-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.py
More file actions
23 lines (16 loc) · 800 Bytes
/
Copy pathexample.py
File metadata and controls
23 lines (16 loc) · 800 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from dotenv import load_dotenv
from conductor import Conductor
load_dotenv() # take environment variables from .env.
import os
api_key = os.environ.get("OPENAI_API_KEY")
system_prompt = "Act as an expert ML engineer. You are training a RESNET50 model on CIFAR-100. Below is the history of hyperparameters and their resulting loss at 10 epochs. Suggest the next hyperparameter configuration in JSON, but first explain your reasoning step-by-step."
conductor = Conductor(api_key=api_key, system_prompt=system_prompt)
conductor.register("learning_rate", 0.0001)
conductor.register("batch_size", 256)
conductor.register("depth", 12)
for _ in range(100):
for _ in range(10):
stats = model.train()
conductor.log(stats)
updates = conductor.update()
model.update(updates)