[fix] encoding
This commit is contained in:
+1
-4
@@ -6,16 +6,13 @@ import random
|
||||
DEFAULT_ROOT_DIR = "examples/input_params"
|
||||
|
||||
|
||||
|
||||
class DataSampler:
|
||||
def __init__(self, root_dir=DEFAULT_ROOT_DIR):
|
||||
self.root_dir = root_dir
|
||||
|
||||
# glob
|
||||
self.input_params_files = list(Path(self.root_dir).glob("*.json"))
|
||||
|
||||
def load_json(self, file_path):
|
||||
with open(file_path, "r") as f:
|
||||
with open(file_path, "r", encoding="utf-8") as f:
|
||||
return json.load(f)
|
||||
|
||||
def sample(self):
|
||||
|
||||
Reference in New Issue
Block a user