Change training tasks to xray for Jenkins tests (#2567)

This commit is contained in:
Yuhong Guo
2018-08-06 13:35:26 -07:00
committed by Robert Nishihara
parent 85b8b2a395
commit 9825da7233
5 changed files with 71 additions and 55 deletions
@@ -10,6 +10,7 @@ To try this out, in two separate shells run:
import os
from gym import spaces
import numpy as np
import ray
from ray.rllib.agents.dqn import DQNAgent
@@ -25,8 +26,9 @@ CHECKPOINT_FILE = "last_checkpoint.out"
class CartpoleServing(ServingEnv):
def __init__(self):
ServingEnv.__init__(self, spaces.Discrete(2),
spaces.Box(low=-10, high=10, shape=(4, )))
ServingEnv.__init__(
self, spaces.Discrete(2),
spaces.Box(low=-10, high=10, shape=(4, ), dtype=np.float32))
def run(self):
print("Starting policy server at {}:{}".format(SERVER_ADDRESS,