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

do logging within run_experiment() #37

Merged
merged 3 commits into from
Sep 16, 2019

Conversation

tripl3a
Copy link
Contributor

@tripl3a tripl3a commented Aug 2, 2019

So that it will also work for the example Option 1: Run experiment(s) from config.

Copy link
Contributor

@Timoeller Timoeller left a comment

Choose a reason for hiding this comment

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

Sorry, I have found a bug that needs fixing and made a comment inside the code.

@Timoeller Timoeller requested review from Timoeller and removed request for brandenchan August 5, 2019 09:52
@Timoeller Timoeller self-assigned this Aug 5, 2019
Copy link
Contributor

@Timoeller Timoeller left a comment

Choose a reason for hiding this comment

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

Thanks @tripl3a for this PR. It greatly improves upon the functionality and makes things a lot clearer.

I took my time to look into the code and found a little bug. I have added detailed descriptions as a comment in the code.

@@ -11,7 +11,7 @@
from farm.data_handler.processor import Processor
from farm.train import Trainer
from farm.train import WrappedDataParallel
from farm.utils import set_all_seeds, initialize_device_settings
from farm.utils import set_all_seeds, initialize_device_settings, MLFlowLogger
from farm.utils import MLFlowLogger as MlLogger
Copy link
Contributor

Choose a reason for hiding this comment

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

Branden is currently unavailable so I took a deeper look into the code and actually found a potential bug.

First a general comment:
We want to always use "MlLogger" for logging. Every logger class should extend BaseLogger, Baselogger has clearly defined functions for logging. So we can swap MLflow with Tensorboard or any other logging in the future by doing
from farm.utils import XXX as MlLogger
I know this is not yet in the code. Could you adjust to this style in your PR? If you dont have time, I will take over and work on that.

Now to the bug: the MlLogger (not the MLFlowLogger) in experiment.py is actually used in initialize_optimizer(), which is called from a lot of other places. The MlLogger is called without initializing an experiment. The experiment is only initialized for MLFlowLogger. Since MlLogger and MlFlowlogger are the same (for now) it is not a problem, only when they are not it will create an error.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the comprehensive feedback! At the moment I don't have time, but I can take a look at it next week or the week after.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated the PR.
@Timoeller would you now like to merge this PR despite the possible bug?

tripl3a and others added 2 commits September 13, 2019 18:28
adjusted as suggested by @Timoeller + compatible with current FARM master branch
@Timoeller Timoeller merged commit 05eab4b into deepset-ai:master Sep 16, 2019
@Timoeller
Copy link
Contributor

Thanks for finishing this PR @tripl3a

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.

2 participants