Skip to content

Explicitly allow or disallow agents with costs in different frameworks #275

@nicola-bastianello

Description

@nicola-bastianello

At this time we don't explicitly allow or disallaw different agents to have costs in different frameworks:

  • In some places we raise when the frameworks are mismatched (like when using Cost._validate_cost_operation(self, other, check_framework: bool = True)). This would probably disallow mismatched frameworks when e.g. computing the sum of the local costs.
  • In other places, we implicitly assume that all costs have the same framework, like when we set SumCost.framework as return self.costs[0].framework. This doesn't explicitly disallow mismatched frameworks, but silently ignores it

Overall, I think we should decide for a clear behavior and implement it everywhere: either we allow or we disallow mismatched frameworks, and ensure that the docs clarify this.

Thanks to the iop layer and the Array object, I think it's not impossible to allow mismatched frameworks, but there are some places like SumCost where it's not clear what we should do.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions