Skip to content

Commit

Permalink
Add docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
albertvillanova committed Dec 13, 2024
1 parent c9cff7b commit f654848
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/lighteval/models/endpoints/endpoint_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 8 additions & 0 deletions src/lighteval/models/endpoints/tgi_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f654848

Please sign in to comment.