I want to save some data on my OutputModel in order to make it more accessible when I'm using the model. When I use myOuputModel.save_metadata("somekey", "so...
12 months ago
import torch
import torchvision
from clearml import Task, OutputModel
scripted_model = torch.jit.script(torchvision.models.resnet18())
scripted_model.save("model.pt")
task = Task.init(project_name="OutputModelMVE", task_name="Testing shit")
outputmodel = OutputModel(task=task, framework='PyTorch')
outputmodel.update_labels({'Clearml': 0, 'Debug': 1})
outputmodel.set_upload_destination(INSERT DESTINATION)
metadatas = dict(Score=("0.2", "float"),
SomeField=("SomeField",...
Ok, the mistake was staring me in the eye the entire time.
I thought that set_metadata
worked on the local output model. But what it actually does is try to update metadata on the remote. The output model doesn't exist on the remote before you call update_weights
, so you have to set_metadata
after upload.
I'll make one:)