mlcommons / mlcommons/inference

Codebase Refactor: Remove use of eval

Open
#2,513 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.6k
Forks
650
Avg merge
1d 22h
Merged PRs (30d)
6

Description

In general, we should try to reduce our usage of eval and use safer alternatives.

Currently this issue just focuses on these files, but should be expanded as more relevant files are found:

  • language/mixtral-8x7b/evaluate_mbxp.py
  • vision/classification_and_detection/tools/calibrate_torchvision_model.py
  • retired_benchmarks/translation/gnmt/tensorflow/process_accuracy.py

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting eval usage in language/mixtral-8x7b/evaluate_mbxp.py, vision/classification_and_detection/tools/calibrate_torchvision_model.py, and retired_benchmarks/translation/gnmt/tensorflow/process_accuracy.py. Identify safer alternatives for each use and check the affected benchmark workflows; done means these listed files no longer rely on eval without changing their behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.