glmcdona / LuxPythonEnvGym

Matching python environment code for Lux AI 2021 Kaggle competition, and a gym interface for RL models.
MIT License
73 stars 38 forks source link

Could there be a place to load in models? #43

Closed goforks12 closed 2 years ago

goforks12 commented 3 years ago

Hey, Thanks for the wrapper! Could there be a way to load in our checkpoints of our models?

royerk commented 3 years ago

Hey @goforks12

I am currently using this in the train.py script:

def get_command_line_arguments():
    ...
    parser.add_argument('--path', type=str, default=None)   # get the path to a checkpoint
    ...
def train(args):
    ...
    if args.path:
        model = PPO.load(args.path)
        model.set_env(env=env)
    else:
        model = PPO(...)
    ...

I am not 100% sure it works as intended. If you could confirm too that it works then I can make the PR.

royerk commented 2 years ago

@glmcdona solved!