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

Neptune Logger improvement #908

Closed
jakubczakon opened this issue Feb 21, 2020 · 5 comments
Closed

Neptune Logger improvement #908

jakubczakon opened this issue Feb 21, 2020 · 5 comments
Assignees
Labels
feature Is an improvement or enhancement help wanted Open to be worked on logger Related to the Loggers
Milestone

Comments

@jakubczakon
Copy link
Contributor

🚀 Feature

I think we could improve user experience for people logging experiment
data with neptune if we let people use the logger after the training is finished.

An example would be:

neptune_logger = NeptuneLogger(..., close_after_train=False)
trainer = Trainer(logger=neptune_logger)
trainer.fit(CoolSystem())
  • log some external validation metric
auc = get_external_validation_auc()
neptune_logger.experiment.log_metric('roc_auc_score', auc)
  • log performance chart like roc auc
fig, ax = plt.subplots(figsize=(16, 12))
plot_roc(y, y_pred, ax=ax)
neptune_logger.experiment.log_image('roc_curve', fig)
  • log final model
torch.save(model.state_dict(), 'final_model.pth')
neptune_logger.experiment.log_artifact('final_model.pth')

I think the only thing that needs changing is this:

    @rank_zero_only
    def finalize(self, status):
        if self.close_after_train:
             self.experiment.stop()

Additional context

I would be happy to create a PR

@jakubczakon jakubczakon added feature Is an improvement or enhancement help wanted Open to be worked on labels Feb 21, 2020
@Borda Borda added this to the 0.6.2 milestone Feb 21, 2020
@Borda
Copy link
Member

Borda commented Feb 21, 2020

@jakubczakon great suggestions, PR is really welcome!
Btw, would you like extend this kind of feature also for other loggers?

@jakubczakon
Copy link
Contributor Author

Sure thing!

@Borda
Copy link
Member

Borda commented Mar 30, 2020

@jakubczakon how is it going? ^^

@jakubczakon
Copy link
Contributor Author

Oh, I must have miscommunicated.
I wrote in the PR:

@Borda
I haven't added this option to other loggers as I saw people did some work there already (comet).
I can add this close_after_fit option to other loggers but I just don't want to step into other folks territory (where they may not appreciate me being) :).
It's your call.

And since you haven't answered there I assumed we would just stick with NeptuneLogger.
Would you like me to play with those other ones?
I'd definitely feel ok improving/updating TestTubeLogger and the open-source ones but I don't feel good about touching the "commercial" ones.

What do you think @Borda ?

@Borda
Copy link
Member

Borda commented Mar 30, 2020

that sounds fair, for TestTubeLogger it is different story/repo..
so closing this issue though 🤖

@Borda Borda closed this as completed Mar 30, 2020
@Borda Borda added the logger Related to the Loggers label Aug 4, 2020
marcociccone added a commit to marcociccone/yapt that referenced this issue Oct 8, 2020
- Neptune supported
- Tensorboard supported
- Python logging supported
- Sacred is going to be deprecated

TODOs
- improve Neptune for images
    - Lightning-AI/pytorch-lightning#908
- check if experiment status is correctly handled
- check how to restore an experiment
@Borda Borda modified the milestones: v0.7., v0.7.x Apr 18, 2021
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 help wanted Open to be worked on logger Related to the Loggers
Projects
None yet
Development

No branches or pull requests

2 participants