Comments (7)
I suspect your filtered_relevance_map
is not valid.
Can you please post a print of it?
from ranx.
I suspect your
filtered_relevance_map
is not valid. Can you please post a print of it?
filtered_relevance_map
:
from ranx.
What the code does is simply this:
doc_ids = [list(doc.keys()) for doc in qrels.values()]
max_len = max(len(y) for x in doc_ids for y in x)
The code finds the max string length of the doc ids in the dictionary to reduce memory consumption.
You should be able to find the issue by checking what happens with your filtered_relevance_map
in place of qrels
.
Please, let me what you find out.
from ranx.
PS: doc
variable name in the list comprehension is probably a wrong name. It should be q
or query
.
from ranx.
What the code does is simply this:
doc_ids = [list(doc.keys()) for doc in qrels.values()] max_len = max(len(y) for x in doc_ids for y in x)The code finds the max string length of the doc ids in the dictionary to reduce memory consumption.
You should be able to find the issue by checking what happens with your
filtered_relevance_map
in place ofqrels
.Please, let me what you find out.
I can't see any problem since I just replaced doc
with label
and query
with text
and concatenated it with their ids.
from ranx.
I can't help you without reproducible code.
The best I can do is guessing.
I never encountered such a problem.
The problem should lay in this line:
doc_ids = [list(doc.keys()) for doc in qrels.values()]
doc.keys()
is probably empty. That should be why the next line throws the exception:
ValueError: max() arg is an empty sequence
Have you checked if those two lines of code (isolated from ranx
) raise the exception?
from ranx.
Closing for inactivity.
from ranx.
Related Issues (20)
- [Feature Request] Expose DCG as metric HOT 3
- [BUG] dcg and dcg_burges do not work in the compare function HOT 2
- [Feature Request] Use black to indent the code HOT 1
- [BUG] RBP with multiple relevance levels HOT 3
- [Feature Request] Support gzipped files? HOT 3
- [Feature Request] memory issue / make Run more efficient HOT 2
- Incorrect result for f1 score HOT 13
- Zero-scored documents HOT 10
- [BUG] Misleading exception message on dataframe types HOT 2
- [BUG] Issues when storing/loading Qrels from a dataframe and a parquet file. HOT 6
- [Feature Request] Run.from_df and Run.from_parquet does not allow specifying run name HOT 1
- Question on rank aggregation usage HOT 4
- Getting "Segmentation fault (core dumped)" error HOT 2
- [Feature Request] stddev statistic HOT 3
- Couldn't find any documentation about Qrel and run score range HOT 2
- [Feature Request] Propensity-scored Metrics HOT 1
- How do we compare different runs with multiple folds per run? HOT 1
- [Question] About the correction among multiple hypotheses
- [Question] How to compute precision for a retriever operating at passage-level
- JIT compilation on serverless (i.e. Modal Labs)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ranx.