Skip to content

Commit

Permalink
hooks: tensorflow: collect sources for tensorflow.python.autograph
Browse files Browse the repository at this point in the history
Collect sources for `tensorflow.python.autograph` to avoid
run-time warning about AutoGraph being unavailable. Not sure if
we need to collect sources for other parts of `tensorflow`, though;
if that proves to be the case, we can adjust the collection mode
later.
  • Loading branch information
rokm committed Dec 23, 2023
1 parent 5de33bd commit e952014
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,12 @@ def _submodules_filter(x):
# Suppress warnings for missing hidden imports generated by this hook.
# Requires PyInstaller > 5.1 (with pyinstaller/pyinstaller#6914 merged); no-op otherwise.
warn_on_missing_hiddenimports = False

# Collect the AutoGraph part of `tensorflow` code, to avoid a run-time warning about AutoGraph being unavailable:
# `WARNING:tensorflow:AutoGraph is not available in this environment: functions lack code information. ...`
# The warning is emitted if source for `log` function from `tensorflow.python.autograph.utils.ag_logging` cannot be
# looked up. Not sure if we need sources for other parts of `tesnorflow`, though.
# Requires PyInstaller >= 5.3, no-op in older versions.
module_collection_mode = {
'tensorflow.python.autograph': 'py+pyz',
}

0 comments on commit e952014

Please sign in to comment.