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, I'M Using Training_Task.Connect() To Manually Connect The Argparse Arguments Into The Task, How Do I Retrieve The Arguments Back ? Also, How Do I Know If I'M Running Remotely Or Locally ?

Hi,
I'm using training_task.connect() to manually connect the argparse arguments into the task, how do I retrieve the arguments back ?
Also, how do I know if I'm running remotely or locally ?

  
  
Posted 11 months ago
Votes Newest

Answers 10


It working, Thanks!

  
  
Posted 11 months ago

It's automatic, you don't need to get anything, simply interact with the argparser as usual (i.e. parse_args() and use the results)

  
  
Posted 11 months ago

So when you connect it (and you're running remotely), it will automatically fill in the values in the parser itself

  
  
Posted 11 months ago

yes

  
  
Posted 11 months ago

And opt is the argparser?

  
  
Posted 11 months ago

training_task.connect(opt, name='opt')

  
  
Posted 11 months ago

How are you calling connect? can you share a snippet of the code?

  
  
Posted 11 months ago

I'm working on an existing code-base, the argparse are named opt instead of args, and the auto connection doesn't work.

I want to connect the argparse manually and load the connected argparse If I'm running on a remote machine.

  
  
Posted 11 months ago

However, note that in most cases you do not need to know if you're running locally or remotely - why do you need to know in this case?

  
  
Posted 11 months ago

Hi @<1571308010351890432:profile|HurtAnt92> , argparse arguments are automatically connected, you do not need to connect them explicitly. They will be available under the Args section of the hyperparams, using:

task.get_parameters()

Also, how do I know if I'm running remotely or locally ?

Use this:

from clearml.config import running_remotely

if running_remotely():
  print("running remotely, not locally!")
  
  
Posted 11 months ago