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-869906: Tag package auto-upload feature as experimental #947

Conversation

sfc-gh-vnayak
Copy link
Contributor

Please answer these questions before submitting your pull requests. Thanks!

  1. What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
    • I am adding new logging messages
    • I am adding a new telemetry message
    • I am adding new credentials
    • I am adding a new dependency
  3. Please describe how your code solves the related issue.

    Please write a short description of how your code change solves the related issue.

@sfc-gh-vnayak sfc-gh-vnayak changed the base branch from main to vnayak-SNOW-849031-environment-persistence July 17, 2023 16:43
@sfc-gh-vnayak sfc-gh-vnayak self-assigned this Jul 17, 2023
@sfc-gh-vnayak sfc-gh-vnayak added the NO-CHANGELOG-UPDATES This pull request does not need to update CHANGELOG.md label Jul 17, 2023
@sfc-gh-vnayak sfc-gh-vnayak marked this pull request as ready for review July 17, 2023 17:39
@sfc-gh-vnayak sfc-gh-vnayak requested a review from a team as a code owner July 17, 2023 17:39
@sfc-gh-vnayak sfc-gh-vnayak requested review from sfc-gh-yixie and sfc-gh-aalam and removed request for a team July 17, 2023 17:39
Copy link
Contributor

@sfc-gh-aalam sfc-gh-aalam left a comment

Choose a reason for hiding this comment

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

For the parameters added in existing functions like add_packages, can you also update the docstrings to mention the parts that will be experimental

@codecov
Copy link

codecov bot commented Jul 19, 2023

Codecov Report

Merging #947 (0b232c9) into vnayak-SNOW-849031-environment-persistence (8369bd3) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@                             Coverage Diff                             @@
##           vnayak-SNOW-849031-environment-persistence     #947   +/-   ##
===========================================================================
  Coverage                                       98.55%   98.55%           
===========================================================================
  Files                                              50       50           
  Lines                                            9024     9026    +2     
  Branches                                         1613     1613           
===========================================================================
+ Hits                                             8894     8896    +2     
  Misses                                             53       53           
  Partials                                           77       77           
Impacted Files Coverage Δ
src/snowflake/snowpark/session.py 98.35% <100.00%> (+<0.01%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more


Note that this function also supports addition of requirements via a `conda environment yaml file
<https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#create-env-file-manually>_`.


Args:
file_path: The path of a local requirement file.
force_push: Force upload Python packages with native dependencies.
force_install: Ignores environment present on persist_path and overwrites it with a fresh installation.
force_push: Force upload Python packages with native dependencies (experimental).
Copy link
Collaborator

Choose a reason for hiding this comment

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

I suggest add a * after file_path to make the 3 new arguments key-word arguments.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

@@ -727,10 +728,11 @@ def add_packages(
:class:`~snowflake.snowpark.udf.UDFRegistration`. See details of
`third-party Python packages in Snowflake <https://docs.snowflake.com/en/developer-guide/udf/python/udf-python-packages.html>`_.

Pure Python packages that are not available in Snowflake will be pip installed locally and made available as an
EXPERIMENTAL: Pure Python packages that are not available in Snowflake will be pip installed locally and made available as an
Copy link
Collaborator

Choose a reason for hiding this comment

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

Better explain how this experimental feature is enabled. For instance, xyz argument is set to True, then the packages will be automatically installed from pip.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The feature is enabled when a custom package not present on Anaconda channel is passed to add_requirements and add_packages. Do you want me to only allow the feature via a specific argument instead?

@@ -742,10 +744,10 @@ def add_packages(
is supported as a `version specifier <https://packaging.python.org/en/latest/glossary/#term-Version-Specifier>`_
for this argument. If a ``module`` object is provided, the package will be
installed with the version in the local environment.
force_push: Force upload unavailable Python packages with native dependencies.
force_install: Ignores environment present on persist_path and overwrites it with a fresh installation.
force_push: Force upload unavailable Python packages with native dependencies (experimental).
Copy link
Collaborator

Choose a reason for hiding this comment

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

"native" dependency might be confusing. People may think of native c code. Do you mean "local"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No I mean native C code, will rewrite this.

@sfc-gh-vnayak
Copy link
Contributor Author

sfc-gh-vnayak commented Jul 20, 2023

Moved these changes to #959 so that they can be directly merged to main (This PR was stacked on top of other changes).

@github-actions github-actions bot locked and limited conversation to collaborators Jul 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
NO-CHANGELOG-UPDATES This pull request does not need to update CHANGELOG.md
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants