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

Commit 8674901

Browse files
committed
Add test for text-generation pipeline
1 parent 0ae6aa7 commit 8674901

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright (c) 2021 - present / Neuralmagic, Inc. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing,
10+
# software distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
import pytest
16+
from deepsparse import Pipeline
17+
18+
19+
@pytest.fixture(scope="session")
20+
def model_stub():
21+
return (
22+
"zoo:nlg/text_generation/codegen_mono-350m/pytorch/"
23+
"huggingface/bigpython_bigquery_thepile/base-none"
24+
)
25+
26+
27+
@pytest.mark.smoke
28+
def test_aggregation_strategy():
29+
pipeline = Pipeline.create(
30+
task="text_generation",
31+
model_path=model_stub,
32+
max_generated_tokens=32,
33+
prompt_processing_sequence_length=1,
34+
)
35+
36+
pipeline(sequences="def fib():")

0 commit comments

Comments
 (0)