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

Added extra checkpoint data #184

Merged
merged 7 commits into from
May 19, 2019
Merged

Added extra checkpoint data #184

merged 7 commits into from
May 19, 2019

Conversation

BloodAxe
Copy link
Contributor

Allows to save additional metadata to checkpoint files:

runner.train(
        model=model,
        ....,
        extra_checkpoint_data={
            'class_names': ['Cat', 'Dogs']
        }
)

@@ -102,6 +102,9 @@ def on_epoch_end(self, state: RunnerState):
if state.stage.startswith("infer"):
return

extra_checkpoint_data = state.extra_checkpoint_data \
if hasattr(state, 'extra_checkpoint_data') else {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's just add checkpoint_data to state init, so we can use it also from Config API.
proposed way:

state_params:
    checkpoint_data:
        exp: "thin is my best experiments"
        date: "today"

This will also reduce such hasattr check.

Copy link
Contributor

@hexfaker hexfaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's squash all small commits into one or two. Keep our history simple and clean!

@Scitator Scitator merged commit 9c3d932 into master May 19, 2019
@Scitator Scitator deleted the feature/extra-checkpoint-data branch May 22, 2019 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants