kitzeslab / opensoundscape

Open source, scalable software for the analysis of bioacoustic recordings
http://opensoundscape.org
MIT License
136 stars 16 forks source link

Annoying futurewarning being raised by sample.py #924

Open louisfh opened 9 months ago

louisfh commented 9 months ago

Repeatedly being raised by model.train call when metrics are evaluated.

/opt/anaconda3/envs/opso_10_1_py310/lib/python3.10/site-packages/opensoundscape/sample.py:152: FutureWarning: Series.getitem treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use ser.iloc[pos] "labels": torch.Tensor([s.labels for s in samples]),

sammlapp commented 3 months ago

we get the same Warning from opensoundscape/utils.py:341 even though we aren't using positional indexing, we are using keyed indexing. @louisfh do you know what the solution is?