# General Suggestions

* The environments heavily use JIT compilation for speed ups. But it might return NaN gradients in some rare situations. The training will explicitly fail in such conditions. In these situations use `PYTORCH_JIT=0`.
* A minor bottleneck might be horovod caching. Disable caching with `HOROVOD_CACHE_CAPACITY=0`.
* By default we simulate the environment on CPU, this is performant for low nagents due to the high kernel launch overhead. In case you want to use our `tsim` and `agents` modules for simulating a large number of vehicles, uncomment [this line](https://github.com/fidler-lab/social-driving/blob/b59dede27ebfed22e2c41165a79b8fce95f308da/sdriving/agents/ppo_distributed/ppo.py#L73) or the corresponding line in other trainers.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://avikpal.gitbook.io/social-driving/agents/general-suggestions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
