I seem to be getting the following error when running cell 22 after completing cell 20. How do I find out what is sending out a NoneType, presumably for the top_k_indices?
Failed test case: output has wrong type. Expected: <class 'list'> Got: <class 'NoneType'>
That is the complete error. I just did a “restart kernel and run up to here”, and it seems that I should have said cell 10 (the unit test). Cell 9 (the list of indices) returned nothing at all.
the place where you write code, you don’t get any output but when you run unit test cell, it check the previous cell where you wrote codes runs the code recalls you wrote, if there is an issue like in your case, they wanted you to recall a variable as a list but you have recalled it by function type that has none type values.
This is where you have used incorrect function type to list the results
Convert the retrieved documents into their corresponding indices in the results list
top_k_indices = instead of using the BM25_RETRIEVER you were suppose to index the corpus to get the result as you already have the result list.
please refer the image below, notice print statement for. results for query just before the Exercise 1 header?
to check the results for query
for doc in results[0] this gives result from the first element
but you are told! here to convert documents into indices and as per hints it should! be corpus.index