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
Hello, Is There A Way To Get The List Of Available Variants For A Metric Via The Api?

Hello, is there a way to get the list of available variants for a metric via the API?

  
  
Posted 2 years ago
Votes Newest

Answers 4


this is a snippet of code:
task = Task.get_task('xxx') session = Session() res = session.send(events.GetDebugImageSampleRequest( task=task.id, metric="xxx", variant="xxx") ) print(res.response_data["event"]["url"])

  
  
Posted 2 years ago

Hi RattyLouse61 ,

I think the APIs you're looking for are:
events.get_task_single_value_metrics
and
events.scalar_metrics_iter_histogram
https://clear.ml/docs/latest/docs/references/api/events#post-eventsscalar_metrics_iter_histogram

I can't find documentation for the first one but this is an example for the usage:
{"tasks":["<TASK_ID>"]}
Together the two fetch all the data you see in the UI.
Is this what you're looking for?

  
  
Posted 2 years ago

It would be also good if I could get all the variants for a given task_id and metric

  
  
Posted 2 years ago

RattyLouse61 you can get the task's metrics using events.get_task_metrics , and all.metric/variants for a specific project using projects.get_unique_metric_variants

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