Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
Make tests run with recent changes to actorpool, bool tensors.
Browse files Browse the repository at this point in the history
Also it seems the test wasn't correctly linted.
  • Loading branch information
Heinrich Kuttler committed Oct 15, 2019
1 parent be815f3 commit 1fd7409
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions tests/contiguous_arrays_test.py
Expand Up @@ -63,6 +63,8 @@ def check_inference_inputs(self):
self.assertTrue(np.array_equal(frame.shape, (1, 1, 5, 4, 3)))
frame = frame.reshape(5, 4, 3)
self.assertTrue(np.array_equal(frame, self.target))
# Set an arbitrary output.
batch.set_outputs(((torch.ones(1, 1),), ()))

def test_contiguous_arrays(self):
self.check_inference_inputs()
Expand Down
4 changes: 1 addition & 3 deletions tests/core_agent_state_test.py
Expand Up @@ -17,8 +17,6 @@
import threading
import subprocess

import numpy as np

import torch
from torch import nn

Expand All @@ -34,7 +32,7 @@ def initial_state(self):

def forward(self, inputs, core_state):
x = inputs["frame"]
notdone = (1 - inputs["done"]).float()
notdone = (~inputs["done"]).float()
T, B, *_ = x.shape

for nd in notdone.unbind():
Expand Down

0 comments on commit 1fd7409

Please sign in to comment.