Skip to content
This repository has been archived by the owner on Dec 11, 2024. It is now read-only.

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

Open
anandhu-eng opened this issue Nov 18, 2024 · 6 comments
Open

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

anandhu-eng opened this issue Nov 18, 2024 · 6 comments

Comments

@anandhu-eng
Copy link


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
Copy link

numpy version issue?
We are using 1.26.4 here

@arjunsuresh
Copy link

What's the pandas version here?

@anandhu-eng
Copy link
Author

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
Copy link
Author

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

@arjunsuresh
Copy link

Hi @anandhu-eng is this issue still there?

@arjunsuresh arjunsuresh transferred this issue from mlcommons/cm4mlops Dec 4, 2024
@anandhu-eng
Copy link
Author

Hi @arjunsuresh , let me test this today

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants