[Docs] update config doc#1136
Open
tonysy wants to merge 3 commits intoopen-mmlab:dev-1.xfrom
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev-1.x #1136 +/- ##
============================================
+ Coverage 0.02% 91.19% +91.17%
============================================
Files 121 131 +10
Lines 8217 9792 +1575
Branches 1368 1542 +174
============================================
+ Hits 2 8930 +8928
+ Misses 8215 665 -7550
- Partials 0 197 +197
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
mzr1996
requested changes
Dec 19, 2022
| from mmcls import registry | ||
| from mmcls.utils import register_all_modules | ||
|
|
||
| register_all_modules() |
Member
There was a problem hiding this comment.
Better to use register_all_modules(init_default_scope=False), which won't influence the default scope settings.
Comment on lines
+23
to
+29
| valid_registry = dict() | ||
| for attr in dir(registry): | ||
| attr_registry = getattr(registry, attr) | ||
| if isinstance(attr_registry, Registry): | ||
| valid_registry[attr] = attr_registry | ||
| else: | ||
| pass |
Member
There was a problem hiding this comment.
Suggested change
| valid_registry = dict() | |
| for attr in dir(registry): | |
| attr_registry = getattr(registry, attr) | |
| if isinstance(attr_registry, Registry): | |
| valid_registry[attr] = attr_registry | |
| else: | |
| pass | |
| mmcls_registry = {k: getattr(registry, k) for k in registry.__all__} |
Comment on lines
+7
to
+27
| <!-- TOC --> | ||
|
|
||
| - [Learn about Configs](#learn-about-configs) | ||
| - [Philosophy of Configuration System](#philosophy-of-configuration-system) | ||
| - [Everything is Configurable](#everything-is-configurable) | ||
| - [Less Code, More Reuse](#less-new-code-more-reuse) | ||
| - [Make Custom Dataset/Model/Optimization Flexible](#make-custom-datasetmodeloptimization-flexible) | ||
| - [Happy Reading, Easy Coding](#happy-reading-easy-coding) | ||
| - [Overall of Config File](#overall-of-config-file) | ||
| - [Config Structure](#config-structure) | ||
| - [Model settings](#model-settings) | ||
| - [Data settings](#data-settings) | ||
| - [Schedule settings](#schedule-settings) | ||
| - [Runtime settings](#runtime-settings) | ||
| - [Inherit and Modify Config File](#inherit-and-modify-config-file) | ||
| - [Use intermediate variables in configs](#use-intermediate-variables-in-configs) | ||
| - [Ignore some fields in the base configs](#ignore-some-fields-in-the-base-configs) | ||
| - [Use some fields in the base configs](#use-some-fields-in-the-base-configs) | ||
| - [Modify Config in Command](#modify-config-in-command) | ||
|
|
||
| <!-- TOC --> |
Member
There was a problem hiding this comment.
I think we don't need the TOC since there is already a TOC on the right side.
This file contains hidden or 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
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.
Update config doc
Motivation
Please describe the motivation of this PR and the goal you want to achieve through this PR.
Modification
Please briefly describe what modification is made in this PR.
BC-breaking (Optional)
Does the modification introduce changes that break the backward compatibility of the downstream repositories?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.
Use cases (Optional)
If this PR introduces a new feature, it is better to list some use cases here and update the documentation.
Checklist
Before PR:
After PR: