Fix clearml-task runtime is not set when no queue was provided

This commit is contained in:
allegroai 2023-01-23 14:09:10 +02:00
parent 55b00eb776
commit 5465f27b8f

View File

@ -138,13 +138,14 @@ def cli():
# update Task args
create_populate.update_task_args(args.args)
# noinspection PyProtectedMember
create_populate.task._set_runtime_properties({"_CLEARML_TASK": True})
print('New task created id={}'.format(create_populate.get_id()))
if not args.queue:
print('Warning: No queue was provided, leaving task in draft-mode.')
exit(0)
# noinspection PyProtectedMember
create_populate.task._set_runtime_properties({"_CLEARML_TASK": True})
Task.enqueue(create_populate.task, queue_name=args.queue)
print('Task id={} sent for execution on queue {}'.format(create_populate.get_id(), args.queue))
print('Execution log at: {}'.format(create_populate.task.get_output_log_web_page()))