mirror of
https://github.com/wassname/ray.git
synced 2026-07-19 11:27:32 +08:00
Change training tasks to xray for Jenkins tests (#2567)
This commit is contained in:
committed by
Robert Nishihara
parent
85b8b2a395
commit
9825da7233
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user