Data tabular is good now

This commit is contained in:
Lillian Violet 2024-09-05 10:15:50 +02:00
parent c6cc9d57a8
commit 1bcb881d3f

View file

@ -7,22 +7,22 @@ from azure.ai.ml.entities import Data
from ml_client import create_or_load_ml_client
name_dataset = "diabetes-dataset"
data_folder = "./data/diabetes.csv"
data_folder = "./azuremlpythonsdk-v2/data/diabetes.csv"
def create_tabular_dataset():
# 1. Create or Load a ML client
ml_client = XXXXX()
ml_client = create_or_load_ml_client()
# 2. Add files
if name_dataset not in [XXXXX for env in ml_client.data.list()]:
if name_dataset not in [id for env in ml_client.data.list()]:
tab_data_set = Data(
path=XXXXX,
path=data_folder,
type=AssetTypes.URI_FILE,
name=name_dataset,
)
ml_client.data.create_or_update(XXXXX)
ml_client.data.create_or_update(tab_data_set)
else:
print("Dataset already registered.")