Skip to content

Deploy a trained PPO Agent #87

Answered by Toni-SM
chadb56 asked this question in Q&A
Jul 11, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hi @chadb56

First, you can train the agent and save each model/optimizer/preprocessor separately by enabling "store_separately" in agent configuration as described in skrl docs Saving checkpoints.

Second, to load and use the checkpoints in a minimal setup it is necessary to take into account whether input processors (for the states) were used or not, since the processors modify the states that are passed to the models.

  • with input preprocessors:

    - define model (only policy)
    - instantiate policy and preprocessor
    - load policy and preprocessor checkpoints
    # use the preprocessor + policy
    
  • without input preprocessors:

    - define model (only policy)
    - instantiate policy
    - load policy checkpoi…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@chadb56
Comment options

Answer selected by Toni-SM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants