Skip to content

Commit

Permalink
Move FewShotEvaluator to contrib
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 599740160
  • Loading branch information
Conchylicultor authored and The kauldron Authors committed Jan 19, 2024
1 parent bb46d07 commit 48b5bc9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 338 deletions.
1 change: 0 additions & 1 deletion kauldron/evals/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

from kauldron.evals.evaluators import Evaluator
from kauldron.evals.evaluators import EvaluatorBase
from kauldron.evals.fewshot_evaluator import FewShotEvaluator

# RunStrategy are available in both XM and Kauldron side
from kauldron.xm._src.run_strategies import RunEvery
Expand Down
337 changes: 0 additions & 337 deletions kauldron/evals/fewshot_evaluator.py

This file was deleted.

8 changes: 8 additions & 0 deletions kauldron/kd.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
pytest.register_assert_rewrite('kauldron.utils.assert_utils')
del pytest, sys

from etils import epy as _epy

# Namespaces
from kauldron import checkpoints as ckpts
from kauldron import data
Expand All @@ -51,6 +53,12 @@
# Register the default `ConfigDict` overwrites
from kauldron.xm._src import default_values as _default_values

# Import contrib at the end as they can use all

with _epy.lazy_imports(
):
from kauldron import contrib # pylint: disable=g-bad-import-order # pytype: disable=import-error

# TODO(epot): This could be optional for the top-level module
# Automated documentation info
# See: https://github.com/conchylicultor/sphinx-apitree
Expand Down
2 changes: 2 additions & 0 deletions kauldron/modules/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class Rearrange(nn.Module):
"""Wrapper around `einops.rearrange` for usage e.g. in `nn.Sequential`.
Example:
```
cfg.model = kd.nn.Sequential(
inputs="batch.image",
Expand Down Expand Up @@ -93,6 +94,7 @@ class Reduce(nn.Module):
"""Wrapper around `einops.reduce` for usage e.g. in `nn.Sequential`.
Example:
```
cfg.model = kd.nn.Sequential(
inputs="batch.image",
Expand Down

0 comments on commit 48b5bc9

Please sign in to comment.