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

[BEAM-11289] [Python] Integrate Google Cloud Recommendations AI functionality #14806

Merged
merged 16 commits into from
Jun 30, 2021

Conversation

matthiasa4
Copy link
Contributor

Integrate Google Cloud Recommendations AI functionality


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

ValidatesRunner compliance status (on master branch)

Lang ULR Dataflow Flink Samza Spark Twister2
Go --- Build Status Build Status --- Build Status ---
Java Build Status Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status
Build Status
Build Status
Build Status
Python --- Build Status
Build Status
Build Status
Build Status
Build Status
--- Build Status ---
XLang Build Status Build Status Build Status --- Build Status ---

Examples testing status on various runners

Lang ULR Dataflow Flink Samza Spark Twister2
Go --- --- --- --- --- --- ---
Java --- Build Status
Build Status
Build Status
--- --- --- --- ---
Python --- --- --- --- --- --- ---
XLang --- --- --- --- --- --- ---

Post-Commit SDK/Transform Integration Tests Status (on master branch)

Go Java Python
Build Status Build Status Build Status
Build Status
Build Status

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website Whitespace Typescript
Non-portable Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status Build Status Build Status
Portable --- Build Status Build Status --- --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests

See CI.md for more information about GitHub Actions CI.

@matthiasa4 matthiasa4 requested a review from pabloem May 13, 2021 07:57
@codecov
Copy link

codecov bot commented May 13, 2021

Codecov Report

Merging #14806 (f594587) into master (c986168) will increase coverage by 0.00%.
The diff coverage is 84.37%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #14806    +/-   ##
========================================
  Coverage   83.77%   83.77%            
========================================
  Files         439      441     +2     
  Lines       59116    59371   +255     
========================================
+ Hits        49523    49738   +215     
- Misses       9593     9633    +40     
Impacted Files Coverage Δ
...n/apache_beam/ml/gcp/recommendations_ai_test_it.py 69.76% <69.76%> (ø)
...ks/python/apache_beam/ml/gcp/recommendations_ai.py 87.26% <87.26%> (ø)
...beam/testing/load_tests/load_test_metrics_utils.py 34.71% <100.00%> (ø)
sdks/python/apache_beam/utils/interactive_utils.py 92.68% <0.00%> (-2.44%) ⬇️
...pache_beam/runners/interactive/interactive_beam.py 74.72% <0.00%> (-1.10%) ⬇️
sdks/python/apache_beam/internal/metrics/metric.py 86.17% <0.00%> (-1.07%) ⬇️
...runners/interactive/display/pcoll_visualization.py 85.18% <0.00%> (-0.53%) ⬇️
...eam/runners/interactive/interactive_environment.py 90.33% <0.00%> (-0.38%) ⬇️
...ks/python/apache_beam/runners/worker/data_plane.py 90.90% <0.00%> (-0.31%) ⬇️
...hon/apache_beam/runners/worker/bundle_processor.py 93.69% <0.00%> (-0.26%) ⬇️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c986168...f594587. Read the comment docs.

@matthiasa4
Copy link
Contributor Author

Run Python 3.8 PostCommit

@aaltay
Copy link
Member

aaltay commented May 27, 2021

@matthiasa4 - Is this ready for review?

@matthiasa4
Copy link
Contributor Author

@aaltay there seems to be issues with the tests still. I am assuming it might be related to the service account permissions that run them since the API is returning nulls which make the test fail, wdyt? I don't think I can grant these permissions.
cc @pabloem

@aaltay
Copy link
Member

aaltay commented May 28, 2021

@aaltay there seems to be issues with the tests still. I am assuming it might be related to the service account permissions that run them since the API is returning nulls which make the test fail, wdyt? I don't think I can grant these permissions.
cc @pabloem

I do not know much about it. Why can't you grant these permissions? What do you need?

@matthiasa4
Copy link
Contributor Author

So the pipeline tests call an API that sit in a test project (to which @pabloem has access) - last time we enabled the API, but since the API is returning nulls while, when I run locally against my own project, the tests pass, hence I think it might be a permission issue.

@aaltay
Copy link
Member

aaltay commented May 29, 2021

So the pipeline tests call an API that sit in a test project (to which @pabloem has access) - last time we enabled the API, but since the API is returning nulls while, when I run locally against my own project, the tests pass, hence I think it might be a permission issue.

That makes sense. Which project is this, is it apache-beam-testing?

@matthiasa4
Copy link
Contributor Author

@aaltay yes, that's the one!

@aaltay
Copy link
Member

aaltay commented Jun 1, 2021

@aaltay yes, that's the one!

I added you to the project. That should give you enough permissions to make the changes you need. Let me know if that does not work.

@matthiasa4
Copy link
Contributor Author

matthiasa4 commented Jun 2, 2021

@aaltay - getting the following message in the console at the moment: You don't have permission to set up a catalogue. Please get 'Owner' or 'Recommendations AI Admin' IAM role assigned to you. - I think the latter should do.

Also, is it fair to assume for the pipelines, the regular compute service accounts are used? Then I will be able to give this one the right permissions to call the API.

@aaltay
Copy link
Member

aaltay commented Jun 3, 2021

@aaltay - getting the following message in the console at the moment: You don't have permission to set up a catalogue. Please get 'Owner' or 'Recommendations AI Admin' IAM role assigned to you. - I think the later should do.

Also, is it fair to assume for the pipelines, the regular compute service accounts are used? Then I will be able to give this one the right permissions to call the API.

Done. Give it a try.

@matthiasa4
Copy link
Contributor Author

Run Python 3.8 PostCommit

@matthiasa4
Copy link
Contributor Author

Run Python 3.8 PostCommit

@matthiasa4
Copy link
Contributor Author

@pabloem @aaltay looks like the failing test is not related to the contributed code - any advise on if that's ok to merge? I rebased onto master yesterday.

@aaltay
Copy link
Member

aaltay commented Jun 29, 2021

@pabloem @aaltay looks like the failing test is not related to the contributed code - any advise on if that's ok to merge? I rebased onto master yesterday.

Agreed. It is fine.

Do you want to squash your commits?

Also, have @pabloem completed his review?

@matthiasa4
Copy link
Contributor Author

Thanks @aaltay - I'll wait for a lgtm from @pabloem before squashing and merging :)

@pabloem
Copy link
Member

pabloem commented Jun 29, 2021

ah so sorry about the delay. Looking...

@pabloem
Copy link
Member

pabloem commented Jun 30, 2021

this LGTM : ) thanks @matthiasa4 - feel free to merge as you see fit!

@matthiasa4
Copy link
Contributor Author

Thanks @pabloem and @aaltay for the continued help! :)

@matthiasa4 matthiasa4 merged commit f9a4bfc into apache:master Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants