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

Error training the fenixcomponent model #4671

Closed
marco-c opened this issue Dec 7, 2024 · 0 comments · Fixed by #4683
Closed

Error training the fenixcomponent model #4671

marco-c opened this issue Dec 7, 2024 · 0 comments · Fixed by #4683
Assignees
Labels
bug Something isn't working

Comments

@marco-c
Copy link
Collaborator

marco-c commented Dec 7, 2024

https://community-tc.services.mozilla.com/tasks/W-kfMnFzSvKHhFDMYCqy0w/runs/0/logs/public/logs/live.log

2024-12-01 02:55:05,264:INFO:scripts.trainer:Training *fenixcomponent* model
2024-12-01 02:56:53,972:INFO:bugbug.model:X: (8908, 4), y: (8908,)
2024-12-01 02:56:53,977:INFO:bugbug.model:X_train: (8017, 4), y_train: (8017,)
2024-12-01 02:56:53,977:INFO:bugbug.model:X_test: (891, 4), y_test: (891,)
Traceback (most recent call last):
  File "/usr/local/bin/bugbug-train", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.12/site-packages/scripts/trainer.py", line 141, in main
    retriever.go(args)
  File "/usr/local/lib/python3.12/site-packages/scripts/trainer.py", line 41, in go
    metrics = model_obj.train(limit=args.limit)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/bugbug/model.py", line 417, in train
    self.clf.fit(X_train, self.le.transform(y_train))
  File "/usr/local/lib/python3.12/site-packages/sklearn/base.py", line 1473, in wrapper
    return fit_method(estimator, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/imblearn/pipeline.py", line 329, in fit
    Xt, yt = self._fit(X, y, routed_params)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/imblearn/pipeline.py", line 265, in _fit
    X, y, fitted_transformer = fit_resample_one_cached(
                               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/joblib/memory.py", line 312, in __call__
    return self.func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/imblearn/pipeline.py", line 1057, in _fit_resample_one
    X_res, y_res = sampler.fit_resample(X, y, **params.get("fit_resample", {}))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/imblearn/base.py", line 208, in fit_resample
    return super().fit_resample(X, y)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/imblearn/base.py", line 112, in fit_resample
    output = self._fit_resample(X, y)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/imblearn/over_sampling/_smote/base.py", line 389, in _fit_resample
    nns = self.nn_k_.kneighbors(X_class, return_distance=False)[:, 1:]
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sklearn/neighbors/_base.py", line 834, in kneighbors
    raise ValueError(
ValueError: Expected n_neighbors <= n_samples_fit, but n_neighbors = 6, n_samples_fit = 1, n_samples = 1
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

Successfully merging a pull request may close this issue.

2 participants