Closed TangJiakai closed 1 month ago
Modify the agentscope.init
method to make the default value setting of the save_dir
parameter more flexible. If the user does not specify save_dir
in the external configuration, _DEFAULT_SAVE_DIR
will be automatically used as the default value. This change eliminates the need for users to manually import _DEFAULT_SAVE_DIR
, e.g.,
We have to import _DEFAULT_SAVE_DIR to meet the requirements
agentscope.init(
project=self.config["project_name"],
save_code=False,
save_api_invoke=False,
model_configs=self.config["model_configs_path"]
),
use_monitor=False,
save_dir=(
self.config["save_dir"] or _DEFAULT_SAVE_DIR
),
)
We have to import _DEFAULT_SAVE_DIR
to meet the requirements
I'm confused about the statement
when the user does not specify the save_dir parameter in the external configuration, the agentscope.init method still requires the user to import _DEFAULT_SAVE_DIR to fulfill the default value setting.
Why does agentscope.init
requires the user to import _DEFAULT_SAVE_DIR
? To use the default directory, just leave the parameter save_dir
for empty?
name: Pull Request about: Create a pull request
Description
In the current implementation, when the user does not specify the
save_dir
parameter in the external configuration, theagentscope.init
method still requires the user to import_DEFAULT_SAVE_DIR
to fulfill the default value setting. This is inconvenient, especially when users want to flexibly set thesave_dir
through configuration files.Checklist
Please check the following items before code is ready to be reviewed.