Base class from which all rewriters should inherit.
Attributes |
name
|
Name of the rewriter.
Should not be None nor empty.
|
Methods
View source
perform_rewrite(
original_model: tfx.components.trainer.rewriting.rewriter.ModelDescription
,
rewritten_model: tfx.components.trainer.rewriting.rewriter.ModelDescription
)
Invoke all validations and perform the rewrite.
Args |
original_model
|
A base_rewriter.ModelDescription object describing the
original model.
|
rewritten_model
|
A base_rewriter.ModelDescription object describing the
location and type of the rewritten model.
|
Raises |
ValueError
|
if the model was not successfully rewritten.
|