#Checking chuster available or create new cluster
aml_name = 'cpu-cluster'
try:
    aml_compute = AmlCompute(ws, aml_name)
    print('Found existing AML compute context.')
except:
    print('Creating new AML compute context.')
    aml_config = AmlCompute.provisioning_configuration(vm_size=vm_size,
                                                       min_nodes=min_nodes,
                                                       max_nodes=max_nodes)
    aml_compute = AmlCompute.create(ws,
                                    name=aml_name,
                                    provisioning_configuration=aml_config)
    aml_compute.wait_for_completion(show_output=True)

#list of experiment with you have created in your workspace
from azureml.core.experiment import Experiment
list_experiments = Experiment.list(ws)
list_experiments

import azurerm
token = azurerm.get_access_token_from_cli()
azurerm.list_subscriptions(token)

#Delete full workspace
ws.delete(delete_dependent_resources=True, no_wait=False)

##Delete your computor cluster
aml_compute.delete()
예제 #2
0
    X=x_df,
    y=y_df,
    compute_target=aml_name,
    run_configuration=run_config,
    iterations=iterations,
    iteration_timeout_minutes=iteration_timeout_minutes,
    primary_metric=primary_metric,
    #n_cross_validations=n_cross_validations,
    preprocess=True)

from azureml.core.experiment import Experiment
experiment = Experiment(ws, 'automl_remote')
remote_run = experiment.submit(automl_config, show_output=True)
best_model, fitted_model = remote_run.get_output()

delete = ws.delete(delete_dependent_resources=False, no_wait=False)

# create a TabularDataset from multiple paths in datastore
datastore_paths = [
    (datastore,
     'D:/Stock_Prediction/AutoML_Azure/stocks_data/stocks_data/2018Q4PredictionTestSet101.csv'
     ),
    (datastore,
     'D:/Stock_Prediction/AutoML_Azure/stocks_data/stocks_data/2018Q4PredictionTestSet10.csv'
     ),
    (datastore,
     'D:/Stock_Prediction/AutoML_Azure/stocks_data/stocks_data/2018Q4PredictionTrainedSet10.csv'
     )
]
stock_ds = Dataset.Tabular.from_delimited_files(path=datastore_paths)