diff --git a/docs/source/misc/changelog.md b/docs/source/misc/changelog.md index 0e8f91ac..31926917 100644 --- a/docs/source/misc/changelog.md +++ b/docs/source/misc/changelog.md @@ -5,6 +5,19 @@ 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.1.13] - 2022-10-17 + +### Fixed + +- Bug in metrics_helper when used without secondary_labels + +### Added + +- RankMatchFailure metric for evaluation +- RankMatchFailure auxiliary loss + +## [0.1.12] - 2022-04-26 + ## [0.1.11] - 2021-01-18 ### Changed diff --git a/python/ml4ir/applications/ranking/model/metrics/metrics_helper.py b/python/ml4ir/applications/ranking/model/metrics/metrics_helper.py index 384d34be..835c9f55 100644 --- a/python/ml4ir/applications/ranking/model/metrics/metrics_helper.py +++ b/python/ml4ir/applications/ranking/model/metrics/metrics_helper.py @@ -297,7 +297,8 @@ def get_grouped_stats( sum_new_reciprocal_rank = df_grouped_batch.apply(lambda x: (1.0 / x[new_rank_col]).sum()) # Aggregate secondary label metrics by group keys - df_secondary_labels_metrics = df_secondary_labels_metrics.groupby(group_keys).sum() + if secondary_labels: + df_secondary_labels_metrics = df_secondary_labels_metrics.groupby(group_keys).sum() else: # Compute overall stats if group keys are not specified query_count = [df_clicked.shape[0]] @@ -307,7 +308,8 @@ def get_grouped_stats( sum_new_reciprocal_rank = [(1.0 / df_clicked[new_rank_col]).sum()] # Aggregate secondary label metrics - df_secondary_labels_metrics = df_secondary_labels_metrics.sum().to_frame().T + if secondary_labels: + df_secondary_labels_metrics = df_secondary_labels_metrics.sum().to_frame().T df_label_stats = pd.DataFrame( { diff --git a/python/setup.py b/python/setup.py index b53f1b64..49ff905f 100644 --- a/python/setup.py +++ b/python/setup.py @@ -24,7 +24,7 @@ def getReadMe(): setup( name="ml4ir", packages=find_namespace_packages(include=["ml4ir.*"]), - version="0.1.12", + version="0.1.13", description="Machine Learning libraries for Information Retrieval", long_description=getReadMe(), long_description_content_type="text/markdown",