Merge pull request #11 from r0m4k/feat/medreason-finetune
Browse files- train/modal_medreason.py +5 -3
train/modal_medreason.py
CHANGED
|
@@ -110,9 +110,11 @@ def train_medreason(n: int = 4000, epochs: int = 1, lr: float = 1e-4, n_eval: in
|
|
| 110 |
|
| 111 |
@app.local_entrypoint()
|
| 112 |
def main(n: int = 4000, epochs: int = 1, lr: float = 1e-4) -> None:
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
|
|
|
|
|
|
| 116 |
print(" modal run train/modal_finetune.py::merge --adapter-dir /adapters/medreason-lora \\")
|
| 117 |
print(" --repo-id dimitriskl/blood-test-minicpmv-4_6-medreason")
|
| 118 |
print(" modal run train/modal_eval.py::compare --finetuned-id dimitriskl/blood-test-minicpmv-4_6-medreason")
|
|
|
|
| 110 |
|
| 111 |
@app.local_entrypoint()
|
| 112 |
def main(n: int = 4000, epochs: int = 1, lr: float = 1e-4) -> None:
|
| 113 |
+
# spawn() runs the job in the background on Modal and returns immediately, so it survives the
|
| 114 |
+
# local client disconnecting (.remote() + --detach can still be canceled on a dropped connection).
|
| 115 |
+
call = train_medreason.spawn(n=n, epochs=epochs, lr=lr)
|
| 116 |
+
print(f"\nLaunched medical-reasoning LoRA on Modal (call {call.object_id}) — runs in the background.")
|
| 117 |
+
print("Watch it in the Modal dashboard; it saves to the 'blood-test-adapters' volume. When done:")
|
| 118 |
print(" modal run train/modal_finetune.py::merge --adapter-dir /adapters/medreason-lora \\")
|
| 119 |
print(" --repo-id dimitriskl/blood-test-minicpmv-4_6-medreason")
|
| 120 |
print(" modal run train/modal_eval.py::compare --finetuned-id dimitriskl/blood-test-minicpmv-4_6-medreason")
|