-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
4,482 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Come here if you encounter any issues | ||
|
||
## Missing episodes | ||
|
||
Large batch size may cause some episodes to be skipped. This is due to the fact that the server may not be able to handle the load. Try reducing the batch size. But you can also use the script in `examples/fix_missing_episodes.py` to fix the missing episodes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Example Scripts For Using The Library | ||
|
||
## Example 1: Evaluating existing episodes | ||
|
||
```python | ||
python examples/evaluate_existing_episodes.py --tag=<tag to upload to the database> --model=<the model used to re-evaluate the existing episodes> --batch_size=<batch size used for evaluation> --push-to-db | ||
``` | ||
|
||
Run ```python examples/evaluate_existing_episodes.py --help``` for more information. | ||
|
||
## Example 2: Generate script-like episodes | ||
See `docs/simulation_modes.md` for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Hyperparameters that are used in the simulation | ||
|
||
## Tags | ||
|
||
- `TAG`: The tag of the simulation. This tag is used to identify the simulation in the database. | ||
- `TAG_TO_CHECK_EXISTING_EPISODES`: Scripts like `examples/experiment_eval.py` checks if there are existing episodes with the same tag in the database. If there are, the simulation **will not** be run. This is to avoid running the same simulation twice. If you want to run the simulation again, you can change the tag or set `TAG_TO_CHECK_EXISTING_EPISODES` to `None`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Different Modes of Simulation | ||
|
||
## Simulation Modes | ||
|
||
The simulation can be run in different modes. The mode is specified in the configuration file. The following modes are available: | ||
|
||
### Sotopia-lite | ||
|
||
- `lite`: The simulation runs without characters' detailed background information but just names. To use this mode, set `lite` to `True` in the gin configuration command. | ||
e.g., | ||
```bash | ||
python examples/experiment_eval.py \ | ||
--gin_file sotopia_conf/generation_utils_conf/generate.gin \ | ||
--gin_file sotopia_conf/server_conf/server.gin \ | ||
--gin_file sotopia_conf/run_async_server_in_batch.gin \ | ||
'--gin.ENV_IDS=[]' \ | ||
'--gin.AGENT1_MODEL="gpt-3.5-turbo"' \ | ||
'--gin.AGENT2_MODEL="gpt-3.5-turbo"' \ | ||
'--gin.BATCH_SIZE=5' \ | ||
'--gin.TAG="lite_gpt3.5_gpt3.5"' \ | ||
'--gin.TAG_TO_CHECK_EXISTING_EPISODES="lite_gpt3.5_gpt3.5"' \ | ||
'--gin.PUSH_TO_DB=False' \ | ||
'--gin.OMNISCIENT=False' \ | ||
'--gin.VERBOSE=False' \ | ||
'--gin.LITE=True' \ | ||
``` | ||
|
||
### Sotopia-script | ||
|
||
- `script`: The simulation runs with enabling LLMs generating the interaction in one shot with a script writing setting. To use this mode, set `script` to `True` in the gin configuration command. | ||
|
||
e.g., | ||
|
||
```bash | ||
python examples/generate_script.py \ | ||
--gin_file sotopia_conf/generation_utils_conf/generate.gin \ | ||
--gin_file sotopia_conf/run_async_server_in_batch_script.gin \ | ||
'--gin.ENV_IDS=[]' \ | ||
'--gin.SCRIPT_MODEL="gpt-3.5-turbo"' \ | ||
'--gin.BATCH_SIZE=5' \ | ||
'--gin.TAG="lite_script_gpt3.5_gpt3.5"' \ | ||
'--gin.TAG_TO_CHECK_EXISTING_EPISODES="lite_script_gpt3.5_gpt3.5"' \ | ||
'--gin.PUSH_TO_DB=True' \ | ||
'--gin.VERBOSE=False' \ | ||
``` |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.