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
Hi! Had A Basic Question: I Want To Retrieve All Tasks Created By A Clearml User Id (Using Task.Get_Tasks() And Filter). Is It Possible To Get User Id Of The Current User Configured In The Clearml.Config Using Clearml Python Api? Thanks In Advanced!

Hi! had a basic question:
I want to retrieve all tasks created by a clearml user ID (using Task.get_tasks() and filter).
Is it possible to get user ID of the current user configured in the clearml.config using clearml python api?
thanks in advanced!

  
  
Posted 2 months ago
Votes Newest

Answers 4


Hi @<1529633468214939648:profile|CostlyElephant1>

Is it possible to get user ID of the current user

On the Task.data object itself there should be a filed named " user " that's the user ID of the owner (creator) of the Task.
You can filter based on this id with

Tasks.get_tasks(..., task_filter={'user': ["user-id-here"]})

wdyt?

  
  
Posted 2 months ago

Yesss!! got the info I needed. Thanks a lot!!

  
  
Posted 2 months ago

I think it is on the JWT token the session gets from the server
a bit of a hack but should work 🙂

session = task.session # or Task._get_default_session() 
my_user_id = session.get_decoded_token(session.token)['identity']['user']
  
  
Posted 2 months ago

Hi @<1523701205467926528:profile|AgitatedDove14> Thanks for your reply.
Is there any way to avoid creating a task to get the user ID?

  
  
Posted 2 months ago
181 Views
4 Answers
2 months ago
2 months ago
Tags