컨텍스트#

class Context(node_id: int, node_config: Dict[str, bool | float | int | str], state: RecordSet, run_config: Dict[str, bool | float | int | str])[소스]#

기반 클래스: object

Context of your run.

매개변수:
  • node_id (int) – The ID that identifies the node.

  • node_config (UserConfig) – A config (key/value mapping) unique to the node and independent of the run_config. This config persists across all runs this node participates in.

  • state (RecordSet) – 특정 실행에서 엔티티가 추가한 레코드를 보유하며 로컬에 유지됩니다. 즉, 저장된 데이터는 실행 중인 시스템을 벗어나지 않습니다. 모드를 실행할 때 중간 저장소나 스크래치 패드로 사용할 수 있습니다. 또한 이 엔티티의 수명 주기 동안 다른 시점에서 액세스하기 위한 메모리로도 사용할 수 있습니다(예: 여러 라운드에 걸쳐)

  • run_config (UserConfig) – A config (key/value mapping) held by the entity in a given run and that will stay local. It can be used at any point during the lifecycle of this entity (e.g. across multiple rounds)

메소드

속성

node_id

node_config

state

run_config