Datasets:
Formats:
parquet
Size:
10K - 100K
Tags:
reasoning
Synthetic
procedural-generation
reinforcement-learning
verifiable-rewards
in-context-learning
License:
Download code/smallagi/families/__init__.py from Asilarkness/smallagi-reasoning: direct link, hf CLI and curl.
- Browser
- Download file 1.34 kB
-
https://huggingface.co/datasets/Asilarkness/smallagi-reasoning/resolve/main/code/smallagi/families/__init__.py
- Command line
-
hf download hf://datasets/Asilarkness/smallagi-reasoning/code/smallagi/families/__init__.py
-
curl -L -o __init__.py https://huggingface.co/datasets/Asilarkness/smallagi-reasoning/resolve/main/code/smallagi/families/__init__.py
1.34 kB
| """Family registry: every module in this package that defines a TaskFamily / | |
| InteractiveFamily subclass with a non-empty `name` is picked up automatically. | |
| With `wrapped=True` (default) the +ambush / +pair variants from smallagi.wrappers | |
| are added for every single-turn family that supports them.""" | |
| from __future__ import annotations | |
| import importlib | |
| import pkgutil | |
| import traceback | |
| from ..core import InteractiveFamily, TaskFamily | |
| _BASES = (TaskFamily, InteractiveFamily) | |
| def all_families(errors: dict[str, str] | None = None, wrapped: bool = True) -> dict: | |
| out = _discover(errors) | |
| if wrapped: | |
| from ..wrappers import wrap_all | |
| out.update(wrap_all(out)) | |
| return out | |
| def _discover(errors: dict[str, str] | None) -> dict: | |
| out = {} | |
| for m in pkgutil.iter_modules(__path__): | |
| if m.name.startswith("_"): | |
| continue | |
| try: | |
| mod = importlib.import_module(f"{__name__}.{m.name}") | |
| except Exception: | |
| if errors is not None: | |
| errors[m.name] = traceback.format_exc() | |
| continue | |
| for obj in vars(mod).values(): | |
| if (isinstance(obj, type) and issubclass(obj, _BASES) and obj not in _BASES | |
| and obj.__module__ == mod.__name__ and obj.name): | |
| out[obj.name] = obj() | |
| return out | |