-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect prefixes
when indexing checkpoints that have no tags
#39
Comments
Possible solutions:
|
Is this only a problem when If it does work correctly for |
It is still incorrect for |
But maybe I see where you are going - a solution is
|
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 |
If I save a checkpoint called "Forecasters.predicted" in
example/path
without tags, the filepath isexample/path/Forecasters/predicted.jlso
.This
IndexEntry
constructor assumes that prefixes are those paths segments which do not contain "=", i.e. are not tags. However, when there are no tags in the first place, all path segments will be included in this operation, becausefirst_tag_ind
defaults to 1:Checkpoints.jl/src/indexing.jl
Lines 24 to 27 in f380d77
MWE:
The text was updated successfully, but these errors were encountered: