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
Hi Clearml Team, Is There A Way To Overwrite Working_Dir When Creating Task From Task.Init() Workflow? The Underlying Function I Am Triggering Relying On The Assumption On Running From Certain Directory.

Hi clearml team, is there a way to overwrite working_dir when creating task from task.init() workflow? the underlying function I am triggering relying on the assumption on running from certain directory.

  
  
Posted 10 days ago
Votes Newest

Answers 4


What exactly are you trying to achieve ?

Let assume that you have Task.init() in run.py
And run.py is inside /foo/bar/

If you run :

cd /foo
python bar/run.py

Then the Task will have working folder /foo

If you run:

cd /foo/bar
python run.py

Then your task will have the working folder /foo/bar

  
  
Posted 10 days ago

The ultimate goal is to make sure run.py get run under project root directory because the underlying code has this assumption when writing it. Locally pycharm take care of this, but when execute remotely, need to take care of this otherwise it will complain Module Not Found .

A typical project setup I am working with look like this:

project_root/
    |--src/
        |--utilities.py
        |--foo.py
    |--runbooks/
        |--run.py

And typical import look like this, for example in foo.py from src.utilities import something

  
  
Posted 10 days ago

the underlying code has this assumption when writing it

That means that you want to make things work not in a standard Python way ... In which case you need to do "non-standard" things to make it work.
You can do this for example in the beginning of your run.py

import sys
import os
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))

In this way, you not relying on a non-standard feature to be implemented by your tool like pycharm or clearml

  
  
Posted 9 days ago

Thanks! I will give this a try

  
  
Posted 9 days ago
67 Views
4 Answers
10 days ago
9 days ago
Tags