azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

allow setting timeout for model register

Open ficocesari opened this issue 6 years ago • 13 comments

In COVID19 times we all work form home and network upload speeds are suboptimal. I can't upload a model that is ~500M $az ml model register --name sow2_macro_micro_5_class --model-path models/faster_rcnn_r101_fpn_1x_sow2_5cls_weights --workspace-name "sow2" --resource-group ml {'Azure-cli-ml Version': '1.0.57', 'Error': AzureHttpError('Operation could not be completed within the specified time. ErrorCode: OperationTimedOut\nOperationTimedOutOperation could not be completed within the specified time.\nRequestId:2babcd2a-501e-0099-4f75-fd0e60000000\nTime:2020-03-18T22:35:23.0520830Z')} (base) (venv) federicocesari FedericsarisMBP ~/dev/ml-inference/examples/shell_sow2 $ls -allh models/faster_rcnn_r101_fpn_1x_sow2_5cls_weights/ -rw-r--r-- 1 federicocesari staff 456M Mar 5 14:57 epoch_24.pth -rw-r--r-- 1 federicocesari staff 5.3K Mar 5 16:11 faster_rcnn_r101_fpn_1x_sow2_5cls.py

Would be useful to have a way to set the timeout to something other than 30 secs

This also happens with the python API WARNING - Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', OSError("(32, 'EPIPE')"))': /azureml/LocalUpload/200318T144837-f2bf1d26/faster_rcnn_r101_fpn_1x_sow2_5cls_weights.tar.gz?sv=2019-02-02&sr=b&sig=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%3D&st=2020-03-18T21%3A38%3A38Z&se=2020-03-19T21%3A48%3A38Z&sp=rcw&comp=block&blockid=TURBd01EQXdNREF3TURBd01EQXdNREF3TURBd01EQXdNVEkxT0RJNU1USSUzRA%3D%3D&timeout=30 W

ficocesari avatar Mar 18 '20 22:03 ficocesari

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @azureml-github.

ghost avatar Mar 19 '20 01:03 ghost

thanks for reporting, we'll have a look

yungezz avatar Mar 19 '20 01:03 yungezz

Do you experience this with the most recent version of the AzureML CLI extension? Update instructions here: https://docs.microsoft.com/en-us/azure/machine-learning/reference-azure-machine-learning-cli#update-the-extension

keriehm avatar Mar 19 '20 17:03 keriehm

Updated to latest

$az --version azure-cli 2.2.0

command-modules-nspkg 2.0.3 core 2.2.0 nspkg 3.0.4 telemetry 1.0.4

Extensions: azure-cli-ml 1.1.5

Python location '/opt/miniconda3/bin/python' Extensions directory '/Users/federicocesari/.azure/cliextensions'

Python (Darwin) 3.7.6 (default, Jan 8 2020, 13:42:34) [Clang 4.0.1 (tags/RELEASE_401/final)]

Still happening

DEBUG - Workspace: name: shell-sow2 resource_group: ml location: westus2 subscription_id: b5b12f4b-f282-41e3-b94f-92d6943ab2d2 WARNING - Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', OSError("(32, 'EPIPE')"))': /azureml/LocalUpload/200324T132629-0270daee/faster_rcnn_r101_fpn_1x_sow2_5cls_weights.tar.gz?sv=2019-02-02&sr=b&sig=wUTQhfVSVsPyjRYt7uiDU4N0Y9z4FWALwbdKCxQUYS4%3D&st=2020-03-24T20%3A16%3A30Z&se=2020-03-25T20%3A26%3A30Z&sp=rcw&comp=block&blockid=TURBd01EQXdNREF3TURBd01EQXdNREF3TURBd01EQXhPVGN4TXpJeU9EZyUzRA%3D%3D&timeout=30 WARNING - Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', OSError("(32, 'EPIPE')"))': /azureml/LocalUpload/200324T132629-0270daee/faster_rcnn_r101_fpn_1x_sow2_5cls_weights.tar.gz?sv=2019-02-02&sr=b&sig=wUTQhfVSVsPyjRYt7uiDU4N0Y9z4FWALwbdKCxQUYS4%3D&st=2020-03-24T20%3A16%3A30Z&se=2020-03-25T20%3A26%3A30Z&sp=rcw&comp=block&blockid=TURBd01EQXdNREF3TURBd01EQXdNREF3TURBd01EQXlNelE0T0RFd01qUSUzRA%3D%3D&timeout=30

On Mar 19, 2020, at 10:23 AM, Kevin Riehm [email protected] wrote:

Do you experience this with the most recent version of the AzureML CLI extension? Update instructions here: https://docs.microsoft.com/en-us/azure/machine-learning/reference-azure-machine-learning-cli#update-the-extension https://docs.microsoft.com/en-us/azure/machine-learning/reference-azure-machine-learning-cli#update-the-extension — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Azure/azure-cli/issues/12651#issuecomment-601311144, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZ5Y2DPCUYTW7E5IXPQDJ3RIJIJVANCNFSM4LO4EYVA.

ficocesari avatar Mar 24 '20 20:03 ficocesari

We have filed an intenal bug to make this timeout configurable and have prioritized the fix. Will update the thread with ETA for when this will be available.

salilbapat avatar Apr 01 '20 17:04 salilbapat

Great thanks!

On Apr 1, 2020, at 10:54 AM, Salil Bapat [email protected] wrote:

We have filed an intenal bug to make this timeout configurable and have prioritized the fix. Will update the thread with ETA for when this will be available.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Azure/azure-cli/issues/12651#issuecomment-607399890, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZ5Y2E5E4BNSCGSY2UVVVDRKN5VPANCNFSM4LO4EYVA.

ficocesari avatar Apr 01 '20 18:04 ficocesari

May I know the measured upload speed on your end?

keerthiadu avatar Apr 02 '20 19:04 keerthiadu

~ 10M

On Apr 2, 2020, at 12:39 PM, keerthi kamal adusumilli [email protected] wrote:

May I know the measured upload speed on your end?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Azure/azure-cli/issues/12651#issuecomment-608064443, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZ5Y2DRHYX4ERB4CL532LDRKTSY3ANCNFSM4LO4EYVA.

ficocesari avatar Apr 03 '20 20:04 ficocesari

The file I was uploading was 500M

On Apr 2, 2020, at 12:39 PM, keerthi kamal adusumilli [email protected] wrote:

May I know the measured upload speed on your end?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Azure/azure-cli/issues/12651#issuecomment-608064443, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZ5Y2DRHYX4ERB4CL532LDRKTSY3ANCNFSM4LO4EYVA.

ficocesari avatar Apr 03 '20 20:04 ficocesari

Unfortunately, the timeout parameter is of no significance and is ignored by the blob service when writing to a blobstorage as per https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-Blob-Service-Operations#exceptions-to-default-timeout-interval .

The OperationTimedOut error(as per logs) is coming from the blobstorage service and most likely the error is due to "Calls to write a blob, write a block, or write a page are permitted 10 minutes per megabyte to complete. If an operation is taking longer than 10 minutes per megabyte on average, it will time out."

As the timeout parameter is being ignored, bumping it and/or making it configurable wont help.

One thing we can try is, uploading the file directly from your local machine to azure blobstorage using AZCopy .

https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10 https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-blobs

If you are able to upload the 500 MB file to azure blob storage using AZCopy, then I can come up with a work around on our end.

keerthiadu avatar Apr 06 '20 18:04 keerthiadu

use-azcopy-for-model-upload.py has code snippet for uploading models using azcopy . This workaround is makeshift and future support and compatibility is not guaranteed.

keerthiadu avatar Jul 23 '20 18:07 keerthiadu

#please-close

keerthiadu avatar Jul 23 '20 18:07 keerthiadu