[Feature] Inheritance of global variables
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Reproduce the setup described with base.py, a.py, b.py, c.py, and main.py, starting from the "Duplicate key is not allowed among bases" error. Read the configuration inheritance behavior and determine the intended handling of shared global variables. Done should include an agreed inheritance behavior and coverage for this case.
Written by the indexing model from the issue text.
Description
What is the feature?
I have the following request:
I have a global variable A that is required by several config files. I placed it in base.py and had a.py, b.py, and c.py inherit from it. Finally, I used main.py to include these three files.
However, this raises an error: "Duplicate key is not allowed among bases".
How can I elegantly resolve this issue?
Any other context?
No response
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 470
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from open-mmlab/mmengine
-
[Bug] fail to build with python 3.13Possibly taken @hubutui claimed this 709 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
open-mmlab/mmengine#1616 · 6 comments · 3 reactions ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
open-mmlab/mmengine#1697 · 1 comment ·
-
[Bug] WandbVisBackend can't set the X‑axis to epoch, because LoggerHook does not consistently pass the epoch valueMay be free again A pull request for this issue was closed without being merged. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 68/100
open-mmlab/mmengine#1692 ·
-
[Bug] MlflowVisBackend fails due to use of deprecated filesystem storePossibly taken @appleweiping claimed this 85 days ago. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 58/100
open-mmlab/mmengine#1687 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
open-mmlab/mmengine#1684 ·
All issues in open-mmlab/mmengine
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 69/100
anderspitman/awesome-tunneling#330 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
521xueweihan/HelloGitHub#4676 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 18 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
pandas-dev/pandas-stubs#2155 ·
Maintainers usually reply within 1 day
-
essreduce
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
Maintainers usually reply within 1 day