mmengine
mmengine copied to clipboard
[Bug] Fix a MLflow vis backend bug when the config key is not `str`
Motivation
As title, when Config key object contains something other than str, this code would failed, a config example is in the RTMO in mmpose:
epoch_attributes={
280: {
"proxy_target_cc": True,
"overlaps_power": 1.0,
"loss_cls.loss_weight": 2.0,
"loss_mle.loss_weight": 5.0,
"loss_oks.loss_weight": 10.0,
}
},
Modification
Fix this by converting it to str first
Use cases (Optional)
This PR only works when using MLflowVisBackend in a config file like:
vis_backends = [
dict(type='MLflowVisBackend', save_dir='xxx', tracking_uri='http://xxx:xxx'),
...
]
@HAOCHENYE i think this one can be reviewed.
P.S. ruff may be the better tool for linting when working with uv. popular packages like transformers are using it.
Setuptools may not be the best choice for editable installations due to issues like this: https://github.com/microsoft/pyright/issues/3846.
I'm planning to replace setuptools with hatch. Refactoring mmengine with a new lint config is reasonable, but it will introduce many conflicts with existing PRs. I'll need some time to handle this...
Setuptools may not be the best choice for editable installations due to issues like this: microsoft/pyright#3846.
I'm planning to replace setuptools with hatch. Refactoring mmengine with a new lint config is reasonable, but it will introduce many conflicts with existing PRs. I'll need some time to handle this...
Maybe I can also help migrate linting to Ruff—I've recently been using Ruff to format my own development workflow. Although I'm still using setuptools for installation.