Convert code to python 2.7 (#35)

* Convert code format to python2.7 (SAC)

* Convert code format python2.7 (TD3, all fD)

* Remove no use import and black setting

* Change SAC param

* Change env name Reacher-v2 to v1

* Remove old version reacher training script

* Convert code format python2.7

* Modify .travis.yml

* Add install command python3.6 & black on Makefile

* Fix seperator to tab on Makefile

* Modify Makefile

* Fix little error

* Change td3 gamma parameter
This commit is contained in:
Kyunghwan Kim authored and Whi Kwon committed 2019-03-25 19:07:19 +09:00
1 parent 81a9d861b6
commit d2769dfa9d
39 files changed
+154 -286

No files matched your search

View File
Whitespace-only changes.
Whitespace-only changes.
@@ -5,9 +5,6 @@
- Contact: curt.park@medipixel.io
"""
import argparse
import gym
import numpy as np
import torch
import torch.optim as optim
@@ -39,7 +36,7 @@ hyper_params = {
}
def run(env: gym.Env, args: argparse.Namespace, state_dim: int, action_dim: int):
def run(env, args, state_dim, action_dim):
"""Run training or test.
Args:
@@ -5,9 +5,6 @@
- Contact: curt.park@medipixel.io
"""
import argparse
import gym
import numpy as np
import torch
import torch.optim as optim
@@ -48,7 +45,7 @@ hyper_params = {
}
def run(env: gym.Env, args: argparse.Namespace, state_dim: int, action_dim: int):
def run(env, args, state_dim, action_dim):
"""Run training or test.
Args:
@@ -5,9 +5,6 @@
- Contact: whikwon@gmail.com
"""
import argparse
import gym
import torch
import torch.optim as optim
@@ -34,7 +31,7 @@ hyper_params = {
}
def run(env: gym.Env, args: argparse.Namespace, state_dim: int, action_dim: int):
def run(env, args, state_dim, action_dim):
"""Run training or test.
Args:
@@ -5,9 +5,6 @@
- Contact: seungjaeryanlee@gmail.com
"""
import argparse
import gym
import torch
import torch.optim as optim
@@ -46,7 +43,7 @@ hyper_params = {
}
def run(env: gym.Env, args: argparse.Namespace, state_dim: int, action_dim: int):
def run(env, args, state_dim, action_dim):
"""Run training or test.
Args:
Whitespace-only changes.
@@ -1,13 +1,10 @@
# -*- coding: utf-8 -*-
"""Run module for SAC on Reacher-v2.
"""Run module for SAC on Reacher-v1.
- Author: Curt Park
- Contact: curt.park@medipixel.io
"""
import argparse
import gym
import numpy as np
import torch
import torch.optim as optim
@@ -40,7 +37,7 @@ hyper_params = {
}
def run(env: gym.Env, args: argparse.Namespace, state_dim: int, action_dim: int):
def run(env, args, state_dim, action_dim):
"""Run training or test.
Args:
@@ -5,9 +5,6 @@
- Contact: curt.park@medipixel.io
"""
import argparse
import gym
import numpy as np
import torch
import torch.optim as optim
@@ -48,7 +45,7 @@ hyper_params = {
}
def run(env: gym.Env, args: argparse.Namespace, state_dim: int, action_dim: int):
def run(env, args, state_dim, action_dim):
"""Run training or test.
Args:
@@ -5,9 +5,6 @@
- Contact: whikwon@gmail.com
"""
import argparse
import gym
import torch
import torch.optim as optim
@@ -19,7 +16,7 @@ device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
# hyper parameters
hyper_params = {
"GAMMA": 0.95,
"GAMMA": 0.99,
"TAU": 5e-3,
"BUFFER_SIZE": int(1e6),
"BATCH_SIZE": 100,
@@ -34,7 +31,7 @@ hyper_params = {
}
def run(env: gym.Env, args: argparse.Namespace, state_dim: int, action_dim: int):
def run(env, args, state_dim, action_dim):
"""Run training or test.
Args:
@@ -5,9 +5,6 @@
- Contact: seungjaeryanlee@gmail.com
"""
import argparse
import gym
import torch
import torch.optim as optim
@@ -46,7 +43,7 @@ hyper_params = {
}
def run(env: gym.Env, args: argparse.Namespace, state_dim: int, action_dim: int):
def run(env, args, state_dim, action_dim):
"""Run training or test.
Args: