Skip to content

Commit

Permalink
v0.3.18
Browse files Browse the repository at this point in the history
  • Loading branch information
AmenRa committed Sep 29, 2023
1 parent ae2550b commit 42e8032
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.3.18] - 2022-09-29
### Changed
- `Qrels.from_df` now checks that scores are `numpy.int64` to avoid errors on Windows.
- `Run.from_df` now checks that scores are `numpy.float64` to avoid errors on Windows.

## [0.3.17] - 2022-09-27
### Changed
- All `Run` import methods allow for specifying the `name` of the run.
Expand Down
4 changes: 3 additions & 1 deletion ranx/data_structures/qrels.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,9 @@ def from_df(
assert (
df[doc_id_col].dtype == "O"
), "DataFrame Document IDs column dtype must be `object` (string)"
assert df[score_col].dtype == int, "DataFrame scores column dtype must be `int`"
assert (
df[score_col].dtype == np.int64
), "DataFrame scores column dtype must be `int`"

qrels_dict = (
df.groupby(q_id_col)[[doc_id_col, score_col]]
Expand Down
2 changes: 1 addition & 1 deletion ranx/data_structures/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def from_df(
df[doc_id_col].dtype == "O"
), "DataFrame Document IDs column dtype must be `object` (string)"
assert (
df[score_col].dtype == float
df[score_col].dtype == np.float64
), "DataFrame scores column dtype must be `float`"

run_py = (
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="ranx",
version="0.3.17",
version="0.3.18",
author="Elias Bassani",
author_email="[email protected]",
description="ranx: A Blazing-Fast Python Library for Ranking Evaluation, Comparison, and Fusion",
Expand Down

0 comments on commit 42e8032

Please sign in to comment.