
Reputation
Badges 1
37 × Eureka!I have an agent running and assigned to the queue megan-testing
:
Run is still marked as "Completed"
Thanks, I'll have a look at the youtube videos. I've been going over the documentation a lot and haven't found much about actually running and deploying pipelines, and a lot of details seem to be missing.
@<1523701070390366208:profile|CostlyOstrich36> here is the INFO section:
For reference for anyone else, this is what I did:
current_task = Task.current_task()
model_run_url = Task.get_task_output_log_web_page(
task_id=current_task.id,
project_id="abc")
I found this issue but not sure if it's the same thing as it's from awhile back: None And the link I'm trying to clone doesn't start with https
but with git@bitbucket
Ok, thanks! Going to try this now. I included an entry point from reading some other messages on Slack here when trying to figure out how to use Docker for running remotely.
Error when executing schedule with a pipeline task ID defined:
Launching job: ScheduleJob(name='Simple Pipeline Schedule Run Test', base_task_id='4cf5b603e3ae4593a8c2dd6c34190c6d', base_function=None, queue='megan_testing', target_project=None, single_instance=False, task_parameters={}, task_overrides={}, clone_task=True, _executed_instances=None, execution_limit_hours=None, recurring=True, starting_time=datetime.datetime(1970, 1, 1, 0, 0), minute=2, hour=None, day=None, weekdays=['mon...
Schedule testing code:
# Schedule for running the pipeline daily
from clearml import Task
from clearml.automation import TaskScheduler
def simple_function():
print('This code is executed in a background thread, '
'on the same machine as the TaskScheduler process')
# add some logic here
print('done')
if __name__ == "__main__":
scheduler = TaskScheduler(force_create_task_name='megan-test-remote-pipeline')
scheduler.add_task(
name='Simple Pipeli...
Hi @<1523701070390366208:profile|CostlyOstrich36> , I've gotten past the environment set up phase - I have the agent running in --services-mode
for the pipeline, but the pipeline step is failing and I can't see why from the error message. When I run this locally it works (ie. if I add PipelineDecorator.run_locally()
).
Environment setup completed successfully
Starting Task Execution:
1710160150496 direct-relief:cpu:0:service:5062dce7ff1d49cfbaf36c96abe3282c DEBUG ClearML res...
I'm just installing the required packages (one of which is an internal package on CodeArtifact).
Hi @<1523701070390366208:profile|CostlyOstrich36> , another quick question, can you run a pipeline on a schedule
or are schedules only for Tasks? We are battling to figure out how to automate the pipelines.
Ah ok, so if I have two steps, this means 3 queues with 3 agents, one for the controller and one each dedicated to the steps, just to confirm?
Thanks, @<1523701070390366208:profile|CostlyOstrich36> .
If I use Task.current_task()
, I then get a task object back that looks like <clearml.task.Task object at 0x7f7723b90a00>
. How does one get the url from this?
I've figured out that this is because I have a config.yaml
file with secrets in it in the repository. This is not committed to git. So, when running remotely, the file is no present. Is the recommendation to put this in the docker image and then I have to specify an entry point in the dockerfile? Previously, I was hoping to just get away with creating a docker image with the installed packages for the agent, not with the repository code as well. Is this not the recommended approach?
I think I found it: None
Will this work for pipelines too, which are also Tasks, right?
Yes, I started the agent in docker mode with clearml-agent daemon --queue direct-relief-forecasting --docker directrelief_ml_clearml --cpu-only -d
I found this issue but not sure if it's the same thing as it's from awhile back: None and also not sure what the final solution here was.
I've tried changing the clearml.conf
file to specify the python_binary
with:
python_binary: "usr/bin/python3"
But, still getting the same error.
Ah, ok thanks so much, I'll work on this now.
Ok, so the image needs ssh in order to clone the repo, not just the server.
This is my dockerfile:
# Use a slim Python image as the base image
FROM python:3.9.9-slim as builder
ARG CODEARTIFACT_AUTH_TOKEN
ARG POETRY_HTTP_BASIC_ARTIFACT_USERNAME
ARG POETRY_HTTP_BASIC_ARTIFACT_PASSWORD
# Set environment variables for Poetry
ENV POETRY_HOME=/opt/poetry \
POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_CREATE=false \
PATH="/opt/poetry/bin:$PATH"\
PYTHONPATH="/ml_pipeline:${...
Oh my word 🙈 Yes, I just saw this just and came back to reply on here. Thank you!
Sorry, was trying to figure out how to do this. So, looks like I can't as get an error NameError: name 'ssh' is not defined
Hi @<1523701205467926528:profile|AgitatedDove14> , thanks for your reply. We want to use the Scheduler
but to run a pipeline. Looking at this example here, it looks like it only works with tasks: None
So, in my code example above, where I have executing_pipeline
as the pipeline function created with the decorator, can this be scheduled to run with the TaskScheduler
, ie. used as the function...
I am using the pipeline id of when I last ran the pipeline and got this through the UI in ClearML.
Also, we use Dagster for orchestration.
This is schedule.py
where the schedule_task_id
is the id for a pipeline that has previously been run and now we want to schedule it:
from clearml import Task
from clearml.automation import TaskScheduler
if __name__ == "__main__":
scheduler = TaskScheduler(force_create_task_name='megan-test-remote-pipeline')
scheduler.add_task(
name='Simple Pipeline Schedule Run Test',
schedule_task_id='94a7e898bb3f4494a31828187710f5bd',
queue='megan_testing',
...