-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Labels
type/bug πSomething isn't workingSomething isn't working
Description
Describe the bug
There is a segfault when deleting tuple with observation, action, reward in example/libecole/src/branching.cpp.
I changed NodeBipatite observation function for StrongBranchingScores in branching.cpp:
#include <exception>
#include <iostream>
#include <tuple>
#include <utility>
#include "ecole/environment/branching.hpp"
#include "ecole/information/nothing.hpp"
#include "ecole/instance/set-cover.hpp"
#include "ecole/observation/node-bipartite.hpp"
#include "ecole/reward/n-nodes.hpp"
#include "ecole/observation/strong-branching-scores.hpp"
int main() {
try {
auto env = ecole::environment::
Branching<ecole::observation::StrongBranchingScores, ecole::reward::NNodes, ecole::information::Nothing>{};
std::size_t constexpr n_rows = 100;
std::size_t constexpr n_cols = 200;
auto gen = ecole::instance::SetCoverGenerator{{n_rows, n_cols}};
static constexpr auto n_episodes = 3;
for (std::size_t i = 0; i < n_episodes; ++i) {
auto [obs, action_set, reward, done, info] = env.reset(gen.next());
while (!done && action_set.has_value()) {
std::tie(obs, action_set, reward, done, info) = env.step(action_set.value()[0]);
}
}
} catch (std::exception const& e) {
std::cerr << "Error: " << e.what() << '\n';
}
}
Setting
- OS: Ubuntu 18.04
- Compiler: gcc 12.4.0
- Python version: 3.11.9
- Ecole version: 0.8.1 (last release)
- SCIP: 8.0.0 (passed as CMAKEARGS to ecole)
- CMake: 3.30.3
- xsimd: 8.1.0
- xtensor: 0.24.6
- xtensor-python: 0.26.1
To Reproduce
- Change branching.cpp example in a way presented above.
- Run
Expected behavior
Expected behavior is to get strong branching scores in observation.
Additional context
I use gdb for debugging and the main tread is paused on exception(our segfault) and everything starts from std::tuple()::~tuple().
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type/bug πSomething isn't workingSomething isn't working