mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-06-24 01:17:28 +08:00
chore(lora): Add real-time log buffering fix for nohup execution (#1311)
* chore(lora): Add real-time log buffering fix for nohup execution Disable Python stdout buffering to ensure logs appear in nohup.out in real-time instead of only after script completion. * chore(lora): remove python 3.7+ check * chore(lora): running pre-commit hook --------- Co-authored-by: Pierre-Louis Létoquart <randlgint@proton.me>
This commit is contained in:
parent
269faa5fa4
commit
1bc3476a46
@ -3,6 +3,7 @@
|
||||
import argparse
|
||||
import json
|
||||
import math
|
||||
import sys
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
@ -14,6 +15,9 @@ import utils as lora_utils
|
||||
from mlx.utils import tree_flatten
|
||||
from models import LoRALinear
|
||||
|
||||
# Disable output buffering to see print statements in real-time
|
||||
sys.stdout.reconfigure(line_buffering=True)
|
||||
|
||||
|
||||
def build_parser():
|
||||
parser = argparse.ArgumentParser(description="LoRA or QLoRA finetuning.")
|
||||
|
Loading…
Reference in New Issue
Block a user