mlcommons / mlcommons/algorithmic-efficiency
Wrong return type in librispeech model_fn
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 425
- Forks
- 78
- PR merge metrics
- No merged PRs in 30d
Description
In librispeech_conformer the model_fn returns logits_batch as a Tuple of tensors, not a tensor.
The return type is hence wrong:
https://github.com/mlcommons/algorithmic-efficiency/blob/ddf5efc4e13a9a4e620ad719e9bf42303f064fac/algorithmic_efficiency/workloads/librispeech_conformer/librispeech_pytorch/workload.py#L119
It should be:
def model_fn(...) -> Tuple[Tuple[spec.Tensor, spec.Tensor], spec.ModelAuxiliaryState]:
As insignificant as it seems, this caused me quite some trouble debugging an OOM issue. Might be useful for other ppl too.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open algorithmic_efficiency/workloads/librispeech_conformer/librispeech_pytorch/workload.py around line 119 and inspect model_fn alongside the construction of logits_batch. Confirm the runtime return shape and update the annotation to match it; done means the declared return type represents the tuple and related checks pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100