author
int64
658
755k
date
stringlengths
19
19
timezone
int64
-46,800
43.2k
hash
stringlengths
40
40
message
stringlengths
5
490
mods
list
language
stringclasses
20 values
license
stringclasses
3 values
repo
stringlengths
5
68
original_message
stringlengths
12
491
154,212
30.08.2018 18:08:58
-32,400
6a2afd389e4d32bc00f4eee5f9df508fed0490cb
add argument for trpo vector
[ { "change_type": "MODIFY", "old_path": "example/run_trpo_vector.py", "new_path": "example/run_trpo_vector.py", "diff": "@@ -45,6 +45,7 @@ parser.add_argument('--episode', type=int, default=1000000)\nparser.add_argument('--seed', type=int, default=256)\nparser.add_argument('--max_episodes', type=int,...
Python
MIT License
deepx-inc/machina
add argument for trpo vector
154,212
01.09.2018 16:50:15
-32,400
8bda79f5be9150450dd60dded7277d1d93c14ada
fix gaussian pol
[ { "change_type": "MODIFY", "old_path": "machina/pols/gaussian_pol.py", "new_path": "machina/pols/gaussian_pol.py", "diff": "@@ -65,8 +65,8 @@ class GaussianPol(BasePol):\nmean, _, hs = self.net(obs, hs, mask)\nself.hs = hs\nelse:\n- mean, _ = self.net(obs)\n+ mean, log_std = self.net(obs)\nmean_real...
Python
MIT License
deepx-inc/machina
fix gaussian pol
154,212
10.09.2018 15:02:36
-32,400
26ce4a6379bbaa858579d2c3afcc90fc01bc4d93
fix sample process
[ { "change_type": "MODIFY", "old_path": "machina/samplers/parallel.py", "new_path": "machina/samplers/parallel.py", "diff": "@@ -18,14 +18,33 @@ def one_path(env, pol, prepro=None):\no = env.reset()\nd = False\npath_length = 0\n+ if pol.rnn:\n+ hs = pol.init_hs(batch_size=1)\n+ else:\n+ hs = None\nwh...
Python
MIT License
deepx-inc/machina
fix sample process
154,212
10.09.2018 20:22:38
-32,400
241b35a3f62dfd914983bc6f75479e9f2869d4e1
data parallel in pol
[ { "change_type": "MODIFY", "old_path": "machina/algos/ppo_clip.py", "new_path": "machina/algos/ppo_clip.py", "diff": "@@ -27,32 +27,21 @@ def make_pol_loss(pol, batch, clip_param, ent_beta):\nacs = batch['acs']\nadvs = batch['advs']\n- if hasattr(pol, 'rnn'):\nif pol.rnn:\ninit_hs = batch['init_hs']...
Python
MIT License
deepx-inc/machina
data parallel in pol
154,212
12.09.2018 16:24:20
-32,400
6ea2c6377c18b2ce9ee45167324c6fad7518a93f
add discrete
[ { "change_type": "MODIFY", "old_path": "example/run_ppo_vector.py", "new_path": "example/run_ppo_vector.py", "diff": "@@ -26,7 +26,7 @@ import gym\nimport pybullet_envs\nimport machina as mc\n-from machina.pols import GaussianPol\n+from machina.pols import GaussianPol, CategoricalPol\nfrom machina.a...
Python
MIT License
deepx-inc/machina
add discrete
154,212
20.09.2018 14:58:21
-32,400
806891bab5014d6595d0f725216c56d4d6368294
downgrade pybullet for build
[ { "change_type": "MODIFY", "old_path": "setup.py", "new_path": "setup.py", "diff": "@@ -17,7 +17,7 @@ install_requires = [\n'numpy>=1.13.3',\n'terminaltables',\n'pandas',\n- 'pybullet',\n+ 'pybullet == 1.8.8',\n]\nsetup(\n@@ -28,7 +28,7 @@ setup(\nauthor='Reiji Hatsugai',\nauthor_email='reiji.hatsug...
Python
MIT License
deepx-inc/machina
downgrade pybullet for build
154,212
01.10.2018 18:36:50
-32,400
730a43701560eb0a47e0d149451393494f33eb91
add deterministic sampler
[ { "change_type": "MODIFY", "old_path": "machina/samplers/batch.py", "new_path": "machina/samplers/batch.py", "diff": "@@ -9,7 +9,7 @@ class BatchSampler(BaseSampler):\ndef __init__(self, env):\nBaseSampler.__init__(self, env)\n- def one_path(self, pol, prepro=None):\n+ def one_path(self, pol, determ...
Python
MIT License
deepx-inc/machina
add deterministic sampler
154,206
16.10.2018 16:21:46
-32,400
7cde6b87dfd14166bc6453aea067f33391330d44
remove DeterministicPolNet
[ { "change_type": "MODIFY", "old_path": "example/run_ddpg.py", "new_path": "example/run_ddpg.py", "diff": "@@ -32,11 +32,11 @@ from machina.algos import ddpg\nfrom machina.prepro import BasePrePro\nfrom machina.qfuncs import DeterministicQfunc\nfrom machina.envs import GymEnv\n-from machina.data impo...
Python
MIT License
deepx-inc/machina
remove DeterministicPolNet
154,206
16.10.2018 16:52:33
-32,400
a1a6278c0cd38e12933f8d5d625b8db4dba92c6d
fix set_device
[ { "change_type": "MODIFY", "old_path": "example/run_ddpg.py", "new_path": "example/run_ddpg.py", "diff": "@@ -67,8 +67,6 @@ parser.add_argument('--gamma', type=float, default=0.99)\nparser.add_argument('--lam', type=float, default=1)\nargs = parser.parse_args()\n-args.cuda = args.cuda if torch.cuda....
Python
MIT License
deepx-inc/machina
fix set_device
154,212
05.12.2018 18:30:52
-32,400
9b57b44bf7b6e46b2fb779696960c2572dab7c2a
add data class
[ { "change_type": "MODIFY", "old_path": "example/run_trpo.py", "new_path": "example/run_trpo.py", "diff": "@@ -31,7 +31,7 @@ from machina.algos import trpo\nfrom machina.prepro import BasePrePro\nfrom machina.vfuncs import NormalizedDeterministicVfunc, DeterministicVfunc\nfrom machina.envs import Gym...
Python
MIT License
deepx-inc/machina
add data class
154,212
05.12.2018 19:22:15
-32,400
f4e1c99b44f05a133361c1f2f910f2b3fb3d3853
add centerize and apply ppo
[ { "change_type": "MODIFY", "old_path": "example/run_ppo.py", "new_path": "example/run_ppo.py", "diff": "@@ -31,7 +31,7 @@ from machina.algos import ppo_clip, ppo_kl\nfrom machina.prepro import BasePrePro\nfrom machina.vfuncs import DeterministicVfunc\nfrom machina.envs import GymEnv\n-from machina.d...
Python
MIT License
deepx-inc/machina
add centerize and apply ppo
154,212
05.12.2018 20:20:56
-32,400
b70edbeb05d259f59ed6a336f89857dd5d15a9a1
add random batch sampling function in Data and apply it to ddpg
[ { "change_type": "MODIFY", "old_path": "example/run_ddpg.py", "new_path": "example/run_ddpg.py", "diff": "@@ -33,7 +33,7 @@ from machina.algos import ddpg\nfrom machina.prepro import BasePrePro\nfrom machina.qfuncs import DeterministicQfunc\nfrom machina.envs import GymEnv\n-from machina.data import...
Python
MIT License
deepx-inc/machina
add random batch sampling function in Data and apply it to ddpg
154,212
05.12.2018 20:44:21
-32,400
d1d91e10bf086a220afb094aadc7446e5c095391
change ppo to be able to use cuda
[ { "change_type": "MODIFY", "old_path": "example/run_ppo.py", "new_path": "example/run_ppo.py", "diff": "@@ -34,7 +34,7 @@ from machina.envs import GymEnv\nfrom machina.data import Data, compute_vs, compute_rets, compute_advs, centerize_advs\nfrom machina.samplers import BatchSampler, ParallelSampler...
Python
MIT License
deepx-inc/machina
change ppo to be able to use cuda
154,212
06.12.2018 12:16:28
-32,400
e44806d9b098cba8a6e8a0b6da510682f2a4fef3
fix target and speed up random batch
[ { "change_type": "MODIFY", "old_path": "example/run_ddpg.py", "new_path": "example/run_ddpg.py", "diff": "@@ -100,10 +100,13 @@ ac_space = env.action_space\npol_net = PolNet(ob_space, ac_space, args.h1, args.h2)\nnoise = OUActionNoise(ac_space.shape)\npol = DeterministicActionNoisePol(ob_space, ac_s...
Python
MIT License
deepx-inc/machina
fix target and speed up random batch
154,212
06.12.2018 21:06:48
-32,400
f3393b9d732da874f7848bc39e5317d36b68d6d3
make rnn's hidden state hidden
[ { "change_type": "MODIFY", "old_path": "example/run_ppo.py", "new_path": "example/run_ppo.py", "diff": "@@ -26,7 +26,7 @@ import gym\nimport pybullet_envs\nimport machina as mc\n-from machina.pols import GaussianPol, MixtureGaussianPol\n+from machina.pols import GaussianPol, CategoricalPol\nfrom mac...
Python
MIT License
deepx-inc/machina
make rnn's hidden state hidden
154,212
06.12.2018 21:54:43
-32,400
4d6c23249b1108ec97e1208f058f52cc9f252eb6
add episode iterator
[ { "change_type": "MODIFY", "old_path": "machina/data/data.py", "new_path": "machina/data/data.py", "diff": "@@ -21,10 +21,10 @@ from machina.utils import get_device\nclass Data(object):\ndef __init__(self):\nself.data_map = dict()\n- self._num_epi = 0\nself._next_id = 0\nself.current_epis = None\n+ ...
Python
MIT License
deepx-inc/machina
add episode iterator
154,212
07.12.2018 20:07:47
-32,400
f3243067fe35c17a351cc48f5770e84858ebd3b9
add max_grad_norm argument
[ { "change_type": "MODIFY", "old_path": "example/run_ppo.py", "new_path": "example/run_ppo.py", "diff": "@@ -62,6 +62,7 @@ parser.add_argument('--ppo_type', type=str,\nchoices=['clip', 'kl'], default='clip')\nparser.add_argument('--clip_param', type=float, default=0.2)\n+parser.add_argument('--max_gr...
Python
MIT License
deepx-inc/machina
add max_grad_norm argument
154,212
08.12.2018 18:11:56
-32,400
fffc0055135eb92e3bdcf88d24dd133546c1b194
delete sampler and terminate mp
[ { "change_type": "MODIFY", "old_path": "example/run_ppo.py", "new_path": "example/run_ppo.py", "diff": "@@ -181,3 +181,4 @@ while args.max_episodes > total_epi:\ntorch.save(optim_vf.state_dict(), os.path.join(\nargs.log, 'models', 'optim_vf_last.pkl'))\ndel data\n+del sampler\n" }, { "change...
Python
MIT License
deepx-inc/machina
delete sampler and terminate mp
154,212
14.12.2018 18:03:51
-32,400
e1be348b4965290e4fc3bff80fd723ef816b2cbd
remove samplers, add epi_sampler
[ { "change_type": "MODIFY", "old_path": "example/run_ddpg.py", "new_path": "example/run_ddpg.py", "diff": "@@ -34,7 +34,7 @@ from machina.prepro import BasePrePro\nfrom machina.qfuncs import DeterministicQfunc\nfrom machina.envs import GymEnv\nfrom machina.data import Data, add_next_obs\n-from machin...
Python
MIT License
deepx-inc/machina
remove samplers, add epi_sampler
154,212
14.12.2018 18:19:22
-32,400
e157020ddd79e6f23f3aa958be652b0bd66cc4f4
max_episodes or max_samples
[ { "change_type": "MODIFY", "old_path": "machina/samplers/epi_sampler.py", "new_path": "machina/samplers/epi_sampler.py", "diff": "@@ -21,6 +21,8 @@ import torch\nimport torch.multiprocessing as mp\n+LARGE_NUMBER = 100000000\n+\ndef one_epi(env, pol, deterministic=False, prepro=None):\nif prepro is N...
Python
MIT License
deepx-inc/machina
max_episodes or max_samples
154,212
14.12.2018 18:21:46
-32,400
42c48156b1aa3c480705f755ad4fad15fe911416
remove max_samples
[ { "change_type": "MODIFY", "old_path": "example/run_ddpg.py", "new_path": "example/run_ddpg.py", "diff": "@@ -48,8 +48,7 @@ parser.add_argument('--seed', type=int, default=256)\nparser.add_argument('--max_episodes', type=int, default=1000000)\nparser.add_argument('--num_parallel', type=int, default=...
Python
MIT License
deepx-inc/machina
remove max_samples
154,212
17.12.2018 10:26:33
-32,400
ffde9e1a9522f31c4b7afda519f95a0f597e41f2
fix prepro and move simplenet
[ { "change_type": "MODIFY", "old_path": "example/run_ddpg.py", "new_path": "example/run_ddpg.py", "diff": "@@ -37,7 +37,7 @@ from machina.data import Data, add_next_obs\nfrom machina.samplers import EpiSampler\nfrom machina.misc import logger\nfrom machina.utils import set_device, measure\n-from mach...
Python
MIT License
deepx-inc/machina
fix prepro and move simplenet
154,212
17.12.2018 10:33:08
-32,400
24f35d9eacf95a335828095d75a159fb7dd308f8
fix for deterministic policy
[ { "change_type": "MODIFY", "old_path": "machina/pols/deterministic_action_noise_pol.py", "new_path": "machina/pols/deterministic_action_noise_pol.py", "diff": "@@ -34,19 +34,19 @@ class DeterministicActionNoisePol(BasePol):\ndef forward(self, obs):\nmean = self.net(obs)\n- ac = mean\n+ ac = mean[0]\...
Python
MIT License
deepx-inc/machina
fix for deterministic policy
154,212
17.12.2018 10:48:02
-32,400
25226d3cf00febfc35cf7c01055b929fdd180806
deterministic policy
[ { "change_type": "MODIFY", "old_path": "example/run_ddpg.py", "new_path": "example/run_ddpg.py", "diff": "@@ -91,10 +91,11 @@ env.env.seed(args.seed)\nob_space = env.observation_space\nac_space = env.action_space\n-pol_net = PolNet(ob_space, ac_space, args.h1, args.h2)\n+pol_net = PolNet(ob_space, a...
Python
MIT License
deepx-inc/machina
deterministic policy
154,212
17.12.2018 12:01:16
-32,400
e9c8e9fd23a78cf4d8025ab2d9d0a64fea2d2fff
add multi categorical
[ { "change_type": "MODIFY", "old_path": "machina/pds/categorical_pd.py", "new_path": "machina/pds/categorical_pd.py", "diff": "# limitations under the License.\n# ==============================================================================\n+\nimport numpy as np\nimport torch\nfrom torch.distributi...
Python
MIT License
deepx-inc/machina
add multi categorical
154,212
17.12.2018 13:01:13
-32,400
c30c14dd21f509572e60414ba7df2fd3236dedb5
change test env
[ { "change_type": "MODIFY", "old_path": "tests/test_env.py", "new_path": "tests/test_env.py", "diff": "@@ -23,8 +23,13 @@ from machina.envs import GymEnv, C2DEnv\ndef test_continuous2discrete():\n- continuous_env = GymEnv('LunarLanderContinuous-v2', record_video=False)\n- discrete_env = C2DEnv(contin...
Python
MIT License
deepx-inc/machina
change test env
154,212
17.12.2018 14:03:12
-32,400
ae3caa393548fe377565be97ba5419575bf202a1
apply to ppo, trpo
[ { "change_type": "MODIFY", "old_path": "example/run_ppo.py", "new_path": "example/run_ppo.py", "diff": "@@ -29,7 +29,7 @@ from machina.pols import GaussianPol, CategoricalPol\nfrom machina.algos import ppo_clip, ppo_kl\nfrom machina.prepro import BasePrePro\nfrom machina.vfuncs import DeterministicV...
Python
MIT License
deepx-inc/machina
apply to ppo, trpo
154,212
17.12.2018 16:48:25
-32,400
2b49ec97f42be33b32d038c7f63221bd63796c5b
rename value function
[ { "change_type": "MODIFY", "old_path": "example/run_ddpg.py", "new_path": "example/run_ddpg.py", "diff": "@@ -30,7 +30,7 @@ from machina.pols import DeterministicActionNoisePol\nfrom machina.noise import OUActionNoise\nfrom machina.algos import ddpg\nfrom machina.prepro import BasePrePro\n-from mach...
Python
MIT License
deepx-inc/machina
rename value function
154,212
17.12.2018 17:16:21
-32,400
d15a0e7a645d0b866de39e96d9015393f85bd85a
fix for ddpg
[ { "change_type": "MODIFY", "old_path": "machina/noise/ounoise.py", "new_path": "machina/noise/ounoise.py", "diff": "# limitations under the License.\n# ==============================================================================\n-from machina.noise.base import BaseActionNoise\n+\nimport numpy as ...
Python
MIT License
deepx-inc/machina
fix for ddpg
154,212
18.12.2018 15:04:09
-32,400
3d1f22070c341c6f2c83f66fe4f6c909eedd56aa
decompose loss of algorithms and apply sac
[ { "change_type": "MODIFY", "old_path": "example/run_ddpg.py", "new_path": "example/run_ddpg.py", "diff": "# limitations under the License.\n# ==============================================================================\n+\nimport argparse\n+import copy\nimport json\nimport os\n-import copy\nfrom p...
Python
MIT License
deepx-inc/machina
decompose loss of algorithms and apply sac
154,206
20.12.2018 18:51:23
-32,400
9f00e6958cd544e94fe7b8d74e8679dffbe2f5b5
rename samples and remove prepro
[ { "change_type": "MODIFY", "old_path": "example/run_ddpg.py", "new_path": "example/run_ddpg.py", "diff": "@@ -30,7 +30,6 @@ import machina as mc\nfrom machina.pols import DeterministicActionNoisePol\nfrom machina.noise import OUActionNoise\nfrom machina.algos import ddpg\n-from machina.prepro import...
Python
MIT License
deepx-inc/machina
rename samples and remove prepro
154,212
21.12.2018 17:45:09
-32,400
3943b5ef2da982ec23195447edfea45dbe0c697f
fix updating target network
[ { "change_type": "MODIFY", "old_path": "machina/algos/ddpg.py", "new_path": "machina/algos/ddpg.py", "diff": "@@ -28,9 +28,11 @@ def train(traj,\npol_loss.backward()\noptim_pol.step()\n- for q, targ_q, p, targ_p in zip(qf.parameters(), targ_qf.parameters(), pol.parameters(), targ_pol.parameters()):\...
Python
MIT License
deepx-inc/machina
fix updating target network
154,212
21.12.2018 18:47:15
-32,400
11434c6cb0ee6d1fa846c4faad017a8c7ba99eb5
remove test of discrete rnn policy with cpu test. Error is discribed at
[ { "change_type": "MODIFY", "old_path": "tests/test_algos.py", "new_path": "tests/test_algos.py", "diff": "@@ -167,6 +167,139 @@ class TestPPODiscrete(unittest.TestCase):\ndel sampler\n+class TestTRPOContinuous(unittest.TestCase):\n+ def setUp(self):\n+ self.env = GymEnv('Pendulum-v0')\n+\n+ def test...
Python
MIT License
deepx-inc/machina
remove test of discrete rnn policy with cpu test. Error is discribed at #74
154,209
05.01.2019 16:21:55
-32,400
0beb48e16ddca5300b97e691428b795f967f3d74
add prioritized experience replay
[ { "change_type": "ADD", "old_path": null, "new_path": "example/run_prioritized_ddpg.py", "diff": "+# Copyright 2018 DeepX Inc. All Rights Reserved.\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# You m...
Python
MIT License
deepx-inc/machina
add prioritized experience replay
154,209
06.01.2019 13:52:27
-32,400
500f0bade07d1a32923600625065ccbef05b5cf1
fix bellman loss
[ { "change_type": "MODIFY", "old_path": "machina/algos/prioritized_ddpg.py", "new_path": "machina/algos/prioritized_ddpg.py", "diff": "@@ -35,8 +35,9 @@ def train(traj,\nqf_losses = []\nlogger.log(\"Optimizing...\")\nfor batch, indices in traj.prioritized_random_batch(batch_size, epoch, return_indice...
Python
MIT License
deepx-inc/machina
fix bellman loss
154,209
06.01.2019 14:47:47
-32,400
15cf9d8bc9e9381e592274012d9c56e40b3925bb
fix initial priorities
[ { "change_type": "MODIFY", "old_path": "example/run_prioritized_ddpg.py", "new_path": "example/run_prioritized_ddpg.py", "diff": "@@ -122,7 +122,8 @@ while args.max_episodes > total_epi:\non_traj.add_epis(epis)\non_traj = ef.add_next_obs(on_traj)\n- on_traj = ef.compute_pris(on_traj, qf, targ_qf, ta...
Python
MIT License
deepx-inc/machina
fix initial priorities
154,209
06.01.2019 17:07:44
-32,400
e740b3e93f2fb6c9bcb1d80e9435a20e6428fe09
add importance-sampling weights
[ { "change_type": "MODIFY", "old_path": "machina/traj/traj.py", "new_path": "machina/traj/traj.py", "diff": "@@ -139,8 +139,20 @@ class Traj(object):\nelse:\nreturn data_map\n- def prioritized_random_batch_once(self, batch_size, return_indices=False):\n- indices = torch.utils.data.sampler.WeightedRan...
Python
MIT License
deepx-inc/machina
add importance-sampling weights
154,209
06.01.2019 19:00:39
-32,400
b83231778187910be17e279fc849040abee2e3c3
add rank-based priority
[ { "change_type": "MODIFY", "old_path": "machina/traj/traj.py", "new_path": "machina/traj/traj.py", "diff": "@@ -139,7 +139,7 @@ class Traj(object):\nelse:\nreturn data_map\n- def prioritized_random_batch_once(self, batch_size, return_indices=False, init_beta=0.4, beta_step=0.00025/4):\n+ def priorit...
Python
MIT License
deepx-inc/machina
add rank-based priority
154,209
06.01.2019 19:15:49
-32,400
2ffbec4a320d15a8b74a251f2c204da489b1ed9a
fix detach timing of priority
[ { "change_type": "MODIFY", "old_path": "machina/traj/traj.py", "new_path": "machina/traj/traj.py", "diff": "@@ -147,7 +147,7 @@ class Traj(object):\nelse:\nself.pri_beta += beta_step\n- pris = self.data_map['pris'].detach().cpu().numpy()\n+ pris = self.data_map['pris'].cpu().numpy()\nif mode == 'ran...
Python
MIT License
deepx-inc/machina
fix detach timing of priority
154,212
08.01.2019 17:05:45
-32,400
bf272cd9be82056869b7c71a90a64ef0dcddd6ea
apply autopep8 to examples
[ { "change_type": "MODIFY", "old_path": "example/run_prioritized_ddpg.py", "new_path": "example/run_prioritized_ddpg.py", "diff": "@@ -81,7 +81,8 @@ set_device(device)\nscore_file = os.path.join(args.log, 'progress.csv')\nlogger.add_tabular_output(score_file)\n-env = GymEnv(args.env_name, log_dir=os....
Python
MIT License
deepx-inc/machina
apply autopep8 to examples
154,212
08.01.2019 21:31:58
-32,400
d8904a145b70cab219fe05e91e18d0fadda84373
[WIP]add algo, noise, pol
[ { "change_type": "MODIFY", "old_path": "machina/algos/ddpg.py", "new_path": "machina/algos/ddpg.py", "diff": "@@ -11,8 +11,41 @@ def train(traj,\npol, targ_pol, qf, targ_qf,\noptim_pol, optim_qf,\nepoch, batch_size, # optimization hypers\n- tau, gamma, lam # advantage estimation\n+ tau, gamma # adva...
Python
MIT License
deepx-inc/machina
[WIP]add algo, noise, pol
154,212
25.01.2019 13:29:38
-32,400
09f058d3f2139fe8cbf750f11521a59d1603fa88
fix for latest
[ { "change_type": "MODIFY", "old_path": "example/machina_quick_start.ipynb", "new_path": "example/machina_quick_start.ipynb", "diff": "\"source\": [\n\"# train your policy\\n\",\n\"from machina.traj import epi_functional as ef\\n\",\n- \"from machina.misc import logger\\n\",\n+ \"from machina import ...
Python
MIT License
deepx-inc/machina
fix for latest
154,212
25.01.2019 13:52:18
-32,400
d46bc10f9b89d03a6500f4b4aa7a71624a77e598
add simplenet
[ { "change_type": "ADD", "old_path": null, "new_path": "example/quickstart/simple_net.py", "diff": "+\"\"\"\n+Examples of network architecture.\n+\"\"\"\n+\n+import torch\n+import torch.nn as nn\n+from torch.nn.init import kaiming_uniform_, uniform_\n+import torch.nn.functional as F\n+import gym\n+\n...
Python
MIT License
deepx-inc/machina
add simplenet
154,212
04.02.2019 17:53:12
-32,400
91cbf55826d0121c0261e77f6cb6effeeec7dee6
add original env
[ { "change_type": "MODIFY", "old_path": "machina/envs/continuous2discrete_env.py", "new_path": "machina/envs/continuous2discrete_env.py", "diff": "@@ -26,6 +26,10 @@ class C2DEnv(object):\nself.n_bins = n_bins\nself.ac_space = gym.spaces.MultiDiscrete(\nenv.ac_space.shape[0] * [n_bins])\n+ if hasattr...
Python
MIT License
deepx-inc/machina
add original env
154,212
12.02.2019 12:16:21
-32,400
cb97cd057956739da5387f31dfd9dfac554d5b85
add new axis to hs
[ { "change_type": "MODIFY", "old_path": "machina/pols/categorical_pol.py", "new_path": "machina/pols/categorical_pol.py", "diff": "@@ -43,6 +43,8 @@ class CategoricalPol(BasePol):\nif hs is None:\nif self.hs is None:\nself.hs = self.net.init_hs(batch_size)\n+ if self.dp_run:\n+ self.hs = (self.hs[0]....
Python
MIT License
deepx-inc/machina
add new axis to hs
154,209
12.02.2019 16:47:50
-32,400
8692d481ec09b5518cc28d5e8b47d87ded0907d9
add ModelNet class
[ { "change_type": "MODIFY", "old_path": "example/simple_net.py", "new_path": "example/simple_net.py", "diff": "@@ -103,6 +103,23 @@ class QNet(nn.Module):\nreturn self.output_layer(h)\n+class ModelNet(nn.Module):\n+ def __init__(self, ob_space, ac_space, h1=500, h2=500):\n+ super(ModelNet, self).__in...
Python
MIT License
deepx-inc/machina
add ModelNet class
154,209
13.02.2019 20:18:08
-32,400
60f570345d41e527f5a8d90023b81095b5285a45
add run_mpc.py
[ { "change_type": "ADD", "old_path": null, "new_path": "example/run_mpc.py", "diff": "+\"\"\"\n+An example of Model Predictive Control.\n+\"\"\"\n+\n+import argparse\n+import json\n+import os\n+from pprint import pprint\n+\n+import numpy as np\n+import torch\n+import torch.nn as nn\n+import torch.nn....
Python
MIT License
deepx-inc/machina
add run_mpc.py
154,209
13.02.2019 20:40:37
-32,400
df2a3bd1ea59b0a32946d8daa6a597a6101b1adb
add normalize_obs_and_acs()
[ { "change_type": "MODIFY", "old_path": "machina/traj/traj_functional.py", "new_path": "machina/traj/traj_functional.py", "diff": "@@ -12,7 +12,18 @@ def update_pris(traj, td_loss, indices, alpha=0.6, epsilon=1e-6):\ntraj.data_map['pris'][indices] = pris.detach()\nreturn traj\n-def add_noise_to_obs(t...
Python
MIT License
deepx-inc/machina
add normalize_obs_and_acs()
154,209
13.02.2019 20:46:45
-32,400
c4bcaa4aac064a00733352e121a0c47f083fbc8d
add normalization of obs, next_obs and acs
[ { "change_type": "MODIFY", "old_path": "example/run_mpc.py", "new_path": "example/run_mpc.py", "diff": "@@ -27,7 +27,6 @@ from machina.utils import measure\nfrom simple_net import PolNet, VNet, PolNetLSTM, VNetLSTM\n-\nclass RandomPolicy(nn.Module):\ndef __init__(self, action_space):\nsuper(RandomPo...
Python
MIT License
deepx-inc/machina
add normalization of obs, next_obs and acs
154,209
14.02.2019 14:09:51
-32,400
c56ecf55bf4203563cadcccd001bea70fa71728e
add mpc_pol.py
[ { "change_type": "ADD", "old_path": null, "new_path": "machina/pols/mpc_pol.py", "diff": "+import numpy as np\n+import torch\n+\n+from machina.pds import DeterministicPd\n+from machina.pols import BasePol\n+from machina.utils import get_device\n+\n+\n+class MPCPol(BasePol):\n+ \"\"\"\n+ Policy with ...
Python
MIT License
deepx-inc/machina
add mpc_pol.py
154,209
14.02.2019 15:33:18
-32,400
2b621ade4463e0aafdd6f16afaf7ac136dec3786
add reward function
[ { "change_type": "MODIFY", "old_path": "example/run_mpc.py", "new_path": "example/run_mpc.py", "diff": "@@ -43,7 +43,7 @@ class RandomPolicy(nn.Module):\nreturn ac_real, ac, dict(mean=mean)\n-def add_noise_to_init_ob(data, std):\n+def add_noise_to_init_obs(data, std):\nepis = data.current_epis\nwith...
Python
MIT License
deepx-inc/machina
add reward function
154,209
14.02.2019 15:48:37
-32,400
00ed3d962f65a1d4abcd768a4710a8cceff32878
make env correspond to str
[ { "change_type": "MODIFY", "old_path": "machina/pols/mpc_pol.py", "new_path": "machina/pols/mpc_pol.py", "diff": "@@ -40,6 +40,8 @@ class MPCPol(BasePol):\n'rnn with MPCPol is not supported now')\nBasePol.__init__(self, ob_space, ac_space, net, rnn=rnn, normalize_ac=normalize_ac,\ndata_parallel=data...
Python
MIT License
deepx-inc/machina
make env correspond to str
154,209
14.02.2019 16:49:03
-32,400
e96f683474846f87ecfb2b7bc5468f2e545698bb
add loss function for dynamics model
[ { "change_type": "MODIFY", "old_path": "machina/loss_functional.py", "new_path": "machina/loss_functional.py", "diff": "@@ -327,3 +327,29 @@ def monte_carlo(vf, batch, clip_param=0.2, clip=False):\nelse:\nvf_loss = 0.5 * torch.mean(vfloss1 * out_masks)\nreturn vf_loss\n+\n+\n+def dynamics(dm, batch,...
Python
MIT License
deepx-inc/machina
add loss function for dynamics model
154,209
14.02.2019 17:03:47
-32,400
4b4831fdb5c27104e1d302be88bded64beb02703
add train function for dynamics model
[ { "change_type": "MODIFY", "old_path": "machina/algos/mpc.py", "new_path": "machina/algos/mpc.py", "diff": "@@ -76,6 +76,49 @@ def make_kl(pol, batch):\n)\n+def update_dm(dm, optim_dm, batch):\n+ dm_loss = lf.dynamics(model, batch)\n+ optim_dm.zero_grad()\n+ dm_loss.backward()\n+ optim_dm.step()\n+\...
Python
MIT License
deepx-inc/machina
add train function for dynamics model
154,212
14.02.2019 18:19:10
-32,400
364a13f7aff363f93ea52a3deb175be0fa461f90
action is included in observation
[ { "change_type": "ADD", "old_path": null, "new_path": "machina/envs/ac_in_ob_env.py", "diff": "+import gym\n+import numpy as np\n+\n+\n+class AcInObEnv(gym.Env):\n+ def __init__(self, env, dim=0, normalize=True, initial_value=0):\n+ self.env = env\n+ if hasattr(env, 'original_env'):\n+ self.original...
Python
MIT License
deepx-inc/machina
action is included in observation
154,212
14.02.2019 18:20:06
-32,400
b29eb25735f965ae587c3d6b6f45c3af9977a9cf
inherit gym.Env
[ { "change_type": "MODIFY", "old_path": "machina/envs/gym_env.py", "new_path": "machina/envs/gym_env.py", "diff": "@@ -50,7 +50,7 @@ class NoVideoSchedule(object):\nreturn False\n-class GymEnv(object):\n+class GymEnv(gym.Env):\ndef __init__(self, env, record_video=False, video_schedule=None, log_dir=...
Python
MIT License
deepx-inc/machina
inherit gym.Env
154,212
14.02.2019 18:33:49
-32,400
1887c41d5971ef88507661a8c7e5bf785b188b04
reward is included in observation 114
[ { "change_type": "ADD", "old_path": null, "new_path": "machina/envs/rew_in_ob_env.py", "diff": "+import gym\n+import numpy as np\n+\n+\n+class RewInObEnv(gym.Env):\n+ def __init__(self, env, dim=0, normalize=True, initial_value=0, mean=0, std=1, low=-np.inf, high=np.inf):\n+ self.env = env\n+ if has...
Python
MIT License
deepx-inc/machina
reward is included in observation #113, 114
154,212
14.02.2019 19:10:43
-32,400
8879429e05c454b55b2a7ceddceea0539304d813
add ob_space to c2d
[ { "change_type": "MODIFY", "old_path": "machina/envs/continuous2discrete_env.py", "new_path": "machina/envs/continuous2discrete_env.py", "diff": "@@ -26,6 +26,7 @@ class C2DEnv(object):\nself.n_bins = n_bins\nself.ac_space = gym.spaces.MultiDiscrete(\nenv.ac_space.shape[0] * [n_bins])\n+ self.ob_spa...
Python
MIT License
deepx-inc/machina
add ob_space to c2d
154,212
14.02.2019 19:11:28
-32,400
c913910ba3261d277a6bbf61dbe32d91af23664b
add mixed env
[ { "change_type": "ADD", "old_path": null, "new_path": "example/run_mixed_env.py", "diff": "+\"\"\"\n+An example of mixed environment with ppo.\n+\"\"\"\n+\n+import argparse\n+import json\n+import os\n+from pprint import pprint\n+\n+import numpy as np\n+import torch\n+import torch.nn as nn\n+import t...
Python
MIT License
deepx-inc/machina
add mixed env
154,209
14.02.2019 19:38:32
-32,400
cc3ff15fe1c39c859e9a86d6fd708e0bfc918793
add statistic to args of normalize function
[ { "change_type": "MODIFY", "old_path": "machina/traj/traj_functional.py", "new_path": "machina/traj/traj_functional.py", "diff": "@@ -13,21 +13,31 @@ def update_pris(traj, td_loss, indices, alpha=0.6, epsilon=1e-6):\nreturn traj\n-def normalize_obs_and_acs(traj):\n+def normalize_obs_and_acs(traj, me...
Python
MIT License
deepx-inc/machina
add statistic to args of normalize function
154,209
14.02.2019 19:44:13
-32,400
10dcac7a9fd904f73522e7887ba4690c8e817862
add normalization of rl_traj
[ { "change_type": "MODIFY", "old_path": "example/run_mpc.py", "new_path": "example/run_mpc.py", "diff": "@@ -153,7 +153,7 @@ rand_traj_val = ef.add_next_obs(rand_traj_val)\nrand_traj_val.register_epis()\n# obs, next_obs, and acs should become mean 0, std 1\n-traj, mean_obs, std_obs, mean_next_obs, st...
Python
MIT License
deepx-inc/machina
add normalization of rl_traj
154,209
14.02.2019 20:15:46
-32,400
9c673ea34619fac0a6e71e627f9568a5a41220e0
add normalization of inputs and outputs of dynamic model
[ { "change_type": "MODIFY", "old_path": "machina/pols/mpc_pol.py", "new_path": "machina/pols/mpc_pol.py", "diff": "@@ -34,7 +34,9 @@ class MPCPol(BasePol):\nSplitted dimension in data parallel.\n\"\"\"\n- def __init__(self, ob_space, ac_space, net, rew_func, env, n_samples=1000, horizon=20, rnn=False...
Python
MIT License
deepx-inc/machina
add normalization of inputs and outputs of dynamic model
154,209
14.02.2019 20:24:48
-32,400
6d71dd7f8c261a4c28cf5f841f8186a0029954f8
inf to mean after normalization
[ { "change_type": "MODIFY", "old_path": "machina/pols/mpc_pol.py", "new_path": "machina/pols/mpc_pol.py", "diff": "@@ -75,6 +75,9 @@ class MPCPol(BasePol):\nfor i in range(self.horizon):\nob = (obs[i] - mean_obs) / std_obs\nac = (sample_acs[i] - mean_acs) / std_acs\n+ # inf to mean\n+ ob[ob == float(...
Python
MIT License
deepx-inc/machina
inf to mean after normalization
154,212
14.02.2019 20:27:51
-32,400
ffe7dbcdd4ab1007d0118a06ac66d0f50d4f4d98
remove roboschool
[ { "change_type": "MODIFY", "old_path": "example/run_ppo.py", "new_path": "example/run_ppo.py", "diff": "@@ -30,18 +30,17 @@ parser = argparse.ArgumentParser()\nparser.add_argument('--log', type=str, default='garbage')\nparser.add_argument('--env_name', type=str, default='Pendulum-v0')\nparser.add_ar...
Python
MIT License
deepx-inc/machina
remove roboschool
154,212
14.02.2019 20:31:37
-32,400
107cbf39f28e39375868c897ded5443bdfb94746
add data parallel to ppo
[ { "change_type": "MODIFY", "old_path": "example/run_ppo.py", "new_path": "example/run_ppo.py", "diff": "@@ -35,6 +35,7 @@ parser.add_argument('--seed', type=int, default=256)\nparser.add_argument('--max_episodes', type=int, default=1000000)\nparser.add_argument('--num_parallel', type=int, default=4)...
Python
MIT License
deepx-inc/machina
add data parallel to ppo
154,212
14.02.2019 20:37:24
-32,400
965c83750b7883d9d331254d721979f85d4c40cd
add dp to sac
[ { "change_type": "MODIFY", "old_path": "example/run_sac.py", "new_path": "example/run_sac.py", "diff": "@@ -36,6 +36,7 @@ parser.add_argument('--seed', type=int, default=256)\nparser.add_argument('--max_episodes', type=int, default=1000000)\nparser.add_argument('--num_parallel', type=int, default=4)...
Python
MIT License
deepx-inc/machina
add dp to sac
154,212
14.02.2019 20:51:11
-32,400
021bc13f03c3f3bc1a6b34b7ef2a0d358f9450a2
add ppo and sac
[ { "change_type": "ADD", "old_path": null, "new_path": "example/run_ppo_sac.py", "diff": "+\"\"\"\n+An example of ppo and sac\n+\"\"\"\n+\n+import argparse\n+import copy\n+import json\n+import os\n+from pprint import pprint\n+\n+import numpy as np\n+import torch\n+import torch.nn as nn\n+import torch...
Python
MIT License
deepx-inc/machina
add ppo and sac
154,209
14.02.2019 20:54:24
-32,400
5495784df271b833c368b7a68b416737cf3314de
add MPCPol to initialization of algos
[ { "change_type": "MODIFY", "old_path": "machina/pols/__init__.py", "new_path": "machina/pols/__init__.py", "diff": "@@ -4,3 +4,4 @@ from machina.pols.mixture_gaussian_pol import MixtureGaussianPol\nfrom machina.pols.deterministic_action_noise_pol import DeterministicActionNoisePol\nfrom machina.pols...
Python
MIT License
deepx-inc/machina
add MPCPol to initialization of algos
154,209
14.02.2019 20:59:39
-32,400
b639705177708b6e6f490d252fd58f2394cbedbe
fix syntax and spell
[ { "change_type": "MODIFY", "old_path": "example/run_mpc.py", "new_path": "example/run_mpc.py", "diff": "@@ -15,7 +15,7 @@ import gym\nimport machina as mc\nfrom machina.pols import GaussianPol, CategoricalPol, MultiCategoricalPol, MPCPol\n-from machina.algos import mpo\n+from machina.algos import mp...
Python
MIT License
deepx-inc/machina
fix syntax and spell
154,209
14.02.2019 21:01:28
-32,400
1a6d4854583a89337e8367f6d3fb0aec493ee414
correspond to roboschool
[ { "change_type": "MODIFY", "old_path": "example/run_mpc.py", "new_path": "example/run_mpc.py", "diff": "@@ -105,6 +105,9 @@ if not os.path.exists(os.path.join(args.log, 'models')):\nnp.random.seed(args.seed)\ntorch.manual_seed(args.seed)\n+if args.roboschool:\n+ import roboschool\n+\nscore_file = os...
Python
MIT License
deepx-inc/machina
correspond to roboschool
154,209
14.02.2019 21:20:14
-32,400
4df50a85bce63ed5b01c375fac45232e980876b1
mave RandomPol from run_mpo.py to random_pol.py
[ { "change_type": "MODIFY", "old_path": "example/run_mpc.py", "new_path": "example/run_mpc.py", "diff": "@@ -14,7 +14,7 @@ import torch.nn.functional as F\nimport gym\nimport machina as mc\n-from machina.pols import GaussianPol, CategoricalPol, MultiCategoricalPol, MPCPol\n+from machina.pols import G...
Python
MIT License
deepx-inc/machina
mave RandomPol from run_mpo.py to random_pol.py
154,209
14.02.2019 21:42:27
-32,400
6ff0a293dd2b3909adc658a9edd5bca812457777
fix std of noise to init obs
[ { "change_type": "MODIFY", "old_path": "example/run_mpc.py", "new_path": "example/run_mpc.py", "diff": "@@ -28,13 +28,11 @@ from machina.utils import measure\nfrom simple_net import PolNet, VNet, ModelNet, PolNetLSTM, VNetLSTM\n-def add_noise_to_init_obs(data, std):\n- epis = data.current_epis\n+def...
Python
MIT License
deepx-inc/machina
fix std of noise to init obs
154,209
14.02.2019 21:46:00
-32,400
bbeb8d23aaf093d6421c1b317ef1d27a6e95473d
fix name of traj
[ { "change_type": "MODIFY", "old_path": "example/run_mpc.py", "new_path": "example/run_mpc.py", "diff": "@@ -131,21 +131,21 @@ sampler = EpiSampler(\nepis = sampler.sample(random_pol, max_episodes=args.num_rollouts_train)\nepis = add_noise_to_init_obs(epis, args.noise_to_init_obs)\n-rand_traj_train =...
Python
MIT License
deepx-inc/machina
fix name of traj
154,209
14.02.2019 22:02:38
-32,400
d522cf27c154ac0d610f0773df12219095ebcc45
fix size of inf mask
[ { "change_type": "MODIFY", "old_path": "machina/traj/traj_functional.py", "new_path": "machina/traj/traj_functional.py", "diff": "@@ -38,14 +38,20 @@ def normalize_obs_and_acs(traj, mean_obs=None, std_obs=None, mean_acs=None, std_\ntraj.data_map['next_obs'] - mean_next_obs) / std_next_obs\n# inf to ...
Python
MIT License
deepx-inc/machina
fix size of inf mask
154,209
15.02.2019 10:19:58
-32,400
c76528b7e08cd6fc534c639e2ae6203338fcdc00
enable cuda mode
[ { "change_type": "MODIFY", "old_path": "example/run_mpc.py", "new_path": "example/run_mpc.py", "diff": "@@ -23,7 +23,7 @@ from machina.traj import epi_functional as ef\nfrom machina.traj import traj_functional as tf\nfrom machina.samplers import EpiSampler\nfrom machina import logger\n-from machina....
Python
MIT License
deepx-inc/machina
enable cuda mode
154,209
15.02.2019 16:36:34
-32,400
70bebddbb5682639cf6a88b17340fdca6e29a637
fix inputs of reward function
[ { "change_type": "MODIFY", "old_path": "machina/pols/mpc_pol.py", "new_path": "machina/pols/mpc_pol.py", "diff": "@@ -79,8 +79,8 @@ class MPCPol(BasePol):\nob[ob == float('inf')] = mean_obs[ob == float('inf')]\nac[ac == float('inf')] = mean_acs[ac == float('inf')]\nnext_ob = ob + self.net(ob, ac)\n-...
Python
MIT License
deepx-inc/machina
fix inputs of reward function
154,209
15.02.2019 17:33:46
-32,400
492a89d49c18b5619de2d7d0559cd72d63860031
fix hyperperameter
[ { "change_type": "MODIFY", "old_path": "example/run_mpc.py", "new_path": "example/run_mpc.py", "diff": "@@ -61,9 +61,10 @@ parser.add_argument('--num_rollouts_val', type=int, default=20)\nparser.add_argument('--noise_to_init_obs', type=float, default=0.001)\nparser.add_argument('--n_samples', type=i...
Python
MIT License
deepx-inc/machina
fix hyperperameter
154,209
15.02.2019 18:12:50
-32,400
247f179d2faf7aa468470780c35fd0162e9607fa
split traj to rand_traj and rl_traj
[ { "change_type": "MODIFY", "old_path": "example/run_mpc.py", "new_path": "example/run_mpc.py", "diff": "@@ -132,21 +132,23 @@ sampler = EpiSampler(\nepis = sampler.sample(random_pol, max_episodes=args.num_rollouts_train)\nepis = add_noise_to_init_obs(epis, args.noise_to_init_obs)\n-traj_train = Traj...
Python
MIT License
deepx-inc/machina
split traj to rand_traj and rl_traj
154,212
15.02.2019 19:46:39
-32,400
666cfdc370c0b796331c9df06526172f25b32d00
normalize pg_weight
[ { "change_type": "MODIFY", "old_path": "machina/loss_functional.py", "new_path": "machina/loss_functional.py", "diff": "@@ -165,7 +165,7 @@ def bellman(qf, targ_qf, targ_pol, batch, gamma, continuous=True, deterministic=\n\"Only Q function with continuous action space is supported now.\")\n-def sac(...
Python
MIT License
deepx-inc/machina
normalize pg_weight
154,209
16.02.2019 11:08:03
-32,400
9c2b2900f7daf01f06a30b2bd28f31755f50d791
delete rand_traj_val
[ { "change_type": "MODIFY", "old_path": "example/run_mpc.py", "new_path": "example/run_mpc.py", "diff": "@@ -124,13 +124,6 @@ rand_traj.add_epis(epis)\nrand_traj = ef.add_next_obs(rand_traj)\nrand_traj.register_epis()\n-epis = sampler.sample(random_pol, max_episodes=args.num_rollouts_val)\n-epis = ad...
Python
MIT License
deepx-inc/machina
delete rand_traj_val
154,209
16.02.2019 11:15:43
-32,400
72955e0809c2cd76880f9a1ec9467b17ff493c68
change architecture of ModelNet
[ { "change_type": "MODIFY", "old_path": "example/simple_net.py", "new_path": "example/simple_net.py", "diff": "@@ -106,16 +106,16 @@ class QNet(nn.Module):\nclass ModelNet(nn.Module):\ndef __init__(self, ob_space, ac_space, h1=500, h2=500):\nsuper(ModelNet, self).__init__()\n- self.fc1 = nn.Linear(ob...
Python
MIT License
deepx-inc/machina
change architecture of ModelNet
154,209
16.02.2019 13:45:45
-32,400
93cd94b52d781a3f5b0a8bb974ef4a42d7f175ea
fix trainig epoch
[ { "change_type": "MODIFY", "old_path": "example/run_mpc.py", "new_path": "example/run_mpc.py", "diff": "@@ -38,9 +38,15 @@ def add_noise_to_init_obs(epis, std):\ndef rew_func(next_obs, acs):\n# HarfCheetah\nindex_of_velx = 3\n+ if isinstance(next_obs, torch.Tensor):\nrews = next_obs[:, index_of_velx...
Python
MIT License
deepx-inc/machina
fix trainig epoch
154,209
16.02.2019 15:51:10
-32,400
54be502c5b8f8e52630053c3dc23d9954dec9838
fix bug of denormalization
[ { "change_type": "MODIFY", "old_path": "machina/pols/mpc_pol.py", "new_path": "machina/pols/mpc_pol.py", "diff": "@@ -79,7 +79,7 @@ class MPCPol(BasePol):\nob[ob == float('inf')] = mean_obs[ob == float('inf')]\nac[ac == float('inf')] = mean_acs[ac == float('inf')]\nnext_ob = ob + self.net(ob, ac)\n-...
Python
MIT License
deepx-inc/machina
fix bug of denormalization
154,209
16.02.2019 20:10:06
-32,400
60b5a3a7f890400ac332f859017ffde7e5a5c6e0
split sampler to rand_rampler and rl_sampler, and fix bugs
[ { "change_type": "MODIFY", "old_path": "example/run_mpc.py", "new_path": "example/run_mpc.py", "diff": "@@ -39,12 +39,12 @@ def rew_func(next_obs, acs):\n# HarfCheetah\nindex_of_velx = 3\nif isinstance(next_obs, torch.Tensor):\n- rews = next_obs[:, index_of_velx] + 0.05 * \\\n- torch.sum(acs**2, dim...
Python
MIT License
deepx-inc/machina
split sampler to rand_rampler and rl_sampler, and fix bugs
154,209
16.02.2019 21:22:49
-32,400
28be487965cc5865290b463e25e372ea8ef38691
fix init obs on the mpc
[ { "change_type": "MODIFY", "old_path": "example/run_mpc.py", "new_path": "example/run_mpc.py", "diff": "@@ -39,12 +39,12 @@ def rew_func(next_obs, acs):\n# HarfCheetah\nindex_of_velx = 3\nif isinstance(next_obs, torch.Tensor):\n- rews = next_obs[:, index_of_velx] # - 0.05 * \\\n- #torch.sum(acs**2, ...
Python
MIT License
deepx-inc/machina
fix init obs on the mpc
154,209
16.02.2019 22:08:44
-32,400
b44709763efb1163f4cbb63ac862cacc41066377
change nan to mean to nan to zero
[ { "change_type": "MODIFY", "old_path": "machina/pols/mpc_pol.py", "new_path": "machina/pols/mpc_pol.py", "diff": "@@ -80,8 +80,10 @@ class MPCPol(BasePol):\nob = (obs[i] - self.mean_obs) / self.std_obs\nac = (sample_acs[i] - self.mean_acs) / self.std_acs\n# inf to mean\n- ob[ob == float('inf')] = se...
Python
MIT License
deepx-inc/machina
change nan to mean to nan to zero
154,209
17.02.2019 01:35:27
-32,400
3500365e64ffbb64ae22dc8a15efd534f74ed5cc
apply mpc_pol to cpu
[ { "change_type": "MODIFY", "old_path": "machina/pols/mpc_pol.py", "new_path": "machina/pols/mpc_pol.py", "diff": "@@ -48,13 +48,13 @@ class MPCPol(BasePol):\nself.rew_func = rew_func\nself.n_samples = n_samples\nself.horizon = horizon\n- self.mean_obs = mean_obs.repeat(n_samples, 1)\n- self.std_obs ...
Python
MIT License
deepx-inc/machina
apply mpc_pol to cpu
154,209
17.02.2019 03:49:27
-32,400
692401647d90ecf2fa6a09bbecf2564f56216484
move train after sample
[ { "change_type": "MODIFY", "old_path": "example/run_mpc.py", "new_path": "example/run_mpc.py", "diff": "+import pybullet_envs\n\"\"\"\nAn example of Model Predictive Control.\n\"\"\"\n@@ -38,28 +39,28 @@ def add_noise_to_init_obs(epis, std):\ndef rew_func(next_obs, acs):\n# HarfCheetah\nindex_of_vel...
Python
MIT License
deepx-inc/machina
move train after sample
154,209
17.02.2019 20:59:01
-32,400
a189d55a5d0f18e2d8bc99ec6db41e044e00e47c
delete env in policy
[ { "change_type": "MODIFY", "old_path": "example/run_mpc.py", "new_path": "example/run_mpc.py", "diff": "@@ -136,7 +136,7 @@ rl_traj = Traj()\n# initialize dynamics model and mpc policy\ndyn_model = ModelNet(ob_space, ac_space)\n-mpc_pol = MPCPol(ob_space, ac_space, dyn_model, rew_func, env,\n+mpc_po...
Python
MIT License
deepx-inc/machina
delete env in policy
154,209
17.02.2019 21:05:16
-32,400
bb795c30d3f32fc609cec38c3fcf2349863dc3dd
replace std tp mean
[ { "change_type": "MODIFY", "old_path": "machina/traj/traj_functional.py", "new_path": "machina/traj/traj_functional.py", "diff": "@@ -25,7 +25,7 @@ def normalize_obs_and_acs(traj, mean_obs=None, std_obs=None, mean_acs=None, std_\nif std_acs is None:\nstd_acs = torch.std(traj.data_map['acs'], dim=0, ...
Python
MIT License
deepx-inc/machina
replace std tp mean
154,206
18.02.2019 08:52:08
-32,400
6ae8bf4d17f366b90edc02f03322e5b102d22727
Delete airl.py
[ { "change_type": "DELETE", "old_path": "machina/pds/airl.py", "new_path": null, "diff": "-# Copyright 2018 DeepX Inc. All Rights Reserved.\n-#\n-# Licensed under the Apache License, Version 2.0 (the \"License\");\n-# you may not use this file except in compliance with the License.\n-# You may obtain...
Python
MIT License
deepx-inc/machina
Delete airl.py
154,209
18.02.2019 10:27:03
-32,400
02023f46fb5e1d725ad549c36bdf28612952e57a
delete mean and atd of next_obs
[ { "change_type": "MODIFY", "old_path": "example/run_mpc.py", "new_path": "example/run_mpc.py", "diff": "@@ -39,12 +39,12 @@ def rew_func(next_obs, acs):\n# HarfCheetah\nindex_of_velx = 3\nif isinstance(next_obs, np.ndarray):\n- rews = next_obs[:, index_of_velx] # - 0.05 * \\\n- #np.sum(acs**2, axis=...
Python
MIT License
deepx-inc/machina
delete mean and atd of next_obs
154,206
18.02.2019 12:43:21
-32,400
f775364b36d4db4a4c66b78def576440b37d45de
Use DeterministicPd
[ { "change_type": "MODIFY", "old_path": ".gitignore", "new_path": ".gitignore", "diff": "@@ -7,3 +7,7 @@ docs/_build/\n.ipynb_checkpoints\n.python-version\n.idea/\n+*.png\n+*.json\n+*.pkl\n+*.csv\n" }, { "change_type": "MODIFY", "old_path": "machina/algos/behavior_clone.py", "new_path...
Python
MIT License
deepx-inc/machina
Use DeterministicPd
154,206
18.02.2019 12:43:45
-32,400
0599fe4de368565a55c6c9fa8d769260f0ac1d9c
add record_results for bc
[ { "change_type": "MODIFY", "old_path": "example/run_behavior_clone.py", "new_path": "example/run_behavior_clone.py", "diff": "@@ -22,16 +22,10 @@ import pickle\nimport numpy as np\nimport torch\n-import torch.nn as nn\n-import torch.nn.functional as F\nimport gym\n-import pybullet_envs\n-import mach...
Python
MIT License
deepx-inc/machina
add record_results for bc
154,206
18.02.2019 12:49:19
-32,400
4ea69bc4e904193ea966d70966511c1df4165fb9
Rename the method 'step' to 'iterate_step'
[ { "change_type": "MODIFY", "old_path": "machina/traj/traj.py", "new_path": "machina/traj/traj.py", "diff": "@@ -156,7 +156,7 @@ class Traj(object):\nyield self._next_batch(batch_size, indices)\nself._next_id = 0\n- def step(self, batch_size, step=1, indices=None, shuffle=True):\n+ def iterate_step(s...
Python
MIT License
deepx-inc/machina
Rename the method 'step' to 'iterate_step'
154,206
18.02.2019 14:30:18
-32,400
c28d5c0e91f80881cae628935380825c9ce6f635
Remove Apache Liscense and autopep
[ { "change_type": "MODIFY", "old_path": "example/run_behavior_clone.py", "new_path": "example/run_behavior_clone.py", "diff": "-# Copyright 2018 DeepX Inc. All Rights Reserved.\n-#\n-# Licensed under the Apache License, Version 2.0 (the \"License\");\n-# you may not use this file except in compliance...
Python
MIT License
deepx-inc/machina
Remove Apache Liscense and autopep
154,209
18.02.2019 15:59:33
-32,400
0ae6dd26988003c7a8df5f5239cabacaca0eb3e1
add small number eps
[ { "change_type": "MODIFY", "old_path": "machina/pols/mpc_pol.py", "new_path": "machina/pols/mpc_pol.py", "diff": "@@ -80,9 +80,6 @@ class MPCPol(BasePol):\nfor i in range(self.horizon):\nob = (obs[i] - self.mean_obs) / self.std_obs\nac = (sample_acs[i] - self.mean_acs) / self.std_acs\n- # inf to zer...
Python
MIT License
deepx-inc/machina
add small number eps
154,206
18.02.2019 17:46:47
-32,400
ab6c871929ba4c8d033071635c777d15a9fdf838
Fix name traj.step to traj.iterate_step
[ { "change_type": "MODIFY", "old_path": "machina/algos/gail.py", "new_path": "machina/algos/gail.py", "diff": "@@ -106,9 +106,9 @@ def train(agent_traj, expert_traj, pol, vf, discrim,\nelse:\nnew_kl_beta = kl_beta\n- agent_iterator = agent_traj.step(\n+ agent_iterator = agent_traj.iterate_step(\nbatc...
Python
MIT License
deepx-inc/machina
Fix name traj.step to traj.iterate_step
154,206
18.02.2019 18:04:43
-32,400
947be465487d2d82f28c75feb475785efc4a1c44
Implement AIRL
[ { "change_type": "ADD", "old_path": null, "new_path": "example/run_airl.py", "diff": "+\"\"\"\n+An example of Generative Adversarial Imitation Learning.\n+\"\"\"\n+\n+import argparse\n+import copy\n+import json\n+import os\n+from pprint import pprint\n+import pickle\n+\n+import numpy as np\n+import ...
Python
MIT License
deepx-inc/machina
Implement AIRL
154,212
18.02.2019 21:40:46
-32,400
c793beb78f1d04671984688d3ecc9e0a4e51395a
add reparam, add twin
[ { "change_type": "MODIFY", "old_path": "example/run_sac.py", "new_path": "example/run_sac.py", "diff": "@@ -17,7 +17,7 @@ import gym\nimport machina as mc\nfrom machina.pols import GaussianPol\nfrom machina.algos import sac\n-from machina.vfuncs import DeterministicSVfunc, DeterministicSAVfunc\n+fro...
Python
MIT License
deepx-inc/machina
add reparam, add twin