mirror of
https://github.com/karpathy/nanochat.git
synced 2026-02-20 10:30:23 +00:00
multi platform gf wf windows encoding problem
This commit is contained in:
parent
e8b86df766
commit
428ccb9eb1
|
|
@ -455,13 +455,13 @@ def enwik8_path():
|
|||
@pytest.fixture(scope="module")
|
||||
def enwik8_small(enwik8_path):
|
||||
"""Fixture providing 100KB of enwik8 for quick tests."""
|
||||
with open(enwik8_path, "r") as f:
|
||||
with open(enwik8_path, "r", encoding="utf-8") as f:
|
||||
return f.read(100_000)
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def enwik8_large(enwik8_path):
|
||||
"""Fixture providing 10MB of enwik8 for performance tests."""
|
||||
with open(enwik8_path, "r") as f:
|
||||
with open(enwik8_path, "r", encoding="utf-8") as f:
|
||||
return f.read(10**7)
|
||||
|
||||
def time_function(func, *args, **kwargs):
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user