Construct a new RandomPairwiseExchange metalearning strategy. Args: metric_strategies: Map from metric name to the criterion for picking a winner with respect to this metric exchange_strategy: The algorithm used for exchangin
(self,
metric_strategies: dict[str,int] = {},
exchange_strategy = ExchangeStrategy(),
mutation_strategy = MutationStrategy())
| 329 | return msg |
| 330 | |
| 331 | def __init__(self, |
| 332 | metric_strategies: dict[str,int] = {}, |
| 333 | exchange_strategy = ExchangeStrategy(), |
| 334 | mutation_strategy = MutationStrategy()): |
| 335 | """Construct a new RandomPairwiseExchange metalearning strategy. |
| 336 | |
| 337 | Args: |
| 338 | metric_strategies: |
| 339 | Map from metric name to the criterion for picking a winner |
| 340 | with respect to this metric |
| 341 | exchange_strategy: |
| 342 | The algorithm used for exchanging models. |
| 343 | mutation_strategy: |
| 344 | The algorithm used for mutating models. |
| 345 | """ |
| 346 | |
| 347 | self.metric_strategies = metric_strategies |
| 348 | self.exchange_strategy = exchange_strategy |
| 349 | self.mutation_strategy = mutation_strategy |
| 350 | |
| 351 | def export_proto(self): |
| 352 | """Get a protobuf representation of this object.""" |
nothing calls this directly
no test coverage detected