Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplification: Merge load_from_metrics and load_from_checkpoint #994

Closed
awaelchli opened this issue Mar 1, 2020 · 3 comments
Closed

Simplification: Merge load_from_metrics and load_from_checkpoint #994

awaelchli opened this issue Mar 1, 2020 · 3 comments
Labels
feature Is an improvement or enhancement good first issue Good for newcomers help wanted Open to be worked on

Comments

@awaelchli
Copy link
Member

🚀 Feature

The two ways of loading a LightningModule from checkpoint only differ in one argument, the tags_csv.

Motivation

The code is almost identical for both and the purpose is the same. If we merge these two into one function, it would simplify the API.

Pitch

Combine
load_from_metrics(cls, weights_path, tags_csv, map_location=None) and
load_from_checkpoint(cls, checkpoint_path, map_location=None) into a single signature:

load_from_checkpoint(cls, checkpoint_path, tags_csv=None, map_location=None)

and make load_from_metrics deprecated.

Alternatives

keep as is, not a big deal :)

@awaelchli awaelchli added feature Is an improvement or enhancement help wanted Open to be worked on labels Mar 1, 2020
@williamFalcon
Copy link
Contributor

let’s do it!

@Borda Borda added the good first issue Good for newcomers label Mar 1, 2020
@Borda
Copy link
Member

Borda commented Mar 1, 2020

@awaelchli I agree, just which method shall be the remaining one?
load_from_metrics or load_from_checkpoint :]

@awaelchli awaelchli mentioned this issue Mar 1, 2020
5 tasks
@awaelchli
Copy link
Member Author

Probably load_from_checkpoint as it used more often :) I already made PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Is an improvement or enhancement good first issue Good for newcomers help wanted Open to be worked on
Projects
None yet
Development

No branches or pull requests

3 participants