-
Notifications
You must be signed in to change notification settings - Fork 3k
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
regression: az ml job stream and download commands do not work in 2.31.0 (do work in 2.30.0) #20712
Comments
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @azureml-github. Issue Details
Describe the bug To Reproduce az ml job download --name '$JOB_NAME' Expected behavior Environment summary Additional context Also opened Microsoft Support Request and ML CLI Team confirmed that has to be issue with CLI itself and that I should raise the issue here.
|
Routing to service team. |
Hi @gro1m, could you include the output when you run your commands with the |
Hi @needuv Traceback (most recent call last):
File "/home/dockeruser/azure-cli-extensions/ml/azext_mlv2/manual/custom/job.py", line 192, in ml_job_stream
ml_client.jobs.stream(name=name)
File "/home/dockeruser/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ml/_operations/job_operations.py", line 304, in stream
self._runs, job_object, self._all_operations.all_operations[AzureMLResourceType.DATASTORE]
File "/home/dockeruser/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ml/_operations/job_ops_helper.py", line 248, in stream_logs_until_completion
_incremental_print(content, processed_logs, current_log, file_handle)
File "/home/dockeruser/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ml/_operations/job_ops_helper.py", line 99, in _incremental_print
fileout.write(line + "\n")
File "/opt/az/lib/python3.6/site-packages/colorama/ansitowin32.py", line 41, in write
self.__convertor.write(text)
File "/opt/az/lib/python3.6/site-packages/colorama/ansitowin32.py", line 162, in write
self.write_and_convert(text)
File "/opt/az/lib/python3.6/site-packages/colorama/ansitowin32.py", line 190, in write_and_convert
self.write_plain_text(text, cursor, len(text))
File "/opt/az/lib/python3.6/site-packages/colorama/ansitowin32.py", line 195, in write_plain_text
self.wrapped.write(text[start:end])
UnicodeEncodeError: 'ascii' codec can't encode character '\u2018' in position 11: ordinal not in range(128)
ERROR: cli: None
DEBUG: cli: Traceback (most recent call last):
File "/home/dockeruser/azure-cli-extensions/ml/azext_mlv2/manual/custom/job.py", line 192, in ml_job_stream
ml_client.jobs.stream(name=name)
File "/home/dockeruser/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ml/_operations/job_operations.py", line 304, in stream
self._runs, job_object, self._all_operations.all_operations[AzureMLResourceType.DATASTORE]
File "/home/dockeruser/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ml/_operations/job_ops_helper.py", line 248, in stream_logs_until_completion
_incremental_print(content, processed_logs, current_log, file_handle)
File "/home/dockeruser/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ml/_operations/job_ops_helper.py", line 99, in _incremental_print
fileout.write(line + "\n")
File "/opt/az/lib/python3.6/site-packages/colorama/ansitowin32.py", line 41, in write
self.__convertor.write(text)
File "/opt/az/lib/python3.6/site-packages/colorama/ansitowin32.py", line 162, in write
self.write_and_convert(text)
File "/opt/az/lib/python3.6/site-packages/colorama/ansitowin32.py", line 190, in write_and_convert
self.write_plain_text(text, cursor, len(text))
File "/opt/az/lib/python3.6/site-packages/colorama/ansitowin32.py", line 195, in write_plain_text
self.wrapped.write(text[start:end])
UnicodeEncodeError: 'ascii' codec can't encode character '\u2018' in position 11: ordinal not in range(128)
DEBUG: cli.azure.cli.core.util: azure.cli.core.util.handle_exception is called with an exception:
DEBUG: cli.azure.cli.core.util: Traceback (most recent call last):
File "/home/dockeruser/azure-cli-extensions/ml/azext_mlv2/manual/custom/job.py", line 192, in ml_job_stream
ml_client.jobs.stream(name=name)
File "/home/dockeruser/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ml/_operations/job_operations.py", line 304, in stream
self._runs, job_object, self._all_operations.all_operations[AzureMLResourceType.DATASTORE]
File "/home/dockeruser/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ml/_operations/job_ops_helper.py", line 248, in stream_logs_until_completion
_incremental_print(content, processed_logs, current_log, file_handle)
File "/home/dockeruser/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ml/_operations/job_ops_helper.py", line 99, in _incremental_print
fileout.write(line + "\n")
File "/opt/az/lib/python3.6/site-packages/colorama/ansitowin32.py", line 41, in write
self.__convertor.write(text)
File "/opt/az/lib/python3.6/site-packages/colorama/ansitowin32.py", line 162, in write
self.write_and_convert(text)
File "/opt/az/lib/python3.6/site-packages/colorama/ansitowin32.py", line 190, in write_and_convert
self.write_plain_text(text, cursor, len(text))
File "/opt/az/lib/python3.6/site-packages/colorama/ansitowin32.py", line 195, in write_plain_text
self.wrapped.write(text[start:end])
UnicodeEncodeError: 'ascii' codec can't encode character '\u2018' in position 11: ordinal not in range(128)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 658, in execute
raise ex
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 721, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 692, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/home/dockeruser/azure-cli-extensions/ml/azext_mlv2/manual/custom/job.py", line 194, in ml_job_stream
log_and_raise_error(err, debug)
File "/home/dockeruser/azure-cli-extensions/ml/azext_mlv2/manual/custom/raise_error.py", line 89, in log_and_raise_error
_raise_cli_error(error)
File "/home/dockeruser/azure-cli-extensions/ml/azext_mlv2/manual/custom/raise_error.py", line 68, in _raise_cli_error
raise CLIError(message)
knack.util.CLIError: 'ascii' codec can't encode character '\u2018' in position 11: ordinal not in range(128)
ERROR: cli.azure.cli.core.azclierror: 'ascii' codec can't encode character '\u2018' in position 11: ordinal not in range(128)
ERROR: az_command_data_logger: 'ascii' codec can't encode character '\u2018' in position 11: ordinal not in range(128)
DEBUG: cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7fb572ea68c8>]
INFO: az_command_data_logger: exit code: 1
INFO: cli.__main__: Command ran in 440.559 seconds (init: 0.125, invoke: 440.434)
INFO: telemetry.save: Save telemetry record of length 3149 in cache
INFO: telemetry.check: Returns Positive.
INFO: telemetry.main: Begin creating telemetry upload process.
INFO: telemetry.process: Creating upload process: "/usr/bin/../../opt/az/bin/python3 /opt/az/lib/python3.6/site-packages/azure/cli/telemetry/__init__.py /home/dockeruser/.azure"
INFO: telemetry.process: Return from creating process
INFO: telemetry.main: Finish creating telemetry upload process. |
Hi @needuv |
@gro1m Can you please try updating az ml extension to the latest version (2.0.7) |
This works in 2.0.7 but breaks again in the newest version 2.1.1 (I am using Az cli version 2.33.1). it failed with a the following error when attempting to download job logs:
|
@bweben Could you verify again, as far as I know it did not work with Azure CLI version 2.33.1 and Azure ML CLI 2.0.7? |
I have the same error: { globalai@SandboxHost-637833806236582481:~$ az ml job download -n 91f47b76-993a-4c19-9910-7c75e5a92a60 Saving blob with prefix ExperimentRun/dcid.91f47b76-993a-4c19-9910-7c75e5a92a60/ was unsuccessful. exception=empty separator |
Hi @Grom1, apologies for the delay. Could you please check the encoding your terminal is using for stdout? You can check it in python by running @hnky, @brandonwatts could you please share your outputs when you run the |
Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you! |
Describe the bug
Cannot stream Azure ML job logs with Azure CLI version 2.31.0 and Azure ML CLI 2.0.3.
To Reproduce
Answer: az ml job stream --name '$JOB_NAME'
ERROR: 'ascii' codec can't encode character '\u2018' in position 11: ordinal not in range(128)
az ml job download --name '$JOB_NAME'
ERROR: This job is in state Preparing. Download is allowed only in states ['Completed', 'Failed', 'Canceled', 'NotResponding', 'Paused']
Expected behavior
No ERROR message, but successful streaming and file downloads. The second error occurs when removing the streaming. So it should actually wait for the job to be finished.
Environment summary
Docker:
Ubuntu 18.04
CLI version: 2.31.0
Shell Type: Bash
ML CLI version: 2.0.3
Additional context
Works with Azure CLI 2.30.0, but we cannot use it due to this issue resolved in 2.31.0:
#20628.
Also opened Microsoft Support Request and ML CLI Team confirmed that has to be issue with CLI itself and that I should raise the issue here.
The text was updated successfully, but these errors were encountered: