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

Integrations: upstage LLM and Embeddings #13193

Merged
merged 19 commits into from
May 20, 2024

Conversation

JuHyung-Son
Copy link
Contributor

@JuHyung-Son JuHyung-Son commented May 1, 2024

Description

Upstage is one of the most up-and-coming LLM providers, and many of users want to use their LLM and Embeddings api, so in this PR, we've added an Upstage LLM and Embeddings integration.

Also we deprecated and added warning on solar LLM integration which will not be managed anymore.

Fixes #13192 (issue)

New Package?

Did I fill in the tool.llamahub section in the pyproject.toml and provide a detailed README.md for my new integration or package?

  • Yes
  • No

Version Bump?

Did I bump the version in the pyproject.toml file of the package I am updating? (Except for the llama-index-core package)

  • Yes
  • No

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Added new unit/integration tests
  • Added new notebook (that tests end-to-end)
  • I stared at the code and made sure it makes sense

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added Google Colab support for the newly added notebooks.
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I ran make format; make lint to appease the lint gods

@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label May 1, 2024
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@JuHyung-Son JuHyung-Son changed the title Juhyung/devr 3 Integrations: upstage LLM and Embeddings May 1, 2024
Copy link
Collaborator

@logan-markewich logan-markewich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, mostly just a few nits

@logan-markewich
Copy link
Collaborator

I can't push to the repo, so I can't fix CICD 😓 But, to fit it

rm -f llama-index-integrations/embeddings/llama-index-embeddings-upstage/BUILD  
rm -f llama-index-integrations/llms/llama-index-llms-upstage/BUILD   

Then install pants

Then run pants tailor :: and add the files it creates in your upstage folders (ignore any other files it creates outside of your integrations)

@JuHyung-Son
Copy link
Contributor Author

Thanks for detailed instruction.

@logan-markewich logan-markewich enabled auto-merge (squash) May 9, 2024 03:57
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 9, 2024
@JuHyung-Son
Copy link
Contributor Author

@logan-markewich tests failed. But when I test it it success. do i need something to do additionally?

✕ llama-index-integrations/embeddings/llama-index-embeddings-upstage/tests/integration_tests/test_integrations.py:tests failed in 6.16s.
✕ llama-index-integrations/embeddings/llama-index-embeddings-upstage/tests/unit_tests/test_embeddings_upstage.py:tests failed in 6.48s.

auto-merge was automatically disabled May 10, 2024 00:30

Head branch was pushed to by a user without write access

@JuHyung-Son
Copy link
Contributor Author

@logan-markewich Would you check this action?, 3.10 passed but 3.8 and 3.9 were canceled because of long running tasks.

@logan-markewich
Copy link
Collaborator

Can you merge main again? There was some issues that were recently fixed

@JuHyung-Son
Copy link
Contributor Author

@logan-markewich action unit test failed with

==================================== ERRORS ====================================
_________ ERROR collecting tests/unit_tests/test_embeddings_upstage.py _________
ImportError while importing test module 'llama-index-integrations/embeddings/llama-index-embeddings-upstage/tests/unit_tests/test_embeddings_upstage.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
llama-index-integrations/embeddings/llama-index-embeddings-upstage/tests/unit_tests/test_embeddings_upstage.py:4: in <module>
    from llama_index.embeddings.upstage import UpstageEmbedding
E   ModuleNotFoundError: No module named 'llama_index.embeddings.upstage'
------------------------------- Captured stderr --------------------------------

I think I have pyproject set up correctly, all tests pass on my local as well, is there anything else I need to set up?

@logan-markewich
Copy link
Collaborator

@JuHyung-Son For the life of me I can't figure out why the embedding tests are failing. I've noticed that any class that inherits openai embeddings, pants (our cicd tool) does not properly detect dependencies.

My advice is we can keep the tests (since they are nice for local dev), but we need to wrap the import in a try/except in the tests, and skip if not found

@logan-markewich
Copy link
Collaborator

Also just and fyi, the embeddings pyproject.toml is missing the llama-index-embeddings-openai dependency (adding it doesn't fix tests, but is needed to publish the package properly)

@logan-markewich logan-markewich enabled auto-merge (squash) May 20, 2024 02:10
@logan-markewich logan-markewich merged commit f5b2ab5 into run-llama:main May 20, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: add upstage llm and embeddings
2 participants