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
I Want To Retrieve The Logged Metrics To Be Able To Save The Best Model From My Training. This Is My Step:

I want to retrieve the logged metrics to be able to save the best model from my training. This is my step:
` trains_logger = Task(...)
args = parse_commandline_args()
model = MyModel(parameters)

for epoch in range(epochs):
model = train_model(model, train_batches)
valid_model(model, valid_batches)

train_logger. ??? during the valid_model I log several metrics like the dice , etc. Their name are something like valid_average_dice_epoch all belong to the Results -> scalars . I just want to select the best validation model given a metric and export it into a pytorch.jit ` is this doable ?

  
  
Posted 3 years ago
Votes Newest

Answers 6


It works well I just need to use the task.id for the task='' I tough I could use the task.name it's perfect thanks AgitatedDove14 .

  
  
Posted 3 years ago

Wow thanks a lot, I'll test it. I didn't even search in trains_agent documentation.

  
  
Posted 3 years ago

Here you go 🙂
(using trains_agent for easier all data access)
from trains_agent import APIClient client = APIClient() log_events = client.events.get_scalar_metric_data(task='11223344aabbcc', metric='valid_average_dice_epoch') print(log_events)

  
  
Posted 3 years ago

Is it possible to get all the iteration for one specific metric ? Lets say I have this metric logged. Will I be able to retrieve these series ?

  
  
Posted 3 years ago

Hi SteadyFox10 , this one will get all the last metric scalars
train_logger.get_last_scalar_metrics()

  
  
Posted 3 years ago

SteadyFox10 With pleasure 🙂
BTW: you can retrieve the Task id from its name with
Task.get_tasks(project_name='my project', task_name='my task name')See https://allegro.ai/docs/task.html?highlight=get_tasks#trains.task.Task.get_tasks

  
  
Posted 3 years ago
544 Views
6 Answers
3 years ago
one year ago
Tags
Similar posts