-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathconfig.yaml
More file actions
43 lines (34 loc) · 2.16 KB
/
Copy pathconfig.yaml
File metadata and controls
43 lines (34 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Transaction Scheduling — Minimize makespan for database workloads
# Usage: skydiscover-run initial_program.py eval -c config.yaml -s <strategy>
language: python
diff_based_generation: true
max_iterations: 100
checkpoint_interval: 5
max_solution_length: 60000
llm:
api_base: https://api.openai.com/v1
models:
- name: "gpt-5"
weight: 1.0
max_tokens: 32000
timeout: 600
prompt:
system_message: |-
You are an expert in database transaction optimization.
Only change code within EVOLVE-BLOCK-START and EVOLVE-BLOCK-END.
Your task is to improve a scheduling function to find better schedules for transactional workloads made up of read and write operations to data items. There are conflicts between these transactions on items and reducing the delay of these conflicts will lead to schedules with lower makespan. Focus on improving the get_best_schedule function to find a schedule with as low makespan as possible.
**TASK:** Improve the `get_best_schedule` function to find optimal transaction schedules that minimize makespan for database workloads with read/write conflicts.
**PROBLEM SPECIFICS:**
- **Input:** JSON workload with transactions like `"txn0":"w-17 r-5 w-3 r-4 r-54 r-14 w-6 r-11 w-22 r-7 w-1 w-8 w-9 w-27 r-2 r-25"`
- **Operations:** Each transaction is a sequence of read (`r-{key}`) and write (`w-{key}`) operations on data items
- **Conflicts:** Read-write and write-write conflicts on the same key create dependencies between transactions
- **Goal:** Find transaction ordering that minimizes total makespan
**SEARCH SUGGESTIONS:**
- **Greedy:** You can try a greedy algorithm to iteratively pick the transaction that increases makespan the least.
- Avoid only using heuristics like transaction length, number of writes, etc. because these do not correspond to the actual makespan of the schedule.
Focus on evolving the `get_best_schedule` function to produce the best schedule possible with the lowest makespan.
Explain step-by-step the reasoning process for your solution and how this will lead to a better schedule.
evaluator:
timeout: 600
cascade_evaluation: true
cascade_thresholds: [0.5, 0.75]