Skip to content

InterpolationKeyError when fine-tuning FastConformer using params['model']['train_ds'] in ASR tutorial notebook #15609

@MNIKIEMA

Description

@MNIKIEMA

Description

When loading a NeMo configuration (like conformer_ctc_char.yaml) as a standard Python dictionary and attempting to initialize a model using a sub-section of that dictionary (params['model']), OmegaConf fails to resolve absolute interpolations.

Steps/Code to reproduce bug

Run the tutorial notebook ASR_with_NeMo.ipynb up to the Training with PyTorch Lightning section and execute the fine-tuning cell:

from omegaconf import DictConfig
params['model']['train_ds']['manifest_filepath'] = train_manifest
params['model']['validation_ds']['manifest_filepath'] = test_manifest
first_asr_model = nemo_asr.models.EncDecCTCModel(cfg=DictConfig(params['model']), trainer=trainer)

Expected behavior

A clear and concise description of what you expected to happen.

Environment overview (please complete the following information)

  • Environment location: [Cloud(Collab)]

  • Method of NeMo install: [pip install git+https://github.com/NVIDIA/NeMo.git@main#egg=nemo_toolkit[all]].

  • PyTorch 2.9.0+cu126

  • Python 3.12.12

Additional context

The configuration file contains the following interpolation:
labels: '${model.labels}'

When passing DictConfig(params['model']), the new config object's root is the model node. The interpolation searches for a top-level key named model (expecting model.model.labels), which does not exist in the sliced context.

Using the following code works:

from omegaconf import DictConfig, OmegaConf

params['model']['train_ds']['manifest_filepath'] = train_manifest
params['model']['validation_ds']['manifest_filepath'] = test_manifest
conf = OmegaConf.create(params)

first_asr_model = nemo_asr.models.EncDecCTCModel(cfg=conf.model, trainer=trainer)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions