License | MIT |
---|---|
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Servant-client functions to interact with the flask server from openai/gym-http-api.
- envCreate :: GymEnv -> ClientM InstID
- envListAll :: ClientM Environment
- envReset :: InstID -> ClientM Observation
- envStep :: InstID -> Step -> ClientM Outcome
- envActionSpaceInfo :: InstID -> ClientM Info
- envActionSpaceSample :: InstID -> ClientM Action
- envActionSpaceContains :: InstID -> Int -> ClientM Object
- envObservationSpaceInfo :: InstID -> ClientM Info
- envMonitorStart :: InstID -> Monitor -> ClientM ()
- envMonitorClose :: InstID -> ClientM ()
- envClose :: InstID -> ClientM ()
- upload :: Config -> ClientM ()
- shutdownServer :: ClientM ()
- gymAPI :: Proxy GymAPI
Environment functions
envCreate :: GymEnv -> ClientM InstID Source #
Create an instance of the specified environment (POST /v1/envs/
)
envListAll :: ClientM Environment Source #
List all environments running on the server (GET /v1/envs/
)
envReset :: InstID -> ClientM Observation Source #
Reset the state of the environment and return an initial observation. (POST /v1/envs/instance_id/reset/
)
envStep :: InstID -> Step -> ClientM Outcome Source #
Step though an environment using an action. (POST /v1/envs/instance_id/step/
)
envActionSpaceInfo :: InstID -> ClientM Info Source #
Get information (name and dimensions/bounds) of the env's action_space (GET /v1/envs/instance_id/action_space/
)
envActionSpaceSample :: InstID -> ClientM Action Source #
Sample randomly from the env's action_space (GET /v1/envs/instance_id/action_space/sample
)
envActionSpaceContains :: InstID -> Int -> ClientM Object Source #
Check to see if a value is valid in the env's action_space (GET /v1/envs/instance_id/action_space/contains/x
)
envObservationSpaceInfo :: InstID -> ClientM Info Source #
Get information (name and dimensions/bounds) of the env's observation_space (GET /v1/envs/instance_id/observation_space/
)
envMonitorStart :: InstID -> Monitor -> ClientM () Source #
Start monitoring (POST /v1/envs/instance_id/monitor/start/
)
envMonitorClose :: InstID -> ClientM () Source #
Flush all monitor data to disk (POST /v1/envs/instance_id/monitor/close/
)
Http-server commands
shutdownServer :: ClientM () Source #
Request a server shutdown (POST /v1/shutdown/
)
Servant code
gymAPI :: Proxy GymAPI Source #
Proxy type for the full servant-client representation of the gym http api.
Orphan instances
MimeUnrender * HTML () Source # | |