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

SNOW-928615: Custom packages don't work for latest versions #1067

Closed
kaarthik108 opened this issue Oct 1, 2023 · 1 comment
Closed

SNOW-928615: Custom packages don't work for latest versions #1067

kaarthik108 opened this issue Oct 1, 2023 · 1 comment
Labels
question Further information is requested

Comments

@kaarthik108
Copy link

kaarthik108 commented Oct 1, 2023

Please answer these questions before submitting your issue. Thanks!

  1. What version of Python are you using?

Python 3.10.0 (default, Aug 15 2023, 22:34:54) [Clang 14.0.3 (clang-1403.0.22.14.1)]

  1. What operating system and processor architecture are you using?

    macOS-13.5.2-arm64-arm-64bit

  2. What are the component versions in the environment (pip freeze)?

snowflake-snowpark-python = "1.6.1" python = "3.10.0"

  1. What did you do?

I am trying to add the latest version of langchain as a zip has the anaconda version is way too old

session.custom_package_usage_config = {"enabled": True}
session.add_packages(["langchain==0.0.304"])

which says

Traceback (most recent call last):
Worksheet, line 10, in main
File "snowflake/snowpark/session.py", line 829, in add_packages
self._resolve_packages(
File "snowflake/snowpark/session.py", line 980, in _resolve_packages
raise RuntimeError(
RuntimeError: Cannot add package langchain(version 0.0.304) because it is not available in Snowflake and it cannot be installed via pip as you are executing this code inside a stored procedure. You can find the directory of these packages and add it via Session.add_import. See details at https://docs.snowflake.com/en/developer-guide/snowpark/python/creating-udfs.html#using-third-party-packages-from-anaconda-in-a-udf.

  1. What did you expect to see?

Instead of zipping the file it errors out.

  1. Can you set logging to DEBUG and collect the logs?
@kaarthik108 kaarthik108 added bug Something isn't working needs triage Initial RCA is required labels Oct 1, 2023
@github-actions github-actions bot changed the title Custom packages don't work for latest versions SNOW-928615: Custom packages don't work for latest versions Oct 1, 2023
@sfc-gh-stan
Copy link
Collaborator

Hi @kaarthik108 , looks like you are executing this in a Python worksheet, which means the code runs in a Python stored procedure. This feature is not supported inside stored procedures.

@sfc-gh-stan sfc-gh-stan added question Further information is requested and removed needs triage Initial RCA is required bug Something isn't working labels Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants