Skip to content

Commit

Permalink
Fix BigQueryExampleGen failing without custom_config #6307
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 600997877
  • Loading branch information
lego0901 authored and tfx-copybara committed Feb 1, 2024
1 parent 3aa2ad9 commit 5df14e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
* Fixed a synchronization bug in google_cloud_ai_platform tuner.
* Print best tuning trials only from the chief worker of google_cloud_ai_platform tuner.
* Add a kpf dependency in the docker-image extra packages.
* Fix BigQueryExampleGen failure without custom_config.

## Dependency Updates
| Package Name | Version Constraints | Previously (in `v1.14.0`) | Comments |
Expand Down
8 changes: 3 additions & 5 deletions tfx/extensions/google_cloud_big_query/example_gen/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,9 @@ def _BigQueryToExample(pipeline: beam.Pipeline, exec_properties: Dict[str, Any],
"""
project = utils.parse_gcp_project(exec_properties['_beam_pipeline_args'])
converter = _BigQueryConverter(split_pattern, project)
big_query_custom_config = (
json.loads(exec_properties['custom_config'])
if 'custom_config' in exec_properties
else None
)
big_query_custom_config = None
if custom_config_str := exec_properties.get('custom_config'):
big_query_custom_config = json.loads(custom_config_str)

return (
pipeline
Expand Down

0 comments on commit 5df14e8

Please sign in to comment.