diff --git a/src/primaite/config/config_1_DDOS_BASIC.yaml b/src/primaite/config/config_1_DDOS_BASIC.yaml index 2796adb4..b6aef17b 100644 --- a/src/primaite/config/config_1_DDOS_BASIC.yaml +++ b/src/primaite/config/config_1_DDOS_BASIC.yaml @@ -1,7 +1,7 @@ - itemType: ACTIONS type: NODE - itemType: OBSERVATIONS - type: MULTIDISCRETE + type: BOX - itemType: STEPS steps: 128 - itemType: PORTS diff --git a/src/primaite/config/config_2_DDOS_BASIC.yaml b/src/primaite/config/config_2_DDOS_BASIC.yaml index 425fe013..f6e9cf52 100644 --- a/src/primaite/config/config_2_DDOS_BASIC.yaml +++ b/src/primaite/config/config_2_DDOS_BASIC.yaml @@ -1,5 +1,7 @@ - itemType: ACTIONS type: NODE +- itemType: OBSERVATIONS + type: BOX - itemType: STEPS steps: 128 - itemType: PORTS diff --git a/src/primaite/config/config_3_DOS_VERY_BASIC.yaml b/src/primaite/config/config_3_DOS_VERY_BASIC.yaml index 8c9b84a6..8ed65535 100644 --- a/src/primaite/config/config_3_DOS_VERY_BASIC.yaml +++ b/src/primaite/config/config_3_DOS_VERY_BASIC.yaml @@ -1,5 +1,7 @@ - itemType: ACTIONS type: NODE +- itemType: OBSERVATIONS + type: BOX - itemType: STEPS steps: 256 - itemType: PORTS diff --git a/src/primaite/config/config_5_DATA_MANIPULATION.yaml b/src/primaite/config/config_5_DATA_MANIPULATION.yaml index 3b29ff4a..5d48ffe4 100644 --- a/src/primaite/config/config_5_DATA_MANIPULATION.yaml +++ b/src/primaite/config/config_5_DATA_MANIPULATION.yaml @@ -1,5 +1,7 @@ - itemType: ACTIONS type: NODE +- itemType: OBSERVATIONS + type: BOX - itemType: STEPS steps: 256 - itemType: PORTS diff --git a/src/primaite/config/config_UNIT_TEST.yaml b/src/primaite/config/config_UNIT_TEST.yaml index 3b29ff4a..5d48ffe4 100644 --- a/src/primaite/config/config_UNIT_TEST.yaml +++ b/src/primaite/config/config_UNIT_TEST.yaml @@ -1,5 +1,7 @@ - itemType: ACTIONS type: NODE +- itemType: OBSERVATIONS + type: BOX - itemType: STEPS steps: 256 - itemType: PORTS diff --git a/src/primaite/transactions/transactions_to_file.py b/src/primaite/transactions/transactions_to_file.py index c4852982..7a6e212c 100644 --- a/src/primaite/transactions/transactions_to_file.py +++ b/src/primaite/transactions/transactions_to_file.py @@ -51,8 +51,13 @@ def write_transaction_to_file(_transaction_list): # This will be tied into the PrimAITE Use Case so that they make sense template_transation = _transaction_list[0] action_length = template_transation.action_space.size + obs_shape = template_transation.obs_space_post.shape obs_assets = template_transation.obs_space_post.shape[0] - obs_features = template_transation.obs_space_post.shape[1] + if len(obs_shape) == 1: + # bit of a workaround but I think the way transactions are written will change soon + obs_features = 1 + else: + obs_features = template_transation.obs_space_post.shape[1] # Create the action space headers array action_header = [] diff --git a/tests/config/one_node_states_on_off_lay_down_config.yaml b/tests/config/one_node_states_on_off_lay_down_config.yaml index 355760bf..47962102 100644 --- a/tests/config/one_node_states_on_off_lay_down_config.yaml +++ b/tests/config/one_node_states_on_off_lay_down_config.yaml @@ -1,5 +1,7 @@ - itemType: ACTIONS type: NODE +- itemType: OBSERVATIONS + type: BOX - itemType: STEPS steps: 13 - itemType: PORTS