Skip to content

Fix the visual interface with pandas 3 and non-numeric metric values - #7

Merged
xixianliao merged 1 commit into
langtech-bsc:mainfrom
xixianliao:main
Oct 1, 2026
Merged

xixianliao merged 1 commit into
langtech-bsc:mainfrom
xixianliao:main

Conversation

@xixianliao

Copy link
Copy Markdown

Fixes found while testing the Streamlit app with the v2 environment (venv-v5, pandas 3).

  • Overview chart: the selected metric is now read as numbers. Perturbation results store dicts in the metric columns, so the whole column was read as text; max() then compared strings and the radial axis could be cut below most scores (e.g. a BLEU of 9.07 gave an axis limit of about 14). This also affected v1.
  • pandas 3: the language lists are sorted with sorted(), since unique() no longer returns an array with an in-place sort().
  • Translation page: removed an unused matplotlib import. matplotlib is not in the requirements and only worked when the cluster Python module happened to provide it.

- Read the selected metric as numbers in the overview chart. Perturbation
  results store dicts in the metric columns, so the whole column was read
  as text: max() then compared strings and the radial axis could be cut
  below most scores.
- Sort the language lists with sorted(); with pandas 3, unique() returns
  an array without an in-place sort().
- Remove an unused matplotlib import, which is not in the requirements.
@xixianliao
xixianliao marked this pull request as ready for review October 1, 2026 16:00
@xixianliao
xixianliao merged commit 401e5dc into langtech-bsc:main Oct 1, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant