Skip to content

gym list / search resolve every benchmark config twice #2100

Description

@marta-sd

gym list (and gym search, which reuses it) takes ~10s because it runs the expensive Hydra/OmegaConf resolver over every benchmark config twice:

  1. discover_benchmarks() calls BenchmarkConfig.from_config_path which builds each BenchmarkConfig
  2. list_benchmarks() calls read_config_metadata() per benchmark to fetch domain and description information

Both call _parse_no_environment_tolerating_unset_values under the hood. Pass 2 is redundant: pass 1 already produced a resolved config that contains domain/description.

Proposed fix (low risk, ~halves runtime):
Capture domain and description during discovery -- call _scan_servers_for_metadata() on the already-resolved dict inside BenchmarkConfig.from_initial_config_dict, store both on BenchmarkConfig, and have list_benchmarks read them directly instead of calling read_config_metadata.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions