ds4dm / ecole

Extensible Combinatorial Optimization Learning Environments
https://www.ecole.ai
BSD 3-Clause "New" or "Revised" License
321 stars 68 forks source link

NodeBipartiteObs object has no attribute variable_features #345

Closed prachi-shah-opt closed 1 year ago

prachi-shah-opt commented 2 years ago

Describe the bug

I am trying to run the example for branching-imitation (https://github.com/ds4dm/ecole/tree/master/examples/branching-imitation) and am getting the following error - 'ecole.core.observation.NodeBipartiteObs' object has no attribute 'variable_features'

Detailed log - Traceback (most recent call last): File "/home/pshah398/LearningToBranch/EcoleGasseEtAl/branching-imitation/example.py", line 408, in observation = train_data[0].to(DEVICE) File "/home/pshah398/anaconda3/envs/ecole_env/lib/python3.10/site-packages/torch_geometric/data/dataset.py", line 197, in getitem data = self.get(self.indices()[idx]) File "/home/pshah398/LearningToBranch/EcoleGasseEtAl/branching-imitation/example.py", line 235, in get variable_features = sample_observation.variable_features AttributeError: 'ecole.core.observation.NodeBipartiteObs' object has no attribute 'variable_features'

Setting

To Reproduce

Run the file example.ipynb at https://github.com/ds4dm/ecole/tree/master/examples/branching-imitation

rezabayani commented 1 year ago

Have you tried row_features and column_features?