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 Community, Can I Run Multiple Clearml Agent From One Machine??

Hello Community,
Can I run multiple clearml agent from one machine??

  
  
Posted 2 years ago
Votes Newest

Answers 8


the CLEARML_* variables are all explained here: None

  
  
Posted 2 years ago

I'm doing that and it's working well

  
  
Posted 2 years ago

Thank You

  
  
Posted 2 years ago

here's my script:

#!/bin/bash
echo "******************** Starting Agent ********************"
echo "******************** Getting ENV Variables ********************"
source /etc/profile.d/env-vars.sh

# test that we can access the API
echo "******************** Waiting for ${CLEARML_API_HOST} connectivity ********************"
curl --retry 10 --retry-delay 10 --retry-connrefused ${CLEARML_API_HOST}/debug.ping

# start the agent
for i in $(seq 1 ${NUM_WORKERS})
do 
    export CLEARML_WORKER_ID="${AGENT_NAME}:${i}"
    if [[ "$QUEUE" == "services" ]]; then
        echo "******************** Launching Services Worker ${i} ********************"
        echo "Worker ID: ${CLEARML_WORKER_ID}"
        python3 -m clearml_agent daemon \
            --services-mode \
            --queue $CLEARML_QUEUE \
            --create-queue \
            --docker \
            --cpu-only \
            &
    else
        echo "******************** Launching Worker ${i} in ${QUEUE} queue ********************"
        echo "Worker ID: ${CLEARML_WORKER_ID}"
        python3 -m clearml_agent daemon \
            --queue $CLEARML_QUEUE \
            --create-queue \
            --docker \
            --cpu-only \
            &
    fi
done
  
  
Posted 2 years ago

and $QUEUE and $NUM_WORKERS are particular to my setup, but they just give the name of the queue and how many copies of the agent to run

  
  
Posted 2 years ago

You don't even need to set the CLEARML_WORKER_ID, it will automatically assign one based on the machine's name

  
  
Posted 2 years ago

can you give more details what's exactly happening here? what are the env variables and other stuff?

  
  
Posted 2 years ago

the key point is you just loop through the number of workers, set a unique CLEARML_WORKER_ID for each, and then run it in the background

  
  
Posted 2 years ago
1K Views
8 Answers
2 years ago
2 years ago
Tags
Similar posts