-
Notifications
You must be signed in to change notification settings - Fork 5
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
Switch to Monai Bundle config #10
Conversation
@surajpaib Cannot seem to make the user project import work, even though the same implementation worked before monai bundle config |
I think I understand what the issue is, the |
Here is a working solution for your previous approach
|
@ibro45 I'm thinking of a better way to do this overall, will post when I have an update |
Sorry, didn't see your comments. So, in the meantime i realized we don't need the |
I get why they did it this way though because you want a reference to the function and not call the function itself in many cases. And then be able to call it into your code however you want. For example. if you defined a train, test and val functions, and then want to call them accordingly. |
Managed to get it to behave as it did before monai bundle config. Ready to be merged if you agree. |
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.
Amazing stuff with monai-bundle! Looks good to go, added a comment about a small refactor, let me know if you think it makes sense and I can add a commit to the PR
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.
Looks good to go from me!
This reverts commit 7ec2112.
- switch to monai bundle config - move yaml load function for readability - user project import not working - Functional user project importing, but ugly af - unnecessary import statement - Updated project import with class def - import user project without yaml imports - Cleaned up cli Co-authored-by: Suraj Pai [bspai@bwh.harvard.edu](mailto:bspai@bwh.harvard.edu)
Closes #7.
Still needs to be addressed:
_target_
(opened an issue Parse callables (functions, methods) similarly to objects Project-MONAI/MONAI#5852 ) so I had to find a workaround. This enables passing the cli arguments to the Trainer method that you're running, e.g.--fit#ckpt_path <PATH>
:lighter/lighter/cli.py
Line 17 in 0e26608
Note:
lighter fit --config_file ...
is basically equal topython -m monai.bundle run fit --config_file ...
.Conclusion:
runner
andconfig
modules