Skip to content

Commit 6b6352e

Browse files
committed
add type hint, simplify method by using abc.abstractmethod
1 parent a32a1c7 commit 6b6352e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/modelgauge/dynamic_sut.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from abc import ABC, abstractmethod
2+
13
from modelgauge.secret_values import InjectSecret
24
from modelgauge.sut import SUT
35

@@ -27,14 +29,14 @@ class DynamicSUT(SUT):
2729
pass
2830

2931

30-
class DynamicSUTMaker:
32+
class DynamicSUTMaker(ABC):
3133

3234
@staticmethod
3335
def get_secrets() -> InjectSecret:
3436
raise NotImplementedError("SUTMaker.get_secrets must be implemented by child classes.")
3537

3638
@staticmethod
37-
def parse_sut_name(name: str):
39+
def parse_sut_name(name: str) -> tuple[str, str, str, str]:
3840
"""A dynamic SUT name looks like hf/nebius/google/gemma-3-27b-it
3941
hf = proxy (passes requests through to...)
4042
provider = nebius (runs model by...)
@@ -71,5 +73,6 @@ def extract_model_name(name: str) -> str:
7173
return model
7274

7375
@staticmethod
76+
@abstractmethod
7477
def find(name: str):
75-
raise NotImplementedError("DynamicSUTMaker.find must be implemented by child classes.")
78+
pass

0 commit comments

Comments
 (0)