Skip to content

Commit 4c374a7

Browse files
Merge pull request #1004 from JohnSnowLabs/fix/bug-fixes-langtest-2-1-0-rc1
Fix/bug fixes langtest 2 1 0 rc1
2 parents 95433f1 + 1e3d69f commit 4c374a7

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎langtest/leaderboard.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def get_parameters(
194194
):
195195
"""Get the parameters from the configuration file."""
196196
# Check file extension
197-
if params_file.endswith(".yml"):
197+
if params_file.endswith(".yml") or params_file.endswith(".yaml"):
198198
loader = yaml.safe_load
199199
elif params_file.endswith(".json"):
200200
loader = json.load
@@ -509,7 +509,7 @@ def reorder_columns(df: pd.DataFrame, desired_order: list) -> pd.DataFrame:
509509
)
510510

511511

512-
def save_file(file_path, data):
512+
def save_file(file_path: str, data):
513513
"""
514514
Save data to a file based on the file extension.
515515
@@ -520,7 +520,7 @@ def save_file(file_path, data):
520520
Raises:
521521
ValueError: If the file format is not supported.
522522
"""
523-
if file_path.endswith(".yml"):
523+
if file_path.endswith(".yml") or file_path.endswith(".yaml"):
524524
dumper = yaml.safe_dump
525525
elif file_path.endswith(".json"):
526526
dumper = json.dump

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "langtest"
3-
version = "2.0.0"
3+
version = "2.1.0"
44
description = "John Snow Labs provides a library for delivering safe & effective NLP models."
55
authors = ["John Snow Labs <support@johnsnowlabs.com>"]
66
readme = "README.md"

0 commit comments

Comments
 (0)