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
From Datetime Import Datetime Import Hashlib From Clearml Import Task Previous_Timestamp = 0 Task_Filter = {} Task_Filter.Update( { 'Page_Size': 100, 'Page': 0, 'Status_Changed': ['>{}'.Format(Datetime.Utcfromtimestamp(Previou

` from datetime import datetime
import hashlib
from clearml import Task

previous_timestamp = 0
task_filter = {}
task_filter.update(
{
'page_size': 100,
'page': 0,
'status_changed': ['>{}'.format(datetime.utcfromtimestamp(previous_timestamp)), ],
'project': ['30934984774e476bbc1fedf27b263ed5'],
}
)
queried_tasks = Task.get_tasks(task_name=None, task_filter=task_filter)

print(f'{len(queried_tasks)} tasks')

for task in queried_tasks:
print(task.comment)
print(task.project)
#print(hashlib.md5('Test'.encode('utf-8')).hexdigest()) `See this small code example. I have a project called 'Test', but I have to specify '30934984774e476bbc1fedf27b263ed5' to get all the tasks under the Test project. How do I get from 'Test' to '30934984774e476bbc1fedf27b263ed5'?

  
  
Posted 3 years ago
Votes Newest

Answers 9


👍

  
  
Posted 3 years ago

BTW: get_tasks has project_name argument, I would just use it 🙂

  
  
Posted 3 years ago

GreasyPenguin14 I think this is what you are looking for
Task.get_project_id('project_name')

  
  
Posted 3 years ago

And is there an easy way to get all the metrics associated with a project?

Metrics are per Task, but you can get the min/max/last of all the tasks in a project. Is that it?

  
  
Posted 3 years ago

And is there an easy way to get all the metrics associated with a project?

  
  
Posted 3 years ago

Task.get_projects() 🙂

  
  
Posted 3 years ago

Is there also a method to get all the project names?

  
  
Posted 3 years ago

I was looking for all the metric names, similar as what you get when clicking the '+ metric' in customize columns. But turns out I will implement it in a different way, not needed anymore

  
  
Posted 3 years ago
1K Views
9 Answers
3 years ago
one year ago
Tags