MachineLearningNotebooks icon indicating copy to clipboard operation
MachineLearningNotebooks copied to clipboard

you may not specify inputs or outputs when running a databricks job on an existing cluster

Open gison93 opened this issue 7 years ago • 14 comments

When building a pipeline with a DatabricksStep passing inputs, outputs and existing_cluster_id I get the following error in the shareableexecutionlogs "Failed to submit job because of error: System.ArgumentException: you may not specify inputs or outputs when running a databricks job on an existing cluster."

gison93 avatar Mar 06 '19 08:03 gison93

Is this expected? Not being able to use parameters is a pretty big limitation.

mcb0035 avatar Jun 28 '19 19:06 mcb0035

@parasharshah @nacharya1 any information for the user?

j-martens avatar Jul 11 '19 22:07 j-martens

Same here

juergstaub avatar Aug 13 '19 13:08 juergstaub

@sanpil @yanrez @parasharshah

j-martens avatar Aug 13 '19 14:08 j-martens

@juergstaub / @mcb0035 / @gison93

Engineering shared this: The only i/o supported for existing clusters are DBFS (https://docs.microsoft.com/en-us/python/api/azureml-core/azureml.data.dbfs_datastore.dbfsdatastore?view=azure-ml-py) azureml.data.dbfs_datastore.DBFSDatastore class - Azure Machine Learning Python A Databricks File System (DBFS) Datastore. docs.microsoft.com​

For other I/O types there is a requirement to configure the cluster to access them which requires a restart of the cluster and we do not want to restart an existing cluster since jobs might be running on them.

cc: @fahdkmsft

j-martens avatar Aug 13 '19 18:08 j-martens

Hopefully this answers your questions. I will proceed to now close this issue. Please reopen if this does not sufficiently clarify things. Thanks!

j-martens avatar Aug 13 '19 18:08 j-martens

Is it possible to configure a cluster for I/O so it does not have to be restarted, then use that cluster instead of creating a new one every time? This would bypass the issue.

On Tue, Aug 13, 2019, 11:23 Josée Martens [email protected] wrote:

@juergstaub https://github.com/juergstaub / @mcb0035 https://github.com/mcb0035 / @gison93 https://github.com/gison93

Engineering shared this: The only i/o supported for existing clusters are DBFS ( https://docs.microsoft.com/en-us/python/api/azureml-core/azureml.data.dbfs_datastore.dbfsdatastore?view=azure-ml-py ) azureml.data.dbfs_datastore.DBFSDatastore class - Azure Machine Learning Python A Databricks File System (DBFS) Datastore. docs.microsoft.com​

For other I/O types there is a requirement to configure the cluster to access them which requires a restart of the cluster and we do not want to restart an existing cluster since jobs might be running on them.

cc: @fahdkmsft https://github.com/fahdkmsft

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Azure/MachineLearningNotebooks/issues/240?email_source=notifications&email_token=ACCFLEJGCIR5CUN7JP2E6K3QEL32PA5CNFSM4G4BMQ32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4GQ6VA#issuecomment-520949588, or mute the thread https://github.com/notifications/unsubscribe-auth/ACCFLEJXLTJB2VFETC5G7RDQEL32PANCNFSM4G4BMQ3Q .

mcb0035 avatar Aug 13 '19 18:08 mcb0035

@mcb0035 - this is indeed possible. Clusters can be pre-configured by the customer to access an I/O path. They have to ensure that they don't pass those paths as inputs or outputs to the DatabricksStep.

j-martens avatar Aug 14 '19 16:08 j-martens

Could you please share pointers to a doc or steps to pre-configure a cluster to an I/O path ?

gitsathish avatar Feb 28 '20 16:02 gitsathish

Does this help? https://aka.ms/pl-databricks.

sanpil avatar Mar 05 '20 17:03 sanpil

@j-martens @sanpil By pre-configure you mean at the time creating the cluster right? What if I have created the cluster outside the azureml notebook and then want to add reference to adls store like below, is there any workaround to achieve that?

adls_datastore = Datastore.get(ws, 'adls')
print(adls_datastore)

adls_input = DataReference(datastore=adls_datastore, path_on_datastore="SampleCDM",
                                   data_reference_name="input")

adls_output = PipelineData("output", datastore=adls_datastore)
notebook_path=os.getenv("DATABRICKS_NOTEBOOK_PATH", "/Shared/test") # Databricks notebook path

dbNbStep = DatabricksStep(
    existing_cluster_id="clusterId",
    name="DBNotebookInWS",
    inputs=[adls_input],
    outputs=[adls_output],
    notebook_path=notebook_path,
    notebook_params={'myparam2': pipeline_param},
    run_name='DB_Notebook_demo',
    compute_target=databricks_compute,
    allow_reuse=False
)

shpraka avatar May 13 '20 14:05 shpraka

@fahdkmsft.

sanpil avatar May 13 '20 23:05 sanpil

I have also faced the DBFS limitation for existing Databricks clusters when I tried to use output data in a DatabricksStep. I am now trying to create a user-defined cluster but I am getting the following error:

Failed to submit job because of error: Invalid spark_conf parameter

Isn't spark_conf a simple dict with key/value Spark configuration variables? I have not found any example trying to set up a custom Databricks cluster so I am not sure what might be wrong. I would appreciate any hint on that matter @j-martens.

Update:

It turns out the = character is not allowed in spark configuration key values (otherwise the spark config parser throws an exception). From my point of view, this should be considered a bug. I moved that key to a Databricks secret as a workaround and that solved the issue.

jarandaf avatar Sep 01 '20 14:09 jarandaf

Is there a working example to refer for "register_dbfs" and how can I use it in DatabricksStep

sidtandon2014 avatar Sep 22 '20 09:09 sidtandon2014