-
Notifications
You must be signed in to change notification settings - Fork 38
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
add validation to reqs arg in cluster install pkgs method #1815
base: main
Are you sure you want to change the base?
Conversation
665c7eb
to
54c1d7b
Compare
@@ -832,6 +832,8 @@ def install_packages( | |||
>>> cluster.pip_install(reqs=["accelerate", "diffusers"]) | |||
>>> cluster.pip_install(reqs=["accelerate", "diffusers"], conda_env_name="my_conda_env", override_remote_version=True) | |||
""" | |||
reqs = [reqs] if isinstance(reqs, str) else reqs |
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.
could we update the type checking in the function arg too? Union[str, List[str]]
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.
Also added support for passing a single rh.Package
instance (and not a list of rh.Package
instances).
54c1d7b
to
61ed5f5
Compare
61ed5f5
to
5f01b75
Compare
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.
actually do you think we could hold off on this change? there's a couple things
- with the addition of
pip_install
,conda_install
, etc, it may make sense to eventually turninstall_packages
internal facing, in which case we might not need to update the signature - on that note, if we want to support single packages it probably makes more sense to do it inside those more specific functions, which can be more vague (vs
install_packages
does indicate plural) - I don't think we need to support
Package
input type for the individual functions, those should be abstracted away internally and push users towards just using strings rather than constructing packages. - and given the new direction, maybe we'll end up adjusting these APIs too so I think we can keep this in mind but no need to implement it now?
No description provided.