ray
ray copied to clipboard
[AIR] Framework specific Checkpoint API consistency
We should make sure all of our framework-specific Checkpoints follow similar API design patterns.
- For creating checkpoints via different sources (for example, from a model object, from a path, etc.), these should be expressed as different methods and not overloaded onto the same method.
- All framework specific checkpoint classes should expose
def get_model(self, *args, **kwargs)
anddef get_preprocessor(self) -> Optional[Preprocessors]
methods. These can be defined in a private abstract base class that all framework specific checkpoint can inherit from. - All predictors should interact with framework specific checkpoints through
get_model
andget_preprocessor
APIs. - The framework-specific Predictors'
from_checkpoint
method should accept**get_model_kwargs
so users can specify kwargs that should be passed through tocheckpoint.get_model(...)
cc @xwjiang2010
@xwjiang2010 @amogkam @krfricke im happy to take a look at this if this hasn't been grabbed!
yeah please do so! and keep us updated. opening a draft PR would be the fastest way to collaborate here!
hey @heyitsmui, let me know if you are still planning to work on this :).
hey @xwjiang2010 i believe you mentioned you already have a draft PR for this? if not, i can get started on this :)
Ah the one I have is this: https://github.com/ray-project/ray/pull/28474 It's currently being blocked by another PR, which should be landed soon. I dont have other parts of this task planned yet.
ah thanks @xwjiang2010 for the clarification! i will take a stab at the rest of the tasks planned, on top of your current PR, thanks!
Thanks @heyitsmui! Let me know if you have any questions!
Working on this now, expect to have a draft PR out for review later today
awesome!
On Tue, Sep 27, 2022 at 9:06 AM Michael Mui @.***> wrote:
Working on this now, expect to have a draft PR out for review later today
— Reply to this email directly, view it on GitHub https://github.com/ray-project/ray/issues/28412#issuecomment-1259722803, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCRZZIAVIXY76SHKJN7N2DWAMLQJANCNFSM6AAAAAAQI572DQ . You are receiving this because you commented.Message ID: @.***>
@heyitsmui did you create a pr for this?
bump @heyitsmui ?
@richardliaw thanks for checking in, let me clean up my change, will have a PR out for review by tomorrow EOD
^^ @heyitsmui :)