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

Declaring multiple integral reward functions #205

Open
jdumouchelle opened this issue Jun 23, 2021 · 0 comments
Open

Declaring multiple integral reward functions #205

jdumouchelle opened this issue Jun 23, 2021 · 0 comments
Labels
type/bug 🐛 Something isn't working

Comments

@jdumouchelle
Copy link

Describe the bug

With the current reward function implementation we are unable to declare multiple reward function in a single environment.

Setting

  • OS: Any
  • Compiler: Any
  • Python version: Any
  • Ecole version: dev and integral_fix branches

To Reproduce

Declare an environment with at least two integral reward functions either in the reward_function or information_function and call reset on an instance.

import ecole 

env = ecole.environment.Configuring(
    observation_function=None,
    reward_function = ecole.reward.PrimalDualIntegral(),
    information_function={
        'dualintegral': ecole.reward.DualIntegral().cumsum(),
    }
)

instances = ecole.instance.SetCoverGenerator()
instance = next(instances)

env.reset(instance)

This will give the error:

Exception: [scip_event.c:76] ERROR: event handler <ecole::reward::IntegralEventHandler> already included.
[objeventhdlr.cpp:229] ERROR: Error <-9> in function call

Expected behavior

No exceptions.

Additional context

We need to decide on how we want to resolve the issue of multiple integral reward functions since they will create an event handler with the same name causing an exception in scip.

@jdumouchelle jdumouchelle added the type/bug 🐛 Something isn't working label Jun 23, 2021
@jdumouchelle jdumouchelle mentioned this issue Jun 24, 2021
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant