From 4da857d86e22ade7350f74a7cc92bf593ceaa83d Mon Sep 17 00:00:00 2001 From: ShenDezhou Date: Tue, 31 Mar 2020 17:22:32 +0800 Subject: [PATCH] Fix windows env setup bugs and other typo. (#11) --- setup.py | 2 +- test/discrete/test_a2c.py | 2 +- test/discrete/test_dqn.py | 2 +- test/discrete/test_pg.py | 2 +- tianshou/__init__.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 93d9a77..29bdb4a 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ setup( name='tianshou', version=version, description='A Library for Deep Reinforcement Learning', - long_description=open('README.md').read(), + long_description=open('README.md', encoding='utf8').read(), long_description_content_type='text/markdown', url='https://github.com/thu-ml/tianshou', author='TSAIL', diff --git a/test/discrete/test_a2c.py b/test/discrete/test_a2c.py index 3229b87..8b0bcb3 100644 --- a/test/discrete/test_a2c.py +++ b/test/discrete/test_a2c.py @@ -74,7 +74,7 @@ def test_a2c(args=get_args()): policy, train_envs, ReplayBuffer(args.buffer_size)) test_collector = Collector(policy, test_envs) # log - writer = SummaryWriter(args.logdir + '/' + 'ppo') + writer = SummaryWriter(args.logdir + '/' + 'a2c') def stop_fn(x): return x >= env.spec.reward_threshold diff --git a/test/discrete/test_dqn.py b/test/discrete/test_dqn.py index 2321d5e..957a856 100644 --- a/test/discrete/test_dqn.py +++ b/test/discrete/test_dqn.py @@ -73,7 +73,7 @@ def test_dqn(args=get_args()): # policy.set_eps(1) train_collector.collect(n_step=args.batch_size) # log - writer = SummaryWriter(args.logdir + '/' + 'ppo') + writer = SummaryWriter(args.logdir + '/' + 'dqn') def stop_fn(x): return x >= env.spec.reward_threshold diff --git a/test/discrete/test_pg.py b/test/discrete/test_pg.py index 09b5b4d..0489ea4 100644 --- a/test/discrete/test_pg.py +++ b/test/discrete/test_pg.py @@ -122,7 +122,7 @@ def test_pg(args=get_args()): policy, train_envs, ReplayBuffer(args.buffer_size)) test_collector = Collector(policy, test_envs) # log - writer = SummaryWriter(args.logdir + '/' + 'ppo') + writer = SummaryWriter(args.logdir + '/' + 'pg') def stop_fn(x): return x >= env.spec.reward_threshold diff --git a/tianshou/__init__.py b/tianshou/__init__.py index 1bc7f5e..a8f5318 100644 --- a/tianshou/__init__.py +++ b/tianshou/__init__.py @@ -1,7 +1,7 @@ from tianshou import data, env, utils, policy, trainer, \ exploration -__version__ = '0.2.0post2' +__version__ = '0.2.0.post2' __all__ = [ 'env', 'data',