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

Getting unreasonably large values for the Khalil feature rows_neg_coefs_mean #356

Open
SelinBayramoglu opened this issue Mar 11, 2023 · 3 comments
Labels
type/bug 🐛 Something isn't working

Comments

@SelinBayramoglu
Copy link

SelinBayramoglu commented Mar 11, 2023

Hello,

When extracting Khalil2016 features for the attached instance, I get very large positive values for the rows_neg_coefs_mean feature (feature id: 14) such as 1.15292150e+18. As a result, rows_neg_coefs_stddev (feature id: 15) has values on the same order.

Describe the bug

instance_1.lp.txt

Setting

  • OS: Linux
  • Python version: 3.9.12
  • Ecole version: 0.8.1

To Reproduce

After renaming the instance file to "instance_1.lp", place it in your working directory and run the following script:
`import ecole
env = ecole.environment.Branching(observation_function=ecole.observation.Khalil2016())
env.seed(0)

filename = "instance_1.lp"

observation, action_set, _, done, _ = env.reset(filename)
while not done:
var_feats = observation.features
print(var_feats[:,14])
break`

Expected behavior

I expect negative values for rows_neg_coefs_mean of much smaller magnitude

@SelinBayramoglu SelinBayramoglu added the type/bug 🐛 Something isn't working label Mar 11, 2023
@stardustwls
Copy link

The same bug happens when i use the Khalil feature.

@Yufei-Kuang
Copy link

I found the same issue when use the code. The Khali features have 72 dimensions in total. However, I found the dimensions from 48 to 65 can usually be either np.inf or np.nan.

@gasse
Copy link
Member

gasse commented Sep 11, 2023

This bug might have been fixed by #343, which was merged in the master branch. Unfortunately these changes are not present in the latest stable release, there is a bunch of stuff that has been refactored in master and have not been tested thoroughly.

I suggest two options, which both require to install from source (see instructions here):

  • checkout and install directly from master
  • checkout the current stable Ecole version (v0.8.1), then cherry-pick this specific commit and install from source

I'm sorry this comes a bit late and I can't offer further assistance. Hope it helps anyway

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

4 participants