MCPcopy Create free account
hub / github.com/JasonLSC/GSCodec_Studio / _strategy_serializer

Function _strategy_serializer

examples/simple_trainer.py:304–308  ·  view source on GitHub ↗
(value: Any, recurse: Callable[[Any], Any])

Source from the content-addressed store, hash-verified

302}
303
304def _strategy_serializer(value: Any, recurse: Callable[[Any], Any]) -> Optional[Any]:
305 if isinstance(value, Strategy):
306 payload = {f.name: recurse(getattr(value, f.name)) for f in fields(value)}
307 return {"type": type(value).__name__, "params": payload}
308 return None
309
310_CONFIG_SERIALIZERS = [_strategy_serializer]
311

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected