Skip to content

Commit

Permalink
PEP8 formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jonashen committed Jun 8, 2018
1 parent 49b387f commit b03fb7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
16 changes: 5 additions & 11 deletions examples/trpo_gym_tf_cartpole.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
env = TfEnv(normalize(GymEnv("CartPole-v0", force_reset=True)))

policy = CategoricalMLPPolicy(
name="policy",
env_spec=env.spec,
# The neural network policy should have two hidden layers, each with 32 hidden units.
hidden_sizes=(32, 32)
)
name="policy",
env_spec=env.spec,
# The neural network policy should have two hidden layers, each with 32 hidden units.
hidden_sizes=(32, 32))

baseline = LinearFeatureBaseline(env_spec=env.spec)

Expand All @@ -34,9 +33,4 @@
# optimizer=ConjugateGradientOptimizer(hvp_approach=FiniteDifferenceHvp(base_eps=1e-5))
)

run_experiment_lite(
algo.train(),
n_parallel=1,
snapshot_mode="last",
seed=1
)
run_experiment_lite(algo.train(), n_parallel=1, snapshot_mode="last", seed=1)
2 changes: 1 addition & 1 deletion tests/test_serializable.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_serializable():
assert obj.w.name.startswith('obj/')
assert obj1.w.name.startswith('obj1/')

obj2 = AllArgs(0, *(1,), **{'kwarg': 2})
obj2 = AllArgs(0, *(1, ), **{'kwarg': 2})
obj3 = Serializable.clone(obj2)
assert obj3.vararg == 0
assert len(obj3.args) == 1 and obj3.args[0] == 1
Expand Down

0 comments on commit b03fb7f

Please sign in to comment.