Skip to content

Commit

Permalink
see #2443
Browse files Browse the repository at this point in the history
  • Loading branch information
qgallouedec committed Dec 5, 2024
1 parent 779062b commit 0892264
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion trl/scripts/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import copy
import json
import os
import platform
import pwd
import re
import time
Expand All @@ -34,6 +35,9 @@
from trl.trainer.utils import get_quantization_config


if platform.system() != "Windows":
import pwd

init_zero_verbose()

HELP_STRING = """\
Expand Down Expand Up @@ -217,7 +221,10 @@ def print_help(self):


def get_username():
return pwd.getpwuid(os.getuid())[0]
if platform.system() == "Windows":
return os.getlogin()
else:
return pwd.getpwuid(os.getuid()).pw_name


def create_default_filename(model_name):
Expand Down

0 comments on commit 0892264

Please sign in to comment.