Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Trying to train a model for classification gives a weird warning #848

Open
sarthakpati opened this issue Apr 18, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@sarthakpati
Copy link
Collaborator

sarthakpati commented Apr 18, 2024

Describe the bug

When trying to train any classification model (and this is most prevalent for binary classification), the following UserWarning from sklearn pops up at every step per subject: y_pred contains classes not in y_true.

To Reproduce

Steps to reproduce the behavior:

  1. Use any data for binary classification (TIL, EGFR, ...).
  2. Try to train.
  3. See the following warnings:
The ``converters`` are currently experimental. It may not support operations including (but not limited to) Functions in ``torch.nn.functional`` that involved data dimension

[SNIP!]

********************
Starting validation :
********************
C:\Projects\GaNDLF\venv\Lib\site-packages\sklearn\metrics\_classification.py:2399: UserWarning: y_pred contains classes not in y_true
  warnings.warn("y_pred contains classes not in y_true")

The first warning comes from this line.

Expected behavior

This warning should come up just once.

Media

N.A.

Environment information

GANDLF version: 0.0.20-dev
Git hash: 000ea17ecd2e018dafa2ecfe7a85c030bb4a02cb
Platform: Windows-10-10.0.22631-SP0
Machine: AMD64
Processor: Intel64 Family 6 Model 165 Stepping 2, GenuineIntel
Architecture: 64bit WindowsPE
Python environment:
  Version: 3.11.6
  Implementation: CPython
  Compiler: MSC v.1935 64 bit (AMD64)
  Build: main Oct  3 2023 10:29:11

Additional context

N.A.

@VukW VukW self-assigned this Apr 18, 2024
@sarthakpati sarthakpati added the bug Something isn't working label Apr 18, 2024
@VukW VukW mentioned this issue Apr 18, 2024
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants