From 852e3b35da340476694c89fa04e0c9fbfb6cc4f7 Mon Sep 17 00:00:00 2001 From: EdenWuyifan Date: Tue, 30 Apr 2024 20:21:19 -0400 Subject: [PATCH] make action space varies --- .gitignore | 3 +++ alpha_automl/pipeline_search/agent_environment.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 190eb0dc..2d498ce2 100644 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ lightning_logs .cache **/smac3_output /venv + +.vscode +**/.vscode \ No newline at end of file diff --git a/alpha_automl/pipeline_search/agent_environment.py b/alpha_automl/pipeline_search/agent_environment.py index f96b6244..b99686c7 100644 --- a/alpha_automl/pipeline_search/agent_environment.py +++ b/alpha_automl/pipeline_search/agent_environment.py @@ -34,10 +34,10 @@ def __init__(self, config: EnvContext): ), # Ray env board contains pipeline and metadata } ) - self.max_actions = 24 # max number of actions (depends on the largest step in the grammar, i.e. CLASSIFIER) self.action_spaces = ( self.generate_action_spaces() ) # number of actions for each step + self.max_actions = max(list(self.action_spaces.values())) # max number of actions (depends on the largest step in the grammar, i.e. CLASSIFIER) self.action_offsets = ( self.generate_action_offsets() ) # offset for each step, for translating action to PipelineGame action