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
Unanswered
How Do I Get The Parsed Args Object Of A Task? I Ran A Task, Using The Argparser To Set Its Hyperparams. I Now Get The Task Using Task.Get_Task, And I Want To Instantiate An Args Namespace Which Has The Same Values As When The Task Ran The Parsing Code, A


args_string = ['--{} {}'.format(k, v) for k, v in task.get_parameters_as_dict().get('Args', {}).items()] args_strings = [a.replace("'", '').replace("[", '').replace("]", '').replace(",", '') for a in reduce(lambda l, s: l + s.split(' '), args_string, []) if a]and then just parser.parse_args(ars_strings)

It's not even very clean, I could have replaced the multiple replace calls with a regex etc. just a quick hack to work around it.

Actually, I found out that if I use execute_remotely I don't even need this, since the parser arguments are apparently reconstructed. so just instantiating the parser and running parser.parse_args() is enough

  
  
Posted 3 years ago
160 Views
0 Answers
3 years ago
one year ago