AttributeError: 'ModelTask' object has no attribute 'replace_invoke'
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1k
- Forks
- 346
- PR merge metrics
- No merged PRs in 30d
Description
When I run python3 run_benchmark.py test-user-invoke --model alexnet, I get an AttributeError error:
Running TorchBenchModelConfig(name='alexnet', test='eval', device='cuda', batch_size=1, extra_args=[], extra_env=None, output_dir=None, skip=False) ...Traceback (most recent call last):
File "/home/chensichao/benchmark-mm/run_benchmark.py", line 48, in <module>
run()
File "/home/chensichao/benchmark-mm/run_benchmark.py", line 41, in run
benchmark.run(bm_args)
File "/home/chensichao/benchmark-mm/userbenchmark/test-user-invoke/run.py", line 94, in run
result = run_config(config)
File "/home/chensichao/benchmark-mm/userbenchmark/test-user-invoke/run.py", line 72, in run_config
inject_model_invoke(model, user_defined_invoke)
File "/home/chensichao/benchmark-mm/torchbenchmark/util/experiment/instantiator.py", line 45, in inject_model_invoke
model_task.replace_invoke(inject_function.__module__, inject_function.__name__)
AttributeError: 'ModelTask' object has no attribute 'replace_invoke'
Then I search the source code, and I find that replace_invoke is not implemented in the code.
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
Start with userbenchmark/test-user-invoke/run.py and torchbenchmark/util/experiment/instantiator.py, then inspect the ModelTask definition referenced by inject_model_invoke. Run python3 run_benchmark.py test-user-invoke --model alexnet to reproduce the AttributeError; done means this invocation no longer fails because ModelTask lacks replace_invoke.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100