Skip to content

[Tune] ProgressReporter default_columns is shared across instances #8913

@TomVeniat

Description

@TomVeniat

What is the problem?

When adding a new column to a ProgressReporter that used the DEFAULT_COLUMNS during its creation, this column will be added to the actual default dictionary. This can cause several unexpected behaviors.
For instance, when creating several experiments with custom columns for each of them, using the same column multiple times will break (see reproduction).

Reproduction (REQUIRED)

from ray.tune import CLIReporter

reporter = CLIReporter()
reporter.add_metric_column('custom column')
reporter = CLIReporter()
reporter.add_metric_column('custom column')

Thows a ValueError: Column custom column already exists.

  • I have verified my script runs in a clean environment and reproduces the issue.
  • I have verified the issue also occurs with the latest wheels.

Solution

A solution is to copy this default parameter each time it is used here.
I can send a PR is this is okay for you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issue moderate in impact or severitybugSomething that is supposed to be working; but isn'ttuneTune-related issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions