Skip to content

Commit

Permalink
Rename configs to it's respective models
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmedsaed committed Aug 1, 2024
1 parent ee376df commit 10cbde6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/fairseq2/recipes/eval/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from fairseq2.logging import get_log_writer
from fairseq2.recipes.cli import Cli, CliGroup, RecipeCommandHandler
from fairseq2.recipes.eval.configs import hf_presets
from fairseq2.recipes.eval.configs import wav2vec2_presets, whisper_presets

log = get_log_writer(__name__)

Expand All @@ -16,7 +16,7 @@ def _add_wav2vev2_asr_eval_cli(group: CliGroup) -> None:

handler = RecipeCommandHandler(
load_wav2vec2_asr_evaluator,
preset_configs=hf_presets,
preset_configs=wav2vec2_presets,
default_preset="librispeech_asr",
)
group.add_command(
Expand Down
2 changes: 1 addition & 1 deletion src/fairseq2/recipes/eval/asr.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from fairseq2.models.sequence import SequenceBatch
from fairseq2.models.wav2vec2.asr import load_wav2vec2_asr_model
from fairseq2.nn.padding import get_seqs_and_padding_mask
from fairseq2.recipes.eval.configs import HFEvalConfig, hf_presets
from fairseq2.recipes.eval.configs import HFEvalConfig, wav2vec2_presets, whisper_presets
from fairseq2.recipes.evaluator import HFEvaluator
from fairseq2.recipes.utils.setup import setup_root_gang
from fairseq2.typing import META, DataType
Expand Down
3 changes: 2 additions & 1 deletion src/fairseq2/recipes/eval/configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ class HFEvalConfig:
"""The name of the model to evaluate."""


hf_presets = ConfigRegistry[HFEvalConfig]()
wav2vec2_presets = ConfigRegistry[HFEvalConfig]()
whisper_presets = ConfigRegistry[HFEvalConfig]()

0 comments on commit 10cbde6

Please sign in to comment.