-
Notifications
You must be signed in to change notification settings - Fork 473
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
[Storage Cleaner] Move 1 entry within a run directory #494
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just minor comments
scripts/storage_cleaner.py
Outdated
move_parser.add_argument( | ||
"--entry", | ||
default=None, | ||
help="If provided, moving is restricted to this entry of the run.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a few words here to describe how an --entry
should be specified. For example it looks it should be given as a filename without any other path components?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scripts/storage_cleaner.py
Outdated
src_dest_pairs = [ | ||
src_dest_pair | ||
for src_dest_pair in src_dest_pairs | ||
if Path(src_dest_pair[0]).name == config.entry.rstrip("/") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems a little bit brittle, what about:
if Path(src_dest_pair[0]).name == config.entry.rstrip("/") | |
if str(Path(src_dest_pair[0])).endswith(str(Path(config.entry))) |
Do we warn anywhere if this list comes up empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR adds the option to move a single entry (file or directory) from a run to another location. This can be run in parallel for all entries run to get higher throughput.