BUG: `partial_fit()` input validation is lacking
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 50/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- python, scikit-learn
- Domain
- machine-learning
Research direction
Start with the reproducer in the issue: GFDLClassifier(hidden_layer_sizes=0, seed=0).partial_fit(X, y, classes=np.unique(y)) in gfdl/model.py. Compare it with how MLPClassifier validates the same parameter through validate_parameter_constraints, and check which parameters GFDL's partial_fit and fit validate. Done when a zero-size network is rejected with a clear error, and other inputs that the harness catches are checked too. The issue's scope is open-ended, so confirm the expected behaviour with maintainers first.
Written by the indexing model from the issue text.
Description
The reproducer below the fold runs just fine on our latest main branch at the time of writing (hash: 768bf3c17), despite having no neurons in the estimator. Conversely, in a similar scenario, MLPClassifier correctly raises an InvalidParameterError. There are probably other examples of input validation being inferior on our end, since they're using a validate_parameter_constraints harness which I suspect catches a few other things we don't. In other words, I'm not so sure this is really constrained to just size 0 neural networks.
import numpy as np
from sklearn.datasets import make_classification
from gfdl.model import GFDLClassifier
X, y = make_classification(random_state=0)
GFDLClassifier(hidden_layer_sizes=0, seed=0).partial_fit(X, y, classes=np.unique(y))
- Dominant language
- Python
- Stars
- 3
- Forks
- 6
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 8
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lanl/GFDL
-
MAINT: inconsistent use of rng in classifier objectsPossibly taken @sdtemple claimed this 3 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 2 days
-
maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 2 days
-
enhancement testing
Difficulty 4/5 3-5 days Newbie friendliness 30/100
Maintainers usually reply within 2 days
-
continuous integration
Difficulty 3/5 Half a day Newbie friendliness 40/100
Maintainers usually reply within 2 days
-
ENH: Toggle BiasPossibly taken @aganguly-lab claimed this 17 days ago. Openenhancement
lanl/GFDL#151 · 7 comments · 1 assignee ·
Maintainers usually reply within 2 days
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
software-mansion-labs/Diplomat#20 ·
Maintainers usually reply within 1 day
-
[Windows] Hidden title bar: a maximized window restored from minimized on a secondary monitor gets the primary monitor's work area as its client areaPossibly taken @lijy91 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
libnativeapi/nativeapi#53 · 1 reaction ·
Maintainers usually reply within 1 day
-
View Counts discarded due to field name mismatchPossibly taken @rsiva0400 claimed this today. Opensite-bug triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Model version publishes the new UK firm entity as a personPossibly taken @vahid-ahmadi claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PolicyEngine/policyengine.py#764 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
spcl/HPCAgent-Bench#264 ·
Maintainers usually reply within 1 day