feat&fix: update configuration management to save model arguments and enhance UI display for model args (#262)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user