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
Hello Everyone, How Do I Tell The Agent That It Needs To Install A Local Module Of The Repo? If I Put Git+<Repopath> In The Requirements It Will Install The Module Version In The Repo And Not Necessarily The Version That Launched The Task. I Basically Wan

Hello everyone, how do I tell the agent that it needs to install a local module of the repo?
If I put git+<repoPath> in the requirements it will install the module version in the repo and not necessarily the version that launched the task. I basically want the agent to run pip install -e my_module just before running the main script. I cannot pass this as a extra_docker_shell_script because the repo hasnt been cloned yet

  
  
Posted 2 years ago
Votes Newest

Answers 4


Hi AttractiveCockroach17
In your "Installed Packages" (when the task is in draft mode, you can edit it like any requirements.txt), you need to add:
package @ git+You can also make sure you have in in the first place bu adding
Task.add_requirements("package", "@ git+ ") task = Task.init(...)

  
  
Posted 2 years ago

ok, yes, but this will install the package of the branch specified there.
So If im working on my own branch and want to run an experiment, I would have to manually put in the git path my current branch name. I guess I can add some logic to get the current branch from the env. Thank you

  
  
Posted 2 years ago

ok, yes, but this will install the package of the branch specified there.

Correct

So If im working on my own branch and want to run an experiment, I would have to manually put in the git path my current branch name.

When you say your own branch you mean local (i.e. not pushed to remote git repo) ?

  
  
Posted 2 years ago

ok, yes I mean the branch im working on. I can assume I;ve pushed it. So ill be using something like

def get_package_url() -> str: repo = Repo(Path(__file__).parent) branch_name = repo.active_branch.name remote_url = repo.remote().url return f"git+ssh://{remote_url.replace(':', '/')}@{branch_name}"and
Task.add_requirements("my_package", "@ {get_package_url()}")

  
  
Posted 2 years ago