Unanswered
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
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", "str"),
OtherField=("OtherField", "str"))
for key, (val, type) in metadatas.items():
outputmodel.set_metadata(key, val, type, )
outputmodel.update_weights(weights_filename="model.pt",
target_filename="model.pt",
auto_delete_file=False,
is_package=True)
outputmodel.wait_for_uploads()
If you remove lines 17-18 and dont't change the metadtata the upload works.
146 Views
0
Answers
one year ago
one year ago