{"action":"created","issue":{"url":"https://api.github.com/repos/wassname/rl-portfolio-management/issues/17","repository_url":"https://api.github.com/repos/wassname/rl-portfolio-management","labels_url":"https://api.github.com/repos/wassname/rl-portfolio-management/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/wassname/rl-portfolio-management/issues/17/comments","events_url":"https://api.github.com/repos/wassname/rl-portfolio-management/issues/17/events","html_url":"https://github.com/wassname/rl-portfolio-management/issues/17","id":315269303,"number":17,"title":"Gym ","user":{"login":"ucfbrd","id":23141212,"avatar_url":"https://avatars2.githubusercontent.com/u/23141212?v=4","gravatar_id":"","url":"https://api.github.com/users/ucfbrd","html_url":"https://github.com/ucfbrd","followers_url":"https://api.github.com/users/ucfbrd/followers","following_url":"https://api.github.com/users/ucfbrd/following{/other_user}","gists_url":"https://api.github.com/users/ucfbrd/gists{/gist_id}","starred_url":"https://api.github.com/users/ucfbrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ucfbrd/subscriptions","organizations_url":"https://api.github.com/users/ucfbrd/orgs","repos_url":"https://api.github.com/users/ucfbrd/repos","events_url":"https://api.github.com/users/ucfbrd/events{/privacy}","received_events_url":"https://api.github.com/users/ucfbrd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-17T22:51:09Z","updated_at":"2018-04-18T23:16:16Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nI have an issue running the environment command from GYM. Can you please help me address this issue.\r\n\r\nThank you\r\n\r\n\r\n---------------------------------------------------------------------------\r\nTypeError                                 Traceback (most recent call last)\r\n<ipython-input-12-6c975cc8b86d> in <module>()\r\n      7     window_length = window_length,\r\n      8     output_mode='EIIE',\r\n----> 9     random_reset=False)\r\n     10 # wrap it in a few wrappers\r\n     11 env = ConcatStates(env)\r\n\r\n~/Downloads/rl-portfolio-management-master/rl_portfolio_management/environments/portfolio.py in __init__(self, df, steps, trading_cost, time_cost, window_length, augment, output_mode, log_dir, scale, scale_extra_cols, random_reset)\r\n    266         nb_assets = len(self.src.asset_names)\r\n    267         self.action_space = gym.spaces.Box(\r\n--> 268             0.0, 1.0, shape=nb_assets + 1)\r\n    269 \r\n    270         # get the history space from the data min and max\r\n\r\n~/gym/gym/spaces/box.py in __init__(self, low, high, shape, dtype)\r\n     32         self.low = low.astype(dtype)\r\n     33         self.high = high.astype(dtype)\r\n---> 34         gym.Space.__init__(self, shape, dtype)\r\n     35 \r\n     36     def sample(self):\r\n\r\n~/gym/gym/core.py in __init__(self, shape, dtype)\r\n    200     \"\"\"\r\n    201     def __init__(self, shape=None, dtype=None):\r\n--> 202         self.shape = None if shape is None else tuple(shape)\r\n    203         self.dtype = None if dtype is None else np.dtype(dtype)\r\n    204 \r\n\r\nTypeError: 'int' object is not iterable"},"comment":{"url":"https://api.github.com/repos/wassname/rl-portfolio-management/issues/comments/382558535","html_url":"https://github.com/wassname/rl-portfolio-management/issues/17#issuecomment-382558535","issue_url":"https://api.github.com/repos/wassname/rl-portfolio-management/issues/17","id":382558535,"user":{"login":"wassname","id":1103714,"avatar_url":"https://avatars1.githubusercontent.com/u/1103714?v=4","gravatar_id":"","url":"https://api.github.com/users/wassname","html_url":"https://github.com/wassname","followers_url":"https://api.github.com/users/wassname/followers","following_url":"https://api.github.com/users/wassname/following{/other_user}","gists_url":"https://api.github.com/users/wassname/gists{/gist_id}","starred_url":"https://api.github.com/users/wassname/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wassname/subscriptions","organizations_url":"https://api.github.com/users/wassname/orgs","repos_url":"https://api.github.com/users/wassname/repos","events_url":"https://api.github.com/users/wassname/events{/privacy}","received_events_url":"https://api.github.com/users/wassname/received_events","type":"User","site_admin":false},"created_at":"2018-04-18T23:16:16Z","updated_at":"2018-04-18T23:16:16Z","author_association":"OWNER","body":"Cheers, so what's the exact gym version so I can try and replicate it?\r\n\r\nDoes this change work? At `rl_portfolio_management/environments/portfolio.py # 286`  change line 286 from\r\n`            0.0, 1.0, shape=nb_assets + 1)`\r\n to \r\n`            0.0, 1.0, shape=(nb_assets + 1,))`\r\nThat changing the input shape from a int to a tuple, it seems to be what gym is expecting."}}
{"actor":{"display_login":"wassname"}}