Skip to content

Commit fe76616

Browse files
committed
Updates from review and requirements for worker integration
1 parent b08e52a commit fe76616

File tree

4 files changed

+253
-177
lines changed

4 files changed

+253
-177
lines changed

src/guidellm/utils/encoding.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
"Encoder",
4848
"EncodingTypesAlias",
4949
"MessageEncoding",
50+
"MsgT",
51+
"ObjT",
5052
"SerializationTypesAlias",
5153
"Serializer",
5254
]
@@ -327,7 +329,7 @@ def register_pydantic(self, model: type[BaseModel]) -> None:
327329
328330
:param model: Pydantic model class to register for type preservation
329331
"""
330-
key = f"{model.__module__}:{model.__name__}"
332+
key = (model.__module__, model.__name__)
331333
self.pydantic_registry[key] = model
332334

333335
def load_pydantic(self, type_name: str, module_name: str) -> type[BaseModel]:
@@ -338,7 +340,7 @@ def load_pydantic(self, type_name: str, module_name: str) -> type[BaseModel]:
338340
:param module_name: Module containing the class
339341
:return: Loaded Pydantic model class
340342
"""
341-
key = f"{module_name}:{type_name}"
343+
key = (module_name, type_name)
342344

343345
if key in self.pydantic_registry:
344346
return self.pydantic_registry[key]

0 commit comments

Comments
 (0)