Skip to content

'ascii' codec decode error from get_trl_metrics #232

@angkywilliam

Description

@angkywilliam

I keep getting 'ascii' codec decode error on get_trl_metrics
https://github.com/unslothai/unsloth-zoo/blob/main/unsloth_zoo/logging_utils.py#L158

  File "/root/sky_workdir/.venv/lib/python3.10/site-packages/art/unsloth/state.py", line 94, in __init__
    self.trainer = GRPOTrainer(
  File "/root/sky_workdir/.venv/lib/python3.10/site-packages/unsloth/trainer.py", line 209, in new_init
    original_init(self, *args, **kwargs)
  File "/root/sky_workdir/src/trainer/unsloth_compiled_cache/UnslothGRPOTrainer.py", line 2862, in __init__
    PatchRLStatistics('grpo_trainer', other_metrics)
  File "/root/sky_workdir/.venv/lib/python3.10/site-packages/unsloth_zoo/logging_utils.py", line 233, in PatchRLStatistics
    all_metrics = get_trl_metrics()
  File "/root/sky_workdir/.venv/lib/python3.10/site-packages/unsloth_zoo/logging_utils.py", line 171, in get_trl_metrics
    with open(filename, "r") as file: file = file.read()
  File "/usr/lib/python3.10/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf0 in position 31733: ordinal not in range(128)

I'm not too certain of the root cause and why only certain people face this issue. I faced similar issue in the past and restarting the GPU resolve it, but this time the issue has been persistent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions