Skip to content
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

Viashpy 0.6.0 #20

Merged
merged 22 commits into from
Jan 22, 2024
Merged

Viashpy 0.6.0 #20

merged 22 commits into from
Jan 22, 2024

Conversation

DriesSchaumont
Copy link
Collaborator

@DriesSchaumont DriesSchaumont commented Jan 18, 2024

Closes #18

@DriesSchaumont DriesSchaumont changed the title CI: Use viash-actions/setup for installing viash Viashpy 0.6.0 Jan 22, 2024
Copy link
Member

@rcannood rcannood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Minor question.

viashpy/_run.py Outdated
Comment on lines 82 to 84
[viash_location, "run", config, "--"]
+ _add_cpu_and_memory(args, cpus, memory, "--"),
_add_cpu_and_memory([viash_location, "run", config], cpus, memory, "--")
+ ["--"]
+ args,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI; I think

Suggested change
[viash_location, "run", config, "--"]
+ _add_cpu_and_memory(args, cpus, memory, "--"),
_add_cpu_and_memory([viash_location, "run", config], cpus, memory, "--")
+ ["--"]
+ args,
[viash_location, "run", config, "--"]
+ _add_cpu_and_memory(args, cpus, memory, "---"),

Would also have worked.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, why pass any args at all? Why not just

Suggested change
[viash_location, "run", config, "--"]
+ _add_cpu_and_memory(args, cpus, memory, "--"),
_add_cpu_and_memory([viash_location, "run", config], cpus, memory, "--")
+ ["--"]
+ args,
[viash_location, "run", config, "--"]
+ _add_cpu_and_memory([], cpus, memory, "---")
+ args

Copy link
Collaborator Author

@DriesSchaumont DriesSchaumont Jan 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out I forgot that ---memory can also be used with viash run. viash run builds an executable and everything after -- gets passed to it (including ---memory and ---cpus). Good suggestion! This simplifies thing a bit.

@DriesSchaumont DriesSchaumont merged commit ad2d20a into main Jan 22, 2024
11 checks passed
@DriesSchaumont DriesSchaumont deleted the update_ci branch January 22, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong position of --memory and --cpu when using run_component from config.
2 participants