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! Is There A Way To Store Env_Vars Or Secrets In Clearml When We Use Remote Agent To Run The Task? Actually I Have Too Many Envs That Are Confidential.

Hi Everyone!

Is there a way to store ENV_VARs or secrets in clearML when we use remote agent to run the task?
Actually I have too many envs that are confidential.

  
  
Posted 5 months ago
Votes Newest

Answers 4


@<1709740168430227456:profile|HomelyBluewhale47> @<1523701070390366208:profile|CostlyOstrich36> any updates here?
Also face same problem, envs that I set in clearml.conf can’t be used when I run agent

  
  
Posted 4 months ago

Hi @<1709740168430227456:profile|HomelyBluewhale47> , you can set it in clearml.conf of the agent in agent.extra_docker_arguments and there you can pass your secrets as env vars

  
  
Posted 5 months ago

and also take a look into development.apply_environment

  
  
Posted 5 months ago

Hi @<1523701070390366208:profile|CostlyOstrich36>
FYI: I’m not using docker agent.

I set the env vars as you mentioned above in config. And I can see the those while starting agent using command: clearml-agent daemon --queue default

While running below code locally eg: python test.py I’m loading the env vars that is working fine.
But my question is when we clone the same task from clearml UI and send it to default queue; So can below piece of code can use those envs?
I tried sending the cloned task to agent but looks like envs are not getting set as it is picking default values. Or is there something that I’m missing.

# test.py

import os

from clearml import Task

# Initialize a ClearML task
task = Task.init(project_name="pl-layoutlm", task_name="Task1", output_uri=False)
logger = task.get_logger()

env1 = os.getenv("MY_ENV1", 'default1')
env2 = os.getenv("MY_ENV2", 'default2')
print(env1)
print(env2)

image
image

  
  
Posted 5 months ago
460 Views
4 Answers
5 months ago
4 months ago
Tags