gym-http-api
gym-http-api copied to clipboard
get_action_space_info not complete
The function get_action_space_info does not return the action space when the action space contains a Tuple. It will just return {'name': 'Tuple'}. Tested on Copy-v0.
Could you provide a minimal test case code sample to help with debugging and testing?
Sure here you go:
import logging
import os, sys
import numpy as np
from gym_http_client import Client
remote_base = 'http://127.0.0.1:5000'
client = Client(remote_base)
env_id = 'Copy-v0'
instance_id = client.env_create(env_id)
print(client.env_action_space_info(instance_id))
To elaborate on this _get_space_properties does not seem to be fully implemented to support all properties, see: https://github.com/openai/gym-http-api/blob/master/gym_http_server.py#L92
indeed... if we can specify how to serialize a Tuple to json then i can add that case in the server code...
Potentially addressed with recent commit: https://github.com/openai/gym-http-api/commit/1b42f25f6fe992cd08f5aeb3cb4151936bc5ea15
Does this get at exactly what you need? If so, then it is a matter of implementing something similar in the info call as what is in the sample call.
The problem is with the environment - Copy-v0. It has three actions with a couple of sub actions within them, unlike CartPole-v0.