我已经成功地使用Hyperdrive在Azure Machine Learning Service上训练了一个模型,该模型现在已经生成了一个hyperdrive运行实例
hyperdrive_run = exp.submit(config=hypertune_config)
hyperdrive_run
best_run = hyperdrive_run.get_best_run_by_primary_metric()作为下一步,我想在向模型添加描述的同时注册模型:
pumps_rf = best_run.register_model(model_name='pumps_rf', model_path='outputs/rf.pkl')在我的Azure门户上的AML Workspace的Models部分中有一个description列,但是register_model方法似乎没有description标志。那么,我如何向模型添加描述,以便在Azure门户中看到它?
发布于 2019-02-20 21:15:17
问得好:)。
查看当前版本的应用程序接口,看起来您不能使用Run.register_model添加描述,如确认的by the docs。
但是,您可以通过使用Model.register方法注册模型来绕过此问题,幸运的是,该方法包含了description的一个参数作为详细的here。在您的情况下,您还需要首先执行download the files。
简而言之,使用像这样的东西:
best_run.download_file('outputs/rf.pkl', output_file_path='./rf.pkl')
Model.register(workspace=ws, model_path='./rf.pkl', model_name="pumps_rf", description="There are many models like it, but this one is mine.")发布于 2021-03-27 21:58:51
嗨,我发现了同样的问题,我解决了这个问题:How to register model from the Azure ML Pipeline Script step
这很奇怪,因为它没有在任何官方示例中列出。
https://stackoverflow.com/questions/54757598
复制相似问题