ai4co / rl4co

A PyTorch library for all things Reinforcement Learning (RL) for Combinatorial Optimization (CO)
https://rl4.co
MIT License
455 stars 84 forks source link

[BUG] Find a mistake in docs #198

Closed Rubbin1926 closed 4 months ago

Rubbin1926 commented 4 months ago

In the "NEW ENVIRONMENT: CREATING AND MODELING" - "Imports" chapter: https://rl4co.readthedocs.io/en/latest/_collections/3-creating-new-env-model.html

from rl4co.envs.common import RL4COEnvBase, Generator, get_sampler

But RL4COEnvBase is actually in rl4co.envs.common.base _Generator, getsampler are in rl4co.envs.common.utils

So maybe the correct one is:

from rl4co.envs.common.base import RL4COEnvBase
from rl4co.envs.common.utils import Generator, get_sampler
ngastzepeda commented 4 months ago

You will notice that in rl4co.envs.common there is a file called __init__.py. The files you mention are imported here, which allows us to directly do from rl4co.envs.common import RL4COEnvBase, Generator, get_sampler.