Pipeline management software for clusters.
Agent Success
Agent success rate when using this tile
67%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.05x
Baseline
Agent success rate without this tile
64%
You need to build a data processing pipeline that processes a list of data files through multiple stages. The pipeline should:
Each stage must wait for the previous stage to fully complete before starting.
Implement a workflow that:
Create the following files:
pipeline.py - Main implementation filetest_pipeline.py - Test fileThe workflow should be organized as:
The pipeline should be executable via:
python pipeline.py <job-store> <url1> <url2> <url3>Example:
python pipeline.py file:my-jobstore http://example.com/data1.csv http://example.com/data2.csvProvides workflow orchestration and job dependency management.
Test File: test_pipeline.py
Description: Verify that a pipeline with three input files executes jobs in the correct order.
Test Code:
import tempfile
import os
from pipeline import RootJob
def test_three_file_pipeline():
"""Test pipeline execution order with three files."""
# Create a temporary job store
with tempfile.TemporaryDirectory() as tmpdir:
jobstore = f"file:{tmpdir}"
urls = [
"http://example.com/file1.csv",
"http://example.com/file2.csv",
"http://example.com/file3.csv"
]
# Create and run the root job
root_job = RootJob(urls)
# In a real test, you would start the workflow with Toil.start()
# and capture output to verify execution order
# For this example, we just verify the job was created
assert root_job is not None
assert len(urls) == 3Expected Behavior:
Test File: test_pipeline.py
Description: Verify that a pipeline works correctly with a single input file.
Test Code:
import tempfile
from pipeline import RootJob
def test_single_file_pipeline():
"""Test pipeline execution with a single file."""
with tempfile.TemporaryDirectory() as tmpdir:
jobstore = f"file:{tmpdir}"
urls = ["http://example.com/single.csv"]
root_job = RootJob(urls)
assert root_job is not None
assert len(urls) == 1Expected Behavior:
tessl i tessl/pypi-toil@9.0.0docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10