diff --git a/dist/flatland_rl-3.0.0-py2.py3-none-any.whl b/dist/flatland_rl-3.0.1-py2.py3-none-any.whl similarity index 98% rename from dist/flatland_rl-3.0.0-py2.py3-none-any.whl rename to dist/flatland_rl-3.0.1-py2.py3-none-any.whl index 18e433350542c9b9d13663687d06c62f7eba0a60..b09a3bf91aebbeac20a31e35c8d5c6b083ce085d 100644 Binary files a/dist/flatland_rl-3.0.0-py2.py3-none-any.whl and b/dist/flatland_rl-3.0.1-py2.py3-none-any.whl differ diff --git a/flatland/__init__.py b/flatland/__init__.py index ddd54c559f3a4c7c5487b34b9a8c63a5704d0297..6fea90b5178baefea248c91eb80efd5f55f9dbff 100644 --- a/flatland/__init__.py +++ b/flatland/__init__.py @@ -4,4 +4,4 @@ __author__ = """S.P. Mohanty""" __email__ = 'mohanty@aicrowd.com' -__version__ = '3.0.0' +__version__ = '3.0.1' diff --git a/flatland/envs/malfunction_generators.py b/flatland/envs/malfunction_generators.py index 5a00364bd9fe91e619974f826fd4b5f8d1a4b900..38677e2f92cd409ffafa9418282c69dbc3aaa714 100644 --- a/flatland/envs/malfunction_generators.py +++ b/flatland/envs/malfunction_generators.py @@ -67,7 +67,7 @@ class FileMalfunctionGen(ParamMalfunctionGen): if env_dict is None: env_dict = persistence.RailEnvPersister.load_env_dict(filename, load_from_package=load_from_package) - if "malfunction" in env_dict: + if env_dict.get('malfunction') is not None: oMFP = MalfunctionParameters(*env_dict["malfunction"]) else: oMFP = MalfunctionParameters(0,0,0) # no malfunctions @@ -184,7 +184,7 @@ def malfunction_from_file(filename: str, load_from_package=None) -> Tuple[Malfun env_dict = persistence.RailEnvPersister.load_env_dict(filename, load_from_package=load_from_package) # TODO: make this better by using namedtuple in the pickle file. See issue 282 - if "malfunction" in env_dict: + if env_dict.get('malfunction') is not None: env_dict['malfunction'] = oMPD = MalfunctionProcessData._make(env_dict['malfunction']) else: oMPD = None diff --git a/flatland/evaluators/client.py b/flatland/evaluators/client.py index ee362c87bfc3b34829b152cacbd4564fdd00ad3d..4ce29cf82e0eea6edd900fe9e65d6d9cdf65b83a 100644 --- a/flatland/evaluators/client.py +++ b/flatland/evaluators/client.py @@ -267,7 +267,7 @@ class FlatlandRemoteClient(object): self.current_env_path = test_env_file_path self.env = RailEnv(width=1, height=1, rail_generator=rail_from_file(test_env_file_path), line_generator=line_from_file(test_env_file_path), - malfunction_generator=FileMalfunctionGen(test_env_file_path), + malfunction_generator=FileMalfunctionGen(filename=test_env_file_path), obs_builder_object=obs_builder_object) time_start = time.time() diff --git a/setup.cfg b/setup.cfg index d9f0b74934b053f138a7b6679297c461b59811ec..4dfa964975405c911737d311f70d4c8346042d13 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 3.0.0 +current_version = 3.0.1 commit = True tag = True diff --git a/setup.py b/setup.py index 951597139909083748ad36810573ab0b2f3b47ed..743b22cd4e143458202e16cbb8e415ea088209b1 100644 --- a/setup.py +++ b/setup.py @@ -80,6 +80,6 @@ setup( test_suite='tests', tests_require=test_requirements, url='https://gitlab.aicrowd.com/flatland/flatland', - version='3.0.0', + version='3.0.1', zip_safe=False, )