mlcommons / cm4mlops

A collection of portable, reusable and cross-platform automation recipes (CM scripts) to make it easier to build and benchmark AI systems across diverse models, data sets, software and hardware
http://docs.mlcommons.org/cm4mlops/
Apache License 2.0
14 stars 20 forks source link

ImportError: numpy._core.multiarray failed to import #571

Open anandhu-eng opened 1 week ago

anandhu-eng commented 1 week ago

Using MLCommons Inference source from '/home/anandhu/CM/repos/local/cache/c61b3360aaf84204/inference'
INFO:root:         ! cd /home/anandhu/CM/repos/local/cache/e96391f14ae64e0e
INFO:root:         ! call /home/anandhu/CM/repos/mlcommons@cm4mlops/script/get-dataset-coco2014/run.sh from tmp-run.sh
./download-coco-2014.sh -d /home/anandhu/CM/repos/local/cache/e96391f14ae64e0e/install -m 50

ImportError: _multiarray_umath failed to import
RuntimeError: CPU dispatcher tracer already initlized
Traceback (most recent call last):
  File "/home/anandhu/CM/repos/local/cache/c61b3360aaf84204/inference/text_to_image/tools/coco.py", line 5, in <module>
    import pandas as pd
  File "/home/anandhu/.local/lib/python3.10/site-packages/pandas/__init__.py", line 49, in <module>
    from pandas.core.api import (
  File "/home/anandhu/.local/lib/python3.10/site-packages/pandas/core/api.py", line 1, in <module>
    from pandas._libs import (
  File "/home/anandhu/.local/lib/python3.10/site-packages/pandas/_libs/__init__.py", line 17, in <module>
    import pandas._libs.pandas_datetime  # noqa: F401 # isort: skip # type: ignore[reportUnusedImport]
ImportError: numpy._core.multiarray failed to import

CM error: Portable CM script failed (name = get-dataset-coco2014, return code = 256)

run command:

cm run script --tags=run,mlperf,accuracy,_coco2014 --result_dir=/home/anandhu/test_results
arjunsuresh commented 1 week ago

numpy version issue? We are using 1.26.4 here

arjunsuresh commented 1 week ago

What's the pandas version here?

anandhu-eng commented 4 days ago

Hi @arjunsuresh , it was 2.2.3

I tried to reproduce in I9 system,

/home/anandhu/CM/repos/local/cache/c5f60ba1e1b144af/bertthreading/bin/python3 '/home/anandhu/CM/repos/local/cache/a25b6fc49f394682/inference/text_to_image/tools/accuracy_coco.py' --mlperf-accuracy-file '/home/anandhu/test_results/mlperf_log_accuracy.json' --caption-path '/home/anandhu/CM/repos/local/cache/a25b6fc49f394682/inference/text_to_image/coco2014/captions/captions_source.tsv' --compliance-images-path '/home/anandhu/test_results/images'  --ids-path '/home/anandhu/CM/repos/local/cache/fd96c918ddd64494/install/sample_ids.txt'  > '/home/anandhu/test_results/accuracy.txt'
Traceback (most recent call last):
  File "/home/anandhu/CM/repos/local/cache/a25b6fc49f394682/inference/text_to_image/tools/accuracy_coco.py", line 17, in <module>
    from fid.fid_score import (
  File "/home/anandhu/CM/repos/local/cache/a25b6fc49f394682/inference/text_to_image/tools/fid/fid_score.py", line 47, in <module>
    sys.path.insert("..", 0)
TypeError: 'str' object cannot be interpreted as an integer

I think the format is reverse: sys.path.insert(index, path)

anandhu-eng commented 4 days ago

I think i have the old version of inference code, i saw a recent commit with the insert problem being fixed... let me try with latest pull