optuna / optuna-dashboard

Real-time Web Dashboard for Optuna.
https://optuna-dashboard.readthedocs.io/en/latest/
Other
521 stars 86 forks source link

CSV ArtifactViewer whites out when clicking a square #911

Closed nabenabe0928 closed 3 months ago

nabenabe0928 commented 3 months ago

Description

When I upload this CSV file as an artifact to a study and click the square (see Figure 1) at the artifact, it whites out.

image Figure 1. The icon of the artifact

image Figure 2. The dashboard page

The page in Figure 2. whites out when clicking the square button. The URL does not change, the Go Back button does not resolve the problem. Refreshing the page fixes the problem.

How to Reproduce

  1. Start dashboard
  2. Upload this CSV file to the dashboard
  3. Click the button
  4. White out

Python version

3.9

Optuna version

4.0.0b0

optuna-dashboard version or git revision

The HEAD of the main branch

Web browser

Google Chrome

c-bata commented 3 months ago

@keisuke-umezawa Could you take a look at this issue?

c-bata commented 3 months ago

I also notice an another issue that TableArtifactViewer is not enabled when using trial artifacts. https://github.com/optuna/optuna-dashboard/pull/877

keisuke-umezawa commented 3 months ago

@c-bata ok! I will handle it.

nabenabe0928 commented 3 months ago

@keisuke-umezawa @c-bata

Replacing an empty string with a random string resolved the issue:

    return keys.map((key) => ({
      header: key || " ",
      accessorFn: (info: Data) =>
        typeof info[key] === "object" ? JSON.stringify(info[key]) : info[key],
      enableSorting: true,
      enableColumnFilter: false,
    }))

https://github.com/optuna/optuna-dashboard/blob/main/optuna_dashboard/ts/components/Artifact/TableArtifactViewer.tsx#L58

I also checked if duplications in header_key cause any problems, but I did not observe any issues.

c-bata commented 3 months ago

Fixed in #913.