Skip to content

Commit

Permalink
Merge pull request #1004 from JohnSnowLabs/fix/bug-fixes-langtest-2-1…
Browse files Browse the repository at this point in the history
…-0-rc1

Fix/bug fixes langtest 2 1 0 rc1
  • Loading branch information
chakravarthik27 authored Apr 3, 2024
2 parents 95433f1 + 1e3d69f commit 4c374a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions langtest/leaderboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def get_parameters(
):
"""Get the parameters from the configuration file."""
# Check file extension
if params_file.endswith(".yml"):
if params_file.endswith(".yml") or params_file.endswith(".yaml"):
loader = yaml.safe_load
elif params_file.endswith(".json"):
loader = json.load
Expand Down Expand Up @@ -509,7 +509,7 @@ def reorder_columns(df: pd.DataFrame, desired_order: list) -> pd.DataFrame:
)


def save_file(file_path, data):
def save_file(file_path: str, data):
"""
Save data to a file based on the file extension.
Expand All @@ -520,7 +520,7 @@ def save_file(file_path, data):
Raises:
ValueError: If the file format is not supported.
"""
if file_path.endswith(".yml"):
if file_path.endswith(".yml") or file_path.endswith(".yaml"):
dumper = yaml.safe_dump
elif file_path.endswith(".json"):
dumper = json.dump
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "langtest"
version = "2.0.0"
version = "2.1.0"
description = "John Snow Labs provides a library for delivering safe & effective NLP models."
authors = ["John Snow Labs <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 4c374a7

Please sign in to comment.