Comments (5)
Ah i see, not a abolute path, but a path that does include the directory that walk was done from
julia> walkpath(p"test/util/") |> collect
3-element Vector{PosixPath}:
p"test/util/Manifest.toml"
p"test/util/Project.toml"
p"test/util/generate_test_data.jl"
So we could strip that out ourself:
julia> [relpath(x, p"test/util") for x in walkpath(p"test/util/")]
3-element Vector{PosixPath}:
p"Manifest.toml"
p"Project.toml"
p"generate_test_data.jl"
But doing that would mean we wouldn't have the path for purposes of actually getting the file.
So maybe we do need a base_dir
argument for IndexEntry
afterall
from checkpoints.jl.
Possible solutions:
- Document the assumption of at least 1 tag
- Add
base_path
as an argument toIndexEntry
so it doesn't have to guess where the base path ends- And maybe: assume that the path given to
index_checkpoint_files
is the longest base path (i.e. checkpoint stuff starts in the first level of subfolders)
- And maybe: assume that the path given to
- Determine the base path as the longest common prefix of all checkpoint paths.
from checkpoints.jl.
Is this only a problem when IndexEntry
is used directly?
If using index_checkpoint_files(dir)
(or index_files
) then I think it works fine?
you pass in the "base_dir" already.
You would call for example: index_checkpoint_files(p"example/path/")
and then any directories under that is either for a tag or for the prefix.
If it does work correctly for index_checkpoint_files
then I think we should document that including directories that are not either part of tags
or prefix
in the call to the IndexEntry
constructor is not defined.
I don't think we should provide a base_path
argument, since it would be exactly as verbose as the user using relpath
themselves
from checkpoints.jl.
It is still incorrect for index_checkpoint_files
and index_files
, because each filepath that it passes to IndexEntry
is an absolute path.
from checkpoints.jl.
But maybe I see where you are going - a solution is index_checkpoint_files
computes a relpath
and passes that to IndexEntry
. In that case I think we should document this:
assume that the path given to index_checkpoint_files is the longest base path (i.e. checkpoint stuff starts in the first level of subfolders)
from checkpoints.jl.
Related Issues (14)
- Documentation link in README does not work HOT 1
- TagBot trigger issue HOT 19
- Change checkpoint to be `checkpoint(name, tags...; data...)` HOT 6
- Making checkpoint a macro HOT 3
- Add examples of using indexing functionality to Readme and docs
- Index checkpoint files incrementally HOT 1
- add checkpoint_fullname(x::IndexEntry)
- `index_files(path::S3Path)` is very slow on large directories HOT 1
- add `checkpoint_basepath(::IndexEntry)`
- Error indexing S3Path with JLSO file at top level
- Remove workaround for relpath with S3Path
- Threadsafe checkpoints
- Introduce `force` argument to JLSOHandler
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from checkpoints.jl.