mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-19 12:58:07 +00:00
fix encoding to be able to run on win (#502)
This commit is contained in:
parent
b8aa55704b
commit
02b7fac863
1 changed files with 2 additions and 2 deletions
|
|
@ -15,7 +15,7 @@ def get_data_file_path(filename: str) -> Path:
|
|||
|
||||
Example:
|
||||
>>> path = get_data_file_path("pg19362.txt")
|
||||
>>> with open(path) as f:
|
||||
>>> with open(path, encoding="utf-8") as f:
|
||||
... content = f.read()
|
||||
"""
|
||||
return resources.files("reasoning_gym.data").joinpath(filename)
|
||||
|
|
@ -33,7 +33,7 @@ def read_data_file(filename: str) -> str:
|
|||
Example:
|
||||
>>> content = read_data_file("pg19362.txt")
|
||||
"""
|
||||
return resources.files("reasoning_gym.data").joinpath(filename).read_text()
|
||||
return resources.files("reasoning_gym.data").joinpath(filename).read_text(encoding="utf-8")
|
||||
|
||||
|
||||
__all__ = ["get_data_file_path", "read_data_file"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue