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

AttributeError: 'XGBClassifier' object has no attribute 'named_steps' #3881

Open
suhaibmujahid opened this issue Dec 3, 2023 · 9 comments
Open
Assignees

Comments

@suhaibmujahid
Copy link
Member

Turns out that there is an issue; I tried to use the model to classify a certain bug but it didn't work. However, it seems like that there are some steps that may help in the Discussion so I will try those out first. Thanks!

Edited: Sorry, the steps in the Discussion didn't resolve this issue.

(base) naoyaokamoto@Naoyas-MacBook-Air-393 bugbug % python3 -m scripts.bug_classifier stepstoreproduce --bug-id 1635837                                        
2023-12-03 18:38:17,677:INFO:numexpr.utils:NumExpr defaulting to 8 threads.
2023-12-03 18:38:19,688:INFO:__main__:stepstoreproducemodel does not exist. Downloading the model....
2023-12-03 18:38:19,703:INFO:bugbug.utils:Downloading https://community-tc.services.mozilla.com/api/index/v1/task/project.bugbug.train_stepstoreproduce.latest/artifacts/public/stepstoreproducemodel.tar.zst...
tar: Error inclusion pattern: Failed to open 'zstdmt'
2023-12-03 18:38:21,680:WARNING:bugbug.utils:Command '['tar', '-I', 'zstdmt', '-xf', 'stepstoreproducemodel.tar.zst']' returned non-zero exit status 1.. Falling back to zstandard API, which could be slower.
Traceback (most recent call last):
  File "/Users/naoyaokamoto/mambaforge/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/naoyaokamoto/mambaforge/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/naoyaokamoto/Documents/GitHub/bugbug/scripts/bug_classifier.py", line 80, in <module>
    main()
  File "/Users/naoyaokamoto/Documents/GitHub/bugbug/scripts/bug_classifier.py", line 76, in main
    classify_bugs(args.model, args.bug_id)
  File "/Users/naoyaokamoto/Documents/GitHub/bugbug/scripts/bug_classifier.py", line 32, in classify_bugs
    model = model_class.load(model_file_name)
  File "/Users/naoyaokamoto/Documents/GitHub/bugbug/bugbug/model.py", line 593, in load
    model.clf.named_steps["estimator"].load_model(xgboost_model_path)
AttributeError: 'XGBClassifier' object has no attribute 'named_steps'

Originally posted by @naoya2000 in #792 (comment)

@suhaibmujahid
Copy link
Member Author

@marco-c releasing a new version to retrain the models should fix this issue.

@marco-c
Copy link
Collaborator

marco-c commented Dec 3, 2023

Will do after #3883 is merged!

@marco-c
Copy link
Collaborator

marco-c commented Dec 5, 2023

Release triggered: 6b0a6d3.

@marco-c marco-c self-assigned this Dec 5, 2023
@marco-c
Copy link
Collaborator

marco-c commented Dec 6, 2023

New release triggered: d220467.

We now just need to trigger a new training pipeline run, I'll do it after making a new release after landing #3882.

@marco-c
Copy link
Collaborator

marco-c commented Dec 8, 2023

New release triggered with the fix to #3906: 6372518.

@marco-c
Copy link
Collaborator

marco-c commented Dec 8, 2023

@marco-c
Copy link
Collaborator

marco-c commented Dec 12, 2023

New release triggered with the fix to #3909: 48a4aba.

@marco-c
Copy link
Collaborator

marco-c commented Dec 12, 2023

@marco-c
Copy link
Collaborator

marco-c commented May 30, 2024

@suhaibmujahid this is fixed, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants