Is it possible to personalize the observation function in python? #87
-
Hey, The GCNN branching tutorial samples observation by the build-in functions: ecole.observation.StrongBranchingScores() and ecole.observation.Pseudocosts(). Is it possible to personalize the observation function (branching policy) for ecole in python? Thank you so much! Best, |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Hi, The observation function is an object that extract data from SCIP, typically to get the data you would feed to the ML model. Ecole implements a few observation functions that we deemed valuable to many users (hopefully more to come). Hope this answer your question. Let us know if we can elaborate on anything. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your response! It helps a lot. I have a small suggestion for the documents of **dynamics_kwargs. I guess it could be helpful to detail it in the document. For instance, if I want to query the pseudobranching candidates rather than the LPbranching candidates, I can directly pass pseudo_candidates=True when initializing the environment. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the feedback.
In your opinion, is there a way we can improve on this? |
Beta Was this translation helpful? Give feedback.
-
Yes, I personally believe it can be helpful to document it in the Creating environment section. |
Beta Was this translation helpful? Give feedback.
-
I have added another section to the doc |
Beta Was this translation helpful? Give feedback.
Hi,
The observation function is an object that extract data from SCIP, typically to get the data you would feed to the ML model.
It can be done in Python or in C++, either by inheriting of an existing one (if you need some of its data), or from scratch. You can see more details here: https://doc.ecole.ai/master/howto/create-functions.html
Ecole implements a few observation functions that we deemed valuable to many users (hopefully more to come).
In the case of
Pseudocosts
andStrongBranchingScores
, they are observation functions.As such, they do not perform any branching, only extract data, even if they are related to a branching policy.
They are useful to get "expert" data and reproduce…