Fix baselines build (fails due to lack of mujoco in public baselines container) (#29)
* make nminibatces = min(nminibatches, nenv) * clarify the usage of lstm policy, add an example and a test * cleaned up example, added assert to the test * remove nminibatches -> min(nminibatches, num_env) * removed code snippet from the docstring, pointing to the file * add _mujoco_present flag to skip the tests that require mujoco if mujoco is not present * re-format skip message in test_doc_examples * flake8 complaints
This commit is contained in:
@@ -1,3 +1,16 @@
|
||||
import pytest
|
||||
try:
|
||||
import mujoco_py
|
||||
_mujoco_present = True
|
||||
except BaseException:
|
||||
mujoco_py = None
|
||||
_mujoco_present = False
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
not _mujoco_present,
|
||||
reason='error loading mujoco - either mujoco / mujoco key not present, or LD_LIBRARY_PATH is not pointing to mujoco library'
|
||||
)
|
||||
def test_lstm_example():
|
||||
import tensorflow as tf
|
||||
from baselines.common import policies, models, cmd_util
|
||||
|
Reference in New Issue
Block a user