feat&fix: update configuration management to save model arguments and enhance UI display for model args (#262)

This commit is contained in:
Zilong Zhou
2025-07-16 21:46:35 +08:00
committed by GitHub
parent e433f35c1f
commit dc164d5269
10 changed files with 140 additions and 17 deletions

View File

@@ -12,12 +12,12 @@ from typing import List, Dict
import math
from tqdm import tqdm
from multiprocessing import Process, Manager
import lib_run_single
from desktop_env.desktop_env import DesktopEnv
# import lib_run_single
# from desktop_env.desktop_env import DesktopEnv
from mm_agents.anthropic import AnthropicAgent as PromptAgent
# import fake_run_single as lib_run_single
# from test_env import DesktopEnv
import fake_run_single as lib_run_single
from test_env import DesktopEnv
# .env
from dotenv import load_dotenv
@@ -352,6 +352,17 @@ if __name__ == "__main__":
os.environ["TOKENIZERS_PARALLELISM"] = "false"
args = config()
# save args to json in result_dir/action_space/observation_type/model/args.json
path_to_args = os.path.join(
args.result_dir,
args.action_space,
args.observation_type,
args.model,
"args.json",
)
os.makedirs(os.path.dirname(path_to_args), exist_ok=True)
with open(path_to_args, "w", encoding="utf-8") as f:
json.dump(vars(args), f, indent=4)
with open(args.test_all_meta_path, "r", encoding="utf-8") as f:
test_all_meta = json.load(f)