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
Hey, I Would Like My Experiment To Call At Some Point A Cli Program Installed As A Dependency Of The Experiment. Here Is What I Do:

Hey, I would like my experiment to call at some point a CLI program installed as a dependency of the experiment. Here is what I do:
myTask = Task.init(...) import subprocess, shlex subprocess.check_output(shlex.split("my-program arg1 arg2")) # I also tried with shell=TrueBut this fails with FileNotFoundError: [Errno 2] No such file or directory: 'my-program': 'my-program'
my-program is just the entry point to the CLI of another python package I need to use. I tried using shutil.which("my-program") and this returns None: at runtime, in the trains-agent temporary venv I cannot launch the program. I could solve this problem by directly calling the path to this executable (my-program), but I don't know where it is installed. Is there any way to retrieve this path?

  
  
Posted 3 years ago
Votes Newest

Answers 4


It worked like a charm 😱 Awesome thanks AgitatedDove14 !

  
  
Posted 3 years ago

yes, exactly 😄

  
  
Posted 3 years ago

So I'm gusseting the cli will be in the folder of python:
import sys from pathlib2 import Path (Path(sys.executable).parent / 'cli-util-here').as_posix()

  
  
Posted 3 years ago

Hi JitteryCoyote63
Just making sure, the package itself it installed as part of the "Installed packages", and it also installs a command line utility ?

  
  
Posted 3 years ago