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
I Wonder What Is The Best Practice Today To Fetch A Model From Another Task By Models Name Or Id ? Currently, I See This Can Be Done As


Well, it's a little verbose, I agree 🙂
I'm sure you know, but for the community's sake I'll just say it's possible to use a more pythonic syntax instead of the for loop:
model = next(m for m in Task.get_task(training_task_id).get_models()["output"] if m.name == model_name)This will raise StopIteration error if no such model is found, or alternatively:
model = next((m for m in Task.get_task(training_task_id).get_models()["output"] if m.name == model_name), None)Which will return None is not model is found

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