def download_model(workspace, path_on_data_store, target_path='.', overwrite=True): blob_data_store = Datastore.get_default(workspace) number_of_files_successfully_downloaded = blob_data_store.download(target_path=target_path, prefix=path_on_data_store, overwrite=overwrite) if number_of_files_successfully_downloaded == 0: print('there is no model downloaded') else: print('model is downloaded to the directory of {}'.format(target_path))
# this is the URL to the CSV file containing the connected car component descriptions cardata_url = ('https://quickstartsws9073123377.blob.core.windows.net/' 'azureml-blobstore-0d1c4218-a5f9-418b-bf55-902b65277b85/' 'quickstarts/connected-car-data/connected-car_components.csv') cardata_ds_name = 'connected_car_components' cardata_ds_description = 'Connected car components data' embedding_dim = 100 training_samples = 90000 validation_samples = 5000 max_words = 10000 run = Run.get_context() ws = run.experiment.workspace ds = Datastore.get_default(ws) #------------------------------------------------------------------- # # Process GloVe embeddings dataset # #------------------------------------------------------------------- # The GloVe embeddings dataset is static so we will only register it once with the workspace print("Downloading GloVe embeddings...") try: glove_ds = Dataset.get_by_name(workspace=ws, name=glove_ds_name) print('GloVe embeddings dataset already registered.') except:
def __init__(self, ws, service_name, model_name): self.__ws = ws self.__service_name = service_name self.__model = Model(self.__ws, name=model_name) self.__datastore = Datastore.get_default(ws)