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

Update logs to write to CSV #2005

Merged
merged 7 commits into from
May 15, 2024
Merged

Update logs to write to CSV #2005

merged 7 commits into from
May 15, 2024

Conversation

frances-h
Copy link
Contributor

Resolve #1974
CU-86b094e79

@sdv-team
Copy link
Contributor

@frances-h frances-h requested a review from pvk-developer May 14, 2024 20:04
@frances-h frances-h marked this pull request as ready for review May 14, 2024 20:04
@frances-h frances-h requested a review from a team as a code owner May 14, 2024 20:04
@frances-h frances-h force-pushed the issue-1974-save-log-csv branch from d764c6e to fd1042a Compare May 14, 2024 20:09
@frances-h frances-h requested a review from amontanez24 May 14, 2024 20:54
Copy link
Member

@pvk-developer pvk-developer left a comment

Choose a reason for hiding this comment

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

Left some comments but open to discuss them.

sdv/logging/logger.py Outdated Show resolved Hide resolved
sdv/logging/logger.py Outdated Show resolved Hide resolved
sdv/logging/sdv_logger_config.yml Show resolved Hide resolved
sdv/multi_table/base.py Show resolved Hide resolved
sdv/logging/sdv_logger_config.yml Show resolved Hide resolved
@@ -4,24 +4,28 @@ loggers:
SingleTableSynthesizer:
level: INFO
propagate: false
format: CSV
Copy link
Contributor

Choose a reason for hiding this comment

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

the standard config for logging has the formatter key word which can be specified under the handler section. https://docs.python.org/3/library/logging.config.html#dictionary-schema-details

sdv/multi_table/base.py Show resolved Hide resolved
Copy link
Member

@pvk-developer pvk-developer left a comment

Choose a reason for hiding this comment

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

LGTM!

@frances-h
Copy link
Contributor Author

Sample logfile:

INFO,Instance,2024-05-15 14:35:34.602861,HMASynthesizer,HMASynthesizer_1.12.2.dev0_6dc42d45ad6044e7a46308596db128ed,,,
INFO,Fit,2024-05-15 14:35:38.887712,HMASynthesizer,HMASynthesizer_1.12.2.dev0_6dc42d45ad6044e7a46308596db128ed,2,668,15
INFO,Fit processed data,2024-05-15 14:35:39.201517,HMASynthesizer,HMASynthesizer_1.12.2.dev0_6dc42d45ad6044e7a46308596db128ed,2,668,11
INFO,Sample,2024-05-15 14:35:45.569641,HMASynthesizer,HMASynthesizer_1.12.2.dev0_6dc42d45ad6044e7a46308596db128ed,2,668,15
INFO,Sample,2024-05-15 14:35:48.678179,HMASynthesizer,HMASynthesizer_1.12.2.dev0_6dc42d45ad6044e7a46308596db128ed,2,1336,15
INFO,Instance,2024-05-15 14:36:01.630464,HSASynthesizer,HSASynthesizer_1.12.2.dev0_b1e1003996bf400b8e9f4c4c95b28d0b,,,
INFO,Fit,2024-05-15 14:36:01.738376,HSASynthesizer,HSASynthesizer_1.12.2.dev0_b1e1003996bf400b8e9f4c4c95b28d0b,2,668,15
INFO,Fit processed data,2024-05-15 14:36:01.944802,HSASynthesizer,HSASynthesizer_1.12.2.dev0_b1e1003996bf400b8e9f4c4c95b28d0b,2,668,11
INFO,Sample,2024-05-15 14:36:02.827084,HSASynthesizer,HSASynthesizer_1.12.2.dev0_b1e1003996bf400b8e9f4c4c95b28d0b,2,2004,15

@frances-h frances-h merged commit e2c3514 into main May 15, 2024
37 checks passed
@frances-h frances-h deleted the issue-1974-save-log-csv branch May 15, 2024 18:39
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.

Save usage log file as a csv
4 participants