-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[Example] Fix the ti example problems of sparse matrix demos #3215
Conversation
✔️ Deploy Preview for jovial-fermat-aa59dc canceled. 🔨 Explore the source changes: 0075a51 🔍 Inspect the deploy log: https://app.netlify.com/sites/jovial-fermat-aa59dc/deploys/616d3f3a35ee360007ac4e84 |
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!
Can you open an issue to track this and add a TODO in the comment?
Thanks!
Alternatively if we could only pass |
Thanks!
Sure, I am working on that.
Good Idea! Let me write it to the issue. Thanks! |
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!
@Hanke98 would you mind helping sending a followup fix later as well ;) ? Thanks a lot!
Related issue = #3216 #3116 #3081
When you type
ti example stable_fluid
, it will not run the example successfully:So does the implicit mass-spring demo.
The reason is that the
runpy.run_path
method will pass thesys.argv
which contains the arguments of the command:ti example ...
to the example scripts and some of these arguments will not be recognized by the demos.Here, I use a quick solution: use
ArgumentParser.parse_known_args()
instead ofArgumentParser.parse_args()
.In the long run, I think we should support passing the arguments correctly from the
ti
CLI to examples since some arguments are important to the examples.