Tips and Tricks

This page contains various tips and tricks for using Schola effectively, as well as common pitfalls and their solutions.

Training In The Editor Runs Slowly

The most common cause of extremely slow training in the editor (e.g. less than 10 fps), is that by default the editor will reduce it’s resource usage drastically when it isn’t the active window. This can be changed in the settings. EditEditor PreferencesGeneralPerformanceUse Less CPU when in Background. Uncheck this option to allow the editor to use more resources when it is not the active window.

Getting More CPU/GPU Utilization

If you find that training is running too slowly for your purposes, you can try building your environment into a standalone executable, and then running training from a separate python process, using the --launch-unreal flag.

Note

If you are using a custom training script, then you can instantiate your environment with a StandaloneUnrealConnection to achieve the same effect.

If your environment doesn’t utilize camera sensors or other Unreal Engine features, requiring rendering, you can also try running the training in headless mode. This can be done by setting the --headless flag for launch.py, or setting headless to True when instantiating your StandaloneUnrealConnection. When running in headless mode, the Unreal Engine will not render the environment, which can significantly increase training speed.

Training Runs at a High FPS but My Agent Doesn’t Train

When training at a very high FPS, actions that are scaled based on the framerate (e.g. Movement Input) may lead to the agent not training properly. This is caused by the agent’s actions having very little impact on the game world, as they have all been scaled down, leading to a large number of very similar datapoints during training.

To resolve this, you can either reduce the FPS of the training, or use the --set-fps FPS option to set the simulation timestep of the Unreal Engine Process. As an example, if you set --set-fps 30, the simulation will run at 30 FPS, regardless of the actual FPS of the training, so each action will impact the game world exactly as if the game was running at 30fps.

Training is Complete but launch.py hangs

If you find that the training progress bar in launch.py reports that training finished but launch.py is hanging, it is likely that the post-training evaluation is still running. This can happen if you run with a very small number of training steps, and evaluation enabled (--disable-eval is not set). If this is the case, due to deterministic decision making, the agent can get stuck in a loop or position where it never completes the environment.

To resolve this, you can either increase the number of training steps, or disable evaluation by setting --disable-eval when running launch.py, or setup your ComputeStatus() to return EAgentTrainingStatus::Truncated after a fixed number of steps.

Understanding Algorithm Parameters and Options

Schola supports multiple algorithms for training: PPO and SAC for Stable Baselines 3, as well as PPO, APPO, and Impala with Ray. each with its own set of parameters and options. These are documented in a few places in Schola:

The order of precedence for default settings is Unreal Settings (only when launching the training process from Unreal), the CLI defaults, and then python dataclass default values. For example, the dataclass default values will be overriden by any values given a default in the CLI.

Note

While the settings and defaults are documented in Schola, the recommended source on what each settings does is the official documentation from Ray and Stable Baselines 3 as the settings are provided, almost entirely as is to the training algorithms provided by those platforms.

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!