cancel
Showing results for 
Search instead for 
Did you mean: 
Machine Learning
Dive into the world of machine learning on the Databricks platform. Explore discussions on algorithms, model training, deployment, and more. Connect with ML enthusiasts and experts.
cancel
Showing results for 
Search instead for 
Did you mean: 

Specify extras of library in asset bundles yml file

pablobd
Contributor II

Hello,

I am using asset bundles to build, deploy, create a cluster and install a package in it. The package comes with some extra dependencies that I also want to include in the cluster. Do you know how to specify this extras in the databricks.yml file? Right now I have this:

resources:
  jobs:
  train:
    name: train-ml
    tasks:
      - task_key: train-ml
        existing_cluster_id: ****
        spark_python_task:
        python_file: "pipelines/train.py"
    libraries:
        - whl: ./dist/*.whl
1 REPLY 1

jessysantos
Databricks Employee
Databricks Employee

Hello @pablobd!

Have you tried declaring these additional dependencies of your wheel file before the wheel file itself? Here's an example snippet for clarification:

resources:
  jobs:
  train:
    name: train-ml
    tasks:
      - task_key: train-ml
        existing_cluster_id: ****
        spark_python_task:
        python_file: "pipelines/train.py"
    libraries:
        - pypi:
          package: dependency-1==0.0.1
        - pypi:
          package: dependency-2==0.0.2
        - whl: ./dist/*.whl

You can learn more about how to declare Databricks Asset Bundles library dependencies in this following doc: https://docs.databricks.com/en/dev-tools/bundles/library-dependencies.html#databricks-asset-bundles-...

Best Regards,
Jéssica Santos


Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group