|
|
|
|
|
|
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_interop_threads(2) |
|
|
|
os.environ["KMP_AFFINITY"] = "granularity=fine,compact,1,0" |
|
|
|
os.environ["KMP_BLOCKTIME"] = "0" |
|
|
|
|
|
|
|
# Known PyLint compatibility with PyTorch https://github.com/pytorch/pytorch/issues/701 |
|
|
|
# pylint: disable=E1101 |
|
|
|