-
Notifications
You must be signed in to change notification settings - Fork 6
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
Check work_dir
with project check CLI and enforce absolute paths
#15
Conversation
src/jobflow_remote/jobs/submit.py
Outdated
if not resources: | ||
resources = worker_obj.resources | ||
|
||
wf = flow_to_workflow( |
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 was the simplest place to add/"fix" this behavior, as the configured QResources fields need to be mapped before the submission script is created (see #14)
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.
In principle it picks the resources from the worker at runtime:
resources = fw_job_data.task.get("resources") or worker.resources or {} |
Did this not work?
I don't have a strong opinion whether it is better to fix it at creation time or run time, but I would keep only one point where it is set, otherwise it might be confusing.
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.
My bad, after checking again with the new slurm fields, it does indeed work at runtime without this change. I've undone these changes
Thanks for the implementation. I have some questions/concerns about this:
|
No, but it seemed like the more appropriate type hint. It will still be stored as e.g.,
Yep, was going to ask if you wanted this.
👍
Fair enough -- if the expected behaviour is to pass queue-specific stuff in this config, then I can change that back to a raw dict. I think the way it is currently laid out, it will still need the other change that passes the config resources into the flow converter function, but I can verify this first. |
- Delete canary file after use in project check
I've just rebased this PR to remove the initial concern in #14 and instead just contains a few tweaks. Feel free to do what you want with it! |
QResources
and check work_dir
with project check CLIwork_dir
with project check CLI and enforce absolute paths
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.
Thanks a lot for all the updates.
Continuation of my last PR, this closes #14and also adds a task for checking the configuredwork_dir
(c.f. #13). I fell into various pits trying to set mine up (using e.g.,~
,$HOME
or relative dirs did not work, so I changed the config description to force absolute paths).