schola.sb3.action_space_patch.PatchedPPO

class schola.sb3.action_space_patch.PatchedPPO(policy, env, learning_rate=0.0003, n_steps=2048, batch_size=64, n_epochs=10, gamma=0.99, gae_lambda=0.95, clip_range=0.2, clip_range_vf=None, normalize_advantage=True, ent_coef=0.0, vf_coef=0.5, max_grad_norm=0.5, use_sde=False, sde_sample_freq=-1, target_kl=None, stats_window_size=100, tensorboard_log=None, policy_kwargs=None, verbose=0, seed=None, device=‘auto’, _init_setup_model=True)[source]

Bases: PPO

Methods

__init__(policy, env[, learning_rate, …])

collect_rollouts(env, callback, …)

Collect experiences using the current policy and fill a RolloutBuffer.

get_env()

Returns the current environment (can be None if not defined).

get_parameters()

Return the parameters of the agent.

get_vec_normalize_env()

Return the VecNormalize wrapper of the training env if it exists.

learn(total_timesteps[, callback, …])

Return a trained model.

load(path[, env, device, custom_objects, …])

Load the model from a zip-file.

predict(observation[, state, episode_start, …])

Get the policy action from an observation (and optional hidden state).

save(path[, exclude, include])

Save all the attributes of the object and the model parameters in a zip-file.

set_env(env[, force_reset])

Checks the validity of the environment, and if it is coherent, set it as the current environment.

set_logger(logger)

Setter for for logger object.

set_parameters(load_path_or_dict[, …])

Load parameters from a given zip-file or a nested dictionary containing parameters for different modules (see get_parameters).

set_random_seed([seed])

Set the seed of the pseudo-random generators (python, numpy, pytorch, gym, action_space)

train()

Update policy using the currently gathered rollout buffer.

Attributes

logger

Getter for the logger object.

policy_aliases

rollout_buffer

policy

observation_space

action_space

n_envs

lr_schedule

Parameters:
__init__(policy, env, learning_rate=0.0003, n_steps=2048, batch_size=64, n_epochs=10, gamma=0.99, gae_lambda=0.95, clip_range=0.2, clip_range_vf=None, normalize_advantage=True, ent_coef=0.0, vf_coef=0.5, max_grad_norm=0.5, use_sde=False, sde_sample_freq=-1, target_kl=None, stats_window_size=100, tensorboard_log=None, policy_kwargs=None, verbose=0, seed=None, device=‘auto’, _init_setup_model=True)[source]
Parameters:

Related pages

  • Visit the Schola product page for download links and more information.

Looking for more documentation on GPUOpen?

AMD GPUOpen software blogs

Our handy software release blogs will help you make good use of our tools, SDKs, and effects, as well as sharing the latest features with new releases.

GPUOpen Manuals

Don’t miss our manual documentation! And if slide decks are what you’re after, you’ll find 100+ of our finest presentations here.

AMD GPUOpen Performance Guides

The home of great performance and optimization advice for AMD RDNA™ 2 GPUs, AMD Ryzen™ CPUs, and so much more.

Getting started: AMD GPUOpen software

New or fairly new to AMD’s tools, libraries, and effects? This is the best place to get started on GPUOpen!

AMD GPUOpen Getting Started Development and Performance

Looking for tips on getting started with developing and/or optimizing your game, whether on AMD hardware or generally? We’ve got you covered!

AMD GPUOpen Technical blogs

Browse our technical blogs, and find valuable advice on developing with AMD hardware, ray tracing, Vulkan®, DirectX®, Unreal Engine, and lots more.

Find out more about our software!

AMD GPUOpen Effects - AMD FidelityFX technologies

Create wonder. No black boxes. Meet the AMD FidelityFX SDK!

AMD GPUOpen Samples

Browse all our useful samples. Perfect for when you’re needing to get started, want to integrate one of our libraries, and much more.

AMD GPUOpen developer SDKs

Discover what our SDK technologies can offer you. Query hardware or software, manage memory, create rendering applications or machine learning, and much more!

AMD GPUOpen Developer Tools

Analyze, Optimize, Profile, Benchmark. We provide you with the developer tools you need to make sure your game is the best it can be!