Skip to content

Commit

Permalink
Add config
Browse files Browse the repository at this point in the history
  • Loading branch information
emnigma committed Aug 8, 2023
1 parent 8a6b842 commit 7659fb8
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions VSharp.ML.AIAgent/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ def create_save_path_if_not_exists(self):
self.save_path.mkdir()


@dataclass(slots=True, frozen=True)
class OnGameServerRestartFeature:
enabled: bool
wait_for_reset_retries: int
wait_for_reset_time: float


class FeatureConfig:
VERBOSE_TABLES = True
SHOW_SUCCESSORS = True
Expand All @@ -72,11 +79,14 @@ class FeatureConfig:
SAVE_EPOCHS_COVERAGES = SaveEpochsCoveragesFeature(
enabled=True, save_path=Path("./report/epochs_tables/")
)
ON_GAME_SERVER_RESTART = True
ON_GAME_SERVER_RESTART = OnGameServerRestartFeature(
enabled=True, wait_for_reset_retries=10 * 60 * 10, wait_for_reset_time=0.1
)


class GameServerConnectorConfig:
CREATE_CONNECTION_TIMEOUT = 1
CREATE_CONNECTION_TIMEOUT_SEC = 1
WAIT_FOR_SOCKET_RECONNECTION_MAX_RETRIES = 10 * 60
RESPONCE_TIMEOUT_SEC = (
FeatureConfig.DUMP_BY_TIMEOUT.timeout_sec + 1
if FeatureConfig.DUMP_BY_TIMEOUT.enabled
Expand Down

0 comments on commit 7659fb8

Please sign in to comment.