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
I Have A Little Bit Of Code That Goes Like:

I have a little bit of code that goes like:

` import argparse
from clearml import Task

from DeployKit.argument_parser import get_parser
import KitUtils

if name == "main":

task = Task.init(project_name="Deployment", task_name="test_args")
parser = get_parser()
args_ = vars(parser.parse_args())
task.connect(args_)
task.execute_remotely(queue_name="deployment")
print(f"ID -----> {args_['building_id']}") `

Where get_parser is like:
` def get_parser(argv=None):
parser = argparse.ArgumentParser(description="AI Deployment Master Script")

# for training every model
parser.add_argument(
    "-t",
    "--training_setting",
    type=dict,
    default={},
    help="Parameter dictionary for specific training instance",
)
return parser `among other parameters.

Running the first piece of code results in
error: argument -t/--training_setting: invalid dict value: '{}'I'm assuming at some point the clearml code execution goes like python mycode.py -t "{}" which conflicts with the parser

  
  
Posted 3 years ago
Votes Newest

Answers 13


ElegantCoyote26
parser = get_parser() args_ = vars(parser.parse_args()) task.connect(args_)There is no need to connect args_ Task.init will automatically catch the argparser.

  
  
Posted 3 years ago

right, I get the same error SuccessfulKoala55

  
  
Posted 3 years ago

my script is Aborted with the above error

  
  
Posted 3 years ago

sure. Removing the task.connect(args_) does not fix my situation

  
  
Posted 3 years ago

0.17.5rc3

  
  
Posted 3 years ago

Can you try the latest RC, just to make sure?

  
  
Posted 3 years ago

Are you seeing the argparse arguments in the UI (when running locally) ?

  
  
Posted 3 years ago

What is the latest rc?

  
  
Posted 3 years ago

I tested 0.17.2 and 0.17.4

  
  
Posted 3 years ago

great 🙂
two things:
I'm not sure argparse supports dict as a type (I mean it will take anything but I'm not sure it will parse your arguments as dict) I know there was an issue with argparsing, but I think it was solvedbtw: Basically the way clearml-agent works, it does not actually pass the arguments in commandline but directly to the argparser at runtime
What happens if you clone the Task (the one with Args showing and without the explicit task.connect(_args) and send it to the agent ?

  
  
Posted 3 years ago

ElegantCoyote26 what clearml version are you using?

  
  
Posted 3 years ago

AgitatedDove14 can you please help me with this?

  
  
Posted 3 years ago

yes, I can see them

  
  
Posted 3 years ago
958 Views
13 Answers
3 years ago
one year ago
Tags