MachineLearningNotebooks icon indicating copy to clipboard operation
MachineLearningNotebooks copied to clipboard

register_model on complete?

Open JackCaster opened this issue 5 years ago • 1 comments

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.

JackCaster avatar Jun 09 '21 08:06 JackCaster

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

salilbapat avatar Jul 20 '21 16:07 salilbapat