You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "damccorm (via GitHub)" <gi...@apache.org> on 2023/07/05 14:41:12 UTC

[GitHub] [beam] damccorm commented on pull request #26225: create helper function

damccorm commented on PR #26225:
URL: https://github.com/apache/beam/pull/26225#issuecomment-1621903255

   Hey @smeet07 typically an author should be responsible for fixing issues with lint/formatting and other CI breakages. The logs will usually have the information needed to find the problem and fix it.
   
   In this case, looking at the logs I see the following issue in the PythonLint check:
   
   `apache_beam/testing/benchmarks/cloudml/criteo_tft/criteo_test.py:24: error: Module 'apache_beam.testing.benchmarks.cloudml.criteo_tft.criteo' has no attribute 'fill_in_missing'  [attr-defined]`
   
   and the following issue in the `PythonFormatter` check:
   
   ```
   03:32:11 --- apache_beam/testing/benchmarks/cloudml/criteo_tft/criteo.py	(original)
   03:32:11 +++ apache_beam/testing/benchmarks/cloudml/criteo_tft/criteo.py	(reformatted)
   03:32:11 @@ -135,7 +135,7 @@
   03:32:11      result = {'clicked': inputs['clicked']}
   03:32:11      for name in _INTEGER_COLUMN_NAMES:
   03:32:11        feature = inputs[name]
   03:32:11 -      
   03:32:11 +
   03:32:11        def fill_in_missing(feature, default_value=-1):
   03:32:11          if tf is not None:
   03:32:11            feature = tf.sparse.SparseTensor(
   03:32:11 Command exited with non-zero status 1
   ```
   
   This one looks like there is some useless white space in between  2 lines, the trailing whitespace should be removed (or you can just run `tox -e py3-yapf` to autoformat).
   
   The first issue represents more of a real issue. You're trying to import `apache_beam.testing.benchmarks.cloudml.criteo_tft.criteo.fill_in_missing` but that function doesn't exist as a top level exported function (it only exists as a function defined inside of the `preprocessing_fn` function and should be moved out if you want to reference it from other files)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org