From b858cb3185ce82d171c318da65097e7f24ecb0d2 Mon Sep 17 00:00:00 2001 From: impreso Date: Mon, 3 Oct 2022 21:40:27 -0400 Subject: [PATCH 1/2] version bump --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d28bfd7..7567ae0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "open-rarity" -version = "0.4.3-beta" +version = "0.5.0-beta" description = "Open-Rarity library is an open standard that provides an easy, explanable and reproducible computation for NFT rarity" authors = ["Dan Meshkov ", "Vicky Gong "] license = "Apache-2.0" From f1b453300a64f468e461d09d14b664f185ec11ff Mon Sep 17 00:00:00 2001 From: impreso Date: Mon, 3 Oct 2022 21:52:40 -0400 Subject: [PATCH 2/2] added change in the method --- open_rarity/scoring/token_feature_extractor.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/open_rarity/scoring/token_feature_extractor.py b/open_rarity/scoring/token_feature_extractor.py index 6ada4a5..d68c6a6 100644 --- a/open_rarity/scoring/token_feature_extractor.py +++ b/open_rarity/scoring/token_feature_extractor.py @@ -32,9 +32,7 @@ def extract_unique_attribute_count( unique_attributes_count: int = 0 for string_attribute in token.metadata.string_attributes.values(): - count = collection.attributes_frequency_counts[ - string_attribute.name - ][string_attribute.value] + count = collection.total_tokens_with_attribute(string_attribute) if count == 1: unique_attributes_count += 1