mmengine icon indicating copy to clipboard operation
mmengine copied to clipboard

[Bug] Fix a MLflow vis backend bug when the config key is not `str`

Open zgjja opened this issue 1 year ago • 1 comments

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'),
    ...
]

zgjja avatar Sep 27 '24 05:09 zgjja

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 27 '24 05:09 CLAassistant

@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.

zgjja avatar Nov 14 '25 02:11 zgjja

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...

HAOCHENYE avatar Nov 17 '25 14:11 HAOCHENYE

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.

fanqiNO1 avatar Nov 17 '25 14:11 fanqiNO1