[BUG] `load_text` 和 `load_dict` 读取本地编码中的文件内容,而不是 UTF-8
作者: ppcvote创建于 2026年9月26日更新于 2026年9月30日
标签bugarea/trackinghas-closing-prready
`mlflow.log_text` writes the artifact as UTF-8 (`open(tmp_path, "w", encoding="utf-8")` in `MlflowClient.log_text`), but `mlflow.artifacts.load_text` and `load_dict` read it back with `open(local_artifact)` (`mlflow/artifacts/__init__.py:188` and `:222`), which uses the locale encoding. Wherever that is not UTF-8, the round trip in `load_text`'s own docstring example breaks as soon as the text is not ASCII:
内容来源: mlflow/mlflow