Problem.get_context

abstract Problem.get_context(get_info=False, step=None)[source]

Retrieve the context graph math:x of the problem instance.

The context graph encompasses all fixed inputs required to define the instance, such as node features, hyper-edge indices, and any static attributes.

Parameters:
  • get_info (bool) – Flag indicating if additional information should be returned for tracking purpose.

  • step (int | None) – Training step number passed by the trainer. Useful for scheduling.

Returns:

A tuple containing: - Graph: The context graph object. - dict: A dictionary of additional information (empty if get_info=False).

Raises:

NotImplementedError – If the subclass does not override this constructor.

Return type:

tuple[JaxGraph, dict]