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

Compatibility with XGBoost 2.0 #296

Merged
merged 12 commits into from
Sep 20, 2023
Merged

Conversation

krfricke
Copy link
Collaborator

No description provided.

Copy link
Contributor

@trivialfis trivialfis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to ping me if there's anything I can help.

self.n_classes_ = len(self.classes_)
if XGBOOST_VERSION < Version("2.0.0"):
self.classes_ = np.unique(y)
self.n_classes_ = len(np.unique(y))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.n_classes_ = len(np.unique(y))
self.n_classes_ = len(self.classes_)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this recursive? As

    @property
    def classes_(self) -> np.ndarray:
        return np.arange(self.n_classes_)

@krfricke
Copy link
Collaborator Author

Feel free to ping me if there's anything I can help.

Thanks! I'm also fighting a few changes on the Ray side, I'll let you know if I need help :-)

@krfricke krfricke marked this pull request as ready for review September 15, 2023 23:54
@krfricke krfricke requested a review from Yard1 September 15, 2023 23:54
Copy link
Member

@Yard1 Yard1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@krfricke krfricke merged commit c7eada3 into ray-project:master Sep 20, 2023
14 checks passed
@krfricke krfricke deleted the xgboost-20 branch September 20, 2023 23:02
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

Successfully merging this pull request may close these issues.

3 participants