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

Add evaluation extra to google-cloud-aiplatform #46270

Merged
merged 2 commits into from
Jan 30, 2025

Conversation

potiuk
Copy link
Member

@potiuk potiuk commented Jan 30, 2025

The scikit-learn is an optional dependency of the library from google and apparently we are using the evaluation optional feature of it. Adding the extra should make google provider depends on scikit-learn.

Closes: #46258


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborg boring-cyborg bot added area:providers provider:google Google (including GCP) related issues labels Jan 30, 2025
@potiuk
Copy link
Member Author

potiuk commented Jan 30, 2025

More explanation:

The difference between metadata of 1.78.0 vs. 1.79.0

Screenshot 2025-01-30 at 01 39 30

We've been installing both extras (pandas, tqdm) by other means before - but we should have been using evaluation extra before, because we are apparently using it for some operators in Google Provider before - but it has not been noticed, because those deps were already installed by other providers (tqdm is a dependency of fsspec).

But no-one else uses scikit learn, so when they added it in 1.79, we have not installed it because we did not have the extra.

@potiuk potiuk requested a review from jedcunningham January 30, 2025 01:21
@potiuk
Copy link
Member Author

potiuk commented Jan 30, 2025

That works - no failures in static checks - other errors fxed in upcoming PRs.

@potiuk potiuk requested a review from eladkal January 30, 2025 01:23
The scikit-learn is an optional dependency of the library from
google and apparently we are using the `evaluation` optional
feature of it. Adding the extra should make google provider
depends on scikit-learn.

Closes: apache#46258
Copy link
Contributor

@amoghrajesh amoghrajesh left a comment

Choose a reason for hiding this comment

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

Nice, thats really nice. Thanks for digging into it!

@amoghrajesh
Copy link
Contributor

Error:

FAILED providers/tests/dbt/cloud/operators/test_dbt.py::TestDbtCloudRunJobOperator::test_execute_wait_for_termination[explicit_account-1-timeout] - AssertionError: assert 2 == 4
 +  where 2 = <MagicMock name='get_job_run' id='140435097315120'>.call_count
====== 1 failed, 6263 passed, 97 skipped, 1 warning in 746.83s (0:12:26) =======

Attempted a fix: #46276

@potiuk potiuk merged commit baf54a8 into apache:main Jan 30, 2025
148 of 154 checks passed
@potiuk potiuk deleted the fix-scikit-learn branch January 30, 2025 07:23
got686-yandex pushed a commit to got686-yandex/airflow that referenced this pull request Jan 30, 2025
The scikit-learn is an optional dependency of the library from
google and apparently we are using the `evaluation` optional
feature of it. Adding the extra should make google provider
depends on scikit-learn.

Closes: apache#46258

Co-authored-by: Amogh Desai <[email protected]>
dabla pushed a commit to dabla/airflow that referenced this pull request Jan 30, 2025
The scikit-learn is an optional dependency of the library from
google and apparently we are using the `evaluation` optional
feature of it. Adding the extra should make google provider
depends on scikit-learn.

Closes: apache#46258

Co-authored-by: Amogh Desai <[email protected]>
ambika-garg pushed a commit to ambika-garg/airflow that referenced this pull request Jan 30, 2025
The scikit-learn is an optional dependency of the library from
google and apparently we are using the `evaluation` optional
feature of it. Adding the extra should make google provider
depends on scikit-learn.

Closes: apache#46258

Co-authored-by: Amogh Desai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers provider:google Google (including GCP) related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sklearn is not a dependency and fails with google-cloud-aiplatform 1.79.0
2 participants