def main(): workspace_name = os.environ['AML_WORKSPACE_NAME'] resource_group = os.environ['RESOURCE_GROUP'] subscription_id = os.environ['SUBSCRIPTION_ID'] spn_credentials = { 'tenant_id': os.environ['TENANT_ID'], 'service_principal_id': os.environ['SPN_ID'], 'service_principal_password': os.environ['SPN_PASSWORD'], } aml_interface = AMLInterface(spn_credentials, subscription_id, workspace_name, resource_group) aml_env = create_aml_environment(aml_interface) aml_interface.register_aml_environment(aml_env)
def main(): storage_acct_name = os.environ['STORAGE_ACCT_NAME'] storage_acct_key = os.environ['STORAGE_ACCT_KEY'] workspace_name = os.environ['AML_WORKSPACE_NAME'] resource_group = os.environ['RESOURCE_GROUP'] subscription_id = os.environ['SUBSCRIPTION_ID'] dbname = os.environ['DBNAME'] user = os.environ['DBUSER'] host = os.environ['DBHOST'] password = os.environ['DBPASSWORD'] port = os.environ['DBPORT'] sslmode = os.environ['DBSSL'] spn_credentials = { 'tenant_id': os.environ['TENANT_ID'], 'service_principal_id': os.environ['SPN_ID'], 'service_principal_password': os.environ['SPN_PASSWORD'], } blob_storage_interface = BlobStorageInterface(storage_acct_name, storage_acct_key) aml_interface = AMLInterface(spn_credentials, subscription_id, workspace_name, resource_group) get_data(host, user, dbname, password, port, sslmode) upload_data(blob_storage_interface) register_dataset('data_new.csv', aml_interface, storage_acct_name, storage_acct_key)
def main(): storage_acct_name = os.environ['STORAGE_ACCT_NAME'] storage_acct_key = os.environ['STORAGE_ACCT_KEY'] workspace_name = os.environ['AML_WORKSPACE_NAME'] resource_group = os.environ['RESOURCE_GROUP'] subscription_id = os.environ['SUBSCRIPTION_ID'] spn_credentials = { 'tenant_id': os.environ['TENANT_ID'], 'service_principal_id': os.environ['SPN_ID'], 'service_principal_password': os.environ['SPN_PASSWORD'], } blob_storage_interface = BlobStorageInterface(storage_acct_name, storage_acct_key) data_creator = get_data() data_creator.upload_data(blob_storage_interface) aml_interface = AMLInterface(spn_credentials, subscription_id, workspace_name, resource_group) aml_interface.register_datastore(TRAINING_CONTAINER, TRAINING_DATASTORE, storage_acct_name, storage_acct_key)
def main(n): # Retrieve vars from env workspace_name = os.environ['AML_WORKSPACE_NAME'] resource_group = os.environ['RESOURCE_GROUP'] subscription_id = os.environ['SUBSCRIPTION_ID'] spn_credentials = { 'tenant_id': os.environ['TENANT_ID'], 'service_principal_id': os.environ['SPN_ID'], 'service_principal_password': os.environ['SPN_PASSWORD'], } aml_interface = AMLInterface( spn_credentials, subscription_id, workspace_name, resource_group ) submit_run(aml_interface,n)
def main(): storage_acct_name = os.environ['STORAGE_ACCT_NAME'] storage_acct_key = os.environ['STORAGE_ACCT_KEY'] workspace_name = os.environ['AML_WORKSPACE_NAME'] resource_group = os.environ['RESOURCE_GROUP'] subscription_id = os.environ['SUBSCRIPTION_ID'] spn_credentials = { 'tenant_id': os.environ['TENANT_ID'], 'service_principal_id': os.environ['SPN_ID'], 'service_principal_password': os.environ['SPN_PASSWORD'], } aml_interface = AMLInterface( spn_credentials, subscription_id, workspace_name, resource_group )
def main(): workspace_name = os.environ['AML_WORKSPACE_NAME'] resource_group = os.environ['RESOURCE_GROUP'] subscription_id = os.environ['SUBSCRIPTION_ID'] spn_credentials = { 'tenant_id': os.environ['TENANT_ID'], 'service_principal_id': os.environ['SPN_ID'], 'service_principal_password': os.environ['SPN_PASSWORD'], } aml_interface = AMLInterface(spn_credentials, subscription_id, workspace_name, resource_group) experiment = get_experiment(aml_interface, AML_EXPERIMENT_NAME) run_id = evaluate(experiment, 'F1_Score') register_model(run_id, experiment)
def main(): workspace_name = os.environ['AML_WORKSPACE_NAME'] resource_group = os.environ['RESOURCE_GROUP'] subscription_id = os.environ['SUBSCRIPTION_ID'] spn_credentials = { 'tenant_id': os.environ['TENANT_ID'], 'service_principal_id': os.environ['SPN_ID'], 'service_principal_password': os.environ['SPN_PASSWORD'], } aml_interface = AMLInterface( spn_credentials, subscription_id, workspace_name, resource_group ) dataset,output_folder=get_test_data(aml_interface) predict_env = set_env() compute_target = aml_interface.workspace.compute_targets[COMPUTE_NAME] parallel_run_config = ParallelRunConfig( source_directory='.', entry_script='score_parallel.py', mini_batch_size='5MB', error_threshold=1, output_action='append_row', append_row_file_name="iris_outputs_new.txt", environment=predict_env, compute_target=compute_target, node_count=1, run_invocation_timeout=600) distributed_csv_iris_step = ParallelRunStep( name='example-iris', inputs=[dataset], output=output_folder, parallel_run_config=parallel_run_config, #arguments=['--model_name', 'model_new.pkl'], allow_reuse=True) run_parallel(distributed_csv_iris_step,aml_interface)
def main(): workspace_name = os.environ['AML_WORKSPACE_NAME'] resource_group = os.environ['RESOURCE_GROUP'] subscription_id = os.environ['SUBSCRIPTION_ID'] spn_credentials = { 'tenant_id': os.environ['TENANT_ID'], 'service_principal_id': os.environ['SPN_ID'], 'service_principal_password': os.environ['SPN_PASSWORD'], } aml_interface = AMLInterface(spn_credentials, subscription_id, workspace_name, resource_group) scoring_script_path = os.path.join(__here__, 'score.py') aml_env = Environment.get(workspace=aml_interface.workspace, name=AML_ENV_NAME) service_name = 'aml-pipeline-deploy-3' inference_config = InferenceConfig(entry_script=scoring_script_path, environment=aml_env) deploy(aml_interface, inference_config, service_name)
def main(): dbname = os.environ['DBNAME'] user = os.environ['DBUSER'] host = os.environ['DBHOST'] password = os.environ['DBPASSWORD'] port = os.environ['DBPORT'] sslmode = os.environ['DBSSL'] #tenent_id=os.environ['TENANT_ID'] resource_group = os.environ['RESOURCE_GROUP'] subscription_id = os.environ['SUBSCRIPTION_ID'] workspace_name = os.environ['AML_WORKSPACE_NAME'] spn_credentials = { 'tenant_id': os.environ['TENANT_ID'], 'service_principal_id': os.environ['SPN_ID'], 'service_principal_password': os.environ['SPN_PASSWORD'], } aml_interface = AMLInterface(spn_credentials, subscription_id, workspace_name, resource_group) #conn_string="""host={0} user={1} dbname={2} password={3} port={4} sslmode={5}""".format(host, user, dbname, password, port, sslmode) get_data(host, user, dbname, password, port, sslmode, aml_interface)