-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[python-package] Expose ObjectiveFunction
class
#6586
base: master
Are you sure you want to change the base?
Conversation
@jameslamb, I'm reaching out to you as I noticed that you've tagged this as 'in progress'. I would appreciate it if you could share your thoughts on this change and its relevance to the project. If there is anything more to be done for this PR, I will be happy to contribute further. |
You will have to be patient with us... there is a small group of mostly-volunteer maintainers overseeing this project. This is quite a significant PR, as it greatly expands the public API of the Python package and the C API. It will be a while before I personally am able to provide a thoughtful review. Maybe others like @shiyu1994 or @guolinke will be able to help. |
], | ||
) | ||
@pytest.mark.parametrize("num_boost_round", [5, 15]) | ||
@pytest.mark.skipif(getenv("TASK", "") == "cuda", reason="Skip due to ObjectiveFunction not exposed for cuda devices.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why couldn't this also be exposed for the CUDA implementation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It segfaults on the CI tests, and I cannot build the CUDA version on MacOS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where exactly does it segfault? 🤔 it seems like this should work 😅
Thank you for the response and sorry for the over-eagerness. I was just opening the door to discussion. |
No problem, we're happy to have you here contributing! In the interim, you might also consider picking up something smaller and more contained, like #6361. Once you have 1 commit merged to |
ObjectiveFunction
class to the Python APIObjectiveFunction
class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This looks very promising already :)
], | ||
) | ||
@pytest.mark.parametrize("num_boost_round", [5, 15]) | ||
@pytest.mark.skipif(getenv("TASK", "") == "cuda", reason="Skip due to ObjectiveFunction not exposed for cuda devices.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where exactly does it segfault? 🤔 it seems like this should work 😅
@neNasko1 Please add
as it was suggested by @borchero . |
Provides a way to invoke the builtin functions outside of training. Implements access to gradient computations and output conversion methods.
This is a minimal implementation of #6585.