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 Everyone! I Have A Short Question That You Can For Sure Help Me With. Is There A Way To Avoid Each Task To Create A New Environment? I'D Like To Specify Which Env To Use. I Tried With

👋 Hi everyone!
I have a short question that you can for sure help me with.

Is there a way to avoid each task to create a new environment? I'd like to specify which env to use.
I tried with CLEARML_AGENT_SKIP_PIP_VENV_INSTALL=/path/to/bin/python but it doesn't seem to work

  
  
Posted 2 years ago
Votes Newest

Answers 34


None
This last solution @<1523701205467926528:profile|AgitatedDove14> proposed did the trick!

  
  
Posted 2 years ago

To give more context, he is running an hyper params optimization script, that internally clones a base task and runs it with certain params and checks if a metric increases or decreases. It is when the agent tries to run this task that the error raises.

ERROR: Could not install packages due to an EnvironmentError: [Errno 28] No space left on device
clearml_agent: ERROR: Could not install task requirements!
Command '['~/.clearml/venvs-builds/3.8/bin/python', '-m', 'pip', '--disable-pip-version-check', 'install', '-r', '/tmp/cached-reqsot4de9w6.txt']' returned non-zero exit status 1.

Is it possible that the agent is somehow limiting the space for the environment creation @<1523701087100473344:profile|SuccessfulKoala55> ?
Because if he runs the same command in a console the install works

  
  
Posted 2 years ago

@<1523703080200179712:profile|NastySeahorse61> so glad you managed to solve it 🎊 🚀

  
  
Posted 2 years ago

I don’t see an agent section there 😕
Can you move your current clearml.conf file to another location and run clearml-agent init ?

  
  
Posted 2 years ago

Sure @<1523701087100473344:profile|SuccessfulKoala55> ! Here it is!

  
  
Posted 2 years ago

I agree, but setting the agent’s env variable TMPDIR didn’t seem to have any effect (check the log above, it is still using /tmp )

  
  
Posted 2 years ago

Then the only other option is the /tmp is out of space (pip uses it to uncompress the .whl files, then it deletes them)
wdyt?

  
  
Posted 2 years ago

I had tried adding those environment variables, but not in the agents 🙈

  
  
Posted 2 years ago

agree, but setting the agent’s env variable TMPDIR

I think this needs to be passed to the docker with -e TMPDIR=/new/tmp as additional container args:
see example
None
wdyt?

  
  
Posted 2 years ago

any idea what could be the issue @<1523701087100473344:profile|SuccessfulKoala55> ?

  
  
Posted 2 years ago

and then run my script from terminal normally... (in the case of the environment variable I passed it before the python command)

  
  
Posted 2 years ago

oh sorry my bad, then you probably need to define all OS environment variable for python temp folder for the agent (the Task process itself is a child process so it will inherit it)

TMPDIR/new/tmp TMP=/new/tmp TEMP=/new/tmp clearml-agent daemon ...
  
  
Posted 2 years ago

Hi Lema Gabriel, thank you very much for your answer. I'm just using the defaults... Should I change something in the configuration?
I'll attach my config just in case

  
  
Posted 2 years ago

Thanks so much for all your help @<1523701205467926528:profile|AgitatedDove14> @<1523702868694011904:profile|AbruptCow41> @<1523701087100473344:profile|SuccessfulKoala55>

  
  
Posted 2 years ago

Then this is by default the free space on the home folder (`~/.clearml') that is missing free space

  
  
Posted 2 years ago

oh but he is not using docker

  
  
Posted 2 years ago

Hi @<1523701087100473344:profile|SuccessfulKoala55> . I'm trying to run an optimization task, based on a previous experiment. I ran the agent like this:

 clearml-agent daemon --queue my_queue -d
  
  
Posted 2 years ago

also I suggested to change TMPDIR env variable, since /tmp/ didn’t have a lot of space.

agent.environment.TMPDIR = ****

is it ok to see * ** * instead of the actual path?

  
  
Posted 2 years ago

Thanks again guys!

  
  
Posted 2 years ago

ERROR: Could not install packages due to an EnvironmentError: 
[Errno 28] No space left on device

BTW: @<1523703080200179712:profile|NastySeahorse61> this sounds like docker out of space on the Main disk '/var/` where it stores all the images and temp file systems
This will cause you code to fail as any runtime change to the container file system will raise this out of disk space error

  
  
Posted 2 years ago

oh ok, I was wondering if this could have been an issue:
agent.venvs_cache.free_space_threshold_gb = 2.0

  
  
Posted 2 years ago

Well, the agent actually can't limits this space even if we wanted to 🙂

  
  
Posted 2 years ago

Right, but there is a lot of free space (257 GB) in the home folder

  
  
Posted 2 years ago

How are you using the agent?

  
  
Posted 2 years ago

or add that

  
  
Posted 2 years ago

@<1523703080200179712:profile|NastySeahorse61> / @<1523702868694011904:profile|AbruptCow41>

Is there a way to avoid each task to create a new environment?

You can just define CLEARML_AGENT_SKIP_PYTHON_ENV_INSTALL=1 it will just use whatever you have there (notice it will totally ignore requirements.txt and "installed packages" on the Task)

BTW I would recommend turning on the venv caching, this is per docker/python/packages caching so the next time you are using th exact requirements it just pulls it from the cache and attaches to the container.
Un-comment this line
None

  
  
Posted 2 years ago

@<1523703080200179712:profile|NastySeahorse61> how are you running the agent? What is the command line? And how are you passing the environment variable you mentioned?

  
  
Posted 2 years ago

line 120 says unmark to enable venv caching (it comes commented by default, but since I’m copying my conf it isn’t commented there)

  
  
Posted 2 years ago

can you share your clearml.conf file (remove the critical information first)?

  
  
Posted 2 years ago

Can you share the agent's/task full log when running this task?

  
  
Posted 2 years ago