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

extracting model response #73

Closed

Conversation

marshmellow77
Copy link

Fixes #72

@RajeshThallam
Copy link

@marshmellow77 Thanks for contributing. Can you please update/run integration tests?

@marshmellow77
Copy link
Author

Integration test ran successfully:

(venv-lc-google) heikohotz-macbookpro:vertexai heikohotz$ pytest tests/integration_tests/test_model_garden.py
================================================================================================== test session starts ==================================================================================================
platform darwin -- Python 3.11.7, pytest-7.4.4, pluggy-1.4.0
rootdir: /Users/heikohotz/Documents/Projects/repos/langchain-google/libs/vertexai
configfile: pyproject.toml
plugins: syrupy-4.6.1, anyio-4.3.0, asyncio-0.21.1
asyncio: mode=Mode.AUTO
collected 6 items

tests/integration_tests/test_model_garden.py ...... [100%]

====================================================================================== warnings summary =======================================================================================
tests/integration_tests/test_model_garden.py::test_model_garden[FALCON_ENDPOINT_ID-generated_text]
/Users/heikohotz/.pyenv/versions/3.11.7/envs/venv-lc-google/lib/python3.11/site-packages/langchain_core/_api/deprecation.py:117: LangChainDeprecationWarning: The function __call__ was deprecated in LangChain 0.1.7 and will be removed in 0.2.0. Use invoke instead.
warn_deprecated(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
===================================================================================== slowest 5 durations =====================================================================================
37.08s call tests/integration_tests/test_model_garden.py::test_model_garden[FALCON_ENDPOINT_ID-generated_text]
31.19s call tests/integration_tests/test_model_garden.py::test_model_garden_agenerate[FALCON_ENDPOINT_ID-generated_text]
29.70s call tests/integration_tests/test_model_garden.py::test_model_garden_generate[FALCON_ENDPOINT_ID-generated_text]
3.72s call tests/integration_tests/test_model_garden.py::test_model_garden_generate[LLAMA_ENDPOINT_ID-None]
2.75s call tests/integration_tests/test_model_garden.py::test_model_garden_agenerate[LLAMA_ENDPOINT_ID-None]
========================================================================== 6 passed, 1 warning in 107.34s (0:01:47) ===========================================================================

@lkuligin
Copy link
Collaborator

integration test should be updated accordingly (to test the changes).
could you work on this, please (and fix linting too).

@marshmellow77
Copy link
Author

What is linting? And I don't want to publish my endpoint IDs to the repo - but then how will it know which endpoints to use?

I'm afraid I'm not familiar with integration testing tools (it was already a struggle to get pytest to run), so I'm not sure what needs to be done here :)

@marshmellow77
Copy link
Author

can someone offer guidance on what needs to be done here?

@moizsajid
Copy link

moizsajid commented Mar 22, 2024

@marshmellow77 firstly set up poetry with linting and testing like explained over here https://python.langchain.com/docs/contributing/code#local-development-dependencies

Then run from make lint and make format from the respective module directory i.e. libs/vertexai or libs/genai (in your case it would be libs/vertexai) after activating poetry shell. Please let me know if you need further help!

For running integration tests, the command would be make integration_tests

@lkuligin lkuligin closed this May 13, 2024
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

Successfully merging this pull request may close these issues.

Response from VertexAIModelGarden is unexpected.
4 participants