ai4co / rl4co

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

Update ppo.py #167

Closed bokveizen closed 3 months ago

bokveizen commented 4 months ago

added "load_from_checkpoint" for PPO

Description

The method "load_from_checkpoint" was missing in PPO.

Motivation and Context

It allows "load_from_checkpoint" of PPOModel for instances now.

Types of changes

What types of changes does your code introduce? Remove all that do not apply:

Checklist

Go over all the following points, and put an x in all the boxes that apply. If you are unsure about any of these, don't hesitate to ask. We are here to help!

fedebotu commented 4 months ago

Thanks! The previous version was not working? Asking because the load_from_checkpoint is actually overwriting a class method of the LightningModule as seen here, so if it does not cause problems, it could be left