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
Is Is Possible To Pass Custom

is is possible to pass custom https://clear.ml/docs/latest/docs/configs/env_vars/ to ClearML agents?

  
  
Posted one year ago
Votes Newest

Answers 30


how to display and what to pass are two different things

  
  
Posted one year ago

yes

  
  
Posted one year ago

will it pass variables to the training containers?

  
  
Posted one year ago

we're using os.getenv in the script to get a value for these secrets

  
  
Posted one year ago

agent.extra_docker_arguments: ["-e", "MY_ENV_VAR=foo"]

  
  
Posted one year ago

So maybe that's something I missed? 😞 - Can you send a more complete log so I'll try to find out where this is coming from?

  
  
Posted one year ago

in the agent configuration, use:
agent.hide_docker_command_env_vars.extra_keys: ["DB_PASSWORD"]

  
  
Posted one year ago

add any other keys you want to hide to that list

  
  
Posted one year ago

agent.hide_docker_command_env_vars.extra_keys: ["DB_PASSWORD=password"]

like this? or ["DB_PASSWORD", "password"]

  
  
Posted one year ago

agent.hide_docker_command_env_vars.extra_keys: ["DB_PASSWORD"]

  
  
Posted one year ago

ah, I see, I still keep it in agent.extra_docker_arguments

  
  
Posted one year ago

If you're using docker, you can just add environment variables in the extra_docker_args section

  
  
Posted one year ago

the agent knows which args to look for and to split them on =

  
  
Posted one year ago

right now we can pass github secrets to the clearml agent training containers ( CLEARML_AGENT_GIT_PASS) to install private repos

we need a way to pass secrets to access our database with annotations

  
  
Posted one year ago

you can actually just provide a very large list of all env var names you might use for secrets in agent.hide_docker_command_env_vars.extra_keys , it doesn't matter if you actually usem the or not, the agent will just look for them and hide them when displaying

  
  
Posted one year ago

I guess I could edit docker-compose.yaml

  
  
Posted one year ago

obviously you should replace the passwords with something there 🙂

  
  
Posted one year ago

it works, but it's not very helpful since everybody can see a secret in logs:
Executing: ['docker', 'run', '-t', '--gpus', '"device=0"', '-e', 'DB_PASSWORD=password']

  
  
Posted one year ago

works like a charm!

  
  
Posted one year ago

1.2.3

  
  
Posted one year ago

thank you

  
  
Posted one year ago

Oh, wait, my bad 😆 - you need to tell the agent this env var should be hidden 🙂

  
  
Posted one year ago

this is probably what I need, thanks. I'll check if it works

  
  
Posted one year ago

nice!

  
  
Posted one year ago

DilapidatedDucks58 can you provide an example?

  
  
Posted one year ago

no no, just the env var name

  
  
Posted one year ago

by default the agent will hide the clearml secrets, AWS secrets etc.

  
  
Posted one year ago

DilapidatedDucks58 which ClearML Agent version are you using? I remember adding specific sanitation to the logs for these cases in the latest versions...

  
  
Posted one year ago

it only hides a pre-specified set of args (since most of the time you do want to see the value for non-secrets)

  
  
Posted one year ago

yes, exactly

  
  
Posted one year ago
600 Views
30 Answers
one year ago
one year ago
Tags
Similar posts