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

[model:regressor] AttributeError: 'IsotonicRegressionCalibrator' object has no attribute 'n_features_in_' #3909

Closed
suhaibmujahid opened this issue Dec 9, 2023 · 2 comments · Fixed by #3921
Labels
bug Something isn't working

Comments

@suhaibmujahid
Copy link
Member

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

Traceback (most recent call last):
  File "/usr/local/bin/bugbug-train", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/site-packages/scripts/trainer.py", line 141, in main
    retriever.go(args)
  File "/usr/local/lib/python3.10/site-packages/scripts/trainer.py", line 41, in go
    metrics = model_obj.train(limit=args.limit)
  File "/usr/local/lib/python3.10/site-packages/bugbug/model.py", line 418, in train
    logger.info("Number of features: %d", self.clf.steps[-1][1].n_features_in_)
AttributeError: 'IsotonicRegressionCalibrator' object has no attribute 'n_features_in_'
@suhaibmujahid suhaibmujahid added the bug Something isn't working label Dec 9, 2023
@jpangas
Copy link
Collaborator

jpangas commented Dec 11, 2023

I think using the n_features_in_ attribute from the base_clf (after fitting) should solve this.
self.n_features_in_ = self.base_clf.n_features_in_

@suhaibmujahid
Copy link
Member Author

I think using the n_features_in_ attribute from the base_clf (after fitting) should solve this.

Yes. Let's solve it that way for now. But at some point, I think we should reconsider the way that we calibrate the model.

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