-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Feature] Add SegmindLoggerHook #1650
Conversation
Hi @saurbhc , thanks for your contribution. We can refer to https://github.com/open-mmlab/mmcv/blob/master/tests/test_runner/test_hooks.py#L1212 to add a unit test. |
- add SegmindLoggerHook import in: mmcv/runner/__init__.py mmcv/runner/hooks/__init__.py mmcv/runner/hooks/logger/__init__.py
@zhouzaida I have added a unit test. |
- Add Docstring to SegmindLoggerHook - Use get_loggable_tags(...)
- mmcv/runner/hooks/logger/segmind.py moved docs from __init__ to class ... update ImportError line-indentation remove unwanted method - tests/test_runner/test_hooks.py update assert_called_with only on hook.segmind_mlflow_log
@zhouzaida
Here's the output of $ pre-commit
flake8...................................................................Passed
seed isort known_third_party.............................................Passed
isort....................................................................Failed
- hook id: isort
- files were modified by this hook
Fixing tests/test_runner/test_hooks.py
yapf.....................................................................Failed
- hook id: yapf
- files were modified by this hook
Trim Trailing Whitespace.................................................Passed
Check Yaml...........................................(no files to check)Skipped
Fix End of Files.........................................................Passed
Fix requirements.txt.................................(no files to check)Skipped
Fix double quoted strings................................................Passed
Check for merge conflicts................................................Passed
Fix python encoding pragma...............................................Passed
Mixed line ending........................................................Passed
Markdownlint.........................................(no files to check)Skipped
codespell................................................................Passed
docformatter.............................................................Passed To reproduce this, run |
We can disable the yapf. |
disable yapf on test_hooks.py imports Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Update SegmindLoggerHook docstring Co-authored-by: Jiazhen Wang <47851024+teamwong111@users.noreply.github.com>
removed un-used statements
18cd85b
to
6621fab
Compare
- code cleanup
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.
Could you please successfully run a task with segmind and show it in the pr content? There are few segmind documents, and AWS is required for configuration, verification is troublesome for me.
- add interval parameter in __init__ method
@teamwong111 I have verified I am attaching these for your reference:
|
More arguments should also be passed. mmcv/mmcv/runner/hooks/logger/base.py Lines 14 to 20 in b6e1ab7
|
- more arguments passes to __init__ method - interval - ignore_last - reset_flag - by_epoch
Can someone please review this? |
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.
LGTM
Hey @zhouzaida, Can we merge this PR? |
Definitely. |
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.
LGTM.
Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
Hi @saurbhc , |
f63cffa
to
3801f1b
Compare
Motivation
I would like to use https://github.com/segmind/segmind as a Logger.
Modification
I added a new LoggerHook child to the HOOKS registry.
Use cases (Optional)
Logging training parameters with Segmind.