Skip to content

Commit

Permalink
Raise an error if generators or slicer functions are passed to the St…
Browse files Browse the repository at this point in the history
…atsOptions.to_json method.

PiperOrigin-RevId: 447478064
  • Loading branch information
tfx-copybara committed May 9, 2022
1 parent f986f6b commit 8bebdea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
conflict. We will rollback this change once `kfp` releases a new version.
* Fixed a compatibility issue with apache-airflow 2.3.0 that is failing with
"unexpected keyword argument 'default_args'".
* StatisticsGen will raise an error if unsupported StatsOptions (i.e.,
generators or experimental_slice_functions) are passed.

## Dependency Updates

Expand Down
4 changes: 2 additions & 2 deletions tfx/components/statistics_gen/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ def __init__(self,
stats_options: The StatsOptions instance to configure optional TFDV
behavior. When stats_options.schema is set, it will be used instead of
the `schema` channel input. Due to the requirement that stats_options be
serialized, the slicer functions and custom stats generators are dropped
and are therefore not usable.
serialized, the slicer functions and custom stats generators are not
usable, and an error will be raised if either is specified.
exclude_splits: Names of splits where statistics and sample should not be
generated. Default behavior (when exclude_splits is set to None) is
excluding no splits.
Expand Down

0 comments on commit 8bebdea

Please sign in to comment.