register_model on complete?
I am registering my model bestmodel that has been created with a pipeline using the function register_model. Before I was successful in doing so, I encountered the error triggered by ModelPathNotFoundException:
azureml.exceptions._azureml_exception.ModelPathNotFoundException: ModelPathNotFoundException:
Message: Could not locate the provided model_path outputs/models/bestmodel.joblib in the set of files uploaded to the run: ['azureml-logs/55_azureml-execution-tvmps_0ec849c2de7fdc379ec009e6b1c1051c3ff191ec6aec38ecea4d0adc621b5ea4_d.txt', 'azureml-logs/65_job_prep-tvmps_0ec849c2de7fdc379ec009e6b1c1051c3ff191ec6aec38ecea4d0adc621b5ea4_d.txt', 'azureml-logs/70_driver_log.txt', 'azureml-logs/process_info.json', 'azureml-logs/process_status.json', 'logs/azureml/81_azureml.log', 'logs/azureml/dataprep/backgroundProcess.log', 'logs/azureml/dataprep/backgroundProcess_Telemetry.log', 'logs/azureml/executionlogs.txt', 'logs/azureml/job_prep_azureml.log', 'logs/azureml/sidecar/tvmps_0ec849c2de7fdc379ec009e6b1c1051c3ff191ec6aec38ecea4d0adc621b5ea4_d/all.log', 'logs/azureml/sidecar/tvmps_0ec849c2de7fdc379ec009e6b1c1051c3ff191ec6aec38ecea4d0adc621b5ea4_d/task.enter_contexts.log', 'logs/azureml/stderrlogs.txt', 'logs/azureml/stdoutlogs.txt', 'outputs/checkpoints/bestmodel.ckpt'] See https://aka.ms/run-logging for more details.
This error occurred despite bestmodel.joblib being available in the folder outputs/models. I realized that the error likely occurred because the model was not "uploaded" yet in the output/ folder. Thus, calling run.register_model(...) right after the model creation would fail. I solved this issue by including a wait time in my script (it can take up to 30 s for a small-size model).
Would it be possible to have a function to register the model when all the underlying/housekeeping processes have completed? I am thinking about a function such as register_on_complete that would register the model when that is available in the compute instance folder.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 2e24ac95-7027-6a3c-81e6-f20cc4415219
- Version Independent ID: 9498cdc2-0d04-39a3-08ce-ef9ea8f2d153
- Content: azureml.core.run.Run class - Azure Machine Learning Python
- Content Source: AzureML-Docset/stable/docs-ref-autogen/azureml-core/azureml.core.run.Run.yml
- Service: machine-learning
- Sub-service: core
- GitHub Login: @DebFro
- Microsoft Alias: debfro
Hi, thanks for the feedback. We will track this feature request, but currently don't have any ETA for when the work will be scheduled