Hi LovelyHamster1 ,
I had similar issue and used the APIClient
( from clearml.backend_api.session.client import APIClient
).
I cloned a template_task and did some changes, and enqueue it after, here is the code:
` from clearml.backend_api.session.client import APIClient
api_client = APIClient()
BASE_TASK_ID = "MY TASK ID"
Task.get_task
template_task = api_client.tasks.get_by_id(BASE_TASK_ID)
Task.clone
cloned_task = api_client.tasks.clone(task=template_task.id,
new_task_name=f"{template_task.name} from AWS lambda",
new_task_tags=template_task.tags,
new_task_comment=template_task.comment,
new_task_parent=template_task.id if not template_task.parent else template_task.parent,
new_task_project=template_task.project,
)
Do your changes here
.
.
.
Task.enqueue
all_queues = api_client.queues.get_all(name="default", only_fields=["id"])
queue_id = all_queues[0].id
api_client.tasks.enqueue(task=cloned_task.id, queue=queue_id) `I worked with this https://allegro.ai/clearml/docs/rst/references/clearml_api_ref/index.html
I also added a layer with ClearML