Spaces:
Running
Running
File size: 1,242 Bytes
9c84f9d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | from abc import ABC, abstractmethod
from solar_eval.models.sample import EvalSample
from solar_eval.providers.base import BaseProvider
class BasePipeline(ABC):
@abstractmethod
async def run(
self,
sample: EvalSample,
*,
prompts: str,
provider: BaseProvider,
model: str,
temperature: float = 0.0,
max_tokens: int = 8000,
reasoning_effort: str | None = None,
messages: list[dict[str, str]] | None = None,
) -> EvalSample:
"""`sample.input` ์ ์ฝ์ด `sample.output` ์ ์ฑ์ฐ๊ณ ๋๋๋ ค์ค๋ค.
๋ฉํฐ์คํ
ํ์ดํ๋ผ์ธ์ ์คํ
๋ง๋ค `sample.output` ์ ๋ฎ์ด์ฐ๋ฉด์
`sample.artifacts["step_outputs"]` ์ {์คํ
์ด๋ฆ: ๊ทธ ์คํ
์งํ output} ์
๋์ ํ๋ค. usage/timing ๋ฉํ๋ฐ์ดํฐ๋ `sample.artifacts["usage"]` /
`sample.artifacts["inference_time_ms"]` ์ ๋ด๋๋ค.
Args:
sample: ์ฑ์ธ ์ํ. `sample.input` ์ด ํ์ดํ๋ผ์ธ ์
๋ ฅ์ด๋ค.
prompts: single-step ์ ์์คํ
ํ๋กฌํํธ. multi-step ์ ์คํ
๋ณ
ํ๋กฌํํธ๊ฐ ์์ฑ์์์ ์ด๋ฏธ ์ฃผ์
๋ผ ์์ด ์ด ์ธ์๋ฅผ ์ฐ์ง ์๋๋ค.
"""
...
|