Skip to content

CustomTermination event functions can collapse to the same unified experiment branch #5625

Description

@martin1cifuentes

While looking at a small follow up around custom experiment terminations, I found what looks like a reachable unified mode branch identity issue.

CustomTermination equality and hash distinguish the event_function identity, but CustomTermination. repr only includes the name. BaseStep.unified_branch_repr() then includes the termination through that lossy representation, and unified experiment setup uses unified_branch_repr() as the key for unique_branch_by_repr.

So the first issue seems to be that same named CustomTermination objects with different event_function values are semantically distinct termination objects, but they produce the same unified_branch_repr() (which I checked) which causes the unified branch identity to collapse.

I also noticed a related but probably separate issue. Same named custom terminations may collide earlier through Experiment or step repr and basic_repr deduplication. I have not revised it deeply because I want to adress the 1st issue first, and because it may be a broader representation and deduplication concern.

Would you prefer that I handle these as two separate PRs? Or would it be better for both representation identity issues to be handled together?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions