Missed TensorFlow Dev Summit? Check out the video playlist. Watch recordings

tfx.components.trainer.rewriting.rewriter_factory.create_rewriter

View source on GitHub

Instantiates a new rewriter with the given type and constructor arguments.

tfx.components.trainer.rewriting.rewriter_factory.create_rewriter(
    rewriter_type, *args, **kwargs
)

Args:

  • rewriter_type: The rewriter subclass to instantiate (can be all lowercase).
  • *args: Positional initialization arguments to pass to the rewriter.
  • **kwargs: Keyward initialization arguments to pass to the rewriter.

Returns:

The instantiated rewriter.

Raises:

  • ValueError: If unable to instantiate the rewriter.