upload_to_datastore
- health_azure.upload_to_datastore(datastore_name, local_data_folder, remote_path, aml_workspace=None, workspace_config_path=None, overwrite=False, show_progress=False)[source]
Upload a folder to an Azure ML Datastore that is registered within a given Workspace. Note that this will upload all files within the folder, but will not copy the folder itself. E.g. if you specify the local_data_dir=”foo/bar” and that contains the files [“1.txt”, “2.txt”], and you specify the remote_path=”baz”, you would see the following paths uploaded to your Datastore: [“baz/1.txt”, “baz/2.txt”]
If not running inside AML and neither a workspace nor the config file are provided, the code will try to locate a config.json file in any of the parent folders of the current working directory. If that succeeds, that config.json file will be used to instantiate the workspace.
- Parameters
datastore_name (
str
) – The name of the Datastore to which the blob should be uploaded. This Datastore itself must be an instance of an AzureBlobDatastorelocal_data_folder (
Path
) – The path to the local directory containing the data to be uploadedremote_path (
Path
) – The path to which the blob should be uploadedaml_workspace (
Optional
[Workspace
]) – Optional Azure ML Workspace objectworkspace_config_path (
Optional
[Path
]) – Optional path to settings for Azure ML Workspaceoverwrite (
bool
) – If True, will overwrite any existing file at the same remote path. If False, will skip any duplicate files and continue to the next.show_progress (
bool
) – If True, will show the progress of the file download
- Return type
None