- Notifications
You must be signed in to change notification settings - Fork 24
Added Python-Fire as Default Argument Parser #279
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
Conversation
✅ Deploy Preview for code-generator ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Thanks for the PR @guptaaryan16
|
Because in CI the templates use pre-installed libraries present in |
This is a fix @theory-in-progress is working on. Basically unless you click on all options the templates does not seem to load the options by default. I have covered this in tests and so CI doesn't raise this issue |
…into python-fire
…into python-fire
` in utils.py common template
| ||
def save_config(config): | ||
"""Save configuration to config-lock.yaml for result reproducibility.""" | ||
with open(f"{config.output_dir}/config-lock.yaml", "a+") as f: |
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.
why it is "a+" mode and not "w" ?
return Path(idist.broadcast(config.output_dir, src=0)) | ||
| ||
| ||
def save_config(config): |
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.
let's make it more generic with output_dir parameter:
def save_config(config: Any, output_dir: str):
def save_config(config): | ||
"""Save configuration to config-lock.yaml for result reproducibility.""" | ||
with open(f"{config.output_dir}/config-lock.yaml", "a+") as f: | ||
with open(f"{config.output_dir}/config-lock.yaml", "w+") as f: |
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.
why "w+" ?
Description
Fix #102
I have added python-fire new argument parser in all templates for now. The best part is we can even over-ride the default configuration through cmd itself. For now I have just tested the templates for CPUs only.
Additional context
What is the purpose of this pull request?