-
Notifications
You must be signed in to change notification settings - Fork 179
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
[V2 Logger] registry for default func/class #1539
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
horheynm
changed the title
registry for default func/class
[V2 Logger] registry for default func/class
Jan 17, 2024
bfineran
reviewed
Jan 18, 2024
src/deepsparse/loggers_v2/registry/loggers/prometheus_logger.py
Outdated
Show resolved
Hide resolved
bfineran
approved these changes
Jan 22, 2024
horheynm
added a commit
that referenced
this pull request
Feb 15, 2024
* logger feature beanch * [V2 Logger] utils for import (#1536) * utils for import * clean up + tests * [V2 Logger] registry for default func/class (#1539) * registry for default func/class * prometheus logger * clean up * clean up * remove ListLogger import, moved to tests * add base logger for type checking * exmaple * [V2 Logger] Filters (#1540) * filters * cleaner logic * fix bug -- if config has duplicated tag.func with different freq * delete config test * move unravel_value_as_generator to pattern.py * tests * doc string * exact match * async submitter (#1538) * manager (#1541) * [V2 Loggers] logger manager patch (#1560) * manager * doc string * [V2 Loggers] config file (#1533) * config file * test * comments * comments * pipeline tests (#1553) * [V2 Logger] root logger (#1542) * root logger * only get func's with respect to the tag * fix bug for duplicated tag.log_type * clena up * doc strings: * loosen up rules for capture * [V2 Logger] factory (#1537) * factory * docstring * [V2 Logger] logger middleware (#1543) * logger middleware * yield individual eleeents in a list * comments * edit state * polish, passes tests * pass middleware * edit condition to add logger to inference state * set default logger manager * delete og prometheus logger test * fix in test_basic_logger * move loggers to legacy and pass tests, circular imports * move tests/deepsparse/loggers to tests/deepsparse/legacy/loggers and pass tests * move loggers_v2 to logger for src and tests, pass logger tests * fix tests and rename legacy logger tests to _legacy_ * pass tests, wait for async logs to complete' * doc string typo and change default to re:.* * fix frequency test bug on text gen * wait for async loggers to finish before counting * get rid of capture, inconsistent number of fields per log calls cause error
horheynm
added a commit
that referenced
this pull request
Feb 20, 2024
* logger feature beanch * [V2 Logger] utils for import (#1536) * utils for import * clean up + tests * [V2 Logger] registry for default func/class (#1539) * registry for default func/class * prometheus logger * clean up * clean up * remove ListLogger import, moved to tests * add base logger for type checking * exmaple * [V2 Logger] Filters (#1540) * filters * cleaner logic * fix bug -- if config has duplicated tag.func with different freq * delete config test * move unravel_value_as_generator to pattern.py * tests * doc string * exact match * async submitter (#1538) * manager (#1541) * [V2 Loggers] logger manager patch (#1560) * manager * doc string * [V2 Loggers] config file (#1533) * config file * test * comments * comments * pipeline tests (#1553) * [V2 Logger] root logger (#1542) * root logger * only get func's with respect to the tag * fix bug for duplicated tag.log_type * clena up * doc strings: * loosen up rules for capture * [V2 Logger] factory (#1537) * factory * docstring * [V2 Logger] logger middleware (#1543) * logger middleware * yield individual eleeents in a list * comments * edit state * polish, passes tests * pass middleware * edit condition to add logger to inference state * set default logger manager * delete og prometheus logger test * fix in test_basic_logger * move loggers to legacy and pass tests, circular imports * move tests/deepsparse/loggers to tests/deepsparse/legacy/loggers and pass tests * move loggers_v2 to logger for src and tests, pass logger tests * fix tests and rename legacy logger tests to _legacy_ * pass tests, wait for async logs to complete' * doc string typo and change default to re:.* * fix frequency test bug on text gen * wait for async loggers to finish before counting * get rid of capture, inconsistent number of fields per log calls cause error
horheynm
added a commit
that referenced
this pull request
Feb 22, 2024
* [V2 Logger] Feature branch (#1516) * logger feature beanch * [V2 Logger] utils for import (#1536) * utils for import * clean up + tests * [V2 Logger] registry for default func/class (#1539) * registry for default func/class * prometheus logger * clean up * clean up * remove ListLogger import, moved to tests * add base logger for type checking * exmaple * [V2 Logger] Filters (#1540) * filters * cleaner logic * fix bug -- if config has duplicated tag.func with different freq * delete config test * move unravel_value_as_generator to pattern.py * tests * doc string * exact match * async submitter (#1538) * manager (#1541) * [V2 Loggers] logger manager patch (#1560) * manager * doc string * [V2 Loggers] config file (#1533) * config file * test * comments * comments * pipeline tests (#1553) * [V2 Logger] root logger (#1542) * root logger * only get func's with respect to the tag * fix bug for duplicated tag.log_type * clena up * doc strings: * loosen up rules for capture * [V2 Logger] factory (#1537) * factory * docstring * [V2 Logger] logger middleware (#1543) * logger middleware * yield individual eleeents in a list * comments * edit state * polish, passes tests * pass middleware * edit condition to add logger to inference state * set default logger manager * delete og prometheus logger test * fix in test_basic_logger * move loggers to legacy and pass tests, circular imports * move tests/deepsparse/loggers to tests/deepsparse/legacy/loggers and pass tests * move loggers_v2 to logger for src and tests, pass logger tests * fix tests and rename legacy logger tests to _legacy_ * pass tests, wait for async logs to complete' * doc string typo and change default to re:.* * fix frequency test bug on text gen * wait for async loggers to finish before counting * get rid of capture, inconsistent number of fields per log calls cause error * fix src. reference (#1607) --------- Co-authored-by: Benjamin Fineran <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Desctiption
Set up a registry folder and save all func, clases in the
__init__
of the registry folder.Functions
Has:
max, average, identity
Loggers
PythonLogger (default import logging)
ListLogger (log will append to a list)
Prometheus logger is a tweaked version of the exiting prometheus logger: https://github.com/neuralmagic/deepsparse/blob/main/src/deepsparse/loggers/prometheus_logger.py
tests are also the tweaked version of the exiting: https://github.com/neuralmagic/deepsparse/blob/main/tests/deepsparse/loggers/test_prometheus_logger.py