Beispiel #1
0
def test_make_vae_dataset():
    assert not bash("cd ~/Code/navrep/navrep/scripts && \
        ipython -- make_vae_dataset.py --environment navreptrain --n 1")
    for i in range(1, 101):
        assert not bash(
            "cp ~/navrep/datasets/V/navreptrain/000_scans_robotstates_actions_rewards_dones.npz \
                        ~/navrep/datasets/V/navreptrain/{:03}_scans_robotstates_actions_rewards_dones.npz"
            .format(i))
Beispiel #2
0
def test_navrep_is_clean():
    if os.path.isdir(os.path.expanduser("~/navrep/models")) or \
            os.path.isdir(os.path.expanduser("~/navrep/logs")) or \
            os.path.isdir(os.path.expanduser("~/navrep/eval")):
        bash("echo $(find ~/navrep -type f | wc -l) files found in ~/navrep!")
        if 'OVERWRITE_NAVREP' in os.environ and os.environ[
                'OVERWRITE_NAVREP'] == '1':
            print(
                "WARNING: OVERWRITE_NAVREP is set to 1, will overwrite files in ~/navrep dir"
            )
        else:
            print(
                """ERROR: running tests will overwrite data in the ~/navrep folder!
                  if you really wish to continue, run OVERWRITE_NAVREP=1 pytest"""
            )
            assert False
Beispiel #3
0
def test_gym_vae_lstm_v_only():
    assert not bash("cd ~/Code/navrep/navrep/scripts && \
        ipython -- train_gym_navreptrainencodedenv.py --backend VAE_LSTM --encoding V_ONLY --no-gpu --n 100000"
                    )
Beispiel #4
0
def test_train_rnn():
    assert not bash("cd ~/Code/navrep/navrep/scripts && \
        ipython -- train_rnn.py --environment navreptrain --n 60")
Beispiel #5
0
def test_make_rnn_dataset():
    assert not bash("cd ~/Code/navrep/navrep/scripts && \
        ipython -- make_rnn_dataset.py --environment navreptrain --n 3")
Beispiel #6
0
def test_train_vae():
    assert not bash("cd ~/Code/navrep/navrep/scripts && \
        ipython -- train_vae.py --environment navreptrain --n 1000")
Beispiel #7
0
def test_gym_gpt_vm():
    assert not bash("cd ~/Code/navrep/navrep/scripts && \
        ipython -- train_gym_navreptrainencodedenv.py --backend GPT --encoding VM --n 100000"
                    )
Beispiel #8
0
def test_gym_gpt1d_m_only():
    assert not bash("cd ~/Code/navrep/navrep/scripts && \
        ipython -- train_gym_navreptrainencodedenv.py --backend GPT1D --encoding M_ONLY --n 100000"
                    )
Beispiel #9
0
def test_gym_vae1dlstm_vm():
    assert not bash("cd ~/Code/navrep/navrep/scripts && \
        ipython -- train_gym_navreptrainencodedenv.py --backend VAE1DLSTM --encoding VM --n 100000"
                    )