Is this still the best way? Is not working for me 😞
Well I figured it out, thats what your -
was for :D
Will they get ordered ascending or descending?
Good point, I'll check the docs... but I think they do not specify
https://clear.ml/docs/latst/docs/references/sdk/task#taskget_tasks
From the code it seems the ordered is not guaranteed.
You can however pass '-last_update'
: order_by
which will give you the latest updated firsttask_filter = { 'page_size': 2, 'page': 0, 'order_by': ['last_metrics.{}.{}'.format(title, series), '-last_update'] } Task.get_tasks(project_name='examples', task_filter=task_filter)
I'll try to test in a new project. Will they get ordered ascending or descending? Does documentation beside your example exist?
Hi GreasyPenguin14
Sure you can, although a bit convoluted (I'll make sure we have a nice interface 🙂 )import hashlib title = hashlib.md5('epoch_accuracy_title'.encode('utf-8')).hexdigest() series = hashlib.md5('epoch_accuracy_series'.encode('utf-8')).hexdigest() task_filter = { 'page_size': 2, 'page': 0, 'order_by': ['last_metrics.{}.{}'.format(title, series)] } queried_tasks = Task.get_tasks(project_name='examples', task_filter=task_filter)
NastyOtter17 can you provide some more info ?
But now you're talking about the case two Tasks have the same metric, right?
I mean in general, whether the task with the largest metric is first, or smallest, because I'd need largest metric, but to me it seems like smallest metric is first. Can the order be inversed?
Still feels super hacky tho, think it would be nice to have a simplier way or atleast some nice documentation
YES you are absolutely correct, we should add it to the Task interface.
Any chance you add a GitHub issue so we do not forget ?
Still feels super hacky tho, think it would be nice to have a simplier way or atleast some nice documentation 🙂
Thanks for your help!