Skip to content

feat: enable publishing pipelines and indexes to deepset AI platfrom #256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 111 commits into from
May 28, 2025

Conversation

faymarie
Copy link
Contributor

@faymarie faymarie commented May 22, 2025

Related Issues

    Usage publishing an index:
    Run `deepset-cloud login` and follow the instructions to authenticate to deepset AI platform.
    
```python
    from haystack import Pipeline
    from deepset_cloud_sdk.workflows import DeepsetSDK, IndexConfig, IndexInputs,
   
    sdk = DeepsetSDK()
    sdk.init()
    
# define your Haystack Pipeline
    pipeline = Pipeline()
   
 # add components to the pipeline and connect them...
 
# define your publish config
   publish_config = IndexConfig(
    name="haystack-index-1",
    inputs=IndexInputs(
        files=["file_classifier.sources"],
    ),
)

    # Option: async execution
    asyncio.run(pipeline.publish_async(pipeline=pipeline, config=publish_config))

   # Option: sync execution
   pipeline_index.publish(config=publish_config)

Proposed Changes?

Allows adding Haystack Pipeline and AsyncPipeline as Pipeline or Index to deepset AI platform as a ymal string.
Adds inputs and outputs.

Secrets, AnswerBuilder, DocumentStores, return values etc will be managed in separate PRs!

How did you test it?

Notes for the reviewer

Screenshots (optional)

Checklist

  • I have updated the referenced issue with new insights and changes
  • If this is a code change, I have added unit tests
  • I've used the conventional commit specification for my PR title
  • I updated the docstrings
  • If this is a code change, I added meaningful logs and prepared Datadog visualizations and alerts

@faymarie faymarie requested a review from a team as a code owner May 22, 2025 08:37
@faymarie faymarie requested a review from ArzelaAscoIi May 22, 2025 08:37
Copy link
Member

@ArzelaAscoIi ArzelaAscoIi left a comment

Choose a reason for hiding this comment

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

looking good already! Some comments about the DX. Looking forward to have this feature!

(Iiiiiif you could add an integration tests that actually pushes a pipeline to the cloud, would be amazing btw.)

Copy link
Contributor

@wochinge wochinge left a comment

Choose a reason for hiding this comment

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

Left more general comments as of now.

In general very good first throw! I especially like the naming (publish, workflows) and it's already fairly intuitive!

Copy link

github-actions bot commented May 23, 2025

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  deepset_cloud_sdk/workflows
  __init__.py
  sdk.py
  deepset_cloud_sdk/workflows/pipeline_client
  __init__.py
  models.py
  pipeline_service.py 32, 40, 86-89, 95, 139-140, 196, 213
Project Total  

This report was generated by python-coverage-comment-action

Marie-Luise Klaus and others added 3 commits May 27, 2025 15:56
Co-authored-by: Agnieszka Marzec <97166305+agnieszka-m@users.noreply.github.com>
Co-authored-by: Agnieszka Marzec <97166305+agnieszka-m@users.noreply.github.com>
Copy link
Member

@ArzelaAscoIi ArzelaAscoIi left a comment

Choose a reason for hiding this comment

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

Looks good!

Copy link
Contributor

@wochinge wochinge left a comment

Choose a reason for hiding this comment

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

A few smaller questions but looks good to me already.

What are the next steps? Secrets & OpenSearch?

faymarie and others added 5 commits May 28, 2025 08:40
Co-authored-by: Agnieszka Marzec <97166305+agnieszka-m@users.noreply.github.com>
Co-authored-by: Agnieszka Marzec <97166305+agnieszka-m@users.noreply.github.com>
Co-authored-by: Agnieszka Marzec <97166305+agnieszka-m@users.noreply.github.com>
Co-authored-by: Agnieszka Marzec <97166305+agnieszka-m@users.noreply.github.com>
@faymarie faymarie enabled auto-merge May 28, 2025 07:13
@faymarie faymarie added this pull request to the merge queue May 28, 2025
Merged via the queue into main with commit 06355dc May 28, 2025
9 checks passed
@faymarie faymarie deleted the feat/support-pipeline-publishing branch May 28, 2025 07:42
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.

4 participants