-
Notifications
You must be signed in to change notification settings - Fork 5
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
Lighting logger integration #241
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lightning's logger for itwinai seems very well done. I would improve a couple of things I left as comments and add more tests. Also, the CI pipeline is currently failing since there are two test modules with the same name (see comments)
Could you add the loggers module here?
itwinai/src/itwinai/tests/sanity_check.py
Line 25 in 86f536f
torch_modules = [ |
@annaelisalappe it seems that you have a doppelganger in the commits history Also, could you update this page with an example on the lightning logger please? https://itwinai.readthedocs.io/latest/how-it-works/loggers/explain_loggers.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
micro fixes before merging
src/itwinai/loggers.py
Outdated
# -------------------------------------------------------------------------------------- | ||
# Part of the interTwin Project: https://www.intertwin.eu/ | ||
# | ||
# Created by: Anna Elisa Lappe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I created it :)
src/itwinai/torch/loggers.py
Outdated
print(f"Path: {path}") | ||
print(f"Identifier: {artifact_path}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove these prints. Or is there a reason to have them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, I will remove them :)
This PR adds an Adapter (Logger) to enable logging from within a Lightning Trainer. This is necessary because Lightning provides its own logger component, which any custom loggers have to comply with. However, should a user want to log using an itwinai logger e.g. the Prov4MLLogger, they need an adapter to convert the lightning logger calls to calls to the itwinai logger.