-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
create helper function #26225
base: master
Are you sure you want to change the base?
create helper function #26225
Conversation
Create helper function to convert rank 2 tensor to rank 1 tensor
Codecov Report
@@ Coverage Diff @@
## master #26225 +/- ##
==========================================
+ Coverage 71.20% 71.49% +0.28%
==========================================
Files 787 849 +62
Lines 103330 102820 -510
==========================================
- Hits 73581 73507 -74
+ Misses 28252 27816 -436
Partials 1497 1497
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 292 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Assigning reviewers. If you would like to opt out of this review, comment R: @damccorm for label python. Available commands:
The PR bot will only process comments in the main thread (not review comments). |
Run TFT Criteo Benchmarks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this! Looks like there are some formatting/linting issues - you can get more detail on them by looking in the logs (linked in the checks section) or by running them locally with the commands described here - https://cwiki.apache.org/confluence/display/BEAM/Python+Tips#PythonTips-LintandFormattingChecks
feature = tf.squeeze(feature, axis=1) | ||
return feature | ||
|
||
fill_in_missing(feature) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably need to reassign these back to feature, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right
I tried solving them by referring to the console output but seems like there is still something I'm missing out , I'll look into it again |
Run TFT Criteo Benchmarks |
could you guide me how to do it ? |
Sorry for the confusion, that was a command for our automation (our Jenkins setup will trigger builds based on comments in the PR). So just commenting Seems like we're having some issues with our Jenkins setup, so it may take a while (or I may need to try again later) |
Run TFT Criteo Benchmarks |
Oh, can only reviewers run the tests or the contributors as well? |
Contributors can as well |
Run TFT Criteo Benchmarks |
@damccorm the TFT criteo benchmark test is giving the following error |
Lets run it again, I think it may be fixed by 0dcb26d |
Run TFT Criteo Benchmarks |
Run TFT Criteo Benchmarks |
this benchmark is failing currently since we updated protobuf to 4.x.x and TFT still relies on protobuf < 4. I am watching TFT pypi for the next release which will make the test suite green |
On that note, I would suggest to do some testing locally for now. |
Run PythonLint PreCommit |
Run PythonLint PreCommit |
@AnandInguva |
Thanks. I will take a look in some time. |
sdks/python/apache_beam/testing/benchmarks/cloudml/criteo_tft/criteo_test.py
Outdated
Show resolved
Hide resolved
try: | ||
import tensorflow as tf | ||
import tensorflow_transform as tft | ||
except ImportError as e: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need this try except here. It is needed only in the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not adding it was causing import error that is why added it , I'll remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should import criteo.py
in tests under a try
except
block since criteo.py
has a dependency on tft
which might not be installed on all test environments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I've imported criteo.py in a try block
@@ -110,6 +113,20 @@ def make_input_feature_spec(include_label=True): | |||
return result | |||
|
|||
|
|||
def fill_in_missing(feature, default_value=-1): | |||
if tf is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this if condition as well.
…criteo_test.py Co-authored-by: Anand Inguva <[email protected]>
import tensorflow as tf | ||
from apache_beam.testing.benchmarks.cloudml.criteo_tft.criteo import fill_in_missing | ||
except ImportError: | ||
tft = None # type: ignore[assignment] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad. Remove the # type: ignore[assignment]
.
Mypy check should pass after that
import numpy as np | ||
import pytest | ||
|
||
from typing import Any, Callable, Optional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove Any, Callable from imports since they are not being used anywhere.
Lint errors would get solved after this.
@AnandInguva I'm having trouble finding out the exact cause of github workflow checks failing since the console output is too large, what do you look for while browsing through the files? |
The Jenkins tests are passing but GHA tests are not. Can you merge master branch on to yours? |
Run TFT Criteo Benchmarks |
@AnandInguva I'm not able to merge it on my this computer as git clone is not cloning the whole repo |
Sorry. I didn't get what you are saying. Can you provide which commands you are using? |
git clone is not copying the whole code for some reason in my new laptop |
@smeet07 any luck getting this fixed up? Sounds like your local git config is currently broken, my recommendation would probably be to try uninstalling/reinstalling. You could also try opening this in a GitHub codespace - https://github.com/features/codespaces |
forgot about this issue tbh, will get this fixed up in 1-2 days |
@smeet07 are you still working on this? |
Create helper function to convert rank 2 tensor to rank 1 tensor
addresses #24902
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
addresses #123
), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>
instead.CHANGES.md
with noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI.