Closed taruntadikonda closed 2 months ago
@taruntadikonda thanks for your feedback, @azureml-github can you take a look at this issue?
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/azure-ml-sdk @azureml-github.
What type of job is this? Also could you share the debug logs for the download call?
For the SDK, you can enable debug logs by following these steps:
Make sure that when the ml_client is instantiated, the logging_enable parameter is set to "True". For example: ml_client = MLClient(..., logging_enable=True) Just before the call that is failing in the SDK, insert the following code: import logging logging.basicConfig(level=logging.DEBUG)
Attached the log file.
Thanks for the logs, looks like we have a bug to fix for single file. However, right now don't have an ETA for this. Until then please use download all files or you may want to download a single file from Azure ML studio portal.
I'm also affected by this bug.
@banibrata-de As you have closed the issue, is the bug fixed?
This bug still seems to be present ml_client.jobs.download(name=job_name)
downloads all the outputs/logs of the job, but specifying output_name
seems to not download anything
Any updates?
Same issue observed from my side.
Per @banibrata-de's comments above, we'll be closing this as not planned for now. Please use the workaround in the meantime and we will update this issue in the future once a fix is planned and executed.
@diondrapeck So, you will close this ticket without a bug fix? How do you make sure this will ever get fixed?
@0xfabioo A fix for it is not currently planned, so we won't leave an issue open for it. We have internal processes to keep track of items to consider work for in the future. It will be tracked there.
Here's my workaround:
from pathlib import Path
from azure.ai.ml import MLClient
from azure.ai.ml._artifacts._artifact_utilities import download_artifact_from_aml_uri
def _build_aml_file_uri(run_id: str, aml_path: Path) -> str:
base_uri = "azureml://datastores/workspaceartifactstore/ExperimentRun"
uri = f"{base_uri}/dcid.{run_id}/{aml_path}"
return uri
def download_file_from_run(
ml_client: MLClient,
run_id: str,
aml_path: Path,
out_dir: Path,
) -> Path:
uri = _build_aml_file_uri(run_id, aml_path)
download_artifact_from_aml_uri(
uri=uri,
destination=str(out_dir),
datastore_operation=ml_client.jobs._datastore_operations,
)
return out_dir / aml_path.name
Describe the bug Unable to download a file from the outputs which are generated after job is completed.
ml_client.jobs.download(name=job_name)
Using the above code I am able to download all the files which are there in the outputs. And the azure blob path from where it is downloaded is
azureml://datastores/workspaceartifactstore/ExperimentRun/dcid.job_name
When I mention a specific file to download like
ml_client.jobs.download(name=job_name,output_name=file_name)
then is looking at different data store that isazureml://datastores/workspaceblobstore/paths/azureml/job_name/file_name
, But actually the file is in different location.