Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use generate_responses.py? (References non-existing utilities module) #13

Closed
mattmazzola opened this issue Feb 9, 2024 · 1 comment

Comments

@mattmazzola
Copy link
Contributor

mattmazzola commented Feb 9, 2024

I am trying to run the MathVista evaluation pipeline using the instructions and 3 step process here: https://github.com/lupantech/MathVista?tab=readme-ov-file#evaluation-pipelines

However, when I attempt to run generate_response.py it fails with:

    from utilities import *
ModuleNotFoundError: No module named 'utilities'

from utilities import *

How do I use generate responses?

@mattmazzola
Copy link
Contributor Author

mattmazzola commented Feb 9, 2024

Ah, I notice it is because the sys.path.append('../') relies on the script being run from a certain location.

This should be called out in the README as I assume it would be similar issue for others that wouldn't expect this.

Also, there are some other minor issues or things to clarify:

  • The README says installation of openai, anthropic, bardapi is Optional, yet the file attempt to import all 3

from models import claude, gpt, bard

and without having them installed it can fail. Example for claude/anthropic

    from anthropic import Anthropic, HUMAN_PROMPT, AI_PROMPT
ModuleNotFoundError: No module named 'anthropic'
  • There are other modules required in utilities, but the README doesn't declare these installation steps (Or at least I didn't see)
pip install opencv-python
pip install word2number
  • The use of old openai methods
You tried to access openai.ChatCompletion, but this is no longer supported in openai>=1.0.0

Given the original issues was about how to use the file and utilities I will resolve.
I think can manually update the openai code to use the 1+ version

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

No branches or pull requests

1 participant