Skip to content

Conversation

@nfelt
Copy link
Contributor

@nfelt nfelt commented Jan 26, 2021

This cleans up our main.py to reduce boilerplate needed for the minimal functionality:

  1. We migrate a few lines of global initialization (which are themselves short, but have longer comments) into a new global_init() helper in a main_lib.py library; this supersedes program.setup_environment(). (We don't want to just move everything into program since we don't want it to pick up a dependency on TensorFlow.)

  2. We remove some fallback logic in main.py that handled the case where we don't have absl available. It's been a required dep for years (since Replace tf.logging with absl.logging #1654).

This is intended to simplify the process of forking main.py as is being done in #4588.

@nfelt nfelt force-pushed the nfelt-simplify-main branch from 72fc80a to 84929e3 Compare January 26, 2021 02:34
@nfelt nfelt requested a review from stephanwlee January 26, 2021 02:37
@nfelt nfelt mentioned this pull request Jan 26, 2021
Base automatically changed from nfelt-cleaner-http-protocol-override to master January 26, 2021 18:43
@nfelt nfelt merged commit 8a1dd4d into master Jan 26, 2021
@nfelt nfelt deleted the nfelt-simplify-main branch January 26, 2021 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants