Function pyxel.run_mode should return a DataTree object instead of a Dataset.
pyxel.run_mode
DataTree
Dataset