jccantre
10/1/2019 - 6:06 PM

Register the Model

# register model 
model = run.register_model(model_name='fwrk', model_path='outputs/fwrk.pkl')
print(model.name, model.id, model.version, sep='\t')

from azureml.core import Workspace
from azureml.core.model import Model
import os 
ws = Workspace.from_config()
model=Model(ws, 'fwrk')

model.download(target_dir=os.getcwd(), exist_ok=True)

# verify the downloaded model file
file_path = os.path.join(os.getcwd(), "fwrk.pkl")

os.stat(file_path)