Skip to content

Commit 46f98be

Browse files
Update generative-proof-of-concept-CPU-preprocessing-in-memory.py
Add sqlite storage for Optuna.
1 parent 71d0a31 commit 46f98be

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

generative-proof-of-concept-CPU-preprocessing-in-memory.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,16 @@
1616
EXPERIMENT_ITERATION = "0001"
1717
EXPERIMENT_NAME = "more-optimizations-br-254-single-machine"
1818
DATA_SET_NAME = "WEB-Bible-Genesis-40-context-681-SPL"
19-
19+
EXPERIMENT_NAME = f"{EXPERIMENT_NAME}-{DATA_SET_NAME}-{EXPERIMENT_ITERATION}-a"
2020

2121
N_TRIALS = 50
2222

2323

2424
mlflow.set_tracking_uri(uri=f"http://127.0.0.1:{MLFLOW_PORT}")
2525

26-
mlflow.set_experiment(f"{EXPERIMENT_NAME}-{DATA_SET_NAME}-{EXPERIMENT_ITERATION}-a")
26+
27+
28+
mlflow.set_experiment(EXPERIMENT_NAME)
2729

2830

2931

@@ -1443,7 +1445,8 @@ def main():
14431445
n_trials = N_TRIALS
14441446
# mlflow_parent = mlflow.start_run(run_name=os.getenv("MLFLOW_PARENT_RUN_NAME", "cerebros_poc_parent"), tags={"phase": "poc", "mode": "fast" if fast else "full"})
14451447
sampler = optuna.samplers.TPESampler(multivariate=True, n_startup_trials=5)
1446-
study = optuna.create_study(direction="minimize", sampler=sampler)
1448+
storage_name = f"sqlite:///{EXPERIMENT_NAME}.db
1449+
study = optuna.create_study(direction="minimize", sampler=sampler, storage=storage_name)
14471450
study.optimize(objective, n_trials=n_trials)
14481451
# mlflow.log_param("n_trials", n_trials)
14491452
# Log fixed (non-tunable) generation control param once at parent level

0 commit comments

Comments
 (0)