t5x.config_utils package#

Utilities for configuring T5X binaries.


Configure and build a T5X launcher from Fiddle command line flags.

The output config, when called via fdl.build(), will execute function.


function – A function that launches a T5X job, e.g., train, eval, …


The buildable of the function or object, depending on whether

–fdl_config_file or –fdl_config was passed.

  • AssertionError – If not using_fdl().

  • ValueError – If both fiddle and gin arguments were passed on the command line.

  • ValueError – If both –fdl_config_file and –fdl_config were passed.

  • ValueError – If the object built via –fdl_config does not build as a call to function.

t5x.config_utils.direct_summarize_fiddle_config(model_dir, summary_writer, step, get_current_fiddle_config=None)[source]#

Writes fiddle config to the model dir and TensorBoard summary.

When passing this function to your fiddle config, don’t pass the private function; instead pass the fdl.Partial version of summarize_fiddle_config.

  • model_dir – Model directory to write to.

  • summary_writer – MetricWriter, if any.

  • step – Current step.

  • get_current_fiddle_config – This will be filled in by t5x.config_utils.prepare_to_summarize().


Update config so its summarize_fiddle_config calls can access it.


Wrapper for app.run that rewrites jax, gin, and fiddle flags.


Update config to remove get_current_fiddle_config calls.


Returns true if any Fiddle configuration flags are set.