Skip to content

Conversation

evanvolgas
Copy link
Contributor

solves #1273

Tested with make dev && make test

============================================================================================================== short test summary info ============================================================================================================== FAILED tests/integration_tests/applications/test_text2sql.py::test_text2sql_with_examples[sqlite://-/Users/evanvolgas/Documents/not_beam/guardrails/tests/integration_tests/test_assets/text2sql/schema.sql-/Users/evanvolgas/Documents/not_beam/guardrails/tests/integration_tests/test_assets/text2sql/examples.json] - ImportError: `numpy` is required for `OpenAIEmbedding` class.Please install it with `poetry add numpy`. FAILED tests/integration_tests/schema/test_pydantic_schema.py::TestPydanticSchema::test_choice_case_happy_path - AssertionError: assert {'$defs': {'F...rFlight', ...} == {'$defs': {'F...rFlight', ...} ERROR tests/integration_tests/test_embedding_openai.py::test_output_dim_for_text_embedding_ada_002 - ImportError: `numpy` is required for `OpenAIEmbedding` class.Please install it with `poetry add numpy`. ERROR tests/integration_tests/test_embedding_openai.py::test_output_dim_for_ada_model - ImportError: `numpy` is required for `OpenAIEmbedding` class.Please install it with `poetry add numpy`. ERROR tests/integration_tests/test_embedding_openai.py::test_output_dim_for_babbage_model - ImportError: `numpy` is required for `OpenAIEmbedding` class.Please install it with `poetry add numpy`. ERROR tests/integration_tests/test_embedding_openai.py::test_output_dim_for_curie_model - ImportError: `numpy` is required for `OpenAIEmbedding` class.Please install it with `poetry add numpy`. ERROR tests/integration_tests/test_embedding_openai.py::test_output_dim_for_davinci_model - ImportError: `numpy` is required for `OpenAIEmbedding` class.Please install it with `poetry add numpy`. ERROR tests/integration_tests/test_embedding_openai.py::test_output_dim_for_unknown_model - ImportError: `numpy` is required for `OpenAIEmbedding` class.Please install it with `poetry add numpy`. ======================================================================================== 2 failed, 618 passed, 54 skipped, 209 warnings, 6 errors in 17.70s ========================================================================================= make: *** [test] Error 1 

I believe those are unrelated as I get the exact same errors on main with the pinned version

============================================================================================================== short test summary info ============================================================================================================== FAILED tests/integration_tests/applications/test_text2sql.py::test_text2sql_with_examples[sqlite://-/Users/evanvolgas/Documents/not_beam/guardrails/tests/integration_tests/test_assets/text2sql/schema.sql-/Users/evanvolgas/Documents/not_beam/guardrails/tests/integration_tests/test_assets/text2sql/examples.json] - ImportError: `numpy` is required for `OpenAIEmbedding` class.Please install it with `poetry add numpy`. FAILED tests/integration_tests/schema/test_pydantic_schema.py::TestPydanticSchema::test_choice_case_happy_path - AssertionError: assert {'$defs': {'F...rFlight', ...} == {'$defs': {'F...rFlight', ...} ERROR tests/integration_tests/test_embedding_openai.py::test_output_dim_for_text_embedding_ada_002 - ImportError: `numpy` is required for `OpenAIEmbedding` class.Please install it with `poetry add numpy`. ERROR tests/integration_tests/test_embedding_openai.py::test_output_dim_for_ada_model - ImportError: `numpy` is required for `OpenAIEmbedding` class.Please install it with `poetry add numpy`. ERROR tests/integration_tests/test_embedding_openai.py::test_output_dim_for_babbage_model - ImportError: `numpy` is required for `OpenAIEmbedding` class.Please install it with `poetry add numpy`. ERROR tests/integration_tests/test_embedding_openai.py::test_output_dim_for_curie_model - ImportError: `numpy` is required for `OpenAIEmbedding` class.Please install it with `poetry add numpy`. ERROR tests/integration_tests/test_embedding_openai.py::test_output_dim_for_davinci_model - ImportError: `numpy` is required for `OpenAIEmbedding` class.Please install it with `poetry add numpy`. ERROR tests/integration_tests/test_embedding_openai.py::test_output_dim_for_unknown_model - ImportError: `numpy` is required for `OpenAIEmbedding` class.Please install it with `poetry add numpy`. ======================================================================================== 2 failed, 618 passed, 54 skipped, 206 warnings, 6 errors in 12.30s ========================================================================================= sys:1: RuntimeWarning: coroutine 'AsyncMockMixin._execute_mock_call' was never awaited RuntimeWarning: Enable tracemalloc to get the object allocation traceback make: *** [test] Error 1 
@zsimjee
Copy link
Collaborator

zsimjee commented Jun 3, 2025

I believe those are unrelated as I get the exact same errors on main with the pinned version

Yup it's just complaining because it doesn't have those bits downloaded!

@evanvolgas
Copy link
Contributor Author

Thank you for your prompt attention to this!

@evanvolgas
Copy link
Contributor Author

I'm happy to help resolve some of these issues, even though I believe they are also unrelated. Just let me know!

@zsimjee
Copy link
Collaborator

zsimjee commented Jun 3, 2025

idk why linting and typing is blowing up, should resolve those

@zsimjee
Copy link
Collaborator

zsimjee commented Jun 3, 2025

try to run

make full

make test-cov locally

@zsimjee
Copy link
Collaborator

zsimjee commented Jun 3, 2025

oh, you can also try to check out your poetry.lock, then instead of running poetry lock, run make update-lock

@evanvolgas
Copy link
Contributor Author

I believe I have fixed the linting errors. Would it be possible to test it again?

@evanvolgas
Copy link
Contributor Author

I don't know why this is still failing

@zsimjee
Copy link
Collaborator

zsimjee commented Jun 3, 2025

yeah something's weird lol - opened this here - #1275

@evanvolgas evanvolgas closed this Jun 4, 2025
@evanvolgas evanvolgas mentioned this pull request Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants