[Python] How to recreate default queue after accidentally deleting it in ClearML?

Discussão em 'Python' iniciado por Stack, Junho 26, 2025.

  1. Stack

    Stack Membro Participativo

    First time installed the ClearML server and agents on my two PCs. Both server and agents are created via Docker images. After trying to understand how everything works, I accidentally deleted the default queue in webui control panel.

    Immediately after that, my agent containers broke with the following error:

    clearml_agent: ERROR: APIError: code 400/707: No queue is tagged as the default queue for this company


    Unfortunately, I don't see any option to create it again or tag the other existing queue as default in WebUI - see the screenshot:

    WebUI

    There is no direct info on google on this problem and ChatGPT + Claude Sonnet also give some obsolete or non-functional code as a fix, which my ClearML does not recognize:

    from clearml import Task, Queue

    # Connect to ClearML server (use your own API credentials)
    Task.set_credentials(
    api_host="http://your-clearml-server-url:8008",
    web_host="http://your-clearml-server-url:8888",
    api_key="YOUR_ACCESS_KEY",
    secret_key="YOUR_SECRET_KEY"
    )

    # Create or get a queue
    queue_name = "default" # or any other name you'd like
    queue = Queue.get(queue_name) or Queue.create(queue_name)

    # Set the queue as default
    queue.set_default(True)

    print(f"Queue '{queue_name}' is set as default.")


    This code above fails with "Couldn't import Queue module" error...

    Please, help me recreate the default queue...

    Continue reading...

Compartilhe esta Página