-
Notifications
You must be signed in to change notification settings - Fork 19
added arguments to azuremldataasset for better control of output path #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from 3 commits
d507682
47217de
8d9ec10
deae7c9
ebdc850
dd897d2
0565423
07bb749
1197c48
45eface
dd50aab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -172,12 +172,24 @@ def _get_output(self, name): | |
| if name in self.catalog.list() and isinstance( | ||
| ds := self.catalog._get_dataset(name), AzureMLAssetDataSet | ||
| ): | ||
| output_path = ( | ||
| f"azureml://datastores/{ds._datastore}/paths/{ds._azureml_root_dir}" | ||
| ) | ||
|
|
||
| # versioning system: to be discussed | ||
| output_path = ( | ||
| f"{output_path}/{ds._azureml_dataset}/{ds.resolve_save_version()}" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The main problem I see with this approach is that this hard codes the version in the pipeline specification. This might not be an issue for a single run using Ideally, the versioning would be added to the path when the node is run, but that doesn't look feasible given that the directory has to be empty for Azure ML to accept it. I might be overlooking something, but I now feel that we won't be able to add a sensible implementation of this feature unless Azure ML accepts non-empty output directories... |
||
| ) | ||
|
|
||
| if ds._azureml_type == "uri_file": | ||
| raise ValueError( | ||
| "AzureMLAssetDataSets with azureml_type 'uri_file' cannot be used as outputs" | ||
| ) | ||
| # TODO: add versioning | ||
| return Output(type=ds._azureml_type, name=ds._azureml_dataset) | ||
| output_path = f"{output_path}/{ds._dataset_config[ds._filepath_arg]}" | ||
| # note that this will always create a new version of the dataset, even if we | ||
| # have versioned set to false. | ||
| return Output( | ||
| type=ds._azureml_type, | ||
| name=ds._azureml_dataset, | ||
| path=output_path, | ||
| ) | ||
| else: | ||
| return Output(type="uri_folder") | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably need to strip off trailing slashes from
ds._azureml_root_dir, or use some URI parsing libThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think an URI parsing lib may be overkill. Moreover
datastorecan be equal to${{default_datastore}}and I don't know if that will pose a problem with these libraries.However, what about
ds._azureml_root_dir.strip("/")to remove both leading and trailing slash?Another solution would be to add checks on the parameters on data set creation and throw an error if they don't match the correct format. Actually if we go this route, this is probably something we want to add to the
datastoreandroot_dirparameter as well.