Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Hey, I Was Planning To Save The Best Trained Model And Get A Task Id For It, So I Could Use It Later As

Hey, I was planning to save the best trained model and get a Task ID for it, so I could use it later as Clearml Task.
` from clearml import Dataset, Task

task = Task.init(project_name='Machine Learning/icon-detector/training',
task_name='icon-detector_training',
task_type=Task.TaskTypes.training,
output_uri=True)
task.execute_remotely()
//// training
//// get the best model
torch.save(model.state_dict(),"best_state_dict.pth")
torch.save(model, "best_mode.pt")
task.upload_artifact('trained_model', 'model_folder/model') I don't know, but in the artifacts ` tab, and there is nothing there!!

  
  
Posted 2 years ago
Votes Newest

Answers 6


👍

  
  
Posted 2 years ago

Thanks for your answer CostlyOstrich36 , but how exactly ?

  
  
Posted 2 years ago

Also, this might be a little stupid sorry, but your torch save command saves the model in the current folder, whereas you give clearml the 'model_folder/model' path instead. Could it be that the path is just incorrect?

  
  
Posted 2 years ago

thanks!

  
  
Posted 2 years ago

Hi 🙂

Please try specifying the file itself explicitly

  
  
Posted 2 years ago

DeliciousSeal67 , something along these lines:
task.upload_artifact('<ARTIFACT_NAME>', artifact_object=os.path.join('<FOLDER>', '<FILE_NAME>'))
So in your case it would be along the lines of
task.upload_artifact('trained_model', 'model_folder/best_mode.pt')

  
  
Posted 2 years ago
1K Views
6 Answers
2 years ago
one year ago
Tags