itfly

Results 5 comments of itfly

I think you should use Microsoft.Extensions.Logging package, not specific logger .

Also got this issue. After replacing all the Iterator in NearestNeighborIterator class (except the outer Iterator of the return type) with Seq/List the exception is gone.

@MarkTickner I changed `NearestNeighborIterator`' to ``` private[model] class NearestNeighborIterator(buckets: Seq[Seq[Seq[ItemId]]], itemVectors: mutable.Map[ItemId, Vector], numNearestNeighbors: Int) extends Iterator[(ItemId, List[ItemIdDistancePair])] ``` and added an index to support the original buckets iterator's `HashNext`...

@oscaroboto thanks for your advice. I'm a scala/spark beginner.

@zhihuawon Here's my modification, hope this can help you too. ``` private[model] class NearestNeighborIterator(buckets: IndexedSeq[Array[mutable.ArrayBuffer[ItemId]]], itemVectors: mutable.Map[ItemId, Vector], numNearestNeighbors: Int) extends Iterator[(ItemId, IndexedSeq[ItemIdDistancePair])] with Serializable { private val bucketsSize =...