Hello @Sagar ,
Here are the ways to create input dataset with uri_file
type and pass it to auto ml classification job.
- As per this documentation you need to pass
Input
type object as training data for automl class, below is the how you create and pass it as training data to classification.
my_training_data_input = Input(
type="uri_file",
path="./data/training-data-folder/your_file.csv" #Paths can be local paths, remote data uris, or a registered AzureML asset ID.
)
classification_job = automl.classification(
compute=compute_name,
experiment_name=exp_name,
training_data=my_training_data_input,
target_column_name="y",
primary_metric="accuracy",
n_cross_validations=5,
enable_model_explainability=True,
tags={"my_custom_tag": "My custom value"},
)
- In portal you can create it, follow below steps.
Next, give a name and select uri_file
Select data source and click on next.
According to data source add your training data files and click on create.
After creating use below code for creating auto ml classification object.
data_asset = ml_client.data.get("<Name given while creating above dataset>", version="1")
input_data = Input(path=data_asset.id)
classification_job = automl.classification(
compute=compute_name,
experiment_name=exp_name,
training_data=input_data ,
target_column_name="y",
primary_metric="accuracy",
n_cross_validations=5,
enable_model_explainability=True,
tags={"my_custom_tag": "My custom value"},
)
Above are the ways to create dataset as uri file, please try it and let us know if you have any query in comments or in private chat.
Thank you