Skip to content

Refactor reward profiling #2621

Description

@marta-sd

While working on #2606 I've noticed that RewardProfiler corries some obsolete code.

  • wandb.Histogram is computed and then always discarded. describe_dataframe builds a
    histogram row for every numeric column, and every exit path strips it: prepare_for_serialization drops histogram* keys, and the primitive_types filter in
    rollout_collection / rollout_reverification excludes non-primitives. Also, it looks like wandb is used here for no good reason.

  • prepare_for_serialization matches startswith("histogram"), not "histogram/", so a
    custom metric named histogram_bins from a compute_metrics_fn is silently dropped.

  • prepare_for_serialization is now effectively a no-op if the histogram row goes away; decide
    whether it stays as a guard for custom metrics or is removed from its four call sites.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions