![](/img/trans.png)
[英]How to format the file path in an MLTable for Azure Machine Learning uploaded during a pipeline job?
[英]How give azure machine learning dataset path in an inference script?
我在 Azure Databricks 中使用 azureml sdk。
當我在數據塊單元格中編寫用於推理 model (%%writefile script.py) 的腳本時,我嘗試加載我在 Azure 機器學習數據集中加載的 .bin 文件。
我想在 script.py 中這樣做:
fasttext.load_model(azuremldatasetpath)
如何在 azuremldatasetpath 變量中提供 my.bin 文件的良好數據集路徑? (無需在腳本中調用工作區)。
就像是:
dataset_path = os.path.join(os.getenv('AZUREML_MODEL_DIR'), 'file.bin')
您可以使用您的 model 名稱和Model.get_model_path()方法來檢索本地文件系統上 model 文件的路徑。 如果注冊文件夾或文件集合,則此 API 返回包含這些文件的目錄的路徑。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.