Skip to content

Make pipeline init interactive with user prompts instead of TODO placeholders#768

Merged
zeiler merged 3 commits intomasterfrom
copilot/fix-767
Sep 9, 2025
Merged

Make pipeline init interactive with user prompts instead of TODO placeholders#768
zeiler merged 3 commits intomasterfrom
copilot/fix-767

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Aug 28, 2025

The clarifai pipeline init command previously created pipeline structures with placeholder values and TODO comments that required manual editing across multiple nested files. This made the initialization process tedious and error-prone.

Changes Made

This PR transforms the pipeline initialization into an interactive experience that prompts users for all required information upfront:

$ clarifai pipeline init
Welcome to Clarifai Pipeline Initialization!
Please provide the following information:
User ID: my-user
App ID: my-app
Pipeline ID [hello-world-pipeline]: awesome-pipeline
Number of pipeline steps [2]: 3
Name for step 1 [stepA]: data-ingestion
Name for step 2 [stepB]: text-processing  
Name for step 3 [stepC]: model-inference

Creating pipeline 'awesome-pipeline' with steps: data-ingestion, text-processing, model-inference

Key Improvements

  • Interactive prompts: Users provide user_id, app_id, pipeline_id, number of steps, and step names during initialization
  • Dynamic step creation: Supports any number of pipeline steps with custom names (defaults to 2 steps: stepA, stepB)
  • Clean generated files: All configuration files contain actual user-provided values instead of placeholder text
  • No manual editing required: Eliminates all TODO comments in configuration files
  • Backward compatibility: Provides sensible defaults so users can accept defaults by pressing Enter

Before vs After

Before: Generated config.yaml with placeholders

pipeline:
  id: "hello-world-pipeline"  # TODO: please fill in
  user_id: "your_user_id"  # TODO: please fill in
  app_id: "your_app_id"  # TODO: please fill in

After: Generated config.yaml with actual values

pipeline:
  id: "awesome-pipeline"
  user_id: "my-user"
  app_id: "my-app"
  step_directories:
    - data-ingestion
    - text-processing
    - model-inference

This change significantly improves the developer experience by providing a streamlined initialization workflow that's ready to use immediately without manual configuration file editing.

Fixes #767.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: zeiler <2138258+zeiler@users.noreply.github.com>
Copilot AI changed the title [WIP] Update the clarifai pipline init to ask the user for user_id and app_id Make pipeline init interactive with user prompts instead of TODO placeholders Aug 28, 2025
Copilot AI requested a review from zeiler August 28, 2025 20:11
- Update the pipeline `id`
- Modify the Argo orchestration spec as needed

2. **Configure pipeline steps**: For each step directory (stepA, stepB):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this number 2 is still valid, the user has to update the logic of each step in it's {step_dir}/1/pipeline_step.py

- Modify the Argo orchestration spec as needed

2. **Configure pipeline steps**: For each step directory (stepA, stepB):
- Edit `config.yaml` and fill in the TODO fields
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the user still has to enter the compute_info they want each step to consume into the config.yaml

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Sep 9, 2025

Code Coverage

Package Line Rate Health
clarifai 43%
clarifai.cli 41%
clarifai.cli.templates 36%
clarifai.client 68%
clarifai.client.auth 67%
clarifai.constants 100%
clarifai.datasets 100%
clarifai.datasets.export 80%
clarifai.datasets.upload 75%
clarifai.datasets.upload.loaders 37%
clarifai.models 100%
clarifai.modules 0%
clarifai.rag 72%
clarifai.runners 52%
clarifai.runners.models 60%
clarifai.runners.pipeline_steps 44%
clarifai.runners.pipelines 80%
clarifai.runners.utils 63%
clarifai.runners.utils.data_types 72%
clarifai.schema 100%
clarifai.urls 60%
clarifai.utils 57%
clarifai.utils.evaluation 67%
clarifai.workflows 95%
Summary 62% (7879 / 12742)

Minimum allowed line rate is 50%

@zeiler zeiler marked this pull request as ready for review September 9, 2025 21:48
@zeiler zeiler merged commit 05eabea into master Sep 9, 2025
11 checks passed
@zeiler zeiler deleted the copilot/fix-767 branch September 9, 2025 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update the clarifai pipline init to ask the user for user_id and app_id

3 participants