0

I'm trying to make a desktop application that uses Concrete-ML for a thesis I'm doing. I was initially developing the application on Windows and opening the Windows directory in WSL and VS Code, but I've tried moving everything to my WSL filesystem to improve performance.

Whenever I try to import Concrete-ML's FHEModelClient, it raises a ModuleNotFoundError saying that there's a missing package named mlir.

I've looked all over PyPi and even tried reinstalling concrete-ml and all the other packages I've been using, but I haven't been able to reinstall the mlir package at all.

Here's the traceback when I try to run from concrete.ml.deployment import FHEModelClient:

Traceback (most recent call last):
  File "/home/vivs/Documents/concreteml-covid-classifier/client/GUI/Test_Folder/clienttkinteruidesignapp.py", line 17, in <module>
    from concrete.ml.deployment import FHEModelClient
  File "/home/vivs/.local/lib/python3.10/site-packages/concrete/ml/deployment/__init__.py", line 2, in <module>
    from .fhe_client_server import FHEModelClient, FHEModelDev, FHEModelServer
  File "/home/vivs/.local/lib/python3.10/site-packages/concrete/ml/deployment/fhe_client_server.py", line 11, in <module>
    from concrete import fhe
  File "/home/vivs/.local/lib/python3.10/site-packages/concrete/fhe/__init__.py", line 7, in <module>
    from concrete.compiler import EvaluationKeys, PublicArguments, PublicResult
  File "/home/vivs/.local/lib/python3.10/site-packages/concrete/compiler/__init__.py", line 8, in <module>
    from mlir._mlir_libs._concretelang._compiler import (
ModuleNotFoundError: No module named 'mlir'

Anyone have ideas for getting that package?

jovivs
  • 1
  • Probably the python bindings to the `mlir` compiler https://mlir.llvm.org/docs/Bindings/Python/ – FlyingTeller May 30 '23 at 14:55
  • What `concrete` version are you running? – FlyingTeller May 30 '23 at 14:56
  • From what I can tell, I have the following versions for concrete-ml and concrete: concrete-ml==1.0.2 concrete-python==1.0.0 – jovivs May 30 '23 at 15:18
  • Hello, just an update: opting to uninstall the packages I installed using requirements.txt and reinstall them. Will close this question if the issue was cleared up. FlyingTeller mentioned that it might be an issue with the bindings to the mlir package which I'm not familiar with, so hopefully reinstalling everything from scratch will help fix that. – jovivs May 30 '23 at 16:17

1 Answers1

0

I fixed my issue; FlyingTeller was most likely correct about it being the Python bindings to the mlir compiler.

I figured that there was likely a copy of the mlir package in the global site-packages (found using these commands) directory on WSL that worked as intended. I replaced the mlir folder in my per-user site-packages directory with that, and the issue was fixed.

jovivs
  • 1