-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
Implementing Logging Configuration for Notebook Logging #1633
Implementing Logging Configuration for Notebook Logging #1633
Conversation
Before a pull request is accepted, it must meet the following criteria:
|
Codecov Report
@@ Coverage Diff @@
## master #1633 +/- ##
==========================================
- Coverage 61.89% 61.86% -0.03%
==========================================
Files 62 62
Lines 5732 5738 +6
==========================================
+ Hits 3548 3550 +2
- Misses 2184 2188 +4
Continue to review full report at Codecov.
|
3c55991
to
900307b
Compare
9d48f12
to
fa0a59e
Compare
8388c36
to
93d3cb4
Compare
Please add documentation to this. |
Also, This needs to be moved to a better place in the CodeBase. Need to discuss where a new |
faa327d
to
09cf417
Compare
2c0d0a3
to
e69d467
Compare
cafd781
to
1efe8cb
Compare
Changed the TestSimulationLogging class to comply to PEP8 styling
98cda65
to
ba9f67e
Compare
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 make sure input to this function is validated, or at least don't let it pass silently without warning or error if an invalid value is encountered
Changed some implementation based on requested changes
fbb4c3c
to
3a1f29f
Compare
2e50fee
to
6d21a61
Compare
… arguments Default value now falls to Debug->Log_state variable Log_state functional parameter has None as default value
6d50c24
to
f63b8d5
Compare
…n YAML & Functional parameters are specified Updated the Documentation for the newer changes
70109cf
to
f23f59e
Compare
* Implementing Logging Configuration for Notebook Logging via Function * Adding Docstring to logging_state() * Making logging states independent of case of arugment passed * Adding Debug YAML for Logging & Debugging * Changing implementation to a single unified flag for logging level * Moved logging_state() from montecarlo_logger to __init__ for TARDIS * Adding support for logging messages at specified level * Moving check for yaml & functional argument to logging_state function * Added functionality for the Debug section of the YAML to be optional Implemented check for Logging level & displaying Dataframe appropriately * Added Tests for logging output configuration via Functional Input & YAML File Added new YAML test file for testing YAML arguments for logging configuation * Fixed display() still showing the plasma stratification values table when using specific logging at other logging levels than INFO * Reworded description of the specific_logging parameter in debug.yml * Added tests for simulation when both parameters, functional & YAML, are present Changed debug.yml to be consistent with other test YAML configurations * Changed the number of iterations & test cases for faster test executions * Fixed docstring in __init__.py to impart the current implementation of the logging_state func * Restructuring tests for faster simulation runs * Added Tutorial Documentation for logging configuration * Fixed & reworded some explaination in the Tutorial for better understanding * Changed Quickstart notebook to incorporate new logging config in run_tardis() * Changed the notebook as request, grammer changes * Changed the python version to 3.7.10, reran the notebooks * Fixed some inconsistencies in tutorial grammar * Fixed with requested changes * Made logging_level constant value Changed the TestSimulationLogging class to comply to PEP8 styling * Fixed metadata for scroll in quickstart notebook * Renamed logging_level & specific_logging in debug schema to log_state & specific resp * Added explaination of list_of_filters Changed some implementation based on requested changes * Added raising of an expection when invalid log_state parameter value is passed * Changed implementation for the log_state function as well as the YAML arguments Default value now falls to Debug->Log_state variable Log_state functional parameter has None as default value * Added message for informing the user which parameter will be used when YAML & Functional parameters are specified Updated the Documentation for the newer changes * [build docs]
This PR aims to implement a configuration for the Notebook logging such that logging can be turned on, off or set to a particular log level for better information.
Description
This implementation of the logging function allows for the following possible state:
Implementation via YAML has also been done. New log_state flag is used to control the logging level as well as the state of the logger.
A new Debug section has been created for the JSON Schema. This section caters to all the Debugging parameters that can be set for TARDIS configuration. Debug Packets will also be moved here soon after discussion.
Motivation and context
Allowing for configurable logging levels & state would be a good addition to TARDIS. It would allow for running the simulation without the logs for graphs & other relevant information. Also, gives the opportunity to get only the specified information from the logger for the simulation ie logs of a particular level.
Screenshots
The screenshots here shows some of the different settings & their corresponding output for the logging configuration.
Without specifying any flag:
The logger doesn't print any information for the Simulation.
Specifying the
log_state
flag (functional argument) {setting to "Debug" Level}:The simulation runs for 2 iterations.
Specifying the
logging_level:
flag (YAML argument) {setting to "Warning" Level}:The simulation runs for 2 iterations.
Specifying the
logging_level:
as well aslog_state
flag (functional & YAML argument, both specified) {setting to "Info" Level for functional parameter & "Warning" Level for YAML}:The simulation runs for 2 iterations.
Note:
Log_state & log_state {YAML file parameter} both specified
&Log_state will be used for Log Level Determination
will be printed for the user to notify that both parameters have been given. Later on this will implemented via a logging statement as well.Documentation Preview : https://dhruvsondhi.github.io/tardis/branch/notebook_logging_config/io/optional/logging_configuration.html
How has this been tested?
Type of change
Checklist