Skip to content

SNOW-1852900: Support Cortex function Sentiment in apply #2742

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

Merged

Conversation

sfc-gh-lmukhopadhyay
Copy link
Contributor

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

    Fixes SNOW-1852900

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
      • If this test skips Local Testing mode, I'm requesting review from @snowflakedb/local-testing
    • I am adding new logging messages
    • I am adding a new telemetry message
    • I am adding new credentials
    • I am adding a new dependency
    • If this is a new feature/behavior, I'm adding the Local Testing parity changes.
    • I acknowledge that I have ensured my changes to be thread-safe. Follow the link for more information: Thread-safe Developer Guidelines
  3. Please describe how your code solves the related issue.

    Support Cortex function Sentiment in apply.

Signed-off-by: Labanya Mukhopadhyay <labanya.mukhopadhyay@snowflake.com>
Signed-off-by: Labanya Mukhopadhyay <labanya.mukhopadhyay@snowflake.com>
Signed-off-by: Labanya Mukhopadhyay <labanya.mukhopadhyay@snowflake.com>
Copy link

Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing

@sfc-gh-lmukhopadhyay sfc-gh-lmukhopadhyay requested a review from a team December 10, 2024 23:41
@sfc-gh-lmukhopadhyay sfc-gh-lmukhopadhyay added the NO-PANDAS-CHANGEDOC-UPDATES This PR does not update Snowpark pandas docs label Dec 10, 2024
@sfc-gh-lmukhopadhyay sfc-gh-lmukhopadhyay marked this pull request as ready for review December 11, 2024 00:01
@sfc-gh-lmukhopadhyay sfc-gh-lmukhopadhyay requested review from a team as code owners December 11, 2024 00:01
Copy link
Contributor

@sfc-gh-helmeleegy sfc-gh-helmeleegy left a comment

Choose a reason for hiding this comment

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

Can you also update docs/source/snowpark/functions.rst?

Signed-off-by: Labanya Mukhopadhyay <labanya.mukhopadhyay@snowflake.com>
Copy link
Contributor

@sfc-gh-helmeleegy sfc-gh-helmeleegy left a comment

Choose a reason for hiding this comment

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

Approving, but please address the unresolved comments.

Signed-off-by: Labanya Mukhopadhyay <labanya.mukhopadhyay@snowflake.com>
Signed-off-by: Labanya Mukhopadhyay <labanya.mukhopadhyay@snowflake.com>
Signed-off-by: Labanya Mukhopadhyay <labanya.mukhopadhyay@snowflake.com>
Signed-off-by: Labanya Mukhopadhyay <labanya.mukhopadhyay@snowflake.com>
### Snowpark pandas API Updates

#### New Features

- Added support for `Series.str.ljust` and `Series.str.rjust`.
- Added support for `Series.str.center`.
- Added support for `Series.str.pad`.
- Added support for applying Snowpark Python function `snowflake_cortex_sentiment`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- Added support for applying Snowpark Python function `snowflake_cortex_sentiment`.
- Added support for function `snowflake_cortex_sentiment` in `functions.py`.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sfc-gh-yuwang Did you mean to update the changelog for Snowpark Python API Updates or pandas API Updates? For pandas, we may want to keep the reference to apply

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the changelog for snowpark python api should be updated to what yuyang suggests here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense, it should be updated now!

A string containing the text for which a sentiment score should be calculated.
Args:
text: A string containing the English text from which a summary should be generated.
Returns:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it possible to add a simple example in the doc string?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, will add!

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

Signed-off-by: Labanya Mukhopadhyay <labanya.mukhopadhyay@snowflake.com>
Signed-off-by: Labanya Mukhopadhyay <labanya.mukhopadhyay@snowflake.com>
Signed-off-by: Labanya Mukhopadhyay <labanya.mukhopadhyay@snowflake.com>
@sfc-gh-lmukhopadhyay sfc-gh-lmukhopadhyay enabled auto-merge (squash) December 13, 2024 18:12
@sfc-gh-lmukhopadhyay sfc-gh-lmukhopadhyay merged commit 71843f3 into main Dec 13, 2024
42 checks passed
@sfc-gh-lmukhopadhyay sfc-gh-lmukhopadhyay deleted the lmukhopadhyay-SNOW-1852900-apply-sentiment-func branch December 13, 2024 18:48
@github-actions github-actions bot locked and limited conversation to collaborators Dec 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
NO-PANDAS-CHANGEDOC-UPDATES This PR does not update Snowpark pandas docs snowpark-pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants