-
Notifications
You must be signed in to change notification settings - Fork 17
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
added arguments to azuremldataasset for better control of output path #75
base: develop
Are you sure you want to change the base?
Changes from 9 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,22 @@ 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}" | ||
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. We probably need to strip off trailing slashes from 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. I think an URI parsing lib may be overkill. Moreover However, what about 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 |
||
) | ||
|
||
# add the job id to the path (actual value is injected when job is run) | ||
output_path = f"{output_path}/${{{{name}}}}" | ||
|
||
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.
Comment can be removed here