* Adjust KMP and interop thread settings * Don't set affinity, seems to slow down on low-CPU machines
import os
# Detect availability of torch package here.
# NOTE: this try/except is temporary until torch is required for ML-Agents.
try:
torch.set_num_threads(1)
torch.set_num_interop_threads(2)
os.environ["KMP_BLOCKTIME"] = "0"
# Known PyLint compatibility with PyTorch https://github.com/pytorch/pytorch/issues/701
# pylint: disable=E1101