Data tabular is good now
This commit is contained in:
parent
c6cc9d57a8
commit
1bcb881d3f
|
@ -7,22 +7,22 @@ from azure.ai.ml.entities import Data
|
||||||
from ml_client import create_or_load_ml_client
|
from ml_client import create_or_load_ml_client
|
||||||
|
|
||||||
name_dataset = "diabetes-dataset"
|
name_dataset = "diabetes-dataset"
|
||||||
data_folder = "./data/diabetes.csv"
|
data_folder = "./azuremlpythonsdk-v2/data/diabetes.csv"
|
||||||
|
|
||||||
|
|
||||||
def create_tabular_dataset():
|
def create_tabular_dataset():
|
||||||
# 1. Create or Load a ML client
|
# 1. Create or Load a ML client
|
||||||
ml_client = XXXXX()
|
ml_client = create_or_load_ml_client()
|
||||||
|
|
||||||
# 2. Add files
|
# 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(
|
tab_data_set = Data(
|
||||||
path=XXXXX,
|
path=data_folder,
|
||||||
type=AssetTypes.URI_FILE,
|
type=AssetTypes.URI_FILE,
|
||||||
name=name_dataset,
|
name=name_dataset,
|
||||||
)
|
)
|
||||||
|
|
||||||
ml_client.data.create_or_update(XXXXX)
|
ml_client.data.create_or_update(tab_data_set)
|
||||||
else:
|
else:
|
||||||
print("Dataset already registered.")
|
print("Dataset already registered.")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue