Commit 6c875f0d authored by Igor Saprykin's avatar Igor Saprykin Committed by TensorFlower Gardener
Browse files

Add the 'is_the_final_export' signal to Exporters.

Instead of adding the option to respect `is_the_final_export` into the `Exporter` that also does garbage collection, such exporter is split into two:  `LatestExporter` and `FinalExporter`.  There is a concern that options `exports_to_keep` and `only_the_final_export` overlap significantly and are somewhat in conflict.  What does it mean to keep last 5 exports but only export the final one?

After splitting in two classes there is a lot of code duplication.  The common implementation is gathered in a private base class.

When the training ends, the final export is performed via `Exporter.export()` call.  That final export is going to have is_the_final_export parameter being set to true.

If `TrainSpec.max_steps` is `None`, then "when training ends" is undefined.  We are going to train forever.  In that case, `is_the_final_export` is going to be always False.  I added a note about it.

PiperOrigin-RevId: 171185881
parent 8818469f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment