Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move FewShotEvaluator to contrib #367

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading