azreasoners / LLM-ASP

23 stars 3 forks source link

ModuleNotFoundError: No module named 'openai.openai_object' while trying to reproduce #1

Closed FatemaTabassum closed 2 months ago

FatemaTabassum commented 4 months ago

I am trying to run this experiment. Additionally, openai package is showing installed and prompt_cache_text-davinci-003.pickle exists in the folder. However, I am getting the following error. Do you have any idea how to resolve this?

(asp_env) fatema@lambda-dual-1:/data/paperswithcode_fatema/ASP/LLM-ASP/bAbI$ python main.py --task 7 --n 10 Traceback (most recent call last): File "/data/paperswithcode_fatema/ASP/LLM-ASP/bAbI/main.py", line 44, in prompt_cache = pickle.load(handle) ^^^^^^^^^^^^^^^^^^^ ModuleNotFoundError: No module named 'openai.openai_object'

(asp_env) fatema@lambda-dual-1:/data/paperswithcode_fatema/ASP/LLM-ASP/bAbI$ pip show openai Name: openai Version: 1.30.5 Summary: The official Python library for the openai API Home-page: Author: Author-email: OpenAI support@openai.com License: Location: /home/fatema/anaconda3/envs/asp_env/lib/python3.11/site-packages Requires: anyio, distro, httpx, pydantic, sniffio, tqdm, typing-extensions Required-by:

azreasoners commented 3 months ago

Thank you for your interest in our work! I believe the reason that this is happening is because of the version of openai that was used to pickle the prompt cache file was version 0.22, and the one you are using is probably a later version. Please try the following to resolve the issue:

conda uninstall openai
pip install openai==0.22