add file_tree to SPO's README.md

This commit is contained in:
isaacJinyu 2025-02-07 17:23:03 +08:00
parent f54903a7fe
commit 5140804f75
2 changed files with 26 additions and 1 deletions

View file

@ -103,3 +103,28 @@ ### 3. Implement the Optimizer 🔧
```bash
python optimize.py --help
```
### 4. View Results
```
workspace
└── Project_name
└── prompts
├── results.json
├── round_1
│ ├── answers.txt
│ └── prompt.txt
├── round_2
│ ├── answers.txt
│ └── prompt.txt
├── round_3
│ ├── answers.txt
│ └── prompt.txt
├── ...
└── round_n
├── answers.txt
└── prompt.txt
```
- `results.json`: Stores whether each iteration round was judged successful and other related information
- `prompt.txt`: The optimized prompt for the corresponding round
- `answers.txt`: The output results generated using the prompt for the corresponding round

View file

@ -13,7 +13,7 @@ def set_file_name(name):
def load_meta_data(k=SAMPLE_K):
# load yaml file
config_path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'settings', FILE_NAME)
config_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'settings', FILE_NAME)
with open(config_path, 'r', encoding='utf-8') as file:
data = yaml.safe_load(file)