I'm looking for some more detailed documentation about flyte checkpoints
from the doc it appears
Copy code
current_context().checkpoint
returns a file like object - but no further details are provided
specifically I'd like to know if there are integrations with frameworks like keras (the native keras checkpointing mechanism expects a directory, not a single file)
and if not, is there a mechanism to write a new file instead of appending to a single file
f
freezing-airport-6809
02/23/2023, 3:59 PM
Cc @boundless-pizza-95864 did you have an integration with huggingface
freezing-airport-6809
02/23/2023, 3:59 PM
Yes you can write new files or byte streams
b
boundless-pizza-95864
02/23/2023, 4:07 PM
We're checkpointing directories (coming from the huggingface trainer in our case). You can use the save/restore methods on a
Checkpoint
instance they work with directories
👍 1
c
chilly-bird-33083
02/23/2023, 4:18 PM
Do you happen to have an example?
b
boundless-pizza-95864
02/23/2023, 5:07 PM
Here’s what we essentially do for saving. I haven’t used Keras for a while but if you can get the path of the current checkpoint in a callback, you should be able to do the same: