Skip to content

PunctuationCapitalizationModel restoring from checkpoint is not working if a config field model.common_dataset_parameters.label_vocab_dir is set #3561

@PeganovAnton

Description

@PeganovAnton

Describe the bug

If model is being restored from checkpoint path from a config field model.common_dataset_parameters.label_vocab_dir should not be prepended to config fields model.class_labels.punct_labels_file and model.class_labels.punct_labels_file. This because in a checkpoint these labels files are in the root of a checkpoint archive.

Steps/Code to reproduce bug

  1. Create a config provides label ids using model.class_labels.punct_labels_file and model.class_labels.punct_labels_file. model.common_dataset_parameters.label_vocab_dir should not be empty.
  2. Create a .nemo checkpoint for a model created via the config.
  3. Try to restore from the .nemo checkpoint.

Expected behavior

A restoring without errors

Environment overview (please complete the following information)

  • Environment location: Bare-metal
  • Method of NeMo install: pip install nemo_toolkit[all]

Environment details

If NVIDIA docker image is used you don't need to specify these.
Otherwise, please provide:

  • OS version: Ubuntu 20.04.1 LTS
  • PyTorch version: 1.10.2
  • Python version: 3.8.12

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions