mlcommons / mlcommons/inference

TypeError

Open
#1,834 0 comments 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

python3 -u main.py --scenario Offline --model-path ${CHECKPOINT_PATH} --mlperf-conf mlperf.conf --user-conf user.conf --total-sample-count 24576 --dataset-path ${DATASET_PATH} --output-log-dir offline-logs --dtype float32 --device cuda:0 2>&1 | tee offline_performance_log.log
Traceback (most recent call last):
File "/home/fangtao/inference/language/llama2-70b/main.py", line 96, in
main()
File "/home/fangtao/inference/language/llama2-70b/main.py", line 69, in main
sut = sut_cls(
File "/home/fangtao/inference/language/llama2-70b/SUT.py", line 97, in init
self.data_object = Dataset(self.model_path, dataset_path=self.dataset_path, total_sample_count=total_sample_count)
File "/home/fangtao/inference/language/llama2-70b/dataset.py", line 30, in init
self.load_processed_dataset()
File "/home/fangtao/inference/language/llama2-70b/dataset.py", line 52, in load_processed_dataset
input_tokens = processed_data['tok_input']
File "/root/miniconda3/envs/llama2-70b/lib/python3.9/site-packages/pandas/core/frame.py", line 4078, in getitem
return self._get_item_cache(key)
File "/root/miniconda3/envs/llama2-70b/lib/python3.9/site-packages/pandas/core/frame.py", line 4639, in _get_item_cache
res = self._ixs(loc, axis=1)
File "/root/miniconda3/envs/llama2-70b/lib/python3.9/site-packages/pandas/core/frame.py", line 4010, in _ixs
col_mgr = self._mgr.iget(i)
File "/root/miniconda3/envs/llama2-70b/lib/python3.9/site-packages/pandas/core/internals/managers.py", line 1016, in iget
block = self.blocks[self.blknos[i]]
File "/root/miniconda3/envs/llama2-70b/lib/python3.9/site-packages/pandas/core/internals/managers.py", line 192, in blknos
self._rebuild_blknos_and_blklocs()
File "internals.pyx", line 761, in pandas._libs.internals.BlockManager._rebuild_blknos_and_blklocs
TypeError: Cannot convert numpy.ndarray to numpy.ndarray

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 with language/llama2-70b/dataset.py, especially load_processed_dataset() at line 52, then trace its call from SUT.py and main.py. Reproduce the shown Offline command and inspect the pandas access to processed_data['tok_input']; done means the command no longer raises the reported TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, pandas, python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.