lightly icon indicating copy to clipboard operation
lightly copied to clipboard

Add more detailed docstring to knn predict

Open IgorSusmelj opened this issue 2 years ago • 2 comments

We have here the knn predict code: https://github.com/lightly-ai/lightly/blob/df004d288fa07816e55975fa0af92868f9867436/lightly/utils/benchmarking/knn.py#L8

The problem is that the docstring doesn't tell us much about the returned values. One would expect a list of labels or a tensor with probabilities for all the classes. But we return a NxD shape tensor that contains the class indices sorted by probability. We should clarify that in the docstring.

IgorSusmelj avatar Jul 13 '23 21:07 IgorSusmelj

Can you assign me this issue.

Aienthu1 avatar Oct 11 '24 05:10 Aienthu1

@Aienthu1 assigned :)

guarin avatar Oct 11 '24 06:10 guarin

Can you please assign this to me ?

maxprogrammer007 avatar Mar 18 '25 08:03 maxprogrammer007

Can you please assign this to me ?

Assigned, @maxprogrammer007 ! 🙂

liopeer avatar Mar 18 '25 10:03 liopeer

@liopeer

please see - https://github.com/lightly-ai/lightly/pull/1812

maxprogrammer007 avatar Mar 18 '25 11:03 maxprogrammer007

Closing this since we just merged https://github.com/lightly-ai/lightly/pull/1812.

liopeer avatar Mar 18 '25 12:03 liopeer