Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Conversation

@horheynm
Copy link

@horheynm horheynm commented Dec 14, 2023

Description

Adds tests for Pipeline.run_async()

Problem

Testing run_async() currently requires some hacking in tests/server. Isolate Pipeline func's test.

Solution

Simple pipeline running run_async

Usage

    inference_state = InferenceState()
    inference_state.create_state({})
    pipeline_input = IntSchema(value=5)

    pipeline_output = await AddThreePipeline.run_async(
        pipeline_input, inference_state=inference_state
    )

Note

using asyncio-pytest works fine locally, but when Pipelines are registered during pytest collection, it has conflicts
Ex.

INTERNALERROR> RuntimeError: Attempting to register name image_classification as <class 'src.deepsparse.image_classification.pipeline.ImageClassificationPipeline'> however image_classification has already been registered as <class 'deepsparse.image_classification.pipeline.ImageClassificationPipeline'>

So created homemade solution to run asyncio

bfineran
bfineran previously approved these changes Dec 14, 2023
@bfineran bfineran requested a review from dsikka January 8, 2024 16:02
@jeanniefinks
Copy link
Member

Per the main README announcement, DeepSparse is being deprecated by June 2, 2025. Closing the PR as work has been suspended; thank you for the inputs and support!

@jeanniefinks jeanniefinks deleted the v2/pipeline-tests branch May 29, 2025 23:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants