From f654848f26df03c0a90284c471742b84fdf01cb0 Mon Sep 17 00:00:00 2001 From: Albert Villanova del Moral <8515462+albertvillanova@users.noreply.github.com> Date: Fri, 13 Dec 2024 07:13:28 +0100 Subject: [PATCH] Add docstrings --- src/lighteval/models/endpoints/endpoint_model.py | 8 ++++++++ src/lighteval/models/endpoints/tgi_model.py | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/src/lighteval/models/endpoints/endpoint_model.py b/src/lighteval/models/endpoints/endpoint_model.py index 0bd6cbbc3..1344e2485 100644 --- a/src/lighteval/models/endpoints/endpoint_model.py +++ b/src/lighteval/models/endpoints/endpoint_model.py @@ -111,6 +111,14 @@ def __post_init__(self): @classmethod def from_path(cls, path: str) -> "InferenceEndpointModelConfig": + """Load configuration for inference endpoint model from YAML file path. + + Args: + path (`str`): Path of the model configuration YAML file. + + Returns: + [`InferenceEndpointModelConfig`]: Configuration for inference endpoint model. + """ import yaml with open(path, "r") as f: diff --git a/src/lighteval/models/endpoints/tgi_model.py b/src/lighteval/models/endpoints/tgi_model.py index 00e2c2773..3f20e4a57 100644 --- a/src/lighteval/models/endpoints/tgi_model.py +++ b/src/lighteval/models/endpoints/tgi_model.py @@ -53,6 +53,14 @@ class TGIModelConfig: @classmethod def from_path(cls, path: str) -> "TGIModelConfig": + """Load configuration for TGI endpoint model from YAML file path. + + Args: + path (`str`): Path of the model configuration YAML file. + + Returns: + [`TGIModelConfig`]: Configuration for TGI endpoint model. + """ import yaml with open(path, "r") as f: