diff --git a/flatland/__init__.py b/flatland/__init__.py index a51361920643b32d156c257baf6d3469b916d0b9..2bb8fee4b5eacf7ebcf7fae9e5c94ed6da5695ff 100644 --- a/flatland/__init__.py +++ b/flatland/__init__.py @@ -4,4 +4,4 @@ __author__ = """S.P. Mohanty""" __email__ = 'mohanty@aicrowd.com' -__version__ = '0.3.6' +__version__ = '0.3.10' diff --git a/flatland/evaluators/service.py b/flatland/evaluators/service.py index 21a5e63f3a0e58ff915c3743eac56250435b5ee4..3ad0a97598c8beb66fc164eb45b670c87f3c96f9 100644 --- a/flatland/evaluators/service.py +++ b/flatland/evaluators/service.py @@ -17,6 +17,7 @@ import time import traceback import crowdai_api import timeout_decorator +import random use_signals_in_timeout = True @@ -74,6 +75,10 @@ class FlatlandRemoteEvaluationService: self.test_env_folder = test_env_folder self.video_generation_envs = video_generation_envs self.env_file_paths = self.get_env_filepaths() + random.shuffle(self.env_file_paths) + print(self.env_file_paths) + # Shuffle all the env_file_paths for more exciting videos + # and for more uniform time progression # Logging and Reporting related vars self.verbose = verbose @@ -352,9 +357,9 @@ class FlatlandRemoteEvaluationService: progress = np.clip( self.simulation_count * 1.0 / len(self.env_file_paths), 0, 1) - mean_reward = np.mean(self.simulation_rewards) - mean_normalized_reward = np.mean(self.simulation_rewards_normalized) - mean_percentage_complete = np.mean(self.simulation_percentage_complete) + mean_reward = round(np.mean(self.simulation_rewards), 2) + mean_normalized_reward = round(np.mean(self.simulation_rewards_normalized), 2) + mean_percentage_complete = round(np.mean(self.simulation_percentage_complete), 3) self.evaluation_state["state"] = "IN_PROGRESS" self.evaluation_state["progress"] = progress self.evaluation_state["simulation_count"] = self.simulation_count @@ -457,9 +462,9 @@ class FlatlandRemoteEvaluationService: """ ) - mean_reward = np.mean(self.simulation_rewards) - mean_normalized_reward = np.mean(self.simulation_rewards_normalized) - mean_percentage_complete = np.mean(self.simulation_percentage_complete) + mean_reward = round(np.mean(self.simulation_rewards), 2) + mean_normalized_reward = round(np.mean(self.simulation_rewards_normalized), 2) + mean_percentage_complete = round(np.mean(self.simulation_percentage_complete), 3) if self.visualize and len(os.listdir(self.vizualization_folder_name)) > 0: # Generate the video diff --git a/requirements_dev.txt b/requirements_dev.txt index 2c3fce762e2cc9f66890ad6def2f7e8c005305c9..e02da21600b9cf0574457e915c69474afe0eff35 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,6 +1,5 @@ # contains all requirements to run the tests by running ```tox -e py36,py37``` tox>=3.5.2 -twine>=1.12.1 pytest>=3.8.2 pytest-runner>=4.2 Click>=7.0 @@ -14,7 +13,6 @@ CairoSVG>=2.3.1 msgpack>=0.6.1 msgpack-numpy>=0.4.4.0 svgutils>=0.3.1 -screeninfo>=0.3.1 pyarrow>=0.13.0 importlib-metadata>=0.17 importlib-resources>=1.0.1 diff --git a/setup.cfg b/setup.cfg index 457dcd2bea6007d073912a7199da885f90e34d7c..580e6accda68402e5f8ca70577cd68eb5b5ad173 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.3.6 +current_version = 0.3.10 commit = True tag = True diff --git a/setup.py b/setup.py index 5299efb0744280a1c0b10d125db7af03e1d7e8e6..48ddd96d47c1e542008e2ad93c60b7bf2b43b410 100644 --- a/setup.py +++ b/setup.py @@ -79,6 +79,6 @@ setup( test_suite='tests', tests_require=test_requirements, url='https://gitlab.aicrowd.com/flatland/flatland', - version='0.3.6', + version='0.3.10', zip_safe=False, )