{"action":"created","issue":{"url":"https://api.github.com/repos/deeplearning4j/gym-java-client/issues/6","repository_url":"https://api.github.com/repos/deeplearning4j/gym-java-client","labels_url":"https://api.github.com/repos/deeplearning4j/gym-java-client/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/deeplearning4j/gym-java-client/issues/6/comments","events_url":"https://api.github.com/repos/deeplearning4j/gym-java-client/issues/6/events","html_url":"https://github.com/deeplearning4j/gym-java-client/issues/6","id":204097971,"number":6,"title":"Cannot Run Code","user":{"login":"MankowitzProjects","id":884293,"avatar_url":"https://avatars.githubusercontent.com/u/884293?v=3","gravatar_id":"","url":"https://api.github.com/users/MankowitzProjects","html_url":"https://github.com/MankowitzProjects","followers_url":"https://api.github.com/users/MankowitzProjects/followers","following_url":"https://api.github.com/users/MankowitzProjects/following{/other_user}","gists_url":"https://api.github.com/users/MankowitzProjects/gists{/gist_id}","starred_url":"https://api.github.com/users/MankowitzProjects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MankowitzProjects/subscriptions","organizations_url":"https://api.github.com/users/MankowitzProjects/orgs","repos_url":"https://api.github.com/users/MankowitzProjects/repos","events_url":"https://api.github.com/users/MankowitzProjects/events{/privacy}","received_events_url":"https://api.github.com/users/MankowitzProjects/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-01-30T18:56:35Z","updated_at":"2017-02-01T13:56:10Z","closed_at":null,"body":"Hi,\r\nI tried cloning the source as well as downloading the jar from Maven repository.\r\n\r\nWhen I clone the source, there are many dependencies missing. Are you able to send me the related jars as I am concerned that the jars I have downloaded are problematic. For example, when I run the unit test on the ClientTest.java file, I get the exception:\r\n\r\njava.lang.NoClassDefFoundError: org/nd4j/linalg/api/complex/IComplexNumber\r\n    at org.deeplearning4j.rl4j.space.GymObservationSpace.<init>(GymObservationSpace.java:38)\r\n    at org.deeplearning4j.gym.ClientFactory.fetchObservationSpace(ClientFactory.java:72)\r\n    at org.deeplearning4j.gym.ClientFactory.build(ClientFactory.java:34)\r\n    at org.deeplearning4j.gym.test.ClientTest.completeClientTest(ClientTest.java:74)\r\n    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n    at java.lang.reflect.Method.invoke(Method.java:498)\r\n    at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:68)\r\n    at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:316)\r\n    at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:89)\r\n    at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:97)\r\n    at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.executeTest(PowerMockJUnit44RunnerDelegateImpl.java:300)\r\n    at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTestInSuper(PowerMockJUnit47RunnerDelegateImpl.java:131)\r\n    at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.access$100(PowerMockJUnit47RunnerDelegateImpl.java:59)\r\n    at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner$TestExecutorStatement.evaluate(PowerMockJUnit47RunnerDelegateImpl.java:147)\r\n    at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.evaluateStatement(PowerMockJUnit47RunnerDelegateImpl.java:107)\r\n    at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTest(PowerMockJUnit47RunnerDelegateImpl.java:82)\r\n    at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runBeforesThenTestThenAfters(PowerMockJUnit44RunnerDelegateImpl.java:288)\r\n    at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:87)\r\n    at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:50)\r\n    at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.invokeTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:208)\r\n    at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.runMethods(PowerMockJUnit44RunnerDelegateImpl.java:147)\r\n    at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$1.run(PowerMockJUnit44RunnerDelegateImpl.java:121)\r\n    at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)\r\n    at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)\r\n    at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.run(PowerMockJUnit44RunnerDelegateImpl.java:123)\r\n    at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.run(JUnit4TestSuiteChunkerImpl.java:121)\r\n    at org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.run(AbstractCommonPowerMockRunner.java:53)\r\n    at org.powermock.modules.junit4.PowerMockRunner.run(PowerMockRunner.java:59)\r\n    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)\r\n    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)\r\n    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)\r\n    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)\r\n    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)\r\n    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)\r\nCaused by: java.lang.ClassNotFoundException: org.nd4j.linalg.api.complex.IComplexNumber\r\n    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)\r\n    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)\r\n    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)\r\n    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)\r\n    at org.powermock.core.classloader.MockClassLoader.loadModifiedClass(MockClassLoader.java:190)\r\n    at org.powermock.core.classloader.DeferSupportingClassLoader.loadClass1(DeferSupportingClassLoader.java:77)\r\n    at org.powermock.core.classloader.DeferSupportingClassLoader.loadClass(DeferSupportingClassLoader.java:67)\r\n    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)\r\n    ... 36 more\r\n\r\n\r\nWhen I download the jar file from the maven repository, I get the following error:\r\n\r\nException in thread \"main\" java.lang.NoClassDefFoundError: org/apache/http/HttpEntity\r\n    at com.mashape.unirest.request.HttpRequestWithBody.body(HttpRequestWithBody.java:146)\r\n    at com.mashape.unirest.request.HttpRequestWithBody.body(HttpRequestWithBody.java:174)\r\n    at org.deeplearning4j.gym.ClientUtils.post(ClientUtils.java:23)\r\n    at org.deeplearning4j.gym.ClientFactory.build(ClientFactory.java:24)\r\n    at com.openaigym.Test.main(Test.java:27)\r\nCaused by: java.lang.ClassNotFoundException: org.apache.http.HttpEntity\r\n    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)\r\n    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)\r\n    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)\r\n    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)\r\n    ... 5 more\r\n\r\n\r\nMy source code is below for the main class is below. Any help would be much appreciated.\r\n\r\npackage com.openaigym;\r\n\r\n\r\n\r\nimport java.io.IOException;\r\n\r\nimport org.deeplearning4j.gym.Client;\r\nimport org.deeplearning4j.gym.ClientFactory;\r\nimport org.deeplearning4j.gym.ClientUtils;\r\nimport org.deeplearning4j.gym.StepReply;\r\nimport org.deeplearning4j.rl4j.space.Box;\r\nimport org.deeplearning4j.rl4j.space.DiscreteSpace;\r\n\r\n\r\n\r\npublic class Test {\r\n\r\n    public static void main(String[] args) throws IOException {\r\n\r\n        String url = \"http://127.0.0.1:5000\";\r\n        String env = \"CartPole-v0\";\r\n        String instanceID = \"e15739cf\";\r\n        String testDir = \"/tmp/testDir\";\r\n        boolean render = true;\r\n        String renderStr = render ? \"True\" : \"False\";\r\n       \r\n        Client<Box, Integer, DiscreteSpace> client = ClientFactory.build(url, env, render);\r\n        client.monitorStart(testDir, true, false);\r\n\r\n        int episodeCount = 1;\r\n        int maxSteps = 200;\r\n        int reward = 0;\r\n\r\n        for (int i = 0; i < episodeCount; i++) {\r\n            client.reset();\r\n\r\n            for (int j = 0; j < maxSteps; j++) {\r\n\r\n                Integer action = client.getActionSpace().randomAction();\r\n                StepReply<Box> step = client.step(action);\r\n                reward += step.getReward();\r\n\r\n                if (step.isDone()) {\r\n                    // System.out.println(\"break\");\r\n                    break;\r\n                }\r\n            }\r\n\r\n        }\r\n\r\n        client.monitorClose();\r\n        client.upload(testDir, \"YOUR_OPENAI_GYM_API_KEY\");\r\n    }\r\n\r\n}\r\n\r\n\r\nThanks,\r\nDaniel"},"comment":{"url":"https://api.github.com/repos/deeplearning4j/gym-java-client/issues/comments/276662731","html_url":"https://github.com/deeplearning4j/gym-java-client/issues/6#issuecomment-276662731","issue_url":"https://api.github.com/repos/deeplearning4j/gym-java-client/issues/6","id":276662731,"user":{"login":"MankowitzProjects","id":884293,"avatar_url":"https://avatars.githubusercontent.com/u/884293?v=3","gravatar_id":"","url":"https://api.github.com/users/MankowitzProjects","html_url":"https://github.com/MankowitzProjects","followers_url":"https://api.github.com/users/MankowitzProjects/followers","following_url":"https://api.github.com/users/MankowitzProjects/following{/other_user}","gists_url":"https://api.github.com/users/MankowitzProjects/gists{/gist_id}","starred_url":"https://api.github.com/users/MankowitzProjects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MankowitzProjects/subscriptions","organizations_url":"https://api.github.com/users/MankowitzProjects/orgs","repos_url":"https://api.github.com/users/MankowitzProjects/repos","events_url":"https://api.github.com/users/MankowitzProjects/events{/privacy}","received_events_url":"https://api.github.com/users/MankowitzProjects/received_events","type":"User","site_admin":false},"created_at":"2017-02-01T13:56:10Z","updated_at":"2017-02-01T13:56:10Z","body":"Hi,\r\n\r\nDid you manage to find the issue?\r\n\r\nThanks"}}
{"actor":{"display_login":"MankowitzProjects"}}