Skip to content

Commit dcbb222

Browse files
mtakeRobotSail
authored andcommitted
Fix ruff errors
1 parent ada9674 commit dcbb222

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

examples/building_a_model_with_fine-tuning_and_interpolation.ipynb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@
141141
"ckpt_output_dir = f\"experiments/training_output-{model_name}{_data_name}\"\n",
142142
"processed_data_dir = f\"data/processed-data-{model_name}{_data_name}\"\n",
143143
"\n",
144-
"process_data = not os.path.isfile(f\"{processed_data_dir}/data.jsonl\") or force_process_data"
144+
"process_data = (\n",
145+
" not os.path.isfile(f\"{processed_data_dir}/data.jsonl\") or force_process_data\n",
146+
")"
145147
]
146148
},
147149
{
@@ -257,7 +259,7 @@
257259
"source": [
258260
"print(\"Start training\", flush=True)\n",
259261
"\n",
260-
"run_training(torch_args=torch_args,train_args=train_args)\n",
262+
"run_training(torch_args=torch_args, train_args=train_args)\n",
261263
"\n",
262264
"print(\"Finished training\", flush=True)"
263265
]
@@ -291,6 +293,7 @@
291293
"source": [
292294
"import glob\n",
293295
"\n",
296+
"\n",
294297
"def find_last_checkpoint(ckpt_output_dir: str) -> str | None:\n",
295298
" last_checkpoint_path = None\n",
296299
"\n",
@@ -333,7 +336,9 @@
333336
"\n",
334337
" print(f\"Trained model path: {trained_model_path}\")\n",
335338
"\n",
336-
" output_model_path = interpolate_models(model_path, trained_model_path, trained_model_weight=trained_model_weight)\n",
339+
" output_model_path = interpolate_models(\n",
340+
" model_path, trained_model_path, trained_model_weight=trained_model_weight\n",
341+
" )\n",
337342
"\n",
338343
" print(f\"Output model path: {output_model_path}\")"
339344
]

0 commit comments

Comments
 (0)