-
Notifications
You must be signed in to change notification settings - Fork 234
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
Python Wheel Install Command #286
base: main
Are you sure you want to change the base?
Conversation
Allows installation of wheels onto databricks clusters by using standard Python setuptools framework. E.g. ``` python setup.py databricks_install --cluster-id abcd --databricks-cli-profile staging ``` will do the following: 1) build wheel 2) use `staging` profile from CLI or throw error with instructions to configre 3) upload it to DBFS location (configurable as well) 4) install it on cluster `abcd` as `whl` library TODO: 1) wait until library is successfully installed or throw error 2) install library on cluster by name 3) install library on clusters by tag (e.g. team tags)
Codecov Report
@@ Coverage Diff @@
## master #286 +/- ##
==========================================
- Coverage 83.53% 83.45% -0.09%
==========================================
Files 33 34 +1
Lines 2211 2266 +55
==========================================
+ Hits 1847 1891 +44
- Misses 364 375 +11
Continue to review full report at Codecov.
|
Once this functionality is ready, we can change our https://docs.databricks.com/dev-tools/ci-cd.html doc from
to As mentioned by @ccstevens, this is for cluster-wide libraries and not for notebook-scoped libraries. CI/CD processes don't make sense for latter. |
('cluster-id=', None, "cluster id to distribute it", None), | ||
('cluster-tag=', None, "cluster tag to install library", None), | ||
('cluster-name=', None, "cluster name to distribute it", None), | ||
('databricks-cli-profile=', None, "Databricks CLI profile name", None), |
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.
I think we should have a overwrite flag to be consistent with the databricks fs commands.
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.
to overwrite a wheel? makes perfect sense.
what do you think about profile flag - maybe shorten it to --profile
as well? so the command will be something like python setup.py databricks_install --cluster-id abcd --profile staging --owerwrite
|
||
def _install_library(self, artifact): | ||
api_client = self._configure_api() | ||
if self.cluster_tag: |
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.
Can we remove the options if they don't work?
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.
i'm about to add logic in next commit
@nfx Do you want to merge this, or functionality similar to this, or should I take the request for review as an FYI? |
Allows installation of wheels onto databricks clusters by using standard Python setuptools framework - through setup.py distutils.command entry point. E.g.
will do the following automatically:
staging
profile from CLI or throw error with instructions to configreabcd
aswhl
libraryTODO:
References:
https://setuptools.readthedocs.io/en/latest/setuptools.html#adding-commands
https://books.google.nl/books?id=9G9zX_jf1f8C&pg=PT236&lpg=PT236&dq=entry_points+distutils.commands&source=bl&ots=_4deWhAJIf&sig=ACfU3U0LgNjqMdOVTc2zNbdwpWlNr43xkg&hl=en&sa=X&ved=2ahUKEwjzl9TFnsjoAhVNDewKHSlkDUgQ6AEwA3oECAsQKA#v=onepage&q=entry_points%20distutils.commands&f=false