diff --git a/.github/workflows/gh-test.yml b/.github/workflows/gh-test.yml index 1dd0c33..f545bf5 100644 --- a/.github/workflows/gh-test.yml +++ b/.github/workflows/gh-test.yml @@ -26,7 +26,7 @@ jobs: pip install flake8 pytest pytest-cov setuptools numpy pip install -e .[extras_disc] pip install ray[rllib,debug]==0.7.3 - pip install tensorflow==1.13.0rc1 + pip install tensorflow==1.13.1 - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names diff --git a/.gitignore b/.gitignore index 8968f0c..85e72d8 100644 --- a/.gitignore +++ b/.gitignore @@ -67,6 +67,10 @@ instance/ # Scrapy stuff: .scrapy +# Sphinx documentation +docs/_build/ +docs/_autosummary/ + # PyBuilder target/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fe04787..10bb5fd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,7 +9,7 @@ pip install -e .[extras] In addition to the standard dependencies, please install the following: ```bash -pip install sphinx, sphinx-book-theme # for generating documentation +pip install sphinx, sphinx-book-theme, sphinx-argparse # for generating documentation pip install pytest-cov # for coverage report # install poetry for packaging and publishing to PyPI curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - @@ -38,7 +38,7 @@ make clean rm -rf _autosummary # optional ``` -To publish: +To publish ensure that the working directoy is clean and run: ```bash -git subtree push --prefix docs/_build/html/ origin gh-pages +./publish-docs.sh ``` diff --git a/docs/_autosummary/mdp_playground.analysis.analysis.MDPP_Analysis.rst b/docs/_autosummary/mdp_playground.analysis.analysis.MDPP_Analysis.rst deleted file mode 100644 index 8da7e3e..0000000 --- a/docs/_autosummary/mdp_playground.analysis.analysis.MDPP_Analysis.rst +++ /dev/null @@ -1,33 +0,0 @@ -mdp\_playground.analysis.analysis.MDPP\_Analysis -================================================ - -.. currentmodule:: mdp_playground.analysis.analysis - -.. autoclass:: MDPP_Analysis - :members: <-- add at least this line - :show-inheritance: <-- plus I want to show inheritance... - :inherited-members: <-- ...and inherited members too - - - .. automethod:: __init__ - - - .. rubric:: Methods - - .. autosummary:: - - ~MDPP_Analysis.__init__ - ~MDPP_Analysis.gather_stats - ~MDPP_Analysis.get_exp_data - ~MDPP_Analysis.load_data - ~MDPP_Analysis.plot_1d_dimensions - ~MDPP_Analysis.plot_2d_heatmap - ~MDPP_Analysis.plot_bar - ~MDPP_Analysis.plot_learning_curves - ~MDPP_Analysis.plot_radar - - - - - - \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.analysis.analysis.rst b/docs/_autosummary/mdp_playground.analysis.analysis.rst deleted file mode 100644 index 03b72fb..0000000 --- a/docs/_autosummary/mdp_playground.analysis.analysis.rst +++ /dev/null @@ -1,31 +0,0 @@ -mdp\_playground.analysis.analysis -================================= - -.. automodule:: mdp_playground.analysis.analysis - - - - - - - - - - - - .. rubric:: Classes - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - - MDPP_Analysis - - - - - - - - - diff --git a/docs/_autosummary/mdp_playground.analysis.radar_chart.radar_factory.rst b/docs/_autosummary/mdp_playground.analysis.radar_chart.radar_factory.rst deleted file mode 100644 index b0fe812..0000000 --- a/docs/_autosummary/mdp_playground.analysis.radar_chart.radar_factory.rst +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.analysis.radar\_chart.radar\_factory -==================================================== - -.. currentmodule:: mdp_playground.analysis.radar_chart - -.. autofunction:: radar_factory \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.analysis.radar_chart.rst b/docs/_autosummary/mdp_playground.analysis.radar_chart.rst deleted file mode 100644 index 68efda4..0000000 --- a/docs/_autosummary/mdp_playground.analysis.radar_chart.rst +++ /dev/null @@ -1,30 +0,0 @@ -mdp\_playground.analysis.radar\_chart -===================================== - -.. automodule:: mdp_playground.analysis.radar_chart - - - - - - - - .. rubric:: Functions - - .. autosummary:: - :toctree: - - radar_factory - - - - - - - - - - - - - diff --git a/docs/_autosummary/mdp_playground.analysis.rst b/docs/_autosummary/mdp_playground.analysis.rst deleted file mode 100644 index 1a7989f..0000000 --- a/docs/_autosummary/mdp_playground.analysis.rst +++ /dev/null @@ -1,33 +0,0 @@ -mdp\_playground.analysis -======================== - -.. automodule:: mdp_playground.analysis - - - - - - - - - - - - - - - - - - - -.. rubric:: Modules - -.. autosummary:: - :toctree: - :template: custom-module-template.rst - :recursive: - - mdp_playground.analysis.analysis - mdp_playground.analysis.radar_chart - diff --git a/docs/_autosummary/mdp_playground.config_processor.config_processor.combined_processing.rst b/docs/_autosummary/mdp_playground.config_processor.config_processor.combined_processing.rst deleted file mode 100644 index 093aef1..0000000 --- a/docs/_autosummary/mdp_playground.config_processor.config_processor.combined_processing.rst +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.combined\_processing -======================================================================== - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: combined_processing \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.config_processor.config_processor.create_config_space_from_config_dict.rst b/docs/_autosummary/mdp_playground.config_processor.config_processor.create_config_space_from_config_dict.rst deleted file mode 100644 index f1cc1c7..0000000 --- a/docs/_autosummary/mdp_playground.config_processor.config_processor.create_config_space_from_config_dict.rst +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.create\_config\_space\_from\_config\_dict -============================================================================================= - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: create_config_space_from_config_dict \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_atari.rst b/docs/_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_atari.rst deleted file mode 100644 index 71dd9f1..0000000 --- a/docs/_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_atari.rst +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.create\_gym\_env\_wrapper\_atari -==================================================================================== - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: create_gym_env_wrapper_atari \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_frame_stack_atari.rst b/docs/_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_frame_stack_atari.rst deleted file mode 100644 index 217325f..0000000 --- a/docs/_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_frame_stack_atari.rst +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.create\_gym\_env\_wrapper\_frame\_stack\_atari -================================================================================================== - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: create_gym_env_wrapper_frame_stack_atari \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_mujoco_wrapper.rst b/docs/_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_mujoco_wrapper.rst deleted file mode 100644 index 492153a..0000000 --- a/docs/_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_mujoco_wrapper.rst +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.create\_gym\_env\_wrapper\_mujoco\_wrapper -============================================================================================== - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: create_gym_env_wrapper_mujoco_wrapper \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.config_processor.config_processor.deepmerge.rst b/docs/_autosummary/mdp_playground.config_processor.config_processor.deepmerge.rst deleted file mode 100644 index 3104dea..0000000 --- a/docs/_autosummary/mdp_playground.config_processor.config_processor.deepmerge.rst +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.deepmerge -============================================================= - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: deepmerge \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.config_processor.config_processor.deepmerge_multiple_dicts.rst b/docs/_autosummary/mdp_playground.config_processor.config_processor.deepmerge_multiple_dicts.rst deleted file mode 100644 index 7678762..0000000 --- a/docs/_autosummary/mdp_playground.config_processor.config_processor.deepmerge_multiple_dicts.rst +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.deepmerge\_multiple\_dicts -============================================================================== - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: deepmerge_multiple_dicts \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.config_processor.config_processor.get_grid_of_configs.rst b/docs/_autosummary/mdp_playground.config_processor.config_processor.get_grid_of_configs.rst deleted file mode 100644 index 7a93e08..0000000 --- a/docs/_autosummary/mdp_playground.config_processor.config_processor.get_grid_of_configs.rst +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.get\_grid\_of\_configs -========================================================================== - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: get_grid_of_configs \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.config_processor.config_processor.get_list_of_varying_configs.rst b/docs/_autosummary/mdp_playground.config_processor.config_processor.get_list_of_varying_configs.rst deleted file mode 100644 index a5ba203..0000000 --- a/docs/_autosummary/mdp_playground.config_processor.config_processor.get_list_of_varying_configs.rst +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.get\_list\_of\_varying\_configs -=================================================================================== - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: get_list_of_varying_configs \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.config_processor.config_processor.get_random_configs.rst b/docs/_autosummary/mdp_playground.config_processor.config_processor.get_random_configs.rst deleted file mode 100644 index fe92ca6..0000000 --- a/docs/_autosummary/mdp_playground.config_processor.config_processor.get_random_configs.rst +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.get\_random\_configs -======================================================================== - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: get_random_configs \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.config_processor.config_processor.init_ray.rst b/docs/_autosummary/mdp_playground.config_processor.config_processor.init_ray.rst deleted file mode 100644 index dc93cc9..0000000 --- a/docs/_autosummary/mdp_playground.config_processor.config_processor.init_ray.rst +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.init\_ray -============================================================= - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: init_ray \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.config_processor.config_processor.init_stats_file.rst b/docs/_autosummary/mdp_playground.config_processor.config_processor.init_stats_file.rst deleted file mode 100644 index 47737e5..0000000 --- a/docs/_autosummary/mdp_playground.config_processor.config_processor.init_stats_file.rst +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.init\_stats\_file -===================================================================== - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: init_stats_file \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.config_processor.config_processor.post_processing.rst b/docs/_autosummary/mdp_playground.config_processor.config_processor.post_processing.rst deleted file mode 100644 index f57eb60..0000000 --- a/docs/_autosummary/mdp_playground.config_processor.config_processor.post_processing.rst +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.post\_processing -==================================================================== - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: post_processing \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.config_processor.config_processor.process_configs.rst b/docs/_autosummary/mdp_playground.config_processor.config_processor.process_configs.rst deleted file mode 100644 index 7e158ac..0000000 --- a/docs/_autosummary/mdp_playground.config_processor.config_processor.process_configs.rst +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.process\_configs -==================================================================== - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: process_configs \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.config_processor.config_processor.rst b/docs/_autosummary/mdp_playground.config_processor.config_processor.rst deleted file mode 100644 index b5742a8..0000000 --- a/docs/_autosummary/mdp_playground.config_processor.config_processor.rst +++ /dev/null @@ -1,46 +0,0 @@ -mdp\_playground.config\_processor.config\_processor -=================================================== - -.. automodule:: mdp_playground.config_processor.config_processor - - - - - - - - .. rubric:: Functions - - .. autosummary:: - :toctree: - - combined_processing - create_config_space_from_config_dict - create_gym_env_wrapper_atari - create_gym_env_wrapper_frame_stack_atari - create_gym_env_wrapper_mujoco_wrapper - deepmerge - deepmerge_multiple_dicts - get_grid_of_configs - get_list_of_varying_configs - get_random_configs - init_ray - init_stats_file - post_processing - process_configs - setup_ray - setup_ray_callbacks - sobol_configs_from_config_dict - - - - - - - - - - - - - diff --git a/docs/_autosummary/mdp_playground.config_processor.config_processor.setup_ray.rst b/docs/_autosummary/mdp_playground.config_processor.config_processor.setup_ray.rst deleted file mode 100644 index f6577f5..0000000 --- a/docs/_autosummary/mdp_playground.config_processor.config_processor.setup_ray.rst +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.setup\_ray -============================================================== - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: setup_ray \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.config_processor.config_processor.setup_ray_callbacks.rst b/docs/_autosummary/mdp_playground.config_processor.config_processor.setup_ray_callbacks.rst deleted file mode 100644 index 53b1b2c..0000000 --- a/docs/_autosummary/mdp_playground.config_processor.config_processor.setup_ray_callbacks.rst +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.setup\_ray\_callbacks -========================================================================= - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: setup_ray_callbacks \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.config_processor.config_processor.sobol_configs_from_config_dict.rst b/docs/_autosummary/mdp_playground.config_processor.config_processor.sobol_configs_from_config_dict.rst deleted file mode 100644 index 861cca9..0000000 --- a/docs/_autosummary/mdp_playground.config_processor.config_processor.sobol_configs_from_config_dict.rst +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.sobol\_configs\_from\_config\_dict -====================================================================================== - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: sobol_configs_from_config_dict \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.config_processor.rst b/docs/_autosummary/mdp_playground.config_processor.rst deleted file mode 100644 index 580b8a0..0000000 --- a/docs/_autosummary/mdp_playground.config_processor.rst +++ /dev/null @@ -1,32 +0,0 @@ -mdp\_playground.config\_processor -================================= - -.. automodule:: mdp_playground.config_processor - - - - - - - - - - - - - - - - - - - -.. rubric:: Modules - -.. autosummary:: - :toctree: - :template: custom-module-template.rst - :recursive: - - mdp_playground.config_processor.config_processor - diff --git a/docs/_autosummary/mdp_playground.envs.gym_env_wrapper.GymEnvWrapper.rst b/docs/_autosummary/mdp_playground.envs.gym_env_wrapper.GymEnvWrapper.rst deleted file mode 100644 index 6f22959..0000000 --- a/docs/_autosummary/mdp_playground.envs.gym_env_wrapper.GymEnvWrapper.rst +++ /dev/null @@ -1,41 +0,0 @@ -mdp\_playground.envs.gym\_env\_wrapper.GymEnvWrapper -==================================================== - -.. currentmodule:: mdp_playground.envs.gym_env_wrapper - -.. autoclass:: GymEnvWrapper - :members: <-- add at least this line - :show-inheritance: <-- plus I want to show inheritance... - :inherited-members: <-- ...and inherited members too - - - .. automethod:: __init__ - - - .. rubric:: Methods - - .. autosummary:: - - ~GymEnvWrapper.__init__ - ~GymEnvWrapper.close - ~GymEnvWrapper.render - ~GymEnvWrapper.reset - ~GymEnvWrapper.seed - ~GymEnvWrapper.step - - - - - - .. rubric:: Attributes - - .. autosummary:: - - ~GymEnvWrapper.action_space - ~GymEnvWrapper.metadata - ~GymEnvWrapper.observation_space - ~GymEnvWrapper.reward_range - ~GymEnvWrapper.spec - ~GymEnvWrapper.unwrapped - - \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.envs.gym_env_wrapper.rst b/docs/_autosummary/mdp_playground.envs.gym_env_wrapper.rst deleted file mode 100644 index d07b529..0000000 --- a/docs/_autosummary/mdp_playground.envs.gym_env_wrapper.rst +++ /dev/null @@ -1,31 +0,0 @@ -mdp\_playground.envs.gym\_env\_wrapper -====================================== - -.. automodule:: mdp_playground.envs.gym_env_wrapper - - - - - - - - - - - - .. rubric:: Classes - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - - GymEnvWrapper - - - - - - - - - diff --git a/docs/_autosummary/mdp_playground.envs.mujoco_env_wrapper.get_mujoco_wrapper.rst b/docs/_autosummary/mdp_playground.envs.mujoco_env_wrapper.get_mujoco_wrapper.rst deleted file mode 100644 index a674ee6..0000000 --- a/docs/_autosummary/mdp_playground.envs.mujoco_env_wrapper.get_mujoco_wrapper.rst +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.envs.mujoco\_env\_wrapper.get\_mujoco\_wrapper -============================================================== - -.. currentmodule:: mdp_playground.envs.mujoco_env_wrapper - -.. autofunction:: get_mujoco_wrapper \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.envs.mujoco_env_wrapper.rst b/docs/_autosummary/mdp_playground.envs.mujoco_env_wrapper.rst deleted file mode 100644 index 147fa86..0000000 --- a/docs/_autosummary/mdp_playground.envs.mujoco_env_wrapper.rst +++ /dev/null @@ -1,30 +0,0 @@ -mdp\_playground.envs.mujoco\_env\_wrapper -========================================= - -.. automodule:: mdp_playground.envs.mujoco_env_wrapper - - - - - - - - .. rubric:: Functions - - .. autosummary:: - :toctree: - - get_mujoco_wrapper - - - - - - - - - - - - - diff --git a/docs/_autosummary/mdp_playground.envs.rl_toy_env.RLToyEnv.rst b/docs/_autosummary/mdp_playground.envs.rl_toy_env.RLToyEnv.rst deleted file mode 100644 index 32de278..0000000 --- a/docs/_autosummary/mdp_playground.envs.rl_toy_env.RLToyEnv.rst +++ /dev/null @@ -1,48 +0,0 @@ -mdp\_playground.envs.rl\_toy\_env.RLToyEnv -========================================== - -.. currentmodule:: mdp_playground.envs.rl_toy_env - -.. autoclass:: RLToyEnv - :members: <-- add at least this line - :show-inheritance: <-- plus I want to show inheritance... - :inherited-members: <-- ...and inherited members too - - - .. automethod:: __init__ - - - .. rubric:: Methods - - .. autosummary:: - - ~RLToyEnv.__init__ - ~RLToyEnv.close - ~RLToyEnv.get_augmented_state - ~RLToyEnv.init_init_state_dist - ~RLToyEnv.init_reward_function - ~RLToyEnv.init_terminal_states - ~RLToyEnv.init_transition_function - ~RLToyEnv.render - ~RLToyEnv.reset - ~RLToyEnv.reward_function - ~RLToyEnv.seed - ~RLToyEnv.step - ~RLToyEnv.transition_function - - - - - - .. rubric:: Attributes - - .. autosummary:: - - ~RLToyEnv.action_space - ~RLToyEnv.metadata - ~RLToyEnv.observation_space - ~RLToyEnv.reward_range - ~RLToyEnv.spec - ~RLToyEnv.unwrapped - - \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.envs.rl_toy_env.dist_of_pt_from_line.rst b/docs/_autosummary/mdp_playground.envs.rl_toy_env.dist_of_pt_from_line.rst deleted file mode 100644 index dddd0d2..0000000 --- a/docs/_autosummary/mdp_playground.envs.rl_toy_env.dist_of_pt_from_line.rst +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.envs.rl\_toy\_env.dist\_of\_pt\_from\_line -========================================================== - -.. currentmodule:: mdp_playground.envs.rl_toy_env - -.. autofunction:: dist_of_pt_from_line \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.envs.rl_toy_env.list_to_float_np_array.rst b/docs/_autosummary/mdp_playground.envs.rl_toy_env.list_to_float_np_array.rst deleted file mode 100644 index f454d29..0000000 --- a/docs/_autosummary/mdp_playground.envs.rl_toy_env.list_to_float_np_array.rst +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.envs.rl\_toy\_env.list\_to\_float\_np\_array -============================================================ - -.. currentmodule:: mdp_playground.envs.rl_toy_env - -.. autofunction:: list_to_float_np_array \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.envs.rl_toy_env.rst b/docs/_autosummary/mdp_playground.envs.rl_toy_env.rst deleted file mode 100644 index 37ad2c0..0000000 --- a/docs/_autosummary/mdp_playground.envs.rl_toy_env.rst +++ /dev/null @@ -1,39 +0,0 @@ -mdp\_playground.envs.rl\_toy\_env -================================= - -.. automodule:: mdp_playground.envs.rl_toy_env - - - - - - - - .. rubric:: Functions - - .. autosummary:: - :toctree: - - dist_of_pt_from_line - list_to_float_np_array - - - - - - .. rubric:: Classes - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - - RLToyEnv - - - - - - - - - diff --git a/docs/_autosummary/mdp_playground.envs.rst b/docs/_autosummary/mdp_playground.envs.rst deleted file mode 100644 index bd1ccef..0000000 --- a/docs/_autosummary/mdp_playground.envs.rst +++ /dev/null @@ -1,34 +0,0 @@ -mdp\_playground.envs -==================== - -.. automodule:: mdp_playground.envs - - - - - - - - - - - - - - - - - - - -.. rubric:: Modules - -.. autosummary:: - :toctree: - :template: custom-module-template.rst - :recursive: - - mdp_playground.envs.gym_env_wrapper - mdp_playground.envs.mujoco_env_wrapper - mdp_playground.envs.rl_toy_env - diff --git a/docs/_autosummary/mdp_playground.rst b/docs/_autosummary/mdp_playground.rst deleted file mode 100644 index 3cb835f..0000000 --- a/docs/_autosummary/mdp_playground.rst +++ /dev/null @@ -1,36 +0,0 @@ -mdp\_playground -=============== - -.. automodule:: mdp_playground - - - - - - - - - - - - - - - - - - - -.. rubric:: Modules - -.. autosummary:: - :toctree: - :template: custom-module-template.rst - :recursive: - - mdp_playground.analysis - mdp_playground.config_processor - mdp_playground.envs - mdp_playground.scripts - mdp_playground.spaces - diff --git a/docs/_autosummary/mdp_playground.scripts.rst b/docs/_autosummary/mdp_playground.scripts.rst deleted file mode 100644 index f2ca0ab..0000000 --- a/docs/_autosummary/mdp_playground.scripts.rst +++ /dev/null @@ -1,32 +0,0 @@ -mdp\_playground.scripts -======================= - -.. automodule:: mdp_playground.scripts - - - - - - - - - - - - - - - - - - - -.. rubric:: Modules - -.. autosummary:: - :toctree: - :template: custom-module-template.rst - :recursive: - - mdp_playground.scripts.run_experiments - diff --git a/docs/_autosummary/mdp_playground.scripts.run_experiments.cli.rst b/docs/_autosummary/mdp_playground.scripts.run_experiments.cli.rst deleted file mode 100644 index ebb6c30..0000000 --- a/docs/_autosummary/mdp_playground.scripts.run_experiments.cli.rst +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.scripts.run\_experiments.cli -============================================ - -.. currentmodule:: mdp_playground.scripts.run_experiments - -.. autofunction:: cli \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.scripts.run_experiments.main.rst b/docs/_autosummary/mdp_playground.scripts.run_experiments.main.rst deleted file mode 100644 index bc22eb9..0000000 --- a/docs/_autosummary/mdp_playground.scripts.run_experiments.main.rst +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.scripts.run\_experiments.main -============================================= - -.. currentmodule:: mdp_playground.scripts.run_experiments - -.. autofunction:: main \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.scripts.run_experiments.rst b/docs/_autosummary/mdp_playground.scripts.run_experiments.rst deleted file mode 100644 index 6167d3f..0000000 --- a/docs/_autosummary/mdp_playground.scripts.run_experiments.rst +++ /dev/null @@ -1,31 +0,0 @@ -mdp\_playground.scripts.run\_experiments -======================================== - -.. automodule:: mdp_playground.scripts.run_experiments - - - - - - - - .. rubric:: Functions - - .. autosummary:: - :toctree: - - cli - main - - - - - - - - - - - - - diff --git a/docs/_autosummary/mdp_playground.spaces.box_extended.BoxExtended.rst b/docs/_autosummary/mdp_playground.spaces.box_extended.BoxExtended.rst deleted file mode 100644 index e282a07..0000000 --- a/docs/_autosummary/mdp_playground.spaces.box_extended.BoxExtended.rst +++ /dev/null @@ -1,31 +0,0 @@ -mdp\_playground.spaces.box\_extended.BoxExtended -================================================ - -.. currentmodule:: mdp_playground.spaces.box_extended - -.. autoclass:: BoxExtended - :members: <-- add at least this line - :show-inheritance: <-- plus I want to show inheritance... - :inherited-members: <-- ...and inherited members too - - - .. automethod:: __init__ - - - .. rubric:: Methods - - .. autosummary:: - - ~BoxExtended.__init__ - ~BoxExtended.contains - ~BoxExtended.from_jsonable - ~BoxExtended.is_bounded - ~BoxExtended.sample - ~BoxExtended.seed - ~BoxExtended.to_jsonable - - - - - - \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.spaces.box_extended.rst b/docs/_autosummary/mdp_playground.spaces.box_extended.rst deleted file mode 100644 index cfcc644..0000000 --- a/docs/_autosummary/mdp_playground.spaces.box_extended.rst +++ /dev/null @@ -1,31 +0,0 @@ -mdp\_playground.spaces.box\_extended -==================================== - -.. automodule:: mdp_playground.spaces.box_extended - - - - - - - - - - - - .. rubric:: Classes - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - - BoxExtended - - - - - - - - - diff --git a/docs/_autosummary/mdp_playground.spaces.discrete_extended.DiscreteExtended.rst b/docs/_autosummary/mdp_playground.spaces.discrete_extended.DiscreteExtended.rst deleted file mode 100644 index f9fe31f..0000000 --- a/docs/_autosummary/mdp_playground.spaces.discrete_extended.DiscreteExtended.rst +++ /dev/null @@ -1,30 +0,0 @@ -mdp\_playground.spaces.discrete\_extended.DiscreteExtended -========================================================== - -.. currentmodule:: mdp_playground.spaces.discrete_extended - -.. autoclass:: DiscreteExtended - :members: <-- add at least this line - :show-inheritance: <-- plus I want to show inheritance... - :inherited-members: <-- ...and inherited members too - - - .. automethod:: __init__ - - - .. rubric:: Methods - - .. autosummary:: - - ~DiscreteExtended.__init__ - ~DiscreteExtended.contains - ~DiscreteExtended.from_jsonable - ~DiscreteExtended.sample - ~DiscreteExtended.seed - ~DiscreteExtended.to_jsonable - - - - - - \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.spaces.discrete_extended.rst b/docs/_autosummary/mdp_playground.spaces.discrete_extended.rst deleted file mode 100644 index 5afdc8e..0000000 --- a/docs/_autosummary/mdp_playground.spaces.discrete_extended.rst +++ /dev/null @@ -1,31 +0,0 @@ -mdp\_playground.spaces.discrete\_extended -========================================= - -.. automodule:: mdp_playground.spaces.discrete_extended - - - - - - - - - - - - .. rubric:: Classes - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - - DiscreteExtended - - - - - - - - - diff --git a/docs/_autosummary/mdp_playground.spaces.image_continuous.ImageContinuous.rst b/docs/_autosummary/mdp_playground.spaces.image_continuous.ImageContinuous.rst deleted file mode 100644 index e7c188d..0000000 --- a/docs/_autosummary/mdp_playground.spaces.image_continuous.ImageContinuous.rst +++ /dev/null @@ -1,34 +0,0 @@ -mdp\_playground.spaces.image\_continuous.ImageContinuous -======================================================== - -.. currentmodule:: mdp_playground.spaces.image_continuous - -.. autoclass:: ImageContinuous - :members: <-- add at least this line - :show-inheritance: <-- plus I want to show inheritance... - :inherited-members: <-- ...and inherited members too - - - .. automethod:: __init__ - - - .. rubric:: Methods - - .. autosummary:: - - ~ImageContinuous.__init__ - ~ImageContinuous.contains - ~ImageContinuous.convert_to_pixel - ~ImageContinuous.from_jsonable - ~ImageContinuous.generate_image - ~ImageContinuous.get_concatenated_image - ~ImageContinuous.is_bounded - ~ImageContinuous.sample - ~ImageContinuous.seed - ~ImageContinuous.to_jsonable - - - - - - \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.spaces.image_continuous.rst b/docs/_autosummary/mdp_playground.spaces.image_continuous.rst deleted file mode 100644 index 79292e9..0000000 --- a/docs/_autosummary/mdp_playground.spaces.image_continuous.rst +++ /dev/null @@ -1,31 +0,0 @@ -mdp\_playground.spaces.image\_continuous -======================================== - -.. automodule:: mdp_playground.spaces.image_continuous - - - - - - - - - - - - .. rubric:: Classes - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - - ImageContinuous - - - - - - - - - diff --git a/docs/_autosummary/mdp_playground.spaces.image_multi_discrete.ImageMultiDiscrete.rst b/docs/_autosummary/mdp_playground.spaces.image_multi_discrete.ImageMultiDiscrete.rst deleted file mode 100644 index 8759dc6..0000000 --- a/docs/_autosummary/mdp_playground.spaces.image_multi_discrete.ImageMultiDiscrete.rst +++ /dev/null @@ -1,33 +0,0 @@ -mdp\_playground.spaces.image\_multi\_discrete.ImageMultiDiscrete -================================================================ - -.. currentmodule:: mdp_playground.spaces.image_multi_discrete - -.. autoclass:: ImageMultiDiscrete - :members: <-- add at least this line - :show-inheritance: <-- plus I want to show inheritance... - :inherited-members: <-- ...and inherited members too - - - .. automethod:: __init__ - - - .. rubric:: Methods - - .. autosummary:: - - ~ImageMultiDiscrete.__init__ - ~ImageMultiDiscrete.contains - ~ImageMultiDiscrete.from_jsonable - ~ImageMultiDiscrete.generate_image - ~ImageMultiDiscrete.get_concatenated_image - ~ImageMultiDiscrete.is_bounded - ~ImageMultiDiscrete.sample - ~ImageMultiDiscrete.seed - ~ImageMultiDiscrete.to_jsonable - - - - - - \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.spaces.image_multi_discrete.rst b/docs/_autosummary/mdp_playground.spaces.image_multi_discrete.rst deleted file mode 100644 index 6c2c8c8..0000000 --- a/docs/_autosummary/mdp_playground.spaces.image_multi_discrete.rst +++ /dev/null @@ -1,31 +0,0 @@ -mdp\_playground.spaces.image\_multi\_discrete -============================================= - -.. automodule:: mdp_playground.spaces.image_multi_discrete - - - - - - - - - - - - .. rubric:: Classes - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - - ImageMultiDiscrete - - - - - - - - - diff --git a/docs/_autosummary/mdp_playground.spaces.multi_discrete_extended.MultiDiscreteExtended.rst b/docs/_autosummary/mdp_playground.spaces.multi_discrete_extended.MultiDiscreteExtended.rst deleted file mode 100644 index d3c6a7f..0000000 --- a/docs/_autosummary/mdp_playground.spaces.multi_discrete_extended.MultiDiscreteExtended.rst +++ /dev/null @@ -1,30 +0,0 @@ -mdp\_playground.spaces.multi\_discrete\_extended.MultiDiscreteExtended -====================================================================== - -.. currentmodule:: mdp_playground.spaces.multi_discrete_extended - -.. autoclass:: MultiDiscreteExtended - :members: <-- add at least this line - :show-inheritance: <-- plus I want to show inheritance... - :inherited-members: <-- ...and inherited members too - - - .. automethod:: __init__ - - - .. rubric:: Methods - - .. autosummary:: - - ~MultiDiscreteExtended.__init__ - ~MultiDiscreteExtended.contains - ~MultiDiscreteExtended.from_jsonable - ~MultiDiscreteExtended.sample - ~MultiDiscreteExtended.seed - ~MultiDiscreteExtended.to_jsonable - - - - - - \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.spaces.multi_discrete_extended.rst b/docs/_autosummary/mdp_playground.spaces.multi_discrete_extended.rst deleted file mode 100644 index d3a62d4..0000000 --- a/docs/_autosummary/mdp_playground.spaces.multi_discrete_extended.rst +++ /dev/null @@ -1,31 +0,0 @@ -mdp\_playground.spaces.multi\_discrete\_extended -================================================ - -.. automodule:: mdp_playground.spaces.multi_discrete_extended - - - - - - - - - - - - .. rubric:: Classes - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - - MultiDiscreteExtended - - - - - - - - - diff --git a/docs/_autosummary/mdp_playground.spaces.rst b/docs/_autosummary/mdp_playground.spaces.rst deleted file mode 100644 index 31538c8..0000000 --- a/docs/_autosummary/mdp_playground.spaces.rst +++ /dev/null @@ -1,39 +0,0 @@ -mdp\_playground.spaces -====================== - -.. automodule:: mdp_playground.spaces - - - - - - - - - - - - - - - - - - - -.. rubric:: Modules - -.. autosummary:: - :toctree: - :template: custom-module-template.rst - :recursive: - - mdp_playground.spaces.box_extended - mdp_playground.spaces.discrete_extended - mdp_playground.spaces.image_continuous - mdp_playground.spaces.image_multi_discrete - mdp_playground.spaces.multi_discrete_extended - mdp_playground.spaces.test_image_continuous - mdp_playground.spaces.test_image_multi_discrete - mdp_playground.spaces.tuple_extended - diff --git a/docs/_autosummary/mdp_playground.spaces.test_image_continuous.TestImageContinuous.rst b/docs/_autosummary/mdp_playground.spaces.test_image_continuous.TestImageContinuous.rst deleted file mode 100644 index d44cd67..0000000 --- a/docs/_autosummary/mdp_playground.spaces.test_image_continuous.TestImageContinuous.rst +++ /dev/null @@ -1,97 +0,0 @@ -mdp\_playground.spaces.test\_image\_continuous.TestImageContinuous -================================================================== - -.. currentmodule:: mdp_playground.spaces.test_image_continuous - -.. autoclass:: TestImageContinuous - :members: <-- add at least this line - :show-inheritance: <-- plus I want to show inheritance... - :inherited-members: <-- ...and inherited members too - - - .. automethod:: __init__ - - - .. rubric:: Methods - - .. autosummary:: - - ~TestImageContinuous.__init__ - ~TestImageContinuous.addCleanup - ~TestImageContinuous.addTypeEqualityFunc - ~TestImageContinuous.assertAlmostEqual - ~TestImageContinuous.assertAlmostEquals - ~TestImageContinuous.assertCountEqual - ~TestImageContinuous.assertDictContainsSubset - ~TestImageContinuous.assertDictEqual - ~TestImageContinuous.assertEqual - ~TestImageContinuous.assertEquals - ~TestImageContinuous.assertFalse - ~TestImageContinuous.assertGreater - ~TestImageContinuous.assertGreaterEqual - ~TestImageContinuous.assertIn - ~TestImageContinuous.assertIs - ~TestImageContinuous.assertIsInstance - ~TestImageContinuous.assertIsNone - ~TestImageContinuous.assertIsNot - ~TestImageContinuous.assertIsNotNone - ~TestImageContinuous.assertLess - ~TestImageContinuous.assertLessEqual - ~TestImageContinuous.assertListEqual - ~TestImageContinuous.assertLogs - ~TestImageContinuous.assertMultiLineEqual - ~TestImageContinuous.assertNotAlmostEqual - ~TestImageContinuous.assertNotAlmostEquals - ~TestImageContinuous.assertNotEqual - ~TestImageContinuous.assertNotEquals - ~TestImageContinuous.assertNotIn - ~TestImageContinuous.assertNotIsInstance - ~TestImageContinuous.assertNotRegex - ~TestImageContinuous.assertNotRegexpMatches - ~TestImageContinuous.assertRaises - ~TestImageContinuous.assertRaisesRegex - ~TestImageContinuous.assertRaisesRegexp - ~TestImageContinuous.assertRegex - ~TestImageContinuous.assertRegexpMatches - ~TestImageContinuous.assertSequenceEqual - ~TestImageContinuous.assertSetEqual - ~TestImageContinuous.assertTrue - ~TestImageContinuous.assertTupleEqual - ~TestImageContinuous.assertWarns - ~TestImageContinuous.assertWarnsRegex - ~TestImageContinuous.assert_ - ~TestImageContinuous.countTestCases - ~TestImageContinuous.debug - ~TestImageContinuous.defaultTestResult - ~TestImageContinuous.doCleanups - ~TestImageContinuous.fail - ~TestImageContinuous.failIf - ~TestImageContinuous.failIfAlmostEqual - ~TestImageContinuous.failIfEqual - ~TestImageContinuous.failUnless - ~TestImageContinuous.failUnlessAlmostEqual - ~TestImageContinuous.failUnlessEqual - ~TestImageContinuous.failUnlessRaises - ~TestImageContinuous.id - ~TestImageContinuous.run - ~TestImageContinuous.setUp - ~TestImageContinuous.setUpClass - ~TestImageContinuous.shortDescription - ~TestImageContinuous.skipTest - ~TestImageContinuous.subTest - ~TestImageContinuous.tearDown - ~TestImageContinuous.tearDownClass - ~TestImageContinuous.test_image_continuous - - - - - - .. rubric:: Attributes - - .. autosummary:: - - ~TestImageContinuous.longMessage - ~TestImageContinuous.maxDiff - - \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.spaces.test_image_continuous.rst b/docs/_autosummary/mdp_playground.spaces.test_image_continuous.rst deleted file mode 100644 index fe148bd..0000000 --- a/docs/_autosummary/mdp_playground.spaces.test_image_continuous.rst +++ /dev/null @@ -1,31 +0,0 @@ -mdp\_playground.spaces.test\_image\_continuous -============================================== - -.. automodule:: mdp_playground.spaces.test_image_continuous - - - - - - - - - - - - .. rubric:: Classes - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - - TestImageContinuous - - - - - - - - - diff --git a/docs/_autosummary/mdp_playground.spaces.test_image_multi_discrete.TestImageMultiDiscrete.rst b/docs/_autosummary/mdp_playground.spaces.test_image_multi_discrete.TestImageMultiDiscrete.rst deleted file mode 100644 index 227f542..0000000 --- a/docs/_autosummary/mdp_playground.spaces.test_image_multi_discrete.TestImageMultiDiscrete.rst +++ /dev/null @@ -1,97 +0,0 @@ -mdp\_playground.spaces.test\_image\_multi\_discrete.TestImageMultiDiscrete -========================================================================== - -.. currentmodule:: mdp_playground.spaces.test_image_multi_discrete - -.. autoclass:: TestImageMultiDiscrete - :members: <-- add at least this line - :show-inheritance: <-- plus I want to show inheritance... - :inherited-members: <-- ...and inherited members too - - - .. automethod:: __init__ - - - .. rubric:: Methods - - .. autosummary:: - - ~TestImageMultiDiscrete.__init__ - ~TestImageMultiDiscrete.addCleanup - ~TestImageMultiDiscrete.addTypeEqualityFunc - ~TestImageMultiDiscrete.assertAlmostEqual - ~TestImageMultiDiscrete.assertAlmostEquals - ~TestImageMultiDiscrete.assertCountEqual - ~TestImageMultiDiscrete.assertDictContainsSubset - ~TestImageMultiDiscrete.assertDictEqual - ~TestImageMultiDiscrete.assertEqual - ~TestImageMultiDiscrete.assertEquals - ~TestImageMultiDiscrete.assertFalse - ~TestImageMultiDiscrete.assertGreater - ~TestImageMultiDiscrete.assertGreaterEqual - ~TestImageMultiDiscrete.assertIn - ~TestImageMultiDiscrete.assertIs - ~TestImageMultiDiscrete.assertIsInstance - ~TestImageMultiDiscrete.assertIsNone - ~TestImageMultiDiscrete.assertIsNot - ~TestImageMultiDiscrete.assertIsNotNone - ~TestImageMultiDiscrete.assertLess - ~TestImageMultiDiscrete.assertLessEqual - ~TestImageMultiDiscrete.assertListEqual - ~TestImageMultiDiscrete.assertLogs - ~TestImageMultiDiscrete.assertMultiLineEqual - ~TestImageMultiDiscrete.assertNotAlmostEqual - ~TestImageMultiDiscrete.assertNotAlmostEquals - ~TestImageMultiDiscrete.assertNotEqual - ~TestImageMultiDiscrete.assertNotEquals - ~TestImageMultiDiscrete.assertNotIn - ~TestImageMultiDiscrete.assertNotIsInstance - ~TestImageMultiDiscrete.assertNotRegex - ~TestImageMultiDiscrete.assertNotRegexpMatches - ~TestImageMultiDiscrete.assertRaises - ~TestImageMultiDiscrete.assertRaisesRegex - ~TestImageMultiDiscrete.assertRaisesRegexp - ~TestImageMultiDiscrete.assertRegex - ~TestImageMultiDiscrete.assertRegexpMatches - ~TestImageMultiDiscrete.assertSequenceEqual - ~TestImageMultiDiscrete.assertSetEqual - ~TestImageMultiDiscrete.assertTrue - ~TestImageMultiDiscrete.assertTupleEqual - ~TestImageMultiDiscrete.assertWarns - ~TestImageMultiDiscrete.assertWarnsRegex - ~TestImageMultiDiscrete.assert_ - ~TestImageMultiDiscrete.countTestCases - ~TestImageMultiDiscrete.debug - ~TestImageMultiDiscrete.defaultTestResult - ~TestImageMultiDiscrete.doCleanups - ~TestImageMultiDiscrete.fail - ~TestImageMultiDiscrete.failIf - ~TestImageMultiDiscrete.failIfAlmostEqual - ~TestImageMultiDiscrete.failIfEqual - ~TestImageMultiDiscrete.failUnless - ~TestImageMultiDiscrete.failUnlessAlmostEqual - ~TestImageMultiDiscrete.failUnlessEqual - ~TestImageMultiDiscrete.failUnlessRaises - ~TestImageMultiDiscrete.id - ~TestImageMultiDiscrete.run - ~TestImageMultiDiscrete.setUp - ~TestImageMultiDiscrete.setUpClass - ~TestImageMultiDiscrete.shortDescription - ~TestImageMultiDiscrete.skipTest - ~TestImageMultiDiscrete.subTest - ~TestImageMultiDiscrete.tearDown - ~TestImageMultiDiscrete.tearDownClass - ~TestImageMultiDiscrete.test_image_multi_discrete - - - - - - .. rubric:: Attributes - - .. autosummary:: - - ~TestImageMultiDiscrete.longMessage - ~TestImageMultiDiscrete.maxDiff - - \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.spaces.test_image_multi_discrete.rst b/docs/_autosummary/mdp_playground.spaces.test_image_multi_discrete.rst deleted file mode 100644 index c6cda6e..0000000 --- a/docs/_autosummary/mdp_playground.spaces.test_image_multi_discrete.rst +++ /dev/null @@ -1,31 +0,0 @@ -mdp\_playground.spaces.test\_image\_multi\_discrete -=================================================== - -.. automodule:: mdp_playground.spaces.test_image_multi_discrete - - - - - - - - - - - - .. rubric:: Classes - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - - TestImageMultiDiscrete - - - - - - - - - diff --git a/docs/_autosummary/mdp_playground.spaces.tuple_extended.TupleExtended.rst b/docs/_autosummary/mdp_playground.spaces.tuple_extended.TupleExtended.rst deleted file mode 100644 index d6a2459..0000000 --- a/docs/_autosummary/mdp_playground.spaces.tuple_extended.TupleExtended.rst +++ /dev/null @@ -1,30 +0,0 @@ -mdp\_playground.spaces.tuple\_extended.TupleExtended -==================================================== - -.. currentmodule:: mdp_playground.spaces.tuple_extended - -.. autoclass:: TupleExtended - :members: <-- add at least this line - :show-inheritance: <-- plus I want to show inheritance... - :inherited-members: <-- ...and inherited members too - - - .. automethod:: __init__ - - - .. rubric:: Methods - - .. autosummary:: - - ~TupleExtended.__init__ - ~TupleExtended.contains - ~TupleExtended.from_jsonable - ~TupleExtended.sample - ~TupleExtended.seed - ~TupleExtended.to_jsonable - - - - - - \ No newline at end of file diff --git a/docs/_autosummary/mdp_playground.spaces.tuple_extended.rst b/docs/_autosummary/mdp_playground.spaces.tuple_extended.rst deleted file mode 100644 index 90f83a6..0000000 --- a/docs/_autosummary/mdp_playground.spaces.tuple_extended.rst +++ /dev/null @@ -1,31 +0,0 @@ -mdp\_playground.spaces.tuple\_extended -====================================== - -.. automodule:: mdp_playground.spaces.tuple_extended - - - - - - - - - - - - .. rubric:: Classes - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - - TupleExtended - - - - - - - - - diff --git a/docs/_build/html/.buildinfo b/docs/_build/html/.buildinfo deleted file mode 100644 index 1c7edee..0000000 --- a/docs/_build/html/.buildinfo +++ /dev/null @@ -1,4 +0,0 @@ -# Sphinx build info version 1 -# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 185e69c94084cc36deaf82255007067e -tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/_build/html/.nojekyll b/docs/_build/html/.nojekyll deleted file mode 100644 index e69de29..0000000 diff --git a/docs/_build/html/_autosummary/mdp_playground.analysis.analysis.MDPP_Analysis.html b/docs/_build/html/_autosummary/mdp_playground.analysis.analysis.MDPP_Analysis.html deleted file mode 100644 index aee6d07..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.analysis.analysis.MDPP_Analysis.html +++ /dev/null @@ -1,699 +0,0 @@ - - - - - - - - mdp_playground.analysis.analysis.MDPP_Analysis — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.analysis.analysis.MDPP_Analysis

-
-
-class mdp_playground.analysis.analysis.MDPP_Analysis[source]
-

Bases: object

-

Utility class to load and plot data for analysis of experiments from MDP Playground

-
-
-__init__()[source]
-

Initialize self. See help(type(self)) for accurate signature.

-
- -

Methods

- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

__init__()

Initialize self.

gather_stats(list_exp_data, train, …)

get_exp_data(dir_name, exp_name[, exp_type, …])

Get training and evaluation data from a single set of recorded CSV stats files.

load_data(experiments[, load_eval, exp_type])

Loads training and evaluation data from given multiple files

plot_1d_dimensions(list_exp_data[, …])

Plots 1-D bar plots across a single dimension with mean and std.

plot_2d_heatmap(list_exp_data[, save_fig, …])

Plots 2 2-D heatmaps: 1 for mean and 1 for std.

plot_bar(ax, stats_data[, save_fig, …])

Plots 1-D bar plots across a single dimension with mean and std.

plot_learning_curves(list_exp_data[, …])

Plots learning curves: Either across 1 or 2 meta-features of MDP Playground.

plot_radar(list_exp_data[, save_fig, train, …])

Plots radar (spider) chart across different dimensions

-
-
-get_exp_data(dir_name, exp_name, exp_type='grid', num_metrics=3, load_eval=True, threshold=0.05, sample_freq=1)[source]
-

Get training and evaluation data from a single set of recorded CSV stats files.

-
-
Parameters
-
    -
  • dir_name (str) – The location where the training and evaluation CSV files were written

  • -
  • exp_name (str) – The name of the experiment: the training and evaluation CSV filenames are formed using this string

  • -
  • exp_type (str) – One of [‘grid’, ‘random’]. If it’s ‘grid’, it’s assumed that a grid of configurations was run and data loading takes place in a manner specific to grids. Otherwise, data loading tries to look for different unique configurations run.

  • -
  • num_metrics (int) – The number of metrics that were written to CSV stats files. Default is 3 (timesteps_total, episode_reward_mean, episode_len_mean).

  • -
  • load_eval (bool) – Whether to load evaluation stats CSV or not.

  • -
  • threshold (float) – The fault tolerance threshold while loading data. Show warnings for files where the number of data rows deviates by more than the threshold value (from the mean number of rows across the loaded files), e.g., if the threshold = 0.05 and mean number of rows across the loaded files = 20, a warning is displayed when for a loaded file the number of rows < 19.

  • -
  • sample_freq (int) – The subsampling frequency when loading data. Sub-select data lines based on this value, e.g., if sample_freq = 5, load every 5th row in a file.

  • -
-
-
Returns
-

    -
  • experiment data (dictionary type with following key-value)

  • -
  • train_stats (np.ndarray) – Training stats at end of training: 8-D tensor with 1st 6 dims the meta-features of MDP Playground, 7th dim is across the seeds, 8th dim is across different stats saved

  • -
  • eval_stats (np.ndarray) – Training stats at end of training: 8-D tensor with 1st 6 dims the meta-features of MDP Playground, 7th dim is across the seeds, 8th dim is across different stats saved

  • -
  • train_curves (np.ndarray) – The loaded training CSV with the last 3 columns the train stats that were saved and the initial columns are various setting for the algorithm and environment.

  • -
  • eval_curves (np.ndarray) – The loaded evaluation CSV with the columns the evaluation stats that were saved

  • -
-

-
-
-
- -
-
-load_data(experiments: dict, load_eval=True, exp_type='grid')[source]
-

Loads training and evaluation data from given multiple files

-
-
Parameters
-

experiments (dict<str,str>) –

per experiment -> key-value pair of exp_name & dir_name

-
-
dir_namestr

The location where the training and evaluation CSV files were written

-
-
exp_namestr

The name of the experiment: the training and evaluation CSV filenames are formed using this string

-
-
eg: experiments = {
-
-

}

-
-
-

-
-
Returns
-

    -
  • list of experiment data of type <dict>

  • -
  • [ for more details refer get_exp_data() ]

  • -
-

-
-
-
- -
-
-plot_1d_dimensions(list_exp_data, save_fig=False, train=True, use_aucs=False, metric_num=- 2, plot_type='agent')[source]
-

Plots 1-D bar plots across a single dimension with mean and std. dev.

-
-
Parameters
-
    -
  • list_exp_data (list of experiment data of type <dict>) – [ for more details refer load_data(), get_exp_data() ]

  • -
  • save_fig (bool, optional) – A flag used to save a PDF (default is False)

  • -
  • train (bool, optional) – A flag used to insert either _train or _eval in the filename of the PDF (default is True)

  • -
  • use_aucs (bool, optional) – A flag used to insert _aucs in the filename of the PDF (default is False)

  • -
  • metric_num

    -
    allowed values-> ‘-1’ to plot episode mean lengths

    ’-2’ to plot episode reward

    -
    -
    -

  • -
  • plot_type (string describing how to group data and plot, say based on agent or metric) – allowed values-> [‘agent’ ,’metric’]

  • -
-
-
-
- -
-
-plot_2d_heatmap(list_exp_data, save_fig=False, train=True, metric_num=- 2)[source]
-

Plots 2 2-D heatmaps: 1 for mean and 1 for std. dev. across 2 meta-features of MDP Playground

-
-
Parameters
-
    -
  • list_exp_data (list of experiment data of type <dict>) – [ for more details refer load_data(), get_exp_data() ]

  • -
  • save_fig (bool, optional) – A flag used to save a PDF (default is False)

  • -
  • train (bool, optional) – A flag used to insert either _train or _eval in the filename of the PDF (default is True)

  • -
-
-
-
- -
-
-plot_bar(ax, stats_data, save_fig=False, metric_num=- 2, bar_color='blue')[source]
-

Plots 1-D bar plots across a single dimension with mean and std. dev.

-
-
Parameters
-
    -
  • ax (matplotlib axes instance to plot) –

  • -
  • stats_data (dictionary type with data related to ['train_stats', 'eval_stats', ..]) – [ for more details refer load_data(), get_exp_data() ]

  • -
  • save_fig (bool, optional) – A flag used to save a PDF (default is False)

  • -
  • metric_num

    -
    allowed values-> ‘-1’ to plot episode mean lengths

    ’-2’ to plot episode reward

    -
    -
    -

  • -
  • bar_color (the color of bars in plots) –

  • -
-
-
-
- -
-
-plot_learning_curves(list_exp_data, save_fig=False, train=True, metric_num=- 2)[source]
-

Plots learning curves: Either across 1 or 2 meta-features of MDP Playground. Different colours represent learning curves for different seeds.

-
-
Parameters
-
    -
  • list_exp_data (list of experiment data of type <dict>) – [ for more details refer load_data(), get_exp_data() ]

  • -
  • save_fig (bool, optional) – A flag used to save a PDF (default is False)

  • -
  • train (bool, optional) – A flag used to insert either _train or _eval in the filename of the PDF (default is True)

  • -
-
-
-
- -
-
-plot_radar(list_exp_data, save_fig=False, train=True, metric_num=- 2, plot_type='agent', weights={}, use_aucs=False)[source]
-

Plots radar (spider) chart across different dimensions

-
-
Parameters
-
    -
  • list_exp_data (list of experiment data of type <dict>) – [ for more details refer load_data(), get_exp_data() ]

  • -
  • save_fig (bool, optional) – A flag used to save a PDF (default is False)

  • -
  • train (bool, optional) – A flag used to insert either _train or _eval in the filename of the PDF (default is True)

  • -
  • metric_num

    -
    allowed values-> ‘-1’ to plot episode mean lengths

    ’-2’ to plot episode reward

    -
    -
    -

  • -
  • use_aucs (bool, optional) – A flag used to insert _aucs in the filename of the PDF (default is False)

  • -
  • plot_type (string describing how to group data and plot, say based on agent or metric) – allowed values-> [‘agent’ ,’metric’]

  • -
  • weights (dictionary of weights associated per dimension (plot_type) data) – eg weights[‘reward_noise’] = [.25, .25, .25, .25]

  • -
-
-
-
- -
- -
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.analysis.analysis.html b/docs/_build/html/_autosummary/mdp_playground.analysis.analysis.html deleted file mode 100644 index ebf9e51..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.analysis.analysis.html +++ /dev/null @@ -1,508 +0,0 @@ - - - - - - - - mdp_playground.analysis.analysis — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.analysis.analysis

-

Classes

- ---- - - - - - -

MDPP_Analysis()

Utility class to load and plot data for analysis of experiments from MDP Playground

-
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.analysis.html b/docs/_build/html/_autosummary/mdp_playground.analysis.html deleted file mode 100644 index 9e60347..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.analysis.html +++ /dev/null @@ -1,511 +0,0 @@ - - - - - - - - mdp_playground.analysis — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.analysis

-

Modules

- ---- - - - - - - - - -

mdp_playground.analysis.analysis

mdp_playground.analysis.radar_chart

-
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.analysis.radar_chart.html b/docs/_build/html/_autosummary/mdp_playground.analysis.radar_chart.html deleted file mode 100644 index cebec5b..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.analysis.radar_chart.html +++ /dev/null @@ -1,508 +0,0 @@ - - - - - - - - mdp_playground.analysis.radar_chart — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.analysis.radar_chart

-

Functions

- ---- - - - - - -

radar_factory(num_vars[, frame])

Create a radar chart with num_vars axes.

-
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.analysis.radar_chart.radar_factory.html b/docs/_build/html/_autosummary/mdp_playground.analysis.radar_chart.radar_factory.html deleted file mode 100644 index 0512eed..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.analysis.radar_chart.radar_factory.html +++ /dev/null @@ -1,512 +0,0 @@ - - - - - - - - mdp_playground.analysis.radar_chart.radar_factory — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.analysis.radar_chart.radar_factory

-
-
-mdp_playground.analysis.radar_chart.radar_factory(num_vars, frame='circle')[source]
-

Create a radar chart with num_vars axes.

-

This function creates a RadarAxes projection and registers it. -reference: https://matplotlib.org/3.1.0/gallery/specialty_plots/radar_chart.html

-
-
Parameters
-
    -
  • num_vars (int) – Number of variables for radar chart.

  • -
  • frame ({'circle' | 'polygon'}) – Shape of frame surrounding axes.

  • -
-
-
-
- -
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.combined_processing.html b/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.combined_processing.html deleted file mode 100644 index cdbc93a..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.combined_processing.html +++ /dev/null @@ -1,505 +0,0 @@ - - - - - - - - mdp_playground.config_processor.config_processor.combined_processing — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.config_processor.config_processor.combined_processing

-
-
-mdp_playground.config_processor.config_processor.combined_processing(*static_configs, varying_configs, framework='ray', algorithm)[source]
-

varying_configs is a list of dict of dicts with structure of each element -in the list as: {

-
-

“env”: {…} -“agent”: {…} -“model”: {…}

-
-

}

-
- -
- - -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.create_config_space_from_config_dict.html b/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.create_config_space_from_config_dict.html deleted file mode 100644 index 3a894c0..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.create_config_space_from_config_dict.html +++ /dev/null @@ -1,497 +0,0 @@ - - - - - - - - mdp_playground.config_processor.config_processor.create_config_space_from_config_dict — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.config_processor.config_processor.create_config_space_from_config_dict

-
-
-mdp_playground.config_processor.config_processor.create_config_space_from_config_dict(config_dict)[source]
-
- -
- - -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_atari.html b/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_atari.html deleted file mode 100644 index 4c1bcb1..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_atari.html +++ /dev/null @@ -1,497 +0,0 @@ - - - - - - - - mdp_playground.config_processor.config_processor.create_gym_env_wrapper_atari — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.config_processor.config_processor.create_gym_env_wrapper_atari

-
-
-mdp_playground.config_processor.config_processor.create_gym_env_wrapper_atari(config)[source]
-
- -
- - -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_frame_stack_atari.html b/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_frame_stack_atari.html deleted file mode 100644 index 1067e30..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_frame_stack_atari.html +++ /dev/null @@ -1,498 +0,0 @@ - - - - - - - - mdp_playground.config_processor.config_processor.create_gym_env_wrapper_frame_stack_atari — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.config_processor.config_processor.create_gym_env_wrapper_frame_stack_atari

-
-
-mdp_playground.config_processor.config_processor.create_gym_env_wrapper_frame_stack_atari(config)[source]
-

When using frameStack GymEnvWrapper should wrap AtariEnv using wrap_deepmind_ray and therefore this function sets “wrap_deepmind_ray”: True and ‘frame_skip’: 1 inside config so as to keep config same as for create_gym_env_wrapper_atari above and reduce manual errors when switching between the 2.

-
- -
- - -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_mujoco_wrapper.html b/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_mujoco_wrapper.html deleted file mode 100644 index 16a747d..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_mujoco_wrapper.html +++ /dev/null @@ -1,498 +0,0 @@ - - - - - - - - mdp_playground.config_processor.config_processor.create_gym_env_wrapper_mujoco_wrapper — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.config_processor.config_processor.create_gym_env_wrapper_mujoco_wrapper

-
-
-mdp_playground.config_processor.config_processor.create_gym_env_wrapper_mujoco_wrapper(config, wrapped_mujoco_env)[source]
-

Creates a GymEnvWrapper around a MujocoEnvWrapper

-
- -
- - -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.deepmerge.html b/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.deepmerge.html deleted file mode 100644 index 9f1344d..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.deepmerge.html +++ /dev/null @@ -1,503 +0,0 @@ - - - - - - - - mdp_playground.config_processor.config_processor.deepmerge — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.config_processor.config_processor.deepmerge

-
-
-mdp_playground.config_processor.config_processor.deepmerge(a, b, path=None, overwrite=True)[source]
-

Merges dict b into dict a

-
-
overwritebool

Overwrites value in a with value in b if True with a warning, else raises Exception

-
-
-

Based on: https://stackoverflow.com/questions/7204805/how-to-merge-dictionaries-of-dictionaries/7205107#7205107

-
- -
- - -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.deepmerge_multiple_dicts.html b/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.deepmerge_multiple_dicts.html deleted file mode 100644 index 8d2d4b1..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.deepmerge_multiple_dicts.html +++ /dev/null @@ -1,497 +0,0 @@ - - - - - - - - mdp_playground.config_processor.config_processor.deepmerge_multiple_dicts — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.config_processor.config_processor.deepmerge_multiple_dicts

-
-
-mdp_playground.config_processor.config_processor.deepmerge_multiple_dicts(*configs, overwrite=True)[source]
-
- -
- - -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.get_grid_of_configs.html b/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.get_grid_of_configs.html deleted file mode 100644 index 78b2ebb..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.get_grid_of_configs.html +++ /dev/null @@ -1,497 +0,0 @@ - - - - - - - - mdp_playground.config_processor.config_processor.get_grid_of_configs — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.config_processor.config_processor.get_grid_of_configs

-
-
-mdp_playground.config_processor.config_processor.get_grid_of_configs(var_configs)[source]
-
- -
- - -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.get_list_of_varying_configs.html b/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.get_list_of_varying_configs.html deleted file mode 100644 index 5ff0ba2..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.get_list_of_varying_configs.html +++ /dev/null @@ -1,502 +0,0 @@ - - - - - - - - mdp_playground.config_processor.config_processor.get_list_of_varying_configs — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.config_processor.config_processor.get_list_of_varying_configs

-
-
-mdp_playground.config_processor.config_processor.get_list_of_varying_configs(var_configs, mode='grid', num_configs=None)[source]
-
-
var_configs: dict of dicts of lists as values

A dict of dicts with lists as the leaf values to allow each -configuration option to take multiple possible values.

-
-
-
- -
- - -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.get_random_configs.html b/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.get_random_configs.html deleted file mode 100644 index c6863a5..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.get_random_configs.html +++ /dev/null @@ -1,504 +0,0 @@ - - - - - - - - mdp_playground.config_processor.config_processor.get_random_configs — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.config_processor.config_processor.get_random_configs

-
-
-mdp_playground.config_processor.config_processor.get_random_configs(var_configs, num_configs)[source]
-
-
var_configs: dict of dicts of strings or tuples as values

A dict of dicts with strings or tuples as the leaf values which encode -a ConfigSpace.

-
-
-

#TODO Currently num_configs is fixed for each config_type (env, agent or -model) for this and get_sobol_configs()

-
- -
- - -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.html b/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.html deleted file mode 100644 index ea54659..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.html +++ /dev/null @@ -1,552 +0,0 @@ - - - - - - - - mdp_playground.config_processor.config_processor — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.config_processor.config_processor

-

Functions

- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

combined_processing(*static_configs, …[, …])

varying_configs is a list of dict of dicts with structure of each element in the list as: { “env”: {…} “agent”: {…} “model”: {…} }

create_config_space_from_config_dict(config_dict)

create_gym_env_wrapper_atari(config)

create_gym_env_wrapper_frame_stack_atari(config)

When using frameStack GymEnvWrapper should wrap AtariEnv using wrap_deepmind_ray and therefore this function sets “wrap_deepmind_ray”: True and ‘frame_skip’: 1 inside config so as to keep config same as for create_gym_env_wrapper_atari above and reduce manual errors when switching between the 2.

create_gym_env_wrapper_mujoco_wrapper(…)

Creates a GymEnvWrapper around a MujocoEnvWrapper

deepmerge(a, b[, path, overwrite])

Merges dict b into dict a

deepmerge_multiple_dicts(*configs[, overwrite])

get_grid_of_configs(var_configs)

get_list_of_varying_configs(var_configs[, …])

var_configs: dict of dicts of lists as values

get_random_configs(var_configs, num_configs)

var_configs: dict of dicts of strings or tuples as values

init_ray(**kwargs)

init_stats_file(stats_file_name, …)

post_processing([framework])

process_configs(config_file, …[, …])

setup_ray(config, config_num, log_level, …)

setup_ray_callbacks(stats_file_prefix, …)

sobol_configs_from_config_dict(var_configs, …)

-
- - -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.init_ray.html b/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.init_ray.html deleted file mode 100644 index c322f89..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.init_ray.html +++ /dev/null @@ -1,497 +0,0 @@ - - - - - - - - mdp_playground.config_processor.config_processor.init_ray — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.config_processor.config_processor.init_ray

-
-
-mdp_playground.config_processor.config_processor.init_ray(**kwargs)[source]
-
- -
- - -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.init_stats_file.html b/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.init_stats_file.html deleted file mode 100644 index 9a2453c..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.init_stats_file.html +++ /dev/null @@ -1,497 +0,0 @@ - - - - - - - - mdp_playground.config_processor.config_processor.init_stats_file — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.config_processor.config_processor.init_stats_file

-
-
-mdp_playground.config_processor.config_processor.init_stats_file(stats_file_name, columns_to_write)[source]
-
- -
- - -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.post_processing.html b/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.post_processing.html deleted file mode 100644 index 4f27838..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.post_processing.html +++ /dev/null @@ -1,497 +0,0 @@ - - - - - - - - mdp_playground.config_processor.config_processor.post_processing — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.config_processor.config_processor.post_processing

-
-
-mdp_playground.config_processor.config_processor.post_processing(framework='ray')[source]
-
- -
- - -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.process_configs.html b/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.process_configs.html deleted file mode 100644 index 06450d8..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.process_configs.html +++ /dev/null @@ -1,497 +0,0 @@ - - - - - - - - mdp_playground.config_processor.config_processor.process_configs — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.config_processor.config_processor.process_configs

-
-
-mdp_playground.config_processor.config_processor.process_configs(config_file, stats_file_prefix, config_num, log_level, framework='ray', framework_dir='/tmp/ray')[source]
-
- -
- - -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.setup_ray.html b/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.setup_ray.html deleted file mode 100644 index 04a8945..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.setup_ray.html +++ /dev/null @@ -1,497 +0,0 @@ - - - - - - - - mdp_playground.config_processor.config_processor.setup_ray — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.config_processor.config_processor.setup_ray

-
-
-mdp_playground.config_processor.config_processor.setup_ray(config, config_num, log_level, framework_dir)[source]
-
- -
- - -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.setup_ray_callbacks.html b/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.setup_ray_callbacks.html deleted file mode 100644 index 572df19..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.setup_ray_callbacks.html +++ /dev/null @@ -1,497 +0,0 @@ - - - - - - - - mdp_playground.config_processor.config_processor.setup_ray_callbacks — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.config_processor.config_processor.setup_ray_callbacks

-
-
-mdp_playground.config_processor.config_processor.setup_ray_callbacks(stats_file_prefix, variable_configs_deepcopy, hacky_timesteps_total, config_algorithm)[source]
-
- -
- - -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.sobol_configs_from_config_dict.html b/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.sobol_configs_from_config_dict.html deleted file mode 100644 index 183cb42..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.config_processor.config_processor.sobol_configs_from_config_dict.html +++ /dev/null @@ -1,497 +0,0 @@ - - - - - - - - mdp_playground.config_processor.config_processor.sobol_configs_from_config_dict — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.config_processor.config_processor.sobol_configs_from_config_dict

-
-
-mdp_playground.config_processor.config_processor.sobol_configs_from_config_dict(var_configs, num_configs)[source]
-
- -
- - -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.config_processor.html b/docs/_build/html/_autosummary/mdp_playground.config_processor.html deleted file mode 100644 index fa1a610..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.config_processor.html +++ /dev/null @@ -1,508 +0,0 @@ - - - - - - - - mdp_playground.config_processor — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.config_processor

-

Modules

- ---- - - - - - -

mdp_playground.config_processor.config_processor

-
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.envs.gym_env_wrapper.GymEnvWrapper.html b/docs/_build/html/_autosummary/mdp_playground.envs.gym_env_wrapper.GymEnvWrapper.html deleted file mode 100644 index 9f25458..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.envs.gym_env_wrapper.GymEnvWrapper.html +++ /dev/null @@ -1,678 +0,0 @@ - - - - - - - - mdp_playground.envs.gym_env_wrapper.GymEnvWrapper — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.envs.gym_env_wrapper.GymEnvWrapper

-
-
-class mdp_playground.envs.gym_env_wrapper.GymEnvWrapper(env, **config)[source]
-

Bases: gym.core.Env

-

Wraps an OpenAI Gym environment to be able to modify its dimensions corresponding to MDP Playground. The documentation for the supported dimensions below can be found in mdp_playground/envs/rl_toy_env.py.

-
-
Currently supported dimensions:

transition noise (discrete) -reward delay -reward noise

-
-
-

Also supports wrapping with AtariPreprocessing from OpenAI Gym or wrap_deepmind from Ray Rllib.

-
-
-__init__(env, **config)[source]
-

Initialize self. See help(type(self)) for accurate signature.

-
- -

Methods

- ---- - - - - - - - - - - - - - - - - - - - - -

__init__(env, **config)

Initialize self.

close()

Override close in your subclass to perform any necessary cleanup.

render([mode])

Renders the environment.

reset()

Resets the state of the environment and returns an initial observation.

seed([seed])

Initialises the Numpy RNG for the environment by calling a utility for this in Gym.

step(action)

Run one timestep of the environment’s dynamics.

-

Attributes

- ---- - - - - - - - - - - - - - - - - - - - - -

action_space

metadata

observation_space

reward_range

spec

unwrapped

Completely unwrap this env.

-
-
-close()
-

Override close in your subclass to perform any necessary cleanup.

-

Environments will automatically close() themselves when -garbage collected or when the program exits.

-
- -
-
-render(mode='human')
-

Renders the environment.

-

The set of supported modes varies per environment. (And some -environments do not support rendering at all.) By convention, -if mode is:

-
    -
  • human: render to the current display or terminal and -return nothing. Usually for human consumption.

  • -
  • rgb_array: Return an numpy.ndarray with shape (x, y, 3), -representing RGB values for an x-by-y pixel image, suitable -for turning into a video.

  • -
  • ansi: Return a string (str) or StringIO.StringIO containing a -terminal-style text representation. The text can include newlines -and ANSI escape sequences (e.g. for colors).

  • -
-
-
Note:
-
Make sure that your class’s metadata ‘render.modes’ key includes

the list of supported modes. It’s recommended to call super() -in implementations to use the functionality of this method.

-
-
-
-
Args:

mode (str): the mode to render with

-
-
-

Example:

-
-
class MyEnv(Env):

metadata = {‘render.modes’: [‘human’, ‘rgb_array’]}

-
-
def render(self, mode=’human’):
-
if mode == ‘rgb_array’:

return np.array(…) # return RGB frame suitable for video

-
-
elif mode == ‘human’:

… # pop up a window and render

-
-
else:

super(MyEnv, self).render(mode=mode) # just raise an exception

-
-
-
-
-
-
-
- -
-
-reset()[source]
-

Resets the state of the environment and returns an initial observation.

-
-
Returns:

observation (object): the initial observation.

-
-
-
- -
-
-seed(seed=None)[source]
-

Initialises the Numpy RNG for the environment by calling a utility for this in Gym.

-
-
Parameters
-

seed (int) – seed to initialise the np_random instance held by the environment. Cannot use numpy.int64 or similar because Gym doesn’t accept it.

-
-
Returns
-

The seed returned by Gym

-
-
Return type
-

int

-
-
-
- -
-
-step(action)[source]
-

Run one timestep of the environment’s dynamics. When end of -episode is reached, you are responsible for calling reset() -to reset this environment’s state.

-

Accepts an action and returns a tuple (observation, reward, done, info).

-
-
Args:

action (object): an action provided by the agent

-
-
Returns:

observation (object): agent’s observation of the current environment -reward (float) : amount of reward returned after previous action -done (bool): whether the episode has ended, in which case further step() calls will return undefined results -info (dict): contains auxiliary diagnostic information (helpful for debugging, and sometimes learning)

-
-
-
- -
-
-property unwrapped
-

Completely unwrap this env.

-
-
Returns:

gym.Env: The base non-wrapped gym.Env instance

-
-
-
- -
- -
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.envs.gym_env_wrapper.html b/docs/_build/html/_autosummary/mdp_playground.envs.gym_env_wrapper.html deleted file mode 100644 index cc05661..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.envs.gym_env_wrapper.html +++ /dev/null @@ -1,508 +0,0 @@ - - - - - - - - mdp_playground.envs.gym_env_wrapper — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.envs.gym_env_wrapper

-

Classes

- ---- - - - - - -

GymEnvWrapper(env, **config)

Wraps an OpenAI Gym environment to be able to modify its dimensions corresponding to MDP Playground.

-
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.envs.html b/docs/_build/html/_autosummary/mdp_playground.envs.html deleted file mode 100644 index 4dbd646..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.envs.html +++ /dev/null @@ -1,514 +0,0 @@ - - - - - - - - mdp_playground.envs — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
- -
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.envs.mujoco_env_wrapper.get_mujoco_wrapper.html b/docs/_build/html/_autosummary/mdp_playground.envs.mujoco_env_wrapper.get_mujoco_wrapper.html deleted file mode 100644 index abaace0..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.envs.mujoco_env_wrapper.get_mujoco_wrapper.html +++ /dev/null @@ -1,508 +0,0 @@ - - - - - - - - mdp_playground.envs.mujoco_env_wrapper.get_mujoco_wrapper — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.envs.mujoco_env_wrapper.get_mujoco_wrapper

-
-
-mdp_playground.envs.mujoco_env_wrapper.get_mujoco_wrapper(base_class)[source]
-

Wraps a mujoco-py environment to be able to modify its XML attributes and inject the dimensions from MDP Playground. The values for these dimensions are passed in a config dict as for mdp_playground.envs.RLToyEnv.

-
-
Currently supported dimensions:

time_unit -action_space_max

-
-
-

For both of these dimensions the scalar value passed in the dict is used to multiply the base environments values. For the Mujoco envs, the time_unit is achieved by multiplying the Gym Mujoco env’s frame_skip and thus needs to be such that time_unit * frame_skip is an integer. The time_unit is NOT achieved by changing Mujoco’s timestep because that would change the numerical integration done my Mujoco.

-
- -
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.envs.mujoco_env_wrapper.html b/docs/_build/html/_autosummary/mdp_playground.envs.mujoco_env_wrapper.html deleted file mode 100644 index 3acfcca..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.envs.mujoco_env_wrapper.html +++ /dev/null @@ -1,508 +0,0 @@ - - - - - - - - mdp_playground.envs.mujoco_env_wrapper — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.envs.mujoco_env_wrapper

-

Functions

- ---- - - - - - -

get_mujoco_wrapper(base_class)

Wraps a mujoco-py environment to be able to modify its XML attributes and inject the dimensions from MDP Playground.

-
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.envs.rl_toy_env.RLToyEnv.html b/docs/_build/html/_autosummary/mdp_playground.envs.rl_toy_env.RLToyEnv.html deleted file mode 100644 index a0bb9ef..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.envs.rl_toy_env.RLToyEnv.html +++ /dev/null @@ -1,1069 +0,0 @@ - - - - - - - - mdp_playground.envs.rl_toy_env.RLToyEnv — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.envs.rl_toy_env.RLToyEnv

-
-
-class mdp_playground.envs.rl_toy_env.RLToyEnv(**config)[source]
-

Bases: gym.core.Env

-

The base toy environment in MDP Playground. It is parameterised by a config dict and can be instantiated to be an MDP with any of the possible dimensions from the accompanying research paper. The class extends OpenAI Gym’s environment gym.Env.

-

The accompanying paper is available at: https://arxiv.org/abs/1909.07750.

-

Instead of implementing a new class for every type of MDP, the intent is to capture as many common dimensions across different types of environments as possible and to be able to control the difficulty of an environment by allowing fine-grained control over each of these dimensions. The focus is to be as flexible as possible.

-
-
The configuration for the environment is passed as a dict at initialisation and contains all the information needed to determine the dynamics of the MDP that the instantiated environment will emulate. We recommend looking at the examples in example.py to begin using the environment since the dimensions and config options are mostly self-explanatory. If you want to specify custom MDPs, please see the use_custom_mdp config option below. For more details, we list here the dimensions and config options (their names here correspond to the keys to be passed in the config dict):
-
state_space_typestr

Specifies what the environment type is. Options are “continuous”, “discrete” and “grid”. The “grid” environment is, basically, a discretised version of the continuous environment.

-
-
delayint >= 0

Delays each reward by this number of timesteps.

-
-
sequence_lengthint >= 1

Intrinsic sequence length of the reward function of an environment. For discrete environments, randomly selected sequences of this length are set to be rewardable at initialisation if use_custom_mdp = false and generate_random_mdp = true.

-
-
transition_noisefloat in range [0, 1] or Python function(rng)

For discrete environments, it is a float that specifies the fraction of times the environment transitions to a noisy next state at each timestep, independently and uniformly at random. -For continuous environments, if it’s a float, it’s used as the standard deviation of an i.i.d. normal distribution of noise. If it is a Python function with one argument, it is added to next state. The argument is the Random Number Generator (RNG) of the environment which is an np.random.RandomState object. This RNG should be used to perform calls to the desired random function to be used as noise to ensure reproducibility.

-
-
reward_noisefloat or Python function(rng)

If it’s a float, it’s used as the standard deviation of an i.i.d. normal distribution of noise. -If it’s a Python function with one argument, it is added to the reward given at every time step. The argument is the Random Number Generator (RNG) of the environment which is an np.random.RandomState object. This RNG should be used to perform calls to the desired random function to be used as noise to ensure reproducibility.

-
-
reward_densityfloat in range [0, 1]

The fraction of possible sequences of a given length that will be selected to be rewardable at initialisation time.

-
-
reward_scalefloat

Multiplies the rewards by this value at every time step.

-
-
reward_shiftfloat

This value is added to the reward at every time step.

-
-
diameterint > 0

For discrete environments, if diameter = d, the set of states is set to be a d-partite graph (and NOT a complete d-partite graph), where, if we order the d sets as 1, 2, .., d, states from set 1 will have actions leading to states in set 2 and so on, with the final set d having actions leading to states in set 1. Number of actions for each state will, thus, be = (number of states) / (d).

-
-
terminal_state_densityfloat in range [0, 1]

For discrete environments, the fraction of states that are terminal; the terminal states are fixed to the “last” states when we consider them to be ordered by their numerical value. This is w.l.o.g. because discrete states are categorical. For continuous environments, please see terminal_states and term_state_edge for how to control terminal states.

-
-
term_state_rewardfloat

Adds this to the reward if a terminal state was reached at the current time step.

-
-
image_representationsboolean

Boolean to associate an image as the external observation with every discrete categorical state. -For discrete envs, this is handled by an mdp_playground.spaces.ImageMultiDiscrete object. It associates the image of an n + 3 sided polygon for a categorical state n. More details can be found in the documentation for the ImageMultiDiscrete class. -For continuous and grid envs, this is handled by an mdp_playground.spaces.ImageContinuous object. More details can be found in the documentation for the ImageContinuous class.

-
-
irrelevant_featuresboolean

If True, an additional irrelevant sub-space (irrelevant to achieving rewards) is present as part of the observation space. This sub-space has its own transition dynamics independent of the dynamics of the relevant sub-space. -For discrete environments, additionally, state_space_size must be specified as a list. -For continuous environments, the option relevant_indices must be specified. This option specifies the dimensions relevant to achieving rewards. -For grid environments, nothing additional needs to be done as relevant grid shape is also used as the irrelevant grid shape.

-
-
use_custom_mdpboolean

If true, users specify their own transition and reward functions using the config options transition_function and reward_function (see below). Optionally, they can also use init_state_dist and terminal_states for discrete spaces (see below).

-
-
transition_functionPython function(state, action) or a 2-D numpy.ndarray

A Python function emulating P(s, a). For discrete envs it’s also possible to specify an |S|x|A| transition matrix.

-
-
reward_functionPython function(state_sequence, action_sequence) or a 2-D numpy.ndarray

A Python function emulating R(state_sequence, action_sequence). The state_sequence is recorded by the environment and transition_function is called before reward_function, so the “current” state (when step() was called) and next state are the last 2 states in the sequence. -For discrete environments, it’s also possible to specify an |S|x|A| transition matrix where reward is assumed to be a function over the “current” state and action. -If use_custom_mdp = false and the environment is continuous, this is a string that chooses one of the following predefined reward functions: move_along_a_line or move_to_a_point. -If use_custom_mdp = false and the environment is grid, this is a string that chooses one of the following predefined reward functions: move_to_a_point. Support for sequences is planned.

-

Also see make_denser documentation.

-
-
Specific to discrete environments:
-
state_space_sizeint > 0 or list of length 2

A number specifying size of the state space for normal discrete environments and a list of len = 2 when irrelevant_features is True (The list contains sizes of relevant and irrelevant sub-spaces where the 1st sub-space is assumed relevant and the 2nd sub-space is assumed irrelevant). -NOTE: When automatically generating MDPs, do not specify this value as its value depends on the action_space_size and the diameter as state_space_size = action_space_size * diameter.

-
-
action_space_sizeint > 0

Similar description as state_space_size. When automatically generating MDPs, however, its value determines the state_space_size.

-
-
reward_distlist with 2 floats or a Python function(env_rng, reward_sequence_dict)

If it’s a list with 2 floats, then these 2 values are interpreted as a closed interval and taken as the end points of a categorical distribution which points equally spaced along the interval. -If it’s a Python function, it samples rewards for the rewardable_sequences dict of the environment. The rewardable_sequences dict of the environment holds the rewardable_sequences with the key as a tuple holding the sequence and value as the reward handed out. The 1st argument for the reward_dist function is the Random Number Generator (RNG) of the environment which is an np.random.RandomState object. This RNG should be used to perform calls to the desired random function to be used to sample rewards to ensure reproducibility. The 2nd argument is the rewardable_sequences dict of the environment. This is available because one may need access to the already created reward sequences in the reward_dist function.

-
-
init_state_dist1-D numpy.ndarray

Specifies an array of initialisation probabilities for the discrete state space.

-
-
terminal_statesPython function(state) or 1-D numpy.ndarray

A Python function with the state as argument that returns whether the state is terminal. If this is specified as an array, the array lists the discrete states that are terminal.

-
-
Specific to image_representations for discrete envs:
-
image_transformsstr

String containing the transforms that must be applied to the image representations. As long as one of the following words is present in the string - shift, scale, rotate, flip - the corresponding transform will be applied at random to the polygon in the image representation whenever an observation is generated. Care is either explicitly taken that the polygon remains inside the image region or a warning is generated.

-
-
sh_quantint

An int to quantise the shift transforms.

-
-
scale_range(float, float)

A tuple of real numbers to specify (min_scaling, max_scaling).

-
-
ro_quantint

An int to quantise the rotation transforms.

-
-
-
-
-
-
Specific to continuous environments:
-
state_space_dimint

A number specifying state space dimensionality. A Gym Box space of this dimensionality will be instantiated.

-
-
action_space_dimint

Same description as state_space_dim. This is currently set equal to the state_space_dim and doesn’t need to specified.

-
-
relevant_indiceslist

A list that provides the dimensions relevant to achieving rewards for continuous environments. The dynamics for these dimensions are independent of the dynamics for the remaining (irrelevant) dimensions.

-
-
state_space_maxfloat

Max absolute value that a dimension of the space can take. A Gym Box will be instantiated with range [-state_space_max, state_space_max]. Sampling will be done as for Gym Box spaces.

-
-
action_space_maxfloat

Similar description as for state_space_max.

-
-
terminal_statesnumpy.ndarray

The centres of hypercube sub-spaces which are terminal.

-
-
term_state_edgefloat

The edge of the hypercube sub-spaces which are terminal.

-
-
transition_dynamics_orderint

An order of n implies that the n-th state derivative is set equal to the action/inertia.

-
-
inertiafloat or numpy.ndarray

inertia of the rigid body or point object that is being simulated. If numpy.ndarray, it specifies independent inertiae for the dimensions and the shape should be (state_space_dim,).

-
-
time_unitfloat

time duration over which the action is applied to the system.

-
-
target_pointnumpy.ndarray

The target point in case move_to_a_point is the reward_function. If make_denser is false, target_radius determines distance from the target point at which the sparse reward is handed out.

-
-
action_loss_weightfloat

A coefficient to multiply the norm of the action and subtract it from the reward to penalise the action magnitude.

-
-
-
-
Specific to grid environments:
-
grid_shapetuple

Shape of the grid environment. If irrelevant_features is True, this is replicated to add a grid which is irrelevant to the reward.

-
-
target_pointnumpy.ndarray

The target point in case move_to_a_point is the reward_function. If make_denser is false, reward is only handed out when the target point is reached.

-
-
terminal_statesPython function(state) or 1-D numpy.ndarray

Same description as for terminal_states under discrete envs

-
-
-
-
-
-
Other important config:
-
Specific to discrete environments:
-
repeats_in_sequencesboolean

If true, allows rewardable sequences to have repeating states in them.

-
-
maximally_connectedboolean

If true, sets the transition function such that every state in independent set i can transition to every state in independent set i + 1. If false, then sets the transition function such that a state in independent set i may have any state in independent set i + 1 as the next state for a transition.

-
-
reward_every_n_stepsboolean

Hand out rewards only at multiples of sequence_length steps. This makes the probability that an agent is executing overlapping rewarding sequences 0. This makes it simpler to evaluate HRL algorithms and whether they can “discretise” time correctly. Noise is added at every step, regardless of this setting. Currently, not implemented for either the make_denser = true case or for continuous and grid environments.

-
-
generate_random_mdpboolean

If true, automatically generate MDPs when use_custom_mdp = false. Currently, this option doesn’t need to be specified because random MDPs are always generated when use_custom_mdp = false.

-
-
-
-
Specific to continuous environments:

none as of now

-
-
-

For all, continuous, discrete and grid environments: -make_denser : boolean

-
-

If true, makes the reward denser in environments. -For discrete environments, hands out a partial reward for completing partial sequences. -For continuous environments, for reward function move_to_a_point, the base reward handed out is equal to the distance moved towards the target point in the current timestep. -For grid envs, the base reward handed out is equal to the Manhattan distance moved towards the target point in the current timestep.

-
-
-
seedint or dict

Recommended to be passed as an int which generates seeds to be used for the various components of the environment. It is, however, possible to control individual seeds by passing it as a dict. Please see the default initialisation for seeds below to see how to do that.

-
-
log_filenamestr

The name of the log file to which logs are written.

-
-
log_levellogging.LOG_LEVEL option

Python log level for logging

-
-
-
-
-

Below, we list the important attributes and methods for this class.

-
-
-config
-

the config contains all the details required to generate an environment

-
-
Type
-

dict

-
-
-
- -
-
-seed[source]
-

recommended to set to an int, which would set seeds for the env, relevant and irrelevant and externally visible observation and action spaces automatically. If fine-grained control over the seeds is necessary, a dict, with key values as in the source code further below, can be passed.

-
-
Type
-

int or dict

-
-
-
- -
-
-observation_space
-

The externally visible observation space for the enviroment.

-
-
Type
-

Gym.Space

-
-
-
- -
-
-action_space
-

The externally visible action space for the enviroment.

-
-
Type
-

Gym.Space

-
-
-
- -
-
-rewardable_sequences
-

holds the rewardable sequences. The keys are tuples of rewardable sequences and values are the rewards handed out. When make_denser is True for discrete environments, this dict also holds the rewardable partial sequences.

-
-
Type
-

dict

-
-
-
- -
-
-init_terminal_states()[source]
-

Initialises terminal states, T

-
- -
-
-init_init_state_dist()[source]
-

Initialises initial state distribution, rho_0

-
- -
-
-init_transition_function()[source]
-

Initialises transition function, P

-
- -
-
-init_reward_function()[source]
-

Initialises reward function, R

-
- -
-
-transition_function(state, action)[source]
-

the transition function of the MDP, P

-
- -
-
-P(state, action)
-

defined as a lambda function in the call to init_transition_function() and is equivalent to calling transition_function()

-
- -
-
-reward_function(state, action)[source]
-

the reward function of the MDP, R

-
- -
-
-R(state, action)
-

defined as a lambda function in the call to init_reward_function() and is equivalent to calling reward_function()

-
- -
-
-get_augmented_state()[source]
-

gets underlying Markovian state of the MDP

-
- -
-
-reset()[source]
-

Resets environment state

-
- -
-
-seed()[source]
-

Sets the seed for the numpy RNG used by the environment (state and action spaces have their own seeds as well)

-
- -
-
-step(action, imaginary_rollout=False)[source]
-

Performs 1 transition of the MDP

-
- -

Initialises the MDP to be emulated using the settings provided in config.

-
-
Parameters
-

config (dict) – the member variable config is initialised to this value after inserting defaults

-
-
-
-
-__init__(**config)[source]
-

Initialises the MDP to be emulated using the settings provided in config.

-
-
Parameters
-

config (dict) – the member variable config is initialised to this value after inserting defaults

-
-
-
- -

Methods

- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

__init__(**config)

Initialises the MDP to be emulated using the settings provided in config.

close()

Override close in your subclass to perform any necessary cleanup.

get_augmented_state()

Intended to return the full augmented state which would be Markovian.

init_init_state_dist()

Initialises initial state distrbution, rho_0, to be uniform over the non-terminal states for discrete environments.

init_reward_function()

Initialises reward function, R by selecting random sequences to be rewardable for discrete environments.

init_terminal_states()

Initialises terminal state set to be the ‘last’ states for discrete environments.

init_transition_function()

Initialises transition function, P by selecting random next states for every (state, action) tuple for discrete environments.

render([mode])

Renders the environment.

reset()

Resets the environment for the beginning of an episode and samples a start state from rho_0.

reward_function(state, action)

The reward function, R.

seed([seed])

Initialises the Numpy RNG for the environment by calling a utility for this in Gym.

step(action[, imaginary_rollout])

The step function for the environment.

transition_function(state, action)

The transition function, P.

-

Attributes

- ---- - - - - - - - - - - - - - - - - - - - - -

action_space

metadata

observation_space

reward_range

spec

unwrapped

Completely unwrap this env.

-
-
-close()
-

Override close in your subclass to perform any necessary cleanup.

-

Environments will automatically close() themselves when -garbage collected or when the program exits.

-
- -
-
-get_augmented_state()[source]
-

Intended to return the full augmented state which would be Markovian. (However, it’s not Markovian wrt the noise in P and R because we’re not returning the underlying RNG.) Currently, returns the augmented state which is the sequence of length “delay + sequence_length + 1” of past states for both discrete and continuous environments. Additonally, the current state derivatives are also returned for continuous environments.

-
-
Returns
-

    -
  • dict – Contains at the end of the current transition

  • -
  • #TODO For noisy processes, this would need the noise distribution and random seed too. Also add the irrelevant state parts, etc.? We don’t need the irrelevant parts for the state to be Markovian.

  • -
-

-
-
-
- -
-
-init_init_state_dist()[source]
-

Initialises initial state distrbution, rho_0, to be uniform over the non-terminal states for discrete environments. For both discrete and continuous environments, the uniform sampling over non-terminal states is taken care of in reset() when setting the initial state for an episode.

-
- -
-
-init_reward_function()[source]
-

Initialises reward function, R by selecting random sequences to be rewardable for discrete environments. For continuous environments, we have fixed available options for the reward function.

-
- -
-
-init_terminal_states()[source]
-

Initialises terminal state set to be the ‘last’ states for discrete environments. For continuous environments, terminal states will be in a hypercube centred around config[‘terminal_states’] with the edge of the hypercube of length config[‘term_state_edge’].

-
- -
-
-init_transition_function()[source]
-

Initialises transition function, P by selecting random next states for every (state, action) tuple for discrete environments. For continuous environments, we have 1 option for the transition function which varies depending on dynamics order and inertia and time_unit for a point object.

-
- -
-
-render(mode='human')
-

Renders the environment.

-

The set of supported modes varies per environment. (And some -environments do not support rendering at all.) By convention, -if mode is:

-
    -
  • human: render to the current display or terminal and -return nothing. Usually for human consumption.

  • -
  • rgb_array: Return an numpy.ndarray with shape (x, y, 3), -representing RGB values for an x-by-y pixel image, suitable -for turning into a video.

  • -
  • ansi: Return a string (str) or StringIO.StringIO containing a -terminal-style text representation. The text can include newlines -and ANSI escape sequences (e.g. for colors).

  • -
-
-
Note:
-
Make sure that your class’s metadata ‘render.modes’ key includes

the list of supported modes. It’s recommended to call super() -in implementations to use the functionality of this method.

-
-
-
-
Args:

mode (str): the mode to render with

-
-
-

Example:

-
-
class MyEnv(Env):

metadata = {‘render.modes’: [‘human’, ‘rgb_array’]}

-
-
def render(self, mode=’human’):
-
if mode == ‘rgb_array’:

return np.array(…) # return RGB frame suitable for video

-
-
elif mode == ‘human’:

… # pop up a window and render

-
-
else:

super(MyEnv, self).render(mode=mode) # just raise an exception

-
-
-
-
-
-
-
- -
-
-reset()[source]
-

Resets the environment for the beginning of an episode and samples a start state from rho_0. For discrete environments uses the defined rho_0 directly. For continuous environments, samples a state and resamples until a non-terminal state is sampled.

-
-
Returns
-

The start state for a new episode.

-
-
Return type
-

int or np.array

-
-
-
- -
-
-reward_function(state, action)[source]
-

The reward function, R.

-
-
Rewards the sequences selected to be rewardable at initialisation for discrete environments. For continuous environments, we have fixed available options for the reward function:

move_to_a_point rewards for moving to a predefined location. It has sparse and dense settings. -move_along_a_line rewards moving along ANY direction in space as long as it’s a fixed direction for sequence_length consecutive steps.

-
-
-
-
Parameters
-
    -
  • state (list) – The underlying MDP state (also called augmented state in this code) that the environment uses to calculate its reward. Normally, just the sequence of past states of length delay + sequence_length + 1.

  • -
  • action (single action dependent on action space) – Action magnitudes are penalised immediately in the case of continuous spaces and, in effect, play no role for discrete spaces as the reward in that case only depends on sequences of states. We say “in effect” because it _is_ used in case of a custom R to calculate R(s, a) but that is equivalent to using the “next” state s’ as the reward determining criterion in case of deterministic transitions. _Sequences_ of _actions_ are currently NOT used to calculate the reward. Since the underlying MDP dynamics are deterministic, a state and action map 1-to-1 with the next state and so, just a sequence of _states_ should be enough to calculate the reward.

  • -
-
-
Returns
-

    -
  • double – The reward at the end of the current transition

  • -
  • #TODO Make reward depend on the action sequence too instead of just state sequence, as it is currently?

  • -
-

-
-
-
- -
-
-seed(seed=None)[source]
-

Initialises the Numpy RNG for the environment by calling a utility for this in Gym.

-

The environment has its own RNG and so do the state and action spaces held by the environment.

-
-
Parameters
-

seed (int) – seed to initialise the np_random instance held by the environment. Cannot use numpy.int64 or similar because Gym doesn’t accept it.

-
-
Returns
-

The seed returned by Gym

-
-
Return type
-

int

-
-
-
- -
-
-step(action, imaginary_rollout=False)[source]
-

The step function for the environment.

-
-
Parameters
-
    -
  • action (int or np.array) – The action that the environment will use to perform a transition.

  • -
  • imaginary_rollout (boolean) – Option for the user to perform “imaginary” transitions, e.g., for model-based RL. If set to true, underlying augmented state of the MDP is not changed and user is responsible to maintain and provide a list of states to this function to be able to perform a rollout.

  • -
-
-
Returns
-

The next state, reward, whether the episode terminated and additional info dict at the end of the current transition

-
-
Return type
-

int or np.array, double, boolean, dict

-
-
-
- -
-
-transition_function(state, action)[source]
-

The transition function, P.

-

Performs a transition according to the initialised P for discrete environments (with dynamics independent for relevant vs irrelevant dimension sub-spaces). For continuous environments, we have a fixed available option for the dynamics (which is the same for relevant or irrelevant dimensions): -The order of the system decides the dynamics. For an nth order system, the nth order derivative of the state is set to the action value / inertia for time_unit seconds. And then the dynamics are integrated over the time_unit to obtain the next state.

-
-
Parameters
-
    -
  • state (list) – The state that the environment will use to perform a transition.

  • -
  • action (list) – The action that the environment will use to perform a transition.

  • -
-
-
Returns
-

The state at the end of the current transition

-
-
Return type
-

int or np.array

-
-
-
- -
-
-property unwrapped
-

Completely unwrap this env.

-
-
Returns:

gym.Env: The base non-wrapped gym.Env instance

-
-
-
- -
- -
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.envs.rl_toy_env.dist_of_pt_from_line.html b/docs/_build/html/_autosummary/mdp_playground.envs.rl_toy_env.dist_of_pt_from_line.html deleted file mode 100644 index 8fc41d9..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.envs.rl_toy_env.dist_of_pt_from_line.html +++ /dev/null @@ -1,502 +0,0 @@ - - - - - - - - mdp_playground.envs.rl_toy_env.dist_of_pt_from_line — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.envs.rl_toy_env.dist_of_pt_from_line

-
-
-mdp_playground.envs.rl_toy_env.dist_of_pt_from_line(pt, ptA, ptB)[source]
-

Returns shortest distance of a point from a line defined by 2 points - ptA and ptB. Based on: https://softwareengineering.stackexchange.com/questions/168572/distance-from-point-to-n-dimensional-line

-
- -
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.envs.rl_toy_env.html b/docs/_build/html/_autosummary/mdp_playground.envs.rl_toy_env.html deleted file mode 100644 index 3886fa9..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.envs.rl_toy_env.html +++ /dev/null @@ -1,523 +0,0 @@ - - - - - - - - mdp_playground.envs.rl_toy_env — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.envs.rl_toy_env

-

Functions

- ---- - - - - - - - - -

dist_of_pt_from_line(pt, ptA, ptB)

Returns shortest distance of a point from a line defined by 2 points - ptA and ptB.

list_to_float_np_array(lis)

Converts list to numpy float array

-

Classes

- ---- - - - - - -

RLToyEnv(**config)

The base toy environment in MDP Playground.

-
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.envs.rl_toy_env.list_to_float_np_array.html b/docs/_build/html/_autosummary/mdp_playground.envs.rl_toy_env.list_to_float_np_array.html deleted file mode 100644 index 8256cfa..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.envs.rl_toy_env.list_to_float_np_array.html +++ /dev/null @@ -1,502 +0,0 @@ - - - - - - - - mdp_playground.envs.rl_toy_env.list_to_float_np_array — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.envs.rl_toy_env.list_to_float_np_array

-
-
-mdp_playground.envs.rl_toy_env.list_to_float_np_array(lis)[source]
-

Converts list to numpy float array

-
- -
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.html b/docs/_build/html/_autosummary/mdp_playground.html deleted file mode 100644 index b0358d8..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.html +++ /dev/null @@ -1,520 +0,0 @@ - - - - - - - - mdp_playground — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
- -
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.scripts.html b/docs/_build/html/_autosummary/mdp_playground.scripts.html deleted file mode 100644 index 16fe657..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.scripts.html +++ /dev/null @@ -1,508 +0,0 @@ - - - - - - - - mdp_playground.scripts — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.scripts

-

Modules

- ---- - - - - - -

mdp_playground.scripts.run_experiments

Script to run experiments on MDP Playground.

-
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.scripts.run_experiments.cli.html b/docs/_build/html/_autosummary/mdp_playground.scripts.run_experiments.cli.html deleted file mode 100644 index 0611955..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.scripts.run_experiments.cli.html +++ /dev/null @@ -1,501 +0,0 @@ - - - - - - - - mdp_playground.scripts.run_experiments.cli — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.scripts.run_experiments.cli

-
-
-mdp_playground.scripts.run_experiments.cli()[source]
-
- -
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.scripts.run_experiments.html b/docs/_build/html/_autosummary/mdp_playground.scripts.run_experiments.html deleted file mode 100644 index f8a6254..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.scripts.run_experiments.html +++ /dev/null @@ -1,514 +0,0 @@ - - - - - - - - mdp_playground.scripts.run_experiments — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.scripts.run_experiments

-

Script to run experiments on MDP Playground.

-

Takes a configuration file, experiment name and config number to run as -optional arguments.

-

Functions

- ---- - - - - - - - - -

cli()

main(args)

-
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.scripts.run_experiments.main.html b/docs/_build/html/_autosummary/mdp_playground.scripts.run_experiments.main.html deleted file mode 100644 index 1d23ff7..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.scripts.run_experiments.main.html +++ /dev/null @@ -1,501 +0,0 @@ - - - - - - - - mdp_playground.scripts.run_experiments.main — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.scripts.run_experiments.main

-
-
-mdp_playground.scripts.run_experiments.main(args)[source]
-
- -
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.spaces.box_extended.BoxExtended.html b/docs/_build/html/_autosummary/mdp_playground.spaces.box_extended.BoxExtended.html deleted file mode 100644 index 6ae6893..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.spaces.box_extended.BoxExtended.html +++ /dev/null @@ -1,577 +0,0 @@ - - - - - - - - mdp_playground.spaces.box_extended.BoxExtended — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.spaces.box_extended.BoxExtended

-
-
-class mdp_playground.spaces.box_extended.BoxExtended(low, high, shape=None, dtype=<class 'numpy.float32'>, seed=None)[source]
-

Bases: gym.spaces.box.Box

-
-
-__init__(low, high, shape=None, dtype=<class 'numpy.float32'>, seed=None)[source]
-

Initialize self. See help(type(self)) for accurate signature.

-
- -

Methods

- ---- - - - - - - - - - - - - - - - - - - - - - - - -

__init__(low, high[, shape, dtype, seed])

Initialize self.

contains(x)

Return boolean specifying if x is a valid member of this space

from_jsonable(sample_n)

Convert a JSONable data type to a batch of samples from this space.

is_bounded([manner])

sample()

Generates a single random sample inside of the Box.

seed([seed])

Seed the PRNG of this space.

to_jsonable(sample_n)

Convert a batch of samples from this space to a JSONable data type.

-
-
-contains(x)
-

Return boolean specifying if x is a valid -member of this space

-
- -
-
-from_jsonable(sample_n)
-

Convert a JSONable data type to a batch of samples from this space.

-
- -
-
-sample()
-

Generates a single random sample inside of the Box.

-

In creating a sample of the box, each coordinate is sampled according to -the form of the interval:

-
    -
  • [a, b] : uniform distribution

  • -
  • [a, oo) : shifted exponential distribution

  • -
  • (-oo, b] : shifted negative exponential distribution

  • -
  • (-oo, oo) : normal distribution

  • -
-
- -
-
-seed(seed=None)
-

Seed the PRNG of this space.

-
- -
-
-to_jsonable(sample_n)
-

Convert a batch of samples from this space to a JSONable data type.

-
- -
- -
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.spaces.box_extended.html b/docs/_build/html/_autosummary/mdp_playground.spaces.box_extended.html deleted file mode 100644 index da56961..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.spaces.box_extended.html +++ /dev/null @@ -1,508 +0,0 @@ - - - - - - - - mdp_playground.spaces.box_extended — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.spaces.box_extended

-

Classes

- ---- - - - - - -

BoxExtended(low, high[, shape, dtype, seed])

-
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.spaces.discrete_extended.DiscreteExtended.html b/docs/_build/html/_autosummary/mdp_playground.spaces.discrete_extended.DiscreteExtended.html deleted file mode 100644 index 7a47971..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.spaces.discrete_extended.DiscreteExtended.html +++ /dev/null @@ -1,567 +0,0 @@ - - - - - - - - mdp_playground.spaces.discrete_extended.DiscreteExtended — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.spaces.discrete_extended.DiscreteExtended

-
-
-class mdp_playground.spaces.discrete_extended.DiscreteExtended(n, seed=None)[source]
-

Bases: gym.spaces.discrete.Discrete

-
-
-__init__(n, seed=None)[source]
-

Initialize self. See help(type(self)) for accurate signature.

-
- -

Methods

- ---- - - - - - - - - - - - - - - - - - - - - -

__init__(n[, seed])

Initialize self.

contains(x)

Return boolean specifying if x is a valid member of this space

from_jsonable(sample_n)

Convert a JSONable data type to a batch of samples from this space.

sample([max, prob, size, replace])

Randomly sample an element of this space.

seed([seed])

Seed the PRNG of this space.

to_jsonable(sample_n)

Convert a batch of samples from this space to a JSONable data type.

-
-
-contains(x)
-

Return boolean specifying if x is a valid -member of this space

-
- -
-
-from_jsonable(sample_n)
-

Convert a JSONable data type to a batch of samples from this space.

-
- -
-
-sample(max=None, prob=None, size=1, replace=True)[source]
-

Randomly sample an element of this space. Can be -uniform or non-uniform sampling based on boundedness of space.

-
- -
-
-seed(seed=None)
-

Seed the PRNG of this space.

-
- -
-
-to_jsonable(sample_n)
-

Convert a batch of samples from this space to a JSONable data type.

-
- -
- -
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.spaces.discrete_extended.html b/docs/_build/html/_autosummary/mdp_playground.spaces.discrete_extended.html deleted file mode 100644 index 6aa12c1..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.spaces.discrete_extended.html +++ /dev/null @@ -1,508 +0,0 @@ - - - - - - - - mdp_playground.spaces.discrete_extended — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.spaces.discrete_extended

-

Classes

- ---- - - - - - -

DiscreteExtended(n[, seed])

-
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.spaces.html b/docs/_build/html/_autosummary/mdp_playground.spaces.html deleted file mode 100644 index e55ed4a..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.spaces.html +++ /dev/null @@ -1,529 +0,0 @@ - - - - - - - - mdp_playground.spaces — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
- -
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.spaces.image_continuous.ImageContinuous.html b/docs/_build/html/_autosummary/mdp_playground.spaces.image_continuous.ImageContinuous.html deleted file mode 100644 index 6b916a7..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.spaces.image_continuous.ImageContinuous.html +++ /dev/null @@ -1,657 +0,0 @@ - - - - - - - - mdp_playground.spaces.image_continuous.ImageContinuous — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.spaces.image_continuous.ImageContinuous

-
-
-class mdp_playground.spaces.image_continuous.ImageContinuous(feature_space, term_spaces=None, width=100, height=100, circle_radius=5, target_point=None, relevant_indices=[0, 1], seed=None, grid_shape=None, dtype=<class 'numpy.uint8'>)[source]
-

Bases: gym.spaces.box.Box

-

A space that maps a continuous 1- or 2-D space 1-to-1 to images so that the -images may be used as representations for corresponding continuous environments.

-
-
-get_concatenated_image(continuous_obs)[source]
-

Gets an image representation for a given feature space observation

-
- -
-
Parameters
-
    -
  • feature_space (Gym.spaces.Box) – The feature space to which this class associates images as external -observations

  • -
  • term_spaces (list of Gym.spaces.Box) – Sub-spaces of the feature space which are terminal

  • -
  • width (int) – The width of the image

  • -
  • height (int) – The height of the image

  • -
  • circle_radius (int) – The radius of the circle which represents the agent and target point

  • -
  • target_point (np.array) –

  • -
  • relevant_indices (list) –

  • -
  • grid_shape (tuple of length 2) –

  • -
  • seed (int) – Seed for this space

  • -
-
-
-
-
-__init__(feature_space, term_spaces=None, width=100, height=100, circle_radius=5, target_point=None, relevant_indices=[0, 1], seed=None, grid_shape=None, dtype=<class 'numpy.uint8'>)[source]
-
-
Parameters
-
    -
  • feature_space (Gym.spaces.Box) – The feature space to which this class associates images as external -observations

  • -
  • term_spaces (list of Gym.spaces.Box) – Sub-spaces of the feature space which are terminal

  • -
  • width (int) – The width of the image

  • -
  • height (int) – The height of the image

  • -
  • circle_radius (int) – The radius of the circle which represents the agent and target point

  • -
  • target_point (np.array) –

  • -
  • relevant_indices (list) –

  • -
  • grid_shape (tuple of length 2) –

  • -
  • seed (int) – Seed for this space

  • -
-
-
-
- -

Methods

- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

__init__(feature_space[, term_spaces, …])

-
param feature_space
-

The feature space to which this class associates images as external

-
-
-

contains(x)

Return boolean specifying if x is a valid member of this space

convert_to_pixel(position)

from_jsonable(sample_n)

Convert a JSONable data type to a batch of samples from this space.

generate_image(position[, relevant])

-
param position
-

-
-

get_concatenated_image(obs)

Gets the “stitched together” image made from images corresponding to each continuous sub-space within the continuous space, concatenated along the X-axis.

is_bounded([manner])

sample()

Generates a single random sample inside of the Box.

seed([seed])

Seed the PRNG of this space.

to_jsonable(sample_n)

Convert a batch of samples from this space to a JSONable data type.

-
-
-contains(x)[source]
-

Return boolean specifying if x is a valid -member of this space

-
- -
-
-convert_to_pixel(position)[source]
-
- -
-
-from_jsonable(sample_n)[source]
-

Convert a JSONable data type to a batch of samples from this space.

-
- -
-
-generate_image(position, relevant=True)[source]
-
-
Parameters
-

position (np.array) –

-
-
-
- -
-
-get_concatenated_image(obs)[source]
-

Gets the “stitched together” image made from images corresponding to -each continuous sub-space within the continuous space, concatenated -along the X-axis.

-
- -
-
-sample()[source]
-

Generates a single random sample inside of the Box.

-

In creating a sample of the box, each coordinate is sampled according to -the form of the interval:

-
    -
  • [a, b] : uniform distribution

  • -
  • [a, oo) : shifted exponential distribution

  • -
  • (-oo, b] : shifted negative exponential distribution

  • -
  • (-oo, oo) : normal distribution

  • -
-
- -
-
-seed(seed=None)
-

Seed the PRNG of this space.

-
- -
-
-to_jsonable(sample_n)[source]
-

Convert a batch of samples from this space to a JSONable data type.

-
- -
- -
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.spaces.image_continuous.html b/docs/_build/html/_autosummary/mdp_playground.spaces.image_continuous.html deleted file mode 100644 index 7175efc..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.spaces.image_continuous.html +++ /dev/null @@ -1,508 +0,0 @@ - - - - - - - - mdp_playground.spaces.image_continuous — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.spaces.image_continuous

-

Classes

- ---- - - - - - -

ImageContinuous(feature_space[, …])

A space that maps a continuous 1- or 2-D space 1-to-1 to images so that the images may be used as representations for corresponding continuous environments.

-
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.spaces.image_multi_discrete.ImageMultiDiscrete.html b/docs/_build/html/_autosummary/mdp_playground.spaces.image_multi_discrete.ImageMultiDiscrete.html deleted file mode 100644 index c45dc01..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.spaces.image_multi_discrete.ImageMultiDiscrete.html +++ /dev/null @@ -1,634 +0,0 @@ - - - - - - - - mdp_playground.spaces.image_multi_discrete.ImageMultiDiscrete — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.spaces.image_multi_discrete.ImageMultiDiscrete

-
-
-class mdp_playground.spaces.image_multi_discrete.ImageMultiDiscrete(state_space_sizes, width=100, height=100, circle_radius=20, transforms='rotate, flip, scale, shift', sh_quant=1, scale_range=(0.5, 1.5), ro_quant=1, seed=None, use_custom_images=None, cust_path=None, dtype=<class 'numpy.uint8'>)[source]
-

Bases: gym.spaces.box.Box

-

A space that maps a (multi-)discrete space 1-to-1 to images so that the images may be used as representations for corresponding (multi-)discrete states. A MultiDiscrete space will have multiple dimensions. For each of these dimensions, there is a size that represents the number of categorical states that correspond to that dimension. For size = n, each of these categorical states is numbered from 0 to n-1. For each categorical state numbered n, we associate a polygon with n + 3 sides. This polygon is present in the image associated with this dimension. The images generated for all the dimensions are concatenated together by placing them side by side in the order of the dimensions in Space. Any of the transforms - rotate, flip, scale, shift - can be associated with an object of this class, to apply at random to polygons in the images whenever they are generated.

-
-
-get_concatenated_image(multi_discrete_state)[source]
-

Gets an image representation for a given multi_discrete_state

-
- -
-
Parameters
-
    -
  • state_space_sizes (list) – The underlying (multi-)discrete state space sizes to which this class associates images as external observations

  • -
  • width (int) – The width of the image

  • -
  • height (int) – The height of the image

  • -
  • circle_radius (int) – The radius of the circle in which the associated polygons are inscribed

  • -
  • transforms (str) – Comma separated string specifiying which transforms are applied to images. (Commas are not actually needed, but are recommended for readability, since it’s only the presence of the string representing the corresponding transform that is checked for.)

  • -
  • sh_quant (int) – An int to quantise the shift transforms.

  • -
  • scale_range (tuple of floats with length = 2) – A tuple of real numbers to specify (min_scaling, max_scaling) for the scale transform.

  • -
  • ro_quant (int) – An int to quantise the rotation transforms.

  • -
  • seed (int) – seed for randomly applied transformations and NOT for the underlying state space

  • -
  • use_custom_images (str or None) – If None, then default setting of no custom textures or images. If this value is “textures” or “images”, then all images in the cust_path directories are loaded in alphabetical order and correspond 1-to-1 with discrete states which are in numeric order. If this value is “textures”, the textures are applied to the polygons that would have been generated for the default setting (of no custom textures or images). If this value is “images”, then the custom images are drawn in a square (with side length = circle_radius * sqrt(2)) in the centre of the polygon when no transforms are applied. When the underlying state space sizes are multi-discrete, the 1-to-1 state number to image mapping is the same for all discrete sub-spaces.

  • -
  • cust_path (str or None) – The directory containing the custom images to be loaded

  • -
-
-
-
-
-__init__(state_space_sizes, width=100, height=100, circle_radius=20, transforms='rotate, flip, scale, shift', sh_quant=1, scale_range=(0.5, 1.5), ro_quant=1, seed=None, use_custom_images=None, cust_path=None, dtype=<class 'numpy.uint8'>)[source]
-
-
Parameters
-
    -
  • state_space_sizes (list) – The underlying (multi-)discrete state space sizes to which this class associates images as external observations

  • -
  • width (int) – The width of the image

  • -
  • height (int) – The height of the image

  • -
  • circle_radius (int) – The radius of the circle in which the associated polygons are inscribed

  • -
  • transforms (str) – Comma separated string specifiying which transforms are applied to images. (Commas are not actually needed, but are recommended for readability, since it’s only the presence of the string representing the corresponding transform that is checked for.)

  • -
  • sh_quant (int) – An int to quantise the shift transforms.

  • -
  • scale_range (tuple of floats with length = 2) – A tuple of real numbers to specify (min_scaling, max_scaling) for the scale transform.

  • -
  • ro_quant (int) – An int to quantise the rotation transforms.

  • -
  • seed (int) – seed for randomly applied transformations and NOT for the underlying state space

  • -
  • use_custom_images (str or None) – If None, then default setting of no custom textures or images. If this value is “textures” or “images”, then all images in the cust_path directories are loaded in alphabetical order and correspond 1-to-1 with discrete states which are in numeric order. If this value is “textures”, the textures are applied to the polygons that would have been generated for the default setting (of no custom textures or images). If this value is “images”, then the custom images are drawn in a square (with side length = circle_radius * sqrt(2)) in the centre of the polygon when no transforms are applied. When the underlying state space sizes are multi-discrete, the 1-to-1 state number to image mapping is the same for all discrete sub-spaces.

  • -
  • cust_path (str or None) – The directory containing the custom images to be loaded

  • -
-
-
-
- -

Methods

- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

__init__(state_space_sizes[, width, height, …])

-
param state_space_sizes
-

The underlying (multi-)discrete state space sizes to which this class associates images as external observations

-
-
-

contains(x)

Return boolean specifying if x is a valid member of this space

from_jsonable(sample_n)

Convert a JSONable data type to a batch of samples from this space.

generate_image(discrete_state)

get_concatenated_image(multi_discrete_state)

Gets the “stitched together” image made from images corresponding to each discrete sub-space within the multidiscrete space, concatenated along the X-axis

is_bounded([manner])

sample()

Generates a single random sample inside of the Box.

seed([seed])

Seed the PRNG of this space.

to_jsonable(sample_n)

Convert a batch of samples from this space to a JSONable data type.

-
-
-contains(x)[source]
-

Return boolean specifying if x is a valid -member of this space

-
- -
-
-from_jsonable(sample_n)[source]
-

Convert a JSONable data type to a batch of samples from this space.

-
- -
-
-get_concatenated_image(multi_discrete_state)[source]
-

Gets the “stitched together” image made from images corresponding to each discrete sub-space within the multidiscrete space, concatenated along the X-axis

-
- -
-
-sample()[source]
-

Generates a single random sample inside of the Box.

-

In creating a sample of the box, each coordinate is sampled according to -the form of the interval:

-
    -
  • [a, b] : uniform distribution

  • -
  • [a, oo) : shifted exponential distribution

  • -
  • (-oo, b] : shifted negative exponential distribution

  • -
  • (-oo, oo) : normal distribution

  • -
-
- -
-
-seed(seed=None)
-

Seed the PRNG of this space.

-
- -
-
-to_jsonable(sample_n)[source]
-

Convert a batch of samples from this space to a JSONable data type.

-
- -
- -
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.spaces.image_multi_discrete.html b/docs/_build/html/_autosummary/mdp_playground.spaces.image_multi_discrete.html deleted file mode 100644 index 7ccb3ee..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.spaces.image_multi_discrete.html +++ /dev/null @@ -1,508 +0,0 @@ - - - - - - - - mdp_playground.spaces.image_multi_discrete — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.spaces.image_multi_discrete

-

Classes

- ---- - - - - - -

ImageMultiDiscrete(state_space_sizes[, …])

A space that maps a (multi-)discrete space 1-to-1 to images so that the images may be used as representations for corresponding (multi-)discrete states.

-
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.spaces.multi_discrete_extended.MultiDiscreteExtended.html b/docs/_build/html/_autosummary/mdp_playground.spaces.multi_discrete_extended.MultiDiscreteExtended.html deleted file mode 100644 index 5f0d792..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.spaces.multi_discrete_extended.MultiDiscreteExtended.html +++ /dev/null @@ -1,569 +0,0 @@ - - - - - - - - mdp_playground.spaces.multi_discrete_extended.MultiDiscreteExtended — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.spaces.multi_discrete_extended.MultiDiscreteExtended

-
-
-class mdp_playground.spaces.multi_discrete_extended.MultiDiscreteExtended(nvec, seed=None)[source]
-

Bases: gym.spaces.multi_discrete.MultiDiscrete

-

Currently, this class doesn’t do anything special except allowing to seed from __init__().

-

nvec: vector of counts of each categorical variable

-
-
-__init__(nvec, seed=None)[source]
-

nvec: vector of counts of each categorical variable

-
- -

Methods

- ---- - - - - - - - - - - - - - - - - - - - - -

__init__(nvec[, seed])

nvec: vector of counts of each categorical variable

contains(x)

Return boolean specifying if x is a valid member of this space

from_jsonable(sample_n)

Convert a JSONable data type to a batch of samples from this space.

sample()

Randomly sample an element of this space.

seed([seed])

Seed the PRNG of this space.

to_jsonable(sample_n)

Convert a batch of samples from this space to a JSONable data type.

-
-
-contains(x)
-

Return boolean specifying if x is a valid -member of this space

-
- -
-
-from_jsonable(sample_n)
-

Convert a JSONable data type to a batch of samples from this space.

-
- -
-
-sample()
-

Randomly sample an element of this space. Can be -uniform or non-uniform sampling based on boundedness of space.

-
- -
-
-seed(seed=None)
-

Seed the PRNG of this space.

-
- -
-
-to_jsonable(sample_n)
-

Convert a batch of samples from this space to a JSONable data type.

-
- -
- -
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.spaces.multi_discrete_extended.html b/docs/_build/html/_autosummary/mdp_playground.spaces.multi_discrete_extended.html deleted file mode 100644 index 5b77cfb..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.spaces.multi_discrete_extended.html +++ /dev/null @@ -1,508 +0,0 @@ - - - - - - - - mdp_playground.spaces.multi_discrete_extended — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.spaces.multi_discrete_extended

-

Classes

- ---- - - - - - -

MultiDiscreteExtended(nvec[, seed])

Currently, this class doesn’t do anything special except allowing to seed from __init__().

-
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.spaces.test_image_continuous.TestImageContinuous.html b/docs/_build/html/_autosummary/mdp_playground.spaces.test_image_continuous.TestImageContinuous.html deleted file mode 100644 index 77da946..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.spaces.test_image_continuous.TestImageContinuous.html +++ /dev/null @@ -1,1200 +0,0 @@ - - - - - - - - mdp_playground.spaces.test_image_continuous.TestImageContinuous — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.spaces.test_image_continuous.TestImageContinuous

-
-
-class mdp_playground.spaces.test_image_continuous.TestImageContinuous(methodName='runTest')[source]
-

Bases: unittest.case.TestCase

-

Create an instance of the class that will use the named test -method when executed. Raises a ValueError if the instance does -not have a method with the specified name.

-
-
-__init__(methodName='runTest')
-

Create an instance of the class that will use the named test -method when executed. Raises a ValueError if the instance does -not have a method with the specified name.

-
- -

Methods

- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

__init__([methodName])

Create an instance of the class that will use the named test method when executed.

addCleanup(function, *args, **kwargs)

Add a function, with arguments, to be called when the test is completed.

addTypeEqualityFunc(typeobj, function)

Add a type specific assertEqual style function to compare a type.

assertAlmostEqual(first, second[, places, …])

Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the difference between the two objects is more than the given delta.

assertAlmostEquals(**kwargs)

assertCountEqual(first, second[, msg])

An unordered sequence comparison asserting that the same elements, regardless of order.

assertDictContainsSubset(subset, dictionary)

Checks whether dictionary is a superset of subset.

assertDictEqual(d1, d2[, msg])

assertEqual(first, second[, msg])

Fail if the two objects are unequal as determined by the ‘==’ operator.

assertEquals(**kwargs)

assertFalse(expr[, msg])

Check that the expression is false.

assertGreater(a, b[, msg])

Just like self.assertTrue(a > b), but with a nicer default message.

assertGreaterEqual(a, b[, msg])

Just like self.assertTrue(a >= b), but with a nicer default message.

assertIn(member, container[, msg])

Just like self.assertTrue(a in b), but with a nicer default message.

assertIs(expr1, expr2[, msg])

Just like self.assertTrue(a is b), but with a nicer default message.

assertIsInstance(obj, cls[, msg])

Same as self.assertTrue(isinstance(obj, cls)), with a nicer default message.

assertIsNone(obj[, msg])

Same as self.assertTrue(obj is None), with a nicer default message.

assertIsNot(expr1, expr2[, msg])

Just like self.assertTrue(a is not b), but with a nicer default message.

assertIsNotNone(obj[, msg])

Included for symmetry with assertIsNone.

assertLess(a, b[, msg])

Just like self.assertTrue(a < b), but with a nicer default message.

assertLessEqual(a, b[, msg])

Just like self.assertTrue(a <= b), but with a nicer default message.

assertListEqual(list1, list2[, msg])

A list-specific equality assertion.

assertLogs([logger, level])

Fail unless a log message of level level or higher is emitted on logger_name or its children.

assertMultiLineEqual(first, second[, msg])

Assert that two multi-line strings are equal.

assertNotAlmostEqual(first, second[, …])

Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the difference between the two objects is less than the given delta.

assertNotAlmostEquals(**kwargs)

assertNotEqual(first, second[, msg])

Fail if the two objects are equal as determined by the ‘!=’ operator.

assertNotEquals(**kwargs)

assertNotIn(member, container[, msg])

Just like self.assertTrue(a not in b), but with a nicer default message.

assertNotIsInstance(obj, cls[, msg])

Included for symmetry with assertIsInstance.

assertNotRegex(text, unexpected_regex[, msg])

Fail the test if the text matches the regular expression.

assertNotRegexpMatches(**kwargs)

assertRaises(expected_exception, *args, **kwargs)

Fail unless an exception of class expected_exception is raised by the callable when invoked with specified positional and keyword arguments.

assertRaisesRegex(expected_exception, …)

Asserts that the message in a raised exception matches a regex.

assertRaisesRegexp(**kwargs)

assertRegex(text, expected_regex[, msg])

Fail the test unless the text matches the regular expression.

assertRegexpMatches(**kwargs)

assertSequenceEqual(seq1, seq2[, msg, seq_type])

An equality assertion for ordered sequences (like lists and tuples).

assertSetEqual(set1, set2[, msg])

A set-specific equality assertion.

assertTrue(expr[, msg])

Check that the expression is true.

assertTupleEqual(tuple1, tuple2[, msg])

A tuple-specific equality assertion.

assertWarns(expected_warning, *args, **kwargs)

Fail unless a warning of class warnClass is triggered by the callable when invoked with specified positional and keyword arguments.

assertWarnsRegex(expected_warning, …)

Asserts that the message in a triggered warning matches a regexp.

assert_(**kwargs)

countTestCases()

debug()

Run the test without collecting errors in a TestResult

defaultTestResult()

doCleanups()

Execute all cleanup functions.

fail([msg])

Fail immediately, with the given message.

failIf(**kwargs)

failIfAlmostEqual(**kwargs)

failIfEqual(**kwargs)

failUnless(**kwargs)

failUnlessAlmostEqual(**kwargs)

failUnlessEqual(**kwargs)

failUnlessRaises(**kwargs)

id()

run([result])

setUp()

Hook method for setting up the test fixture before exercising it.

setUpClass()

Hook method for setting up class fixture before running tests in the class.

shortDescription()

Returns a one-line description of the test, or None if no description has been provided.

skipTest(reason)

Skip this test.

subTest([msg])

Return a context manager that will return the enclosed block of code in a subtest identified by the optional message and keyword parameters.

tearDown()

Hook method for deconstructing the test fixture after testing it.

tearDownClass()

Hook method for deconstructing the class fixture after running all tests in the class.

test_image_continuous()

-

Attributes

- ---- - - - - - - - - -

longMessage

maxDiff

-
-
-addCleanup(function, *args, **kwargs)
-

Add a function, with arguments, to be called when the test is -completed. Functions added are called on a LIFO basis and are -called after tearDown on test failure or success.

-

Cleanup items are called even if setUp fails (unlike tearDown).

-
- -
-
-addTypeEqualityFunc(typeobj, function)
-

Add a type specific assertEqual style function to compare a type.

-

This method is for use by TestCase subclasses that need to register -their own type equality functions to provide nicer error messages.

-
-
Args:
-
typeobj: The data type to call this function on when both values

are of the same type in assertEqual().

-
-
function: The callable taking two arguments and an optional

msg= argument that raises self.failureException with a -useful error message when the two arguments are not equal.

-
-
-
-
-
- -
-
-assertAlmostEqual(first, second, places=None, msg=None, delta=None)
-

Fail if the two objects are unequal as determined by their -difference rounded to the given number of decimal places -(default 7) and comparing to zero, or by comparing that the -difference between the two objects is more than the given -delta.

-

Note that decimal places (from zero) are usually not the same -as significant digits (measured from the most significant digit).

-

If the two objects compare equal then they will automatically -compare almost equal.

-
- -
-
-assertCountEqual(first, second, msg=None)
-

An unordered sequence comparison asserting that the same elements, -regardless of order. If the same element occurs more than once, -it verifies that the elements occur the same number of times.

-
-
-
-
self.assertEqual(Counter(list(first)),

Counter(list(second)))

-
-
-
-
-
Example:
    -
  • [0, 1, 1] and [1, 0, 1] compare equal.

  • -
  • [0, 0, 1] and [0, 1] compare unequal.

  • -
-
-
-
-
- -
-
-assertDictContainsSubset(subset, dictionary, msg=None)
-

Checks whether dictionary is a superset of subset.

-
- -
-
-assertEqual(first, second, msg=None)
-

Fail if the two objects are unequal as determined by the ‘==’ -operator.

-
- -
-
-assertFalse(expr, msg=None)
-

Check that the expression is false.

-
- -
-
-assertGreater(a, b, msg=None)
-

Just like self.assertTrue(a > b), but with a nicer default message.

-
- -
-
-assertGreaterEqual(a, b, msg=None)
-

Just like self.assertTrue(a >= b), but with a nicer default message.

-
- -
-
-assertIn(member, container, msg=None)
-

Just like self.assertTrue(a in b), but with a nicer default message.

-
- -
-
-assertIs(expr1, expr2, msg=None)
-

Just like self.assertTrue(a is b), but with a nicer default message.

-
- -
-
-assertIsInstance(obj, cls, msg=None)
-

Same as self.assertTrue(isinstance(obj, cls)), with a nicer -default message.

-
- -
-
-assertIsNone(obj, msg=None)
-

Same as self.assertTrue(obj is None), with a nicer default message.

-
- -
-
-assertIsNot(expr1, expr2, msg=None)
-

Just like self.assertTrue(a is not b), but with a nicer default message.

-
- -
-
-assertIsNotNone(obj, msg=None)
-

Included for symmetry with assertIsNone.

-
- -
-
-assertLess(a, b, msg=None)
-

Just like self.assertTrue(a < b), but with a nicer default message.

-
- -
-
-assertLessEqual(a, b, msg=None)
-

Just like self.assertTrue(a <= b), but with a nicer default message.

-
- -
-
-assertListEqual(list1, list2, msg=None)
-

A list-specific equality assertion.

-
-
Args:

list1: The first list to compare. -list2: The second list to compare. -msg: Optional message to use on failure instead of a list of

-
-

differences.

-
-
-
-
- -
-
-assertLogs(logger=None, level=None)
-

Fail unless a log message of level level or higher is emitted -on logger_name or its children. If omitted, level defaults to -INFO and logger defaults to the root logger.

-

This method must be used as a context manager, and will yield -a recording object with two attributes: output and records. -At the end of the context manager, the output attribute will -be a list of the matching formatted log messages and the -records attribute will be a list of the corresponding LogRecord -objects.

-

Example:

-
with self.assertLogs('foo', level='INFO') as cm:
-    logging.getLogger('foo').info('first message')
-    logging.getLogger('foo.bar').error('second message')
-self.assertEqual(cm.output, ['INFO:foo:first message',
-                             'ERROR:foo.bar:second message'])
-
-
-
- -
-
-assertMultiLineEqual(first, second, msg=None)
-

Assert that two multi-line strings are equal.

-
- -
-
-assertNotAlmostEqual(first, second, places=None, msg=None, delta=None)
-

Fail if the two objects are equal as determined by their -difference rounded to the given number of decimal places -(default 7) and comparing to zero, or by comparing that the -difference between the two objects is less than the given delta.

-

Note that decimal places (from zero) are usually not the same -as significant digits (measured from the most significant digit).

-

Objects that are equal automatically fail.

-
- -
-
-assertNotEqual(first, second, msg=None)
-

Fail if the two objects are equal as determined by the ‘!=’ -operator.

-
- -
-
-assertNotIn(member, container, msg=None)
-

Just like self.assertTrue(a not in b), but with a nicer default message.

-
- -
-
-assertNotIsInstance(obj, cls, msg=None)
-

Included for symmetry with assertIsInstance.

-
- -
-
-assertNotRegex(text, unexpected_regex, msg=None)
-

Fail the test if the text matches the regular expression.

-
- -
-
-assertRaises(expected_exception, *args, **kwargs)
-

Fail unless an exception of class expected_exception is raised -by the callable when invoked with specified positional and -keyword arguments. If a different type of exception is -raised, it will not be caught, and the test case will be -deemed to have suffered an error, exactly as for an -unexpected exception.

-

If called with the callable and arguments omitted, will return a -context object used like this:

-
with self.assertRaises(SomeException):
-    do_something()
-
-
-

An optional keyword argument ‘msg’ can be provided when assertRaises -is used as a context object.

-

The context manager keeps a reference to the exception as -the ‘exception’ attribute. This allows you to inspect the -exception after the assertion:

-
with self.assertRaises(SomeException) as cm:
-    do_something()
-the_exception = cm.exception
-self.assertEqual(the_exception.error_code, 3)
-
-
-
- -
-
-assertRaisesRegex(expected_exception, expected_regex, *args, **kwargs)
-

Asserts that the message in a raised exception matches a regex.

-
-
Args:

expected_exception: Exception class expected to be raised. -expected_regex: Regex (re pattern object or string) expected

-
-

to be found in error message.

-
-

args: Function to be called and extra positional args. -kwargs: Extra kwargs. -msg: Optional message used in case of failure. Can only be used

-
-

when assertRaisesRegex is used as a context manager.

-
-
-
-
- -
-
-assertRegex(text, expected_regex, msg=None)
-

Fail the test unless the text matches the regular expression.

-
- -
-
-assertSequenceEqual(seq1, seq2, msg=None, seq_type=None)
-

An equality assertion for ordered sequences (like lists and tuples).

-

For the purposes of this function, a valid ordered sequence type is one -which can be indexed, has a length, and has an equality operator.

-
-
Args:

seq1: The first sequence to compare. -seq2: The second sequence to compare. -seq_type: The expected datatype of the sequences, or None if no

-
-

datatype should be enforced.

-
-
-
msg: Optional message to use on failure instead of a list of

differences.

-
-
-
-
-
- -
-
-assertSetEqual(set1, set2, msg=None)
-

A set-specific equality assertion.

-
-
Args:

set1: The first set to compare. -set2: The second set to compare. -msg: Optional message to use on failure instead of a list of

-
-

differences.

-
-
-
-

assertSetEqual uses ducktyping to support different types of sets, and -is optimized for sets specifically (parameters must support a -difference method).

-
- -
-
-assertTrue(expr, msg=None)
-

Check that the expression is true.

-
- -
-
-assertTupleEqual(tuple1, tuple2, msg=None)
-

A tuple-specific equality assertion.

-
-
Args:

tuple1: The first tuple to compare. -tuple2: The second tuple to compare. -msg: Optional message to use on failure instead of a list of

-
-

differences.

-
-
-
-
- -
-
-assertWarns(expected_warning, *args, **kwargs)
-

Fail unless a warning of class warnClass is triggered -by the callable when invoked with specified positional and -keyword arguments. If a different type of warning is -triggered, it will not be handled: depending on the other -warning filtering rules in effect, it might be silenced, printed -out, or raised as an exception.

-

If called with the callable and arguments omitted, will return a -context object used like this:

-
with self.assertWarns(SomeWarning):
-    do_something()
-
-
-

An optional keyword argument ‘msg’ can be provided when assertWarns -is used as a context object.

-

The context manager keeps a reference to the first matching -warning as the ‘warning’ attribute; similarly, the ‘filename’ -and ‘lineno’ attributes give you information about the line -of Python code from which the warning was triggered. -This allows you to inspect the warning after the assertion:

-
with self.assertWarns(SomeWarning) as cm:
-    do_something()
-the_warning = cm.warning
-self.assertEqual(the_warning.some_attribute, 147)
-
-
-
- -
-
-assertWarnsRegex(expected_warning, expected_regex, *args, **kwargs)
-

Asserts that the message in a triggered warning matches a regexp. -Basic functioning is similar to assertWarns() with the addition -that only warnings whose messages also match the regular expression -are considered successful matches.

-
-
Args:

expected_warning: Warning class expected to be triggered. -expected_regex: Regex (re pattern object or string) expected

-
-

to be found in error message.

-
-

args: Function to be called and extra positional args. -kwargs: Extra kwargs. -msg: Optional message used in case of failure. Can only be used

-
-

when assertWarnsRegex is used as a context manager.

-
-
-
-
- -
-
-debug()
-

Run the test without collecting errors in a TestResult

-
- -
-
-doCleanups()
-

Execute all cleanup functions. Normally called for you after -tearDown.

-
- -
-
-fail(msg=None)
-

Fail immediately, with the given message.

-
- -
-
-failureException
-

alias of AssertionError

-
- -
-
-setUp()
-

Hook method for setting up the test fixture before exercising it.

-
- -
-
-classmethod setUpClass()
-

Hook method for setting up class fixture before running tests in the class.

-
- -
-
-shortDescription()
-

Returns a one-line description of the test, or None if no -description has been provided.

-

The default implementation of this method returns the first line of -the specified test method’s docstring.

-
- -
-
-skipTest(reason)
-

Skip this test.

-
- -
-
-subTest(msg=<object object>, **params)
-

Return a context manager that will return the enclosed block -of code in a subtest identified by the optional message and -keyword parameters. A failure in the subtest marks the test -case as failed but resumes execution at the end of the enclosed -block, allowing further test code to be executed.

-
- -
-
-tearDown()
-

Hook method for deconstructing the test fixture after testing it.

-
- -
-
-classmethod tearDownClass()
-

Hook method for deconstructing the class fixture after running all tests in the class.

-
- -
- -
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.spaces.test_image_continuous.html b/docs/_build/html/_autosummary/mdp_playground.spaces.test_image_continuous.html deleted file mode 100644 index f108e08..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.spaces.test_image_continuous.html +++ /dev/null @@ -1,508 +0,0 @@ - - - - - - - - mdp_playground.spaces.test_image_continuous — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.spaces.test_image_continuous

-

Classes

- ---- - - - - - -

TestImageContinuous([methodName])

Create an instance of the class that will use the named test method when executed.

-
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.spaces.test_image_multi_discrete.TestImageMultiDiscrete.html b/docs/_build/html/_autosummary/mdp_playground.spaces.test_image_multi_discrete.TestImageMultiDiscrete.html deleted file mode 100644 index 1542bf6..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.spaces.test_image_multi_discrete.TestImageMultiDiscrete.html +++ /dev/null @@ -1,1200 +0,0 @@ - - - - - - - - mdp_playground.spaces.test_image_multi_discrete.TestImageMultiDiscrete — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.spaces.test_image_multi_discrete.TestImageMultiDiscrete

-
-
-class mdp_playground.spaces.test_image_multi_discrete.TestImageMultiDiscrete(methodName='runTest')[source]
-

Bases: unittest.case.TestCase

-

Create an instance of the class that will use the named test -method when executed. Raises a ValueError if the instance does -not have a method with the specified name.

-
-
-__init__(methodName='runTest')
-

Create an instance of the class that will use the named test -method when executed. Raises a ValueError if the instance does -not have a method with the specified name.

-
- -

Methods

- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

__init__([methodName])

Create an instance of the class that will use the named test method when executed.

addCleanup(function, *args, **kwargs)

Add a function, with arguments, to be called when the test is completed.

addTypeEqualityFunc(typeobj, function)

Add a type specific assertEqual style function to compare a type.

assertAlmostEqual(first, second[, places, …])

Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the difference between the two objects is more than the given delta.

assertAlmostEquals(**kwargs)

assertCountEqual(first, second[, msg])

An unordered sequence comparison asserting that the same elements, regardless of order.

assertDictContainsSubset(subset, dictionary)

Checks whether dictionary is a superset of subset.

assertDictEqual(d1, d2[, msg])

assertEqual(first, second[, msg])

Fail if the two objects are unequal as determined by the ‘==’ operator.

assertEquals(**kwargs)

assertFalse(expr[, msg])

Check that the expression is false.

assertGreater(a, b[, msg])

Just like self.assertTrue(a > b), but with a nicer default message.

assertGreaterEqual(a, b[, msg])

Just like self.assertTrue(a >= b), but with a nicer default message.

assertIn(member, container[, msg])

Just like self.assertTrue(a in b), but with a nicer default message.

assertIs(expr1, expr2[, msg])

Just like self.assertTrue(a is b), but with a nicer default message.

assertIsInstance(obj, cls[, msg])

Same as self.assertTrue(isinstance(obj, cls)), with a nicer default message.

assertIsNone(obj[, msg])

Same as self.assertTrue(obj is None), with a nicer default message.

assertIsNot(expr1, expr2[, msg])

Just like self.assertTrue(a is not b), but with a nicer default message.

assertIsNotNone(obj[, msg])

Included for symmetry with assertIsNone.

assertLess(a, b[, msg])

Just like self.assertTrue(a < b), but with a nicer default message.

assertLessEqual(a, b[, msg])

Just like self.assertTrue(a <= b), but with a nicer default message.

assertListEqual(list1, list2[, msg])

A list-specific equality assertion.

assertLogs([logger, level])

Fail unless a log message of level level or higher is emitted on logger_name or its children.

assertMultiLineEqual(first, second[, msg])

Assert that two multi-line strings are equal.

assertNotAlmostEqual(first, second[, …])

Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the difference between the two objects is less than the given delta.

assertNotAlmostEquals(**kwargs)

assertNotEqual(first, second[, msg])

Fail if the two objects are equal as determined by the ‘!=’ operator.

assertNotEquals(**kwargs)

assertNotIn(member, container[, msg])

Just like self.assertTrue(a not in b), but with a nicer default message.

assertNotIsInstance(obj, cls[, msg])

Included for symmetry with assertIsInstance.

assertNotRegex(text, unexpected_regex[, msg])

Fail the test if the text matches the regular expression.

assertNotRegexpMatches(**kwargs)

assertRaises(expected_exception, *args, **kwargs)

Fail unless an exception of class expected_exception is raised by the callable when invoked with specified positional and keyword arguments.

assertRaisesRegex(expected_exception, …)

Asserts that the message in a raised exception matches a regex.

assertRaisesRegexp(**kwargs)

assertRegex(text, expected_regex[, msg])

Fail the test unless the text matches the regular expression.

assertRegexpMatches(**kwargs)

assertSequenceEqual(seq1, seq2[, msg, seq_type])

An equality assertion for ordered sequences (like lists and tuples).

assertSetEqual(set1, set2[, msg])

A set-specific equality assertion.

assertTrue(expr[, msg])

Check that the expression is true.

assertTupleEqual(tuple1, tuple2[, msg])

A tuple-specific equality assertion.

assertWarns(expected_warning, *args, **kwargs)

Fail unless a warning of class warnClass is triggered by the callable when invoked with specified positional and keyword arguments.

assertWarnsRegex(expected_warning, …)

Asserts that the message in a triggered warning matches a regexp.

assert_(**kwargs)

countTestCases()

debug()

Run the test without collecting errors in a TestResult

defaultTestResult()

doCleanups()

Execute all cleanup functions.

fail([msg])

Fail immediately, with the given message.

failIf(**kwargs)

failIfAlmostEqual(**kwargs)

failIfEqual(**kwargs)

failUnless(**kwargs)

failUnlessAlmostEqual(**kwargs)

failUnlessEqual(**kwargs)

failUnlessRaises(**kwargs)

id()

run([result])

setUp()

Hook method for setting up the test fixture before exercising it.

setUpClass()

Hook method for setting up class fixture before running tests in the class.

shortDescription()

Returns a one-line description of the test, or None if no description has been provided.

skipTest(reason)

Skip this test.

subTest([msg])

Return a context manager that will return the enclosed block of code in a subtest identified by the optional message and keyword parameters.

tearDown()

Hook method for deconstructing the test fixture after testing it.

tearDownClass()

Hook method for deconstructing the class fixture after running all tests in the class.

test_image_multi_discrete()

-

Attributes

- ---- - - - - - - - - -

longMessage

maxDiff

-
-
-addCleanup(function, *args, **kwargs)
-

Add a function, with arguments, to be called when the test is -completed. Functions added are called on a LIFO basis and are -called after tearDown on test failure or success.

-

Cleanup items are called even if setUp fails (unlike tearDown).

-
- -
-
-addTypeEqualityFunc(typeobj, function)
-

Add a type specific assertEqual style function to compare a type.

-

This method is for use by TestCase subclasses that need to register -their own type equality functions to provide nicer error messages.

-
-
Args:
-
typeobj: The data type to call this function on when both values

are of the same type in assertEqual().

-
-
function: The callable taking two arguments and an optional

msg= argument that raises self.failureException with a -useful error message when the two arguments are not equal.

-
-
-
-
-
- -
-
-assertAlmostEqual(first, second, places=None, msg=None, delta=None)
-

Fail if the two objects are unequal as determined by their -difference rounded to the given number of decimal places -(default 7) and comparing to zero, or by comparing that the -difference between the two objects is more than the given -delta.

-

Note that decimal places (from zero) are usually not the same -as significant digits (measured from the most significant digit).

-

If the two objects compare equal then they will automatically -compare almost equal.

-
- -
-
-assertCountEqual(first, second, msg=None)
-

An unordered sequence comparison asserting that the same elements, -regardless of order. If the same element occurs more than once, -it verifies that the elements occur the same number of times.

-
-
-
-
self.assertEqual(Counter(list(first)),

Counter(list(second)))

-
-
-
-
-
Example:
    -
  • [0, 1, 1] and [1, 0, 1] compare equal.

  • -
  • [0, 0, 1] and [0, 1] compare unequal.

  • -
-
-
-
-
- -
-
-assertDictContainsSubset(subset, dictionary, msg=None)
-

Checks whether dictionary is a superset of subset.

-
- -
-
-assertEqual(first, second, msg=None)
-

Fail if the two objects are unequal as determined by the ‘==’ -operator.

-
- -
-
-assertFalse(expr, msg=None)
-

Check that the expression is false.

-
- -
-
-assertGreater(a, b, msg=None)
-

Just like self.assertTrue(a > b), but with a nicer default message.

-
- -
-
-assertGreaterEqual(a, b, msg=None)
-

Just like self.assertTrue(a >= b), but with a nicer default message.

-
- -
-
-assertIn(member, container, msg=None)
-

Just like self.assertTrue(a in b), but with a nicer default message.

-
- -
-
-assertIs(expr1, expr2, msg=None)
-

Just like self.assertTrue(a is b), but with a nicer default message.

-
- -
-
-assertIsInstance(obj, cls, msg=None)
-

Same as self.assertTrue(isinstance(obj, cls)), with a nicer -default message.

-
- -
-
-assertIsNone(obj, msg=None)
-

Same as self.assertTrue(obj is None), with a nicer default message.

-
- -
-
-assertIsNot(expr1, expr2, msg=None)
-

Just like self.assertTrue(a is not b), but with a nicer default message.

-
- -
-
-assertIsNotNone(obj, msg=None)
-

Included for symmetry with assertIsNone.

-
- -
-
-assertLess(a, b, msg=None)
-

Just like self.assertTrue(a < b), but with a nicer default message.

-
- -
-
-assertLessEqual(a, b, msg=None)
-

Just like self.assertTrue(a <= b), but with a nicer default message.

-
- -
-
-assertListEqual(list1, list2, msg=None)
-

A list-specific equality assertion.

-
-
Args:

list1: The first list to compare. -list2: The second list to compare. -msg: Optional message to use on failure instead of a list of

-
-

differences.

-
-
-
-
- -
-
-assertLogs(logger=None, level=None)
-

Fail unless a log message of level level or higher is emitted -on logger_name or its children. If omitted, level defaults to -INFO and logger defaults to the root logger.

-

This method must be used as a context manager, and will yield -a recording object with two attributes: output and records. -At the end of the context manager, the output attribute will -be a list of the matching formatted log messages and the -records attribute will be a list of the corresponding LogRecord -objects.

-

Example:

-
with self.assertLogs('foo', level='INFO') as cm:
-    logging.getLogger('foo').info('first message')
-    logging.getLogger('foo.bar').error('second message')
-self.assertEqual(cm.output, ['INFO:foo:first message',
-                             'ERROR:foo.bar:second message'])
-
-
-
- -
-
-assertMultiLineEqual(first, second, msg=None)
-

Assert that two multi-line strings are equal.

-
- -
-
-assertNotAlmostEqual(first, second, places=None, msg=None, delta=None)
-

Fail if the two objects are equal as determined by their -difference rounded to the given number of decimal places -(default 7) and comparing to zero, or by comparing that the -difference between the two objects is less than the given delta.

-

Note that decimal places (from zero) are usually not the same -as significant digits (measured from the most significant digit).

-

Objects that are equal automatically fail.

-
- -
-
-assertNotEqual(first, second, msg=None)
-

Fail if the two objects are equal as determined by the ‘!=’ -operator.

-
- -
-
-assertNotIn(member, container, msg=None)
-

Just like self.assertTrue(a not in b), but with a nicer default message.

-
- -
-
-assertNotIsInstance(obj, cls, msg=None)
-

Included for symmetry with assertIsInstance.

-
- -
-
-assertNotRegex(text, unexpected_regex, msg=None)
-

Fail the test if the text matches the regular expression.

-
- -
-
-assertRaises(expected_exception, *args, **kwargs)
-

Fail unless an exception of class expected_exception is raised -by the callable when invoked with specified positional and -keyword arguments. If a different type of exception is -raised, it will not be caught, and the test case will be -deemed to have suffered an error, exactly as for an -unexpected exception.

-

If called with the callable and arguments omitted, will return a -context object used like this:

-
with self.assertRaises(SomeException):
-    do_something()
-
-
-

An optional keyword argument ‘msg’ can be provided when assertRaises -is used as a context object.

-

The context manager keeps a reference to the exception as -the ‘exception’ attribute. This allows you to inspect the -exception after the assertion:

-
with self.assertRaises(SomeException) as cm:
-    do_something()
-the_exception = cm.exception
-self.assertEqual(the_exception.error_code, 3)
-
-
-
- -
-
-assertRaisesRegex(expected_exception, expected_regex, *args, **kwargs)
-

Asserts that the message in a raised exception matches a regex.

-
-
Args:

expected_exception: Exception class expected to be raised. -expected_regex: Regex (re pattern object or string) expected

-
-

to be found in error message.

-
-

args: Function to be called and extra positional args. -kwargs: Extra kwargs. -msg: Optional message used in case of failure. Can only be used

-
-

when assertRaisesRegex is used as a context manager.

-
-
-
-
- -
-
-assertRegex(text, expected_regex, msg=None)
-

Fail the test unless the text matches the regular expression.

-
- -
-
-assertSequenceEqual(seq1, seq2, msg=None, seq_type=None)
-

An equality assertion for ordered sequences (like lists and tuples).

-

For the purposes of this function, a valid ordered sequence type is one -which can be indexed, has a length, and has an equality operator.

-
-
Args:

seq1: The first sequence to compare. -seq2: The second sequence to compare. -seq_type: The expected datatype of the sequences, or None if no

-
-

datatype should be enforced.

-
-
-
msg: Optional message to use on failure instead of a list of

differences.

-
-
-
-
-
- -
-
-assertSetEqual(set1, set2, msg=None)
-

A set-specific equality assertion.

-
-
Args:

set1: The first set to compare. -set2: The second set to compare. -msg: Optional message to use on failure instead of a list of

-
-

differences.

-
-
-
-

assertSetEqual uses ducktyping to support different types of sets, and -is optimized for sets specifically (parameters must support a -difference method).

-
- -
-
-assertTrue(expr, msg=None)
-

Check that the expression is true.

-
- -
-
-assertTupleEqual(tuple1, tuple2, msg=None)
-

A tuple-specific equality assertion.

-
-
Args:

tuple1: The first tuple to compare. -tuple2: The second tuple to compare. -msg: Optional message to use on failure instead of a list of

-
-

differences.

-
-
-
-
- -
-
-assertWarns(expected_warning, *args, **kwargs)
-

Fail unless a warning of class warnClass is triggered -by the callable when invoked with specified positional and -keyword arguments. If a different type of warning is -triggered, it will not be handled: depending on the other -warning filtering rules in effect, it might be silenced, printed -out, or raised as an exception.

-

If called with the callable and arguments omitted, will return a -context object used like this:

-
with self.assertWarns(SomeWarning):
-    do_something()
-
-
-

An optional keyword argument ‘msg’ can be provided when assertWarns -is used as a context object.

-

The context manager keeps a reference to the first matching -warning as the ‘warning’ attribute; similarly, the ‘filename’ -and ‘lineno’ attributes give you information about the line -of Python code from which the warning was triggered. -This allows you to inspect the warning after the assertion:

-
with self.assertWarns(SomeWarning) as cm:
-    do_something()
-the_warning = cm.warning
-self.assertEqual(the_warning.some_attribute, 147)
-
-
-
- -
-
-assertWarnsRegex(expected_warning, expected_regex, *args, **kwargs)
-

Asserts that the message in a triggered warning matches a regexp. -Basic functioning is similar to assertWarns() with the addition -that only warnings whose messages also match the regular expression -are considered successful matches.

-
-
Args:

expected_warning: Warning class expected to be triggered. -expected_regex: Regex (re pattern object or string) expected

-
-

to be found in error message.

-
-

args: Function to be called and extra positional args. -kwargs: Extra kwargs. -msg: Optional message used in case of failure. Can only be used

-
-

when assertWarnsRegex is used as a context manager.

-
-
-
-
- -
-
-debug()
-

Run the test without collecting errors in a TestResult

-
- -
-
-doCleanups()
-

Execute all cleanup functions. Normally called for you after -tearDown.

-
- -
-
-fail(msg=None)
-

Fail immediately, with the given message.

-
- -
-
-failureException
-

alias of AssertionError

-
- -
-
-setUp()
-

Hook method for setting up the test fixture before exercising it.

-
- -
-
-classmethod setUpClass()
-

Hook method for setting up class fixture before running tests in the class.

-
- -
-
-shortDescription()
-

Returns a one-line description of the test, or None if no -description has been provided.

-

The default implementation of this method returns the first line of -the specified test method’s docstring.

-
- -
-
-skipTest(reason)
-

Skip this test.

-
- -
-
-subTest(msg=<object object>, **params)
-

Return a context manager that will return the enclosed block -of code in a subtest identified by the optional message and -keyword parameters. A failure in the subtest marks the test -case as failed but resumes execution at the end of the enclosed -block, allowing further test code to be executed.

-
- -
-
-tearDown()
-

Hook method for deconstructing the test fixture after testing it.

-
- -
-
-classmethod tearDownClass()
-

Hook method for deconstructing the class fixture after running all tests in the class.

-
- -
- -
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.spaces.test_image_multi_discrete.html b/docs/_build/html/_autosummary/mdp_playground.spaces.test_image_multi_discrete.html deleted file mode 100644 index 3209793..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.spaces.test_image_multi_discrete.html +++ /dev/null @@ -1,508 +0,0 @@ - - - - - - - - mdp_playground.spaces.test_image_multi_discrete — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.spaces.test_image_multi_discrete

-

Classes

- ---- - - - - - -

TestImageMultiDiscrete([methodName])

Create an instance of the class that will use the named test method when executed.

-
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.spaces.tuple_extended.TupleExtended.html b/docs/_build/html/_autosummary/mdp_playground.spaces.tuple_extended.TupleExtended.html deleted file mode 100644 index 1a9cc53..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.spaces.tuple_extended.TupleExtended.html +++ /dev/null @@ -1,566 +0,0 @@ - - - - - - - - mdp_playground.spaces.tuple_extended.TupleExtended — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.spaces.tuple_extended.TupleExtended

-
-
-class mdp_playground.spaces.tuple_extended.TupleExtended(spaces, seed=None)[source]
-

Bases: gym.spaces.tuple.Tuple

-

Currently, this class doesn’t do anything special except allowing to seed from __init__().

-
-
-__init__(spaces, seed=None)[source]
-

Initialize self. See help(type(self)) for accurate signature.

-
- -

Methods

- ---- - - - - - - - - - - - - - - - - - - - - -

__init__(spaces[, seed])

Initialize self.

contains(x)

Return boolean specifying if x is a valid member of this space

from_jsonable(sample_n)

Convert a JSONable data type to a batch of samples from this space.

sample()

Randomly sample an element of this space.

seed([seed])

Seed the PRNG of this space.

to_jsonable(sample_n)

Convert a batch of samples from this space to a JSONable data type.

-
-
-contains(x)
-

Return boolean specifying if x is a valid -member of this space

-
- -
-
-from_jsonable(sample_n)
-

Convert a JSONable data type to a batch of samples from this space.

-
- -
-
-sample()
-

Randomly sample an element of this space. Can be -uniform or non-uniform sampling based on boundedness of space.

-
- -
-
-seed(seed=None)
-

Seed the PRNG of this space.

-
- -
-
-to_jsonable(sample_n)
-

Convert a batch of samples from this space to a JSONable data type.

-
- -
- -
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_autosummary/mdp_playground.spaces.tuple_extended.html b/docs/_build/html/_autosummary/mdp_playground.spaces.tuple_extended.html deleted file mode 100644 index 24ff004..0000000 --- a/docs/_build/html/_autosummary/mdp_playground.spaces.tuple_extended.html +++ /dev/null @@ -1,508 +0,0 @@ - - - - - - - - mdp_playground.spaces.tuple_extended — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

mdp_playground.spaces.tuple_extended

-

Classes

- ---- - - - - - -

TupleExtended(spaces[, seed])

Currently, this class doesn’t do anything special except allowing to seed from __init__().

-
- - -
- - - - -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_modules/index.html b/docs/_build/html/_modules/index.html deleted file mode 100644 index 2be3fd2..0000000 --- a/docs/_build/html/_modules/index.html +++ /dev/null @@ -1,489 +0,0 @@ - - - - - - - - Overview: module code — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - -
- - -
- -
-
-
-
- -
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_modules/mdp_playground/analysis/analysis.html b/docs/_build/html/_modules/mdp_playground/analysis/analysis.html deleted file mode 100644 index d70886e..0000000 --- a/docs/_build/html/_modules/mdp_playground/analysis/analysis.html +++ /dev/null @@ -1,1308 +0,0 @@ - - - - - - - - mdp_playground.analysis.analysis — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -

Source code for mdp_playground.analysis.analysis

-import numpy as np
-import pandas as pd
-import matplotlib.pyplot as plt
-from . import radar_chart
-import os
-import warnings
-import math
-
-
[docs]class MDPP_Analysis(): - '''Utility class to load and plot data for analysis of experiments from MDP Playground - - ''' -
[docs] def __init__(self): - pass
- -
[docs] def load_data(self, experiments: dict, load_eval=True, exp_type='grid'): - '''Loads training and evaluation data from given multiple files - - Parameters - ---------- - experiments : dict<str,str> - per experiment -> key-value pair of exp_name & dir_name - - dir_name : str - The location where the training and evaluation CSV files were written - exp_name : str - The name of the experiment: the training and evaluation CSV filenames are formed using this string - - eg: experiments = { - "td3_move_to_a_point_action_max": "<path_to_data_dir>", - ..... - } - - Returns - ------- - list of experiment data of type <dict> - [ for more details refer get_exp_data() ] - - ''' - list_exp_data = [] - for exp_name, dir_name in experiments.items(): - exp_data = self.get_exp_data(dir_name, exp_name, exp_type=exp_type, load_eval=load_eval) - list_exp_data.append(exp_data) - return list_exp_data
- -
[docs] def get_exp_data(self, dir_name, exp_name, exp_type='grid', num_metrics=3, - load_eval=True, threshold=0.05, sample_freq=1): - #, max_total_configs=200): - '''Get training and evaluation data from a single set of recorded CSV stats files. - - Parameters - ---------- - dir_name : str - The location where the training and evaluation CSV files were written - exp_name : str - The name of the experiment: the training and evaluation CSV filenames are formed using this string - exp_type : str - One of ['grid', 'random']. If it's 'grid', it's assumed that a grid of configurations was run and data loading takes place in a manner specific to grids. Otherwise, data loading tries to look for different unique configurations run. - num_metrics : int - The number of metrics that were written to CSV stats files. Default is 3 (timesteps_total, episode_reward_mean, episode_len_mean). - load_eval : bool - Whether to load evaluation stats CSV or not. - threshold : float - The fault tolerance threshold while loading data. Show warnings for files where the number of data rows deviates by more than the threshold value (from the mean number of rows across the loaded files), e.g., if the threshold = 0.05 and mean number of rows across the loaded files = 20, a warning is displayed when for a loaded file the number of rows < 19. - sample_freq : int - The subsampling frequency when loading data. Sub-select data lines based on this value, e.g., if sample_freq = 5, load every 5th row in a file. - - Returns - ------- - experiment data: dictionary type with following key-value - - train_stats : np.ndarray - Training stats at end of training: 8-D tensor with 1st 6 dims the meta-features of MDP Playground, 7th dim is across the seeds, 8th dim is across different stats saved - eval_stats : np.ndarray - Training stats at end of training: 8-D tensor with 1st 6 dims the meta-features of MDP Playground, 7th dim is across the seeds, 8th dim is across different stats saved - train_curves: np.ndarray - The loaded training CSV with the last 3 columns the train stats that were saved and the initial columns are various setting for the algorithm and environment. - eval_curves: np.ndarray - The loaded evaluation CSV with the columns the evaluation stats that were saved - ''' - - stats_file = dir_name + '/' + exp_name #Name of file to which benchmark stats were written - self.stats_file = stats_file - - if os.path.isfile(stats_file + '.csv'): - print("\033[1;31mLoading data from a sequential run/already combined runs of experiment configurations:\033[0;0m " + stats_file + '.csv') - else: - print("Loading data from a distributed run of experiment configurations. Creating a combined CSV stats file.") - train_data = dict() - eval_data = dict() - - def join_files(file_prefix, file_suffix): - '''Utility to join files that were written with different experiment configs''' - with open(file_prefix + file_suffix, 'ab') as combined_file: - i = 0 - missing_configs = [] - num_diff_lines = [] - while True: # i < max_total_configs: - if os.path.isfile(file_prefix + '_' + str(i) + file_suffix): - with open(file_prefix + '_' + str(i) + file_suffix, 'rb') as curr_file: - byte_string = curr_file.read() - newline_count = byte_string.count(10) - num_diff_lines.append(newline_count) - combined_file.write(byte_string) - - if file_suffix == '.csv': - # train data - train_data[os.path.basename(curr_file.name)] = newline_count - else: - # eval data - eval_data[os.path.basename(curr_file.name)] = newline_count - else: - # missing_configs.append(i) - break - i += 1 - print(str(i) + " files were combined into 1 for file:" + file_prefix + '_n' + file_suffix) - # print("Files missing for config_nums:", missing_configs, ". Did you pass the right value for max_total_configs as an argument?") - # print("Unique line count values:", np.unique(num_diff_lines)) - if i==0: - raise FileNotFoundError("No files to combine were present. Please check your location and/or filenames that they are correct. Filename passed: " + file_prefix + file_suffix) - join_files(stats_file, '.csv') - join_files(stats_file, '_eval.csv') - - train_mean_cnt = np.mean(list(train_data.values())) - eval_mean_cnt = np.mean(list(eval_data.values())) - - # fault tolerance check - for file_name, line_count in train_data.items(): - if line_count < train_mean_cnt * (1 - threshold): - warnings.warn('Expected a minimum of {0} rows in each stats file. Got only: {1} in file: {2}'.format(train_mean_cnt * (1 - threshold), line_count, file_name)) - for file_name, line_count in eval_data.items(): - if line_count < eval_mean_cnt * (1 - threshold): - warnings.warn('Expected a minimum of {0} rows in each stats file. Got only: {1} in file: {2}'.format(eval_mean_cnt * (1 - threshold), line_count, file_name)) - - # Read column names - with open(stats_file + '.csv') as file_: - col_names = file_.readline().strip().split(', ') - col_names[0] = col_names[0][2:] # to remove '# ' that was written - # print("config_names:", col_names) - - stats_pd = pd.read_csv(stats_file + '.csv', skip_blank_lines=True,\ - header=None, names = col_names, comment='#', sep=' ') - # subsampling code - stats_pd_indices = np.arange(0, stats_pd.shape[0], step=sample_freq) - stats_pd = stats_pd.loc[stats_pd_indices] - - self.stats_pd = stats_pd - print("Training stats read (rows, columns):", stats_pd.shape) - - config_counts = [] - dims_values = [] - # Keep only config_names that we want to measure - # traning iteration is always first, metrics are always last. - self.full_config_names = col_names.copy() - full_config_names = self.full_config_names - full_config_names.remove("training_iteration") - - - #config counts includes seed - self.seed_idx = None # seed used to be fixed as the last, i.e., - # quickest varying dimension in the <experiment config>.py file's - # config space because then all runs on a single env would be recorded - # consecutively in the stats CSV - self.ts_idx = None - for i, c in enumerate(full_config_names[:-num_metrics]): - dims_values.append(stats_pd[c].unique()) - config_counts.append(stats_pd[c].nunique()) - if("seed" in c): # ##TODO this will just set seed index to be - # the "last" column name with seed in it. - self.seed_idx = i - if c == "timesteps_total": - self.ts_idx = i - - - config_counts.append(num_metrics) # #hardcoded number of training - # stats that were recorded - config_counts = tuple(config_counts) - self.metric_names = full_config_names[-num_metrics:] - self.config_names = full_config_names[:-num_metrics] - - # Slice into training stats and get end of training stats for - # individual training runs in the experiment - final_rows_for_a_config = [] - previous_i = 0 - list_of_learning_curves = [] - # cols_to_take = 8 - - #Finding end configuration training - for i in range(stats_pd.shape[0] - 1): - if stats_pd["timesteps_total"].iloc[i] > stats_pd["timesteps_total"].iloc[ i + 1]: - final_rows_for_a_config.append(i) - - # print("i, previous_i:", i, previous_i) - final_rows_for_a_config.append(i + 1) # Always append the last row! - self.final_rows_for_a_config = final_rows_for_a_config - stats_end_of_training = stats_pd.iloc[final_rows_for_a_config] - if exp_type == 'grid': - train_stats = stats_end_of_training.iloc[:, -num_metrics:] # last vals are timesteps_total, episode_reward_mean, episode_len_mean - train_stats = np.reshape(np.array(train_stats), config_counts) - elif exp_type == 'random': - train_stats = stats_end_of_training # Includes config values within dataframe as opposed to only perf. metrics for the grid case above - # train_stats = stats_end_of_training.iloc[:, -num_metrics:] # Saves space by not including config values. # last vals are timesteps_total, episode_reward_mean, episode_len_mean ### TODO remove - - pass - else: - raise ValueError('Please check exp_type passed. Was:' + exp_type) - - print("train stats shape:", train_stats.shape) - - # Calculate AUC metrics - train_aucs = [] - for i in range(len(final_rows_for_a_config)): - if i == 0: - to_avg_ = stats_pd.iloc[0:self.final_rows_for_a_config[i]+1, -num_metrics:] - else: - to_avg_ = stats_pd.iloc[self.final_rows_for_a_config[i-1]+1:self.final_rows_for_a_config[i]+1, -num_metrics:] - auc = np.mean(to_avg_, axis=0) - train_aucs.append(auc) - # print(auc) - train_aucs = np.array(train_aucs) - - if exp_type == 'grid': - train_aucs = np.reshape(train_aucs, config_counts) - elif exp_type == 'random': - train_aucs_ = train_stats.copy() - train_aucs_.iloc[:, -num_metrics:] = train_aucs - train_aucs = train_aucs_ - pass - print("train_aucs.shape:", train_aucs.shape) - - - # Load evaluation stats - eval_stats, mean_data_eval, eval_aucs = None, None, None - # load_eval = False # hack #### TODO rectify - if load_eval: - stats_file_eval = stats_file + '_eval.csv' - eval_stats = np.loadtxt(stats_file_eval, dtype=float) - # print(eval_stats, eval_stats.shape) - - i = 0 - hack_indices = [] - for line in open(stats_file_eval): - - line=line.strip() - # print(line) - if line.startswith("#HACK"): - # print(line, i) - hack_indices.append(i - len(hack_indices)) # appends index of last eval in this training_iteration - i += 1 - - # print("len(hack_indices), hack_indices[:5] and [:-5]:", len(hack_indices), hack_indices[:5], hack_indices[-5:]) - if hack_indices[0] == 0: #hack - hack_indices = hack_indices[1:] #hardcoded removes the 1st hack_index which is at position 0 so that hack_indices_10 below doesn't begin with a -10; apparently Ray seems to have changed logging for evaluation (using on_episode_end) from 0.7.3 to 0.9.0 - ray_0_9_0 = True - else: - ray_0_9_0 = False - hack_indices_10 = np.array(hack_indices) - 10 - # print(hack_indices_10.shape, hack_indices_10[:5], hack_indices_10[-5:]) - # print(np.array(hack_indices[1:]) - np.array(hack_indices[:-1])) - # print("Min:", min(np.array(hack_indices[1:]) - np.array(hack_indices[:-1]))) # Some problem with Ray? Sometimes no. of eval episodes is less than 10. - final_10_evals = [] - for i in range(len(hack_indices)): - final_10_evals.append(eval_stats[hack_indices_10[i]:hack_indices[i]]) - # print(final_10_evals[-1]) - if ray_0_9_0: #hack - final_10_evals.append(eval_stats[hack_indices[i]:]) # appends the very last eval which begins at last hack_index for Ray 0.9.0 - - final_10_evals = np.array(final_10_evals) # has 2 columns: episode reward and episode length - # print(final_10_evals.shape, final_10_evals) - - - # final_vals = fin[final_rows_for_a_config] - # print('final_rows_for_a_config', final_rows_for_a_config) - # print("len(final_10_evals)", final_10_evals.shape, type(final_10_evals)) - mean_data_eval = np.mean(final_10_evals, axis=1) # this is mean over last 10 eval episodes - - # subsampling code - eval_stats_indices = np.arange(0, mean_data_eval.shape[0], step=sample_freq) - mean_data_eval = mean_data_eval[eval_stats_indices] - - # Adds timesteps_total column to the eval stats which did not have them: - mean_data_eval = np.concatenate((np.atleast_2d(np.array(stats_pd.iloc[:, -num_metrics])).T, mean_data_eval), axis=1) - - final_eval_metrics_ = mean_data_eval[final_rows_for_a_config, :] # 1st column is episode reward, 2nd is episode length in original _eval.csv file, here it's 2nd and 3rd after prepending timesteps_total column above. - # print(dims_values, config_counts) - - if exp_type == 'grid': - eval_stats = np.reshape(final_eval_metrics_, config_counts) - # print(final_eval_metrics_) - elif exp_type == 'random': - eval_stats = final_eval_metrics_ - eval_stats = np.concatenate((np.atleast_2d(np.array(train_stats.iloc[:, :-num_metrics])), eval_stats), axis=1) # Includes config values within dataframe as opposed to only perf. metrics for the grid case above - - eval_stats = pd.DataFrame(eval_stats, columns=train_stats.columns) - print("eval stats shape:", eval_stats.shape) - - - # Calculate AUC metrics - eval_aucs = [] - for i in range(len(final_rows_for_a_config)): - if i == 0: - to_avg_ = mean_data_eval[0:self.final_rows_for_a_config[i]+1, -num_metrics:] - else: - to_avg_ = mean_data_eval[self.final_rows_for_a_config[i-1]+1:self.final_rows_for_a_config[i]+1, -num_metrics:] - auc = np.mean(to_avg_, axis=0) - eval_aucs.append(auc) - # print(auc) - eval_aucs = np.array(eval_aucs) - - if exp_type == 'grid': #TODO Do this at once for train_stats, eval_stats, train_aucs and eval_aucs - eval_aucs = np.reshape(eval_aucs, config_counts) - elif exp_type == 'random': - eval_aucs_ = eval_stats.copy() - eval_aucs_.iloc[:, -num_metrics:] = eval_aucs - eval_aucs = eval_aucs_ - - pass - - print("eval_aucs.shape:", eval_aucs.shape) - - - # -1 is added to ignore "no. of stats that were saved" as a dimension of difficulty - self.config_counts = config_counts[:-1] - self.dims_values = dims_values - - # Capture the dimensions that were varied, i.e. ones which had more than 1 value across experiments - x_axis_labels = [] - x_tick_labels_ = [] - dims_varied = [] - for i in range(len(self.config_counts)): - if("seed" in self.config_names[i]): # ignore #seeds as dimensions of difficulty - print("Number of seeds:", config_counts[i]) - continue - if self.config_counts[i]> 1: - x_axis_labels.append(self.config_names[i]) - x_tick_labels_.append([str(j) for j in self.dims_values[i]]) - for j in range(len(x_tick_labels_[-1])): - if len(x_tick_labels_[-1][j]) > 2: #hack - abridged_str = x_tick_labels_[-1][j].split(',') - if abridged_str[-1] == '': - abridged_str = abridged_str[:-1] - for k in range(len(abridged_str)): - if abridged_str[k] == 'scale': - abridged_str[k] = 'S' - elif abridged_str[k] == 'shift': - abridged_str[k] = 's' - elif abridged_str[k] == 'rotate': - abridged_str[k] = 'r' - elif abridged_str[k] == 'flip': - abridged_str[k] = 'f' - # abridged_str[j] = abridged_str[j][:2] - x_tick_labels_[-1][j] = ''.join(abridged_str) - dims_varied.append(i) - - if x_tick_labels_ == []: - warnings.warn("No varying dims were found!") - x_tick_labels_.append('single_config') - x_axis_labels.append('single_config') - dims_varied.append(0) - - self.axis_labels = x_axis_labels - self.tick_labels = x_tick_labels_ - self.dims_varied = dims_varied - for d, v, i in zip(x_axis_labels, x_tick_labels_, dims_varied): - print("Dimension varied:", d, ". The values it took:", v if (len(v) < 10 or type(v) != list) else str(v[:5] + v[-5:]) + " (1st 5 and last 5)", ". Number of values it took:", config_counts[i], ". Index in loaded data:", i) - - # experiment data - exp_data = dict() - # related to training & eval data - exp_data['train_stats'] = train_stats - exp_data['eval_stats'] = eval_stats - exp_data['train_curves'] = np.array(stats_pd) - exp_data['eval_curves'] = mean_data_eval - exp_data['train_aucs'] = train_aucs - exp_data['eval_aucs'] = eval_aucs - - # related to plots - # #TODO Remove the self from these since they are per expt. variables? - exp_data['metric_names'] = self.metric_names - exp_data['tick_labels'] = self.tick_labels - exp_data['axis_labels'] = self.axis_labels - exp_data['stats_file'] = self.stats_file - exp_data['algorithm'] = self.dims_values[0][0] - exp_data['dims_varied'] = self.dims_varied - exp_data['config_counts'] = self.config_counts - exp_data['final_rows_for_a_config'] = self.final_rows_for_a_config - exp_data['config_names'] = self.config_names - exp_data['dims_values'] = self.dims_values - exp_data['seed_idx'] = self.seed_idx - exp_data['ts_idx'] = self.ts_idx - - return exp_data
- - - def gather_stats(self, list_exp_data, train, metric_num, plot_type, use_aucs): - stats_data = dict() - - if plot_type == "agent": - #groupby agent - groupby = 'algorithm' - sub_groupby = 'axis_labels' - elif plot_type == "metric": - #groupby metric - groupby = 'axis_labels' - sub_groupby = 'algorithm' - - #iterate and group data based on the their values eg. ['SAC', 'TD3'] or ['action_space_max', 'time_unit'] - """ - example of experiment data grouped by agent: - { - <group_key> - "SAC": { - <sub_group_key> - "time_unit": { - "to_plot_": [], - "to_plot_std_": [], - .... - }, - "action_space_max": { - "to_plot_": [], - "to_plot_std_": [], - .... - }, - ........ - }, - "TD3": { - ...... - } - } - """ - for exp_data in list_exp_data: - if train: - if use_aucs: - stats = exp_data['train_aucs'] - else: - stats = exp_data['train_stats'] - else: - if use_aucs: - stats = exp_data['eval_aucs'] - else: - stats = exp_data['eval_stats'] - - group_keys = exp_data[groupby] - if isinstance(group_keys, str): - group_keys = [group_keys] - - for group_key in group_keys: - if group_key not in stats_data: - # if group_key is not alreay present initialize - stats_data[group_key] = dict() - - sub_group_keys = exp_data[sub_groupby] - if isinstance(sub_group_keys, str): - sub_group_keys = [sub_group_keys] - - for idx in range(len(sub_group_keys)): - sub_group_key = sub_group_keys[idx] - if sub_group_key not in stats_data[group_key]: - # if sub_group_key is not alreay present initialize - stats_data[group_key][sub_group_key] = dict() - - - # gather data related to plot - mean_data_ = np.mean(stats[..., metric_num], axis=exp_data['seed_idx']) # the slice sub-selects the metric written in position metric_num from the "last axis of diff. metrics that were written" and then the axis of #seeds becomes axis=-1 ( before slice it was -2). - to_plot_ = np.squeeze(mean_data_) - - #HACK traspose the array and choose first column elements always - if len(to_plot_.shape) > 1: - axes = np.arange(len(to_plot_.shape)) - new_axes = [axes[(i - idx) % len(axes)] for i, x in enumerate(axes)] - to_plot_ = np.transpose(to_plot_, tuple(new_axes))[:, 0] - stats_data[group_key][sub_group_key]['to_plot_'] = to_plot_ - - std_dev_ = np.std(stats[..., metric_num], axis=exp_data['seed_idx']) #seed - to_plot_std_ = np.squeeze(std_dev_) - - #HACK traspose the array and choose first column elements always - if len(to_plot_std_.shape) > 1: - to_plot_std_ = np.transpose(to_plot_std_, tuple(new_axes))[:, 0] - stats_data[group_key][sub_group_key]['to_plot_std_'] = to_plot_std_ - - stats_data[group_key][sub_group_key]['labels'] = sub_group_key - stats_data[group_key][sub_group_key]['tick_labels'] = exp_data['tick_labels'][idx] - stats_data[group_key][sub_group_key]['axis_labels'] = exp_data[groupby] - stats_data[group_key][sub_group_key]['metric_names'] = exp_data['metric_names'] - stats_data[group_key][sub_group_key]['stats_file'] = exp_data['stats_file'] - - return stats_data - -
[docs] def plot_1d_dimensions(self, list_exp_data, save_fig=False, train=True, use_aucs=False, metric_num=-2, plot_type = "agent"): - '''Plots 1-D bar plots across a single dimension with mean and std. dev. - - Parameters - ---------- - list_exp_data : list of experiment data of type <dict> - [ for more details refer load_data(), get_exp_data() ] - save_fig : bool, optional - A flag used to save a PDF (default is False) - train : bool, optional - A flag used to insert either _train or _eval in the filename of the PDF (default is True) - use_aucs : bool, optional - A flag used to insert _aucs in the filename of the PDF (default is False) - metric_num : - allowed values-> '-1' to plot episode mean lengths - '-2' to plot episode reward - plot_type : string describing how to group data and plot, say based on agent or metric - allowed values-> ['agent' ,'metric'] - - ''' - - stats_data = self.gather_stats(list_exp_data, train, metric_num, plot_type, use_aucs) - - #plot - for group_key in stats_data.keys(): - cols = 4 # hard-coded value - rows = math.ceil((len(stats_data[group_key].keys())/cols)) # dynamically compute - - plt.rcParams.update({'font.size': 18}) # default 12, for poster: 30 - plt.rcParams['figure.figsize'] = [7 * cols, 5 * rows] - - figure, axes = plt.subplots(nrows=rows, ncols=cols) # [n*1] or [n*2] grid - - i = j = 0 - colors = ['blue', 'orange', 'green', 'purple', 'cyan', 'olive', 'brown', 'grey', 'red', 'pink'] - for sub_group_key, color in zip(stats_data[group_key].keys(), colors): - if cols == 1 and rows == 1: - #single row, single column plot - self.plot_bar(axes, stats_data[group_key][sub_group_key], save_fig, metric_num, color) - elif rows ==1 : - #single row, multiple column plot - self.plot_bar(axes[j], stats_data[group_key][sub_group_key], save_fig, metric_num, color) - j +=1 - else : - #multiple row, multiple column plot - self.plot_bar(axes[i, j], stats_data[group_key][sub_group_key], save_fig, metric_num, color) - if j == cols-1: - #switch to next row 1st column - j = 0 - i += 1 - else: - #switch to same row next column - j += 1 - - # hide the blank plot (if any) - if j > 0 and j <= cols-1: - while j <= cols-1: - if i == 0: - #axes[j].set_visible(False) - axes[j].axis('off') - else: - #axes[i, j].set_visible(False) - axes[i, j].axis('off') - j += 1 - - figure.tight_layout(pad=3.0) - figure.suptitle(group_key, x=0.2, y=1, fontsize=24, fontweight='bold') - - # save figure - if save_fig: - fig_name = stats_data[group_key][sub_group_key]['stats_file'].split('/')[-1] + \ - ('_train' if train else '_eval') + ( '_aucs' if use_aucs else '')+ '_final_reward_' + \ - stats_data[group_key][sub_group_key]['axis_labels'].replace(' ','_') + \ - '_' + str(stats_data[group_key][sub_group_key]['metric_names'][metric_num]) + '_1d.pdf' - plt.savefig(fig_name, dpi=300, bbox_inches="tight") - - plt.show()
- -
[docs] def plot_bar(self, ax, stats_data, save_fig=False, metric_num=-2, bar_color='blue'): - '''Plots 1-D bar plots across a single dimension with mean and std. dev. - - Parameters - ---------- - ax: matplotlib axes instance to plot - stats_data : dictionary type with data related to ['train_stats', 'eval_stats', ...] - [ for more details refer load_data(), get_exp_data() ] - save_fig : bool, optional - A flag used to save a PDF (default is False) - metric_num : - allowed values-> '-1' to plot episode mean lengths - '-2' to plot episode reward - bar_color : the color of bars in plots - ''' - - y_axis_label = 'Reward' if 'reward' in stats_data['metric_names'][metric_num] else stats_data['metric_names'][metric_num] - - to_plot_ = stats_data['to_plot_'] - to_plot_std_ = stats_data['to_plot_std_'] - labels = stats_data['labels'] - tick_labels = stats_data['tick_labels'] - axis_labels = stats_data['axis_labels'] - stats_file = stats_data['stats_file'] - - x = np.arange(len(tick_labels)) - width = (x[1]-x[0])*0.8 # bar width - - ax.bar(x, to_plot_, width, yerr=to_plot_std_, label=labels, color=bar_color) - - ax.set_ylabel(y_axis_label) - #ax.set_xlabel(axis_labels) - ax.set_xticks(x) - #ax.set_title(labels) - ax.legend(loc='upper right') - ax.set_xticklabels(tick_labels)
- - -
[docs] def plot_2d_heatmap(self, list_exp_data, save_fig=False, train=True, metric_num=-2): - '''Plots 2 2-D heatmaps: 1 for mean and 1 for std. dev. across 2 meta-features of MDP Playground - - Parameters - ---------- - list_exp_data : list of experiment data of type <dict> - [ for more details refer load_data(), get_exp_data() ] - save_fig : bool, optional - A flag used to save a PDF (default is False) - train : bool, optional - A flag used to insert either _train or _eval in the filename of the PDF (default is True) - ''' - #HACK - if len(list_exp_data) > 0: - exp_data = list_exp_data[0] #TODO make changes to handle multiple experiments plot - else: - return - - - plt.rcParams.update({'font.size': 18}) # default 12, 24 for paper, for poster: 30 - cmap = 'Purples' # 'Blues' # - label_ = 'Reward' if 'reward' in exp_data['metric_names'][metric_num] else exp_data['metric_names'][metric_num] - - tick_labels = exp_data['tick_labels'] - axis_labels = exp_data['axis_labels'] - stats_file = exp_data['stats_file'] - - if train: - stats_data = exp_data['train_stats'] - else: - stats_data = exp_data['eval_stats'] - - mean_data_ = np.mean(stats_data[..., metric_num], axis=exp_data['seed_idx']) #seed - to_plot_ = np.squeeze(mean_data_) - # print(to_plot_) - if len(to_plot_.shape) > 2: - # warning.warn("Data contains variation in more than 2 dimensions (apart from seeds). May lead to plotting error!") - raise ValueError("Data contains variation in more than 2 dimensions (apart from seeds). This is currently not supported") #TODO Add 2-D plots for all combinations of 2 varying dims? - plt.imshow(np.atleast_2d(to_plot_), cmap=cmap, interpolation='none', vmin=0, vmax=np.max(to_plot_)) - if len(tick_labels) == 2: - plt.gca().set_xticklabels(tick_labels[1]) - plt.gca().set_yticklabels(tick_labels[0]) - else: - plt.gca().set_xticklabels(tick_labels[0]) - cbar = plt.colorbar() - cbar.ax.get_yaxis().labelpad = 15 # default 15, for poster: 25 - cbar.set_label(label_, rotation=270) - if len(axis_labels) == 2: - plt.xlabel(axis_labels[1]) - plt.ylabel(axis_labels[0]) - else: - plt.xlabel(axis_labels[0]) - if save_fig: - plt.savefig(stats_file.split('/')[-1] + ('_train' if train else '_eval') + '_final_reward_mean_heat_map_' + str(exp_data['metric_names'][metric_num]) + '.pdf', dpi=300, bbox_inches="tight") - plt.show() - std_dev_ = np.std(stats_data[..., metric_num], axis=exp_data['seed_idx']) #seed - to_plot_ = np.squeeze(std_dev_) - # print(to_plot_, to_plot_.shape) - plt.imshow(np.atleast_2d(to_plot_), cmap=cmap, interpolation='none', vmin=0, vmax=np.max(to_plot_)) # 60 for DQN, 100 for A3C - if len(tick_labels) == 2: - plt.gca().set_xticklabels(tick_labels[1]) - plt.gca().set_yticklabels([str(i) for i in tick_labels[0]]) - else: - plt.gca().set_xticklabels(tick_labels[0]) - cbar = plt.colorbar() - cbar.ax.get_yaxis().labelpad = 15 # default 15, for poster: 30 - cbar.set_label('Reward Std Dev.', rotation=270) - if len(axis_labels) == 2: - plt.xlabel(axis_labels[1]) - plt.ylabel(axis_labels[0]) - else: - plt.xlabel(axis_labels[0]) - # plt.tight_layout() - if save_fig: - plt.savefig(stats_file.split('/')[-1] + ('_train' if train else '_eval') + '_final_reward_std_heat_map_' + str(exp_data['metric_names'][metric_num]) + '.pdf', dpi=300, bbox_inches="tight") - # plt.savefig(stats_file.split('/')[-1] + '_train_heat_map.png')#, dpi=300) - plt.show()
- -
[docs] def plot_learning_curves(self, list_exp_data, save_fig=False, train=True, metric_num=-2): # metric_num needs to be minus indexed because stats_pd reutrned for train stats has _all_ columns - '''Plots learning curves: Either across 1 or 2 meta-features of MDP Playground. Different colours represent learning curves for different seeds. - - Parameters - ---------- - list_exp_data : list of experiment data of type <dict> - [ for more details refer load_data(), get_exp_data() ] - save_fig : bool, optional - A flag used to save a PDF (default is False) - train : bool, optional - A flag used to insert either _train or _eval in the filename of the PDF (default is True) - ''' - #HACK - if len(list_exp_data) > 0: - exp_data = list_exp_data[0] #TODO make changes to handle multiple experiments plot - warnings.warn("Using only 1st expt. for the foll. plots") - else: - return - - - stats_file = exp_data['stats_file'] - dims_varied = exp_data['dims_varied'] - config_counts = exp_data['config_counts'] - config_names = exp_data['config_names'] - dims_values = exp_data['dims_values'] - final_rows_for_a_config = exp_data['final_rows_for_a_config'] - if train: - stats_data = exp_data['train_curves'] - else: - stats_data = exp_data['eval_curves'] - - # Plot for train metrics: learning curves; with subplot - # Comment out unneeded labels in code lines 41-44 in this cell - if len(dims_varied) > 1: - ncols_ = config_counts[dims_varied[1]] - nrows_ = config_counts[dims_varied[0]] - else: - ncols_ = config_counts[dims_varied[0]] - nrows_ = 1 - nseeds_ = config_counts[exp_data['seed_idx']]#self.config_counts[-1] - # print(ax, type(ax), type(ax[0])) - #color_cycle = plt.rcParams['axes.prop_cycle'].by_key()['color'] - # print("color_cycle", color_cycle) - plt.rcParams.update({'font.size': 25}) # 25 for 36x21 fig, 16 for 24x14 fig. - # 36x21 for better resolution but about 900kb file size, 24x14 for okay resolution and 550kb file size - fig, ax = plt.subplots(nrows=nrows_, ncols=ncols_, figsize=(7 * ncols_, 5 * nrows_)) - ax = np.atleast_2d(ax) - # metrics_reshaped_squeezed = np.squeeze(metrics_reshaped) - # print(np.squeeze(metrics_reshaped).shape) - for i in range(len(final_rows_for_a_config)): - i_index = i//(nseeds_ * ncols_) # = num_seeds * shape of more frequently changing hyperparam - j_index = (i//nseeds_) % ncols_ # - if i == 0: - to_plot_ = stats_data[0:final_rows_for_a_config[i]+1, metric_num] - to_plot_x = stats_data[0:final_rows_for_a_config[i]+1, exp_data['ts_idx']] - else: - to_plot_ = stats_data[final_rows_for_a_config[i-1]+1:final_rows_for_a_config[i]+1, metric_num] - to_plot_x = stats_data[final_rows_for_a_config[i-1]+1:final_rows_for_a_config[i]+1, exp_data['ts_idx']] - # print(to_plot_[-1]) - # if i % 10 == 0: - # fig = plt.figure(figsize=(12, 7)) - # print(i//50, (i//10) % 5) - ax[i_index][j_index].plot(to_plot_x, to_plot_, rasterized=False)#, label="Seq len" + str(seq_lens[i//10])) - if i % nseeds_ == nseeds_ - 1: # 10 is num. of seeds - # pass - # print("Plot no.", i//10) - ax[i_index][j_index].set_xlabel("Train Timesteps") - ax[i_index][j_index].set_ylabel("Reward") - # ax[i_index][j_index].set_title('Delay ' + str(delays[i_index]) + ', Sequence Length ' + str(sequence_lengths[j_index])) - if len(dims_varied) > 1: - title_1st_dim = config_names[dims_varied[0]] + ' ' + str(dims_values[dims_varied[0]][i_index]) - title_2nd_dim = config_names[dims_varied[1]] + ' ' + str(dims_values[dims_varied[1]][j_index]) - ax[i_index][j_index].set_title(title_1st_dim + ', ' + title_2nd_dim) - else: - title_1st_dim = config_names[dims_varied[0]] + ' ' + str(dims_values[dims_varied[0]][j_index]) - ax[i_index][j_index].set_title(title_1st_dim) - # ax[i_index][j_index].set_title('Sequence Length ' + str(seq_lens[j_index])) - # ax[i_index][j_index].set_title('Reward Density ' + str(reward_densities[j_index])) - - # plt.legend(loc='upper left', prop={'size': 26}) - fig.tight_layout() - # plt.suptitle("Training Learning Curves") - plt.show() - if save_fig: - fig.savefig(stats_file.split('/')[-1] + ('_train' if train else '_eval') + '_learning_curves_' + str(exp_data['metric_names'][metric_num]) + '.pdf', dpi=300, bbox_inches="tight") # Generates high quality vector graphic PDF 125kb; dpi doesn't matter for this
- - ###### ---------- radar (spider) plot ------------- ###### -
[docs] def plot_radar(self, list_exp_data, save_fig=False, train=True, metric_num=-2, plot_type="agent", weights={}, use_aucs=False): - '''Plots radar (spider) chart across different dimensions - - Parameters - ---------- - list_exp_data : list of experiment data of type <dict> - [ for more details refer load_data(), get_exp_data() ] - save_fig : bool, optional - A flag used to save a PDF (default is False) - train : bool, optional - A flag used to insert either _train or _eval in the filename of the PDF (default is True) - metric_num : - allowed values-> '-1' to plot episode mean lengths - '-2' to plot episode reward - use_aucs : bool, optional - A flag used to insert _aucs in the filename of the PDF (default is False) - plot_type : string describing how to group data and plot, say based on agent or metric - allowed values-> ['agent' ,'metric'] - weights : dictionary of weights associated per dimension (plot_type) data - eg weights['reward_noise'] = [.25, .25, .25, .25] - ''' - - stats_data = self.gather_stats(list_exp_data, train, metric_num, plot_type, use_aucs) - - # get axes labels - first_group = next(iter(stats_data.values())) - spoke_labels = first_group.keys() - - #plot - N = len(spoke_labels) - theta = radar_chart.radar_factory(N, frame='circle') - plt.rcParams['figure.figsize'] = [7, 5] - ax = plt.subplot(111, projection='radar') - - colors = ['blue', 'orange', 'green', 'purple', 'cyan', 'olive', 'brown', 'grey', 'red', 'pink'] - for group_key, color in zip(stats_data.keys(), colors): - d = [] - for sub_group_key in stats_data[group_key].keys(): - data = stats_data[group_key][sub_group_key]['to_plot_'] - if sub_group_key in weights: - d.append(np.average(data, axis=0, weights=weights[sub_group_key])) - else: - d.append(np.average(data)) - - ax.plot(theta, d, color=color) - ax.fill(theta, d, facecolor=color, alpha=0.25) - - # customize plot axis labels - ax.set_varlabels(spoke_labels) - ax.set_rlabel_position(0) - plt.xticks(color="black", fontsize=12) - plt.yticks(color="black", fontsize=10) - - labels = stats_data.keys() - legend = ax.legend(labels, loc=(0.9, .95), labelspacing=0.1, fontsize=12) - - # save figure - if save_fig: - fig_name = stats_data[group_key][sub_group_key]['stats_file'].split('/')[-1] + \ - ('_train' if train else '_eval') + ( '_aucs' if use_aucs else '')+'_final_reward_' + \ - stats_data[group_key][sub_group_key]['axis_labels'].replace(' ','_') + \ - '_' + str(stats_data[group_key][sub_group_key]['metric_names'][metric_num]) + '_spider.pdf' - plt.savefig(fig_name, dpi=300, bbox_inches="tight") - - plt.show()
-
- -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_modules/mdp_playground/analysis/radar_chart.html b/docs/_build/html/_modules/mdp_playground/analysis/radar_chart.html deleted file mode 100644 index 5342f53..0000000 --- a/docs/_build/html/_modules/mdp_playground/analysis/radar_chart.html +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - - - mdp_playground.analysis.radar_chart — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -

Source code for mdp_playground.analysis.radar_chart

-import numpy as np
-
-import matplotlib.pyplot as plt
-from matplotlib.patches import Circle, RegularPolygon
-from matplotlib.path import Path
-from matplotlib.projections.polar import PolarAxes
-from matplotlib.projections import register_projection
-from matplotlib.spines import Spine
-from matplotlib.transforms import Affine2D
-
-
-
[docs]def radar_factory(num_vars, frame='circle'): - """Create a radar chart with `num_vars` axes. - - This function creates a RadarAxes projection and registers it. - reference: https://matplotlib.org/3.1.0/gallery/specialty_plots/radar_chart.html - - Parameters - ---------- - num_vars : int - Number of variables for radar chart. - frame : {'circle' | 'polygon'} - Shape of frame surrounding axes. - - """ - # calculate evenly-spaced axis angles - theta = np.linspace(0, 2*np.pi, num_vars, endpoint=False) - - class RadarAxes(PolarAxes): - - name = 'radar' - # use 1 line segment to connect specified points - RESOLUTION = 1 - - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - # rotate plot such that the first axis is at the top - self.set_theta_zero_location('N') - - def fill(self, *args, closed=True, **kwargs): - """Override fill so that line is closed by default""" - return super().fill(closed=closed, *args, **kwargs) - - def plot(self, *args, **kwargs): - """Override plot so that line is closed by default""" - lines = super().plot(*args, **kwargs) - for line in lines: - self._close_line(line) - - def _close_line(self, line): - x, y = line.get_data() - # FIXME: markers at x[0], y[0] get doubled-up - if x[0] != x[-1]: - x = np.concatenate((x, [x[0]])) - y = np.concatenate((y, [y[0]])) - line.set_data(x, y) - - def set_varlabels(self, labels): - self.set_thetagrids(np.degrees(theta), labels) - - def _gen_axes_patch(self): - # The Axes patch must be centered at (0.5, 0.5) and of radius 0.5 - # in axes coordinates. - if frame == 'circle': - return Circle((0.5, 0.5), 0.5) - elif frame == 'polygon': - return RegularPolygon((0.5, 0.5), num_vars, - radius=.5, edgecolor="k") - else: - raise ValueError("unknown value for 'frame': %s" % frame) - - def _gen_axes_spines(self): - if frame == 'circle': - return super()._gen_axes_spines() - elif frame == 'polygon': - # spine_type must be 'left'/'right'/'top'/'bottom'/'circle'. - spine = Spine(axes=self, - spine_type='circle', - path=Path.unit_regular_polygon(num_vars)) - # unit_regular_polygon gives a polygon of radius 1 centered at - # (0, 0) but we want a polygon of radius 0.5 centered at (0.5, - # 0.5) in axes coordinates. - spine.set_transform(Affine2D().scale(.5).translate(.5, .5) - + self.transAxes) - return {'polar': spine} - else: - raise ValueError("unknown value for 'frame': %s" % frame) - - register_projection(RadarAxes) - return theta
-
- -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_modules/mdp_playground/config_processor/config_processor.html b/docs/_build/html/_modules/mdp_playground/config_processor/config_processor.html deleted file mode 100644 index b2ee0c2..0000000 --- a/docs/_build/html/_modules/mdp_playground/config_processor/config_processor.html +++ /dev/null @@ -1,1277 +0,0 @@ - - - - - - - - mdp_playground.config_processor.config_processor — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -

Source code for mdp_playground.config_processor.config_processor

-from ray.tune.registry import register_env
-import copy
-import sys, os
-
-mujoco_envs = ["HalfCheetahWrapper-v3", "HopperWrapper-v3", "PusherWrapper-v2",\
-                "ReacherWrapper-v2"]
-
-import mdp_playground
-from mdp_playground.envs import RLToyEnv
-from ray.tune.registry import register_env
-import numpy as np
-import warnings
-
-
-from ray.rllib.models.preprocessors import OneHotPreprocessor
-from ray.rllib.models import ModelCatalog
-ModelCatalog.register_custom_preprocessor("ohe", OneHotPreprocessor)
-
-
-# def init_ray(log_level=None, tmp_dir=None, include_webui=None,
-#              object_store_memory=int(2e9),
-#              redis_max_memory=int(1e9), local_mode=False):
-
[docs]def init_ray(**kwargs): - import ray - if ray.__version__[0] == '1': # new version 1.0 API - if "redis_max_memory" in kwargs: - value = kwargs["redis_max_memory"] - del kwargs["redis_max_memory"] - kwargs["_redis_max_memory"] = value - if "tmp_dir" in kwargs: - value = kwargs["tmp_dir"] - del kwargs["tmp_dir"] - kwargs["_temp_dir"] = value - - else: - if "tmp_dir" in kwargs: - value = kwargs["tmp_dir"] - del kwargs["tmp_dir"] - kwargs["temp_dir"] = value - - if "log_level" in kwargs: - value = kwargs["log_level"] - del kwargs["log_level"] - kwargs["logging_level"] = value - - ray.init(**kwargs)
- - -
[docs]def process_configs(config_file, stats_file_prefix, config_num, log_level, - framework='ray', framework_dir='/tmp/ray'): - config_file_path = os.path.abspath('/'.join(config_file.split('/')[:-1])) - - sys.path.insert(1, config_file_path) # #hack - import importlib - config = importlib.import_module(config_file.split('/')[-1], package=None) - print("Number of seeds for environment:", config.num_seeds) - - - # #hacks needed to setup Ray callbacks below - # #hack because these need to be read in on_train_result and trying to read - # config there raises an error because it's been imported from a Python - # module and I think they try to reload the module there. - variable_configs = [] - if 'var_configs' in dir(config): - variable_configs.append(copy.deepcopy(config.var_configs)) - - if 'random_configs' in dir(config): - variable_configs.append(copy.deepcopy(config.random_configs)) - if 'sobol_configs' in dir(config): - variable_configs.append(copy.deepcopy(config.sobol_configs)) - - # overwrite = False because the keys in different modes of config generation - # need to be disjoint - variable_configs_deepcopy = deepmerge_multiple_dicts(*variable_configs, - overwrite=False) - - if "timesteps_total" in dir(config): - hacky_timesteps_total = config.timesteps_total #hack - - config_algorithm = config.algorithm #hack - # sys.exit(0) - - columns_to_write = [] - for config_type, config_dict in variable_configs_deepcopy.items(): - for key in config_dict: - columns_to_write.append(key) - - stats_file_name = stats_file_prefix + '.csv' - - init_stats_file(stats_file_name, columns_to_write) - - # Ray specific setup: - if framework.lower() == 'ray': - from ray import tune - setup_ray(config, config_num, log_level, framework_dir) - on_train_result, on_episode_end = setup_ray_callbacks(stats_file_prefix, variable_configs_deepcopy, hacky_timesteps_total, config_algorithm) - - #default Define default config which gets overwritten with config in config.py file if present. - default_config = { - "callbacks": { - # "on_episode_start": tune.function(on_episode_start), - # "on_episode_step": tune.function(on_episode_step), - "on_episode_end": tune.function(on_episode_end), - # "on_sample_end": tune.function(on_sample_end), - "on_train_result": tune.function(on_train_result), - # "on_postprocess_traj": tune.function(on_postprocess_traj), - }, - # "log_level": 'WARN', - } - - # Stable Baselines specific setup: - elif framework.lower() == 'stable_baselines': - ... - - - else: - raise ValueError("Framework passed was not a valid option. It was: " \ - + framework + ". Available options are: ray and stable_baselines.") - - - varying_configs = [] - separate_var_configs = [] - # ###IMP Currently num_configs has to be equal for all 3 cases below: - # grid (i.e. var), random and sobol #TODO Not sure how to solve this #config - # setup problem. Could take Cartesian product of all 3 but that may lead to - # too many configs and Cartesian product of dicts is a pain. - if 'var_configs' in dir(config): - separate_var_configs.append(get_list_of_varying_configs( - config.var_configs, mode='grid')) - if 'sobol_configs' in dir(config): - separate_var_configs.append(get_list_of_varying_configs( - config.sobol_configs, mode='sobol', - num_configs=config.num_configs)) - if 'random_configs' in dir(config): - separate_var_configs.append(get_list_of_varying_configs( - config.random_configs, mode='random', - num_configs=config.num_configs)) - # print("VARYING_CONFIGS:", varying_configs) - - num_configs_ = max([len(separate_var_configs[i]) \ - for i in range(len(separate_var_configs))]) - for i in range(num_configs_): - to_combine = [separate_var_configs[j][i] \ - for j in range(len(separate_var_configs))] - # overwrite = False because the keys in different modes of - # config generation need to be disjoint - varying_configs.append(deepmerge_multiple_dicts(*to_combine, - overwrite=False)) - - - # varying_configs is a list of dict of dicts with a specific structure. - final_configs = combined_processing(default_config, config.env_config, - config.agent_config, config.model_config, - config.eval_config, varying_configs=varying_configs, framework=framework, algorithm=config.algorithm) - - - return config, final_configs
- - -
[docs]def setup_ray(config, config_num, log_level, framework_dir): - tmp_dir = framework_dir + '/tmp_' + str(config_num) - # import ray - if config.algorithm == 'DQN': #hack - init_ray(log_level=log_level, tmp_dir=tmp_dir) - # ray.init(object_store_memory=int(2e9), redis_max_memory=int(1e9), - # temp_dir=tmp_dir, - # logging_level=log_level, - # # local_mode=True, - # # webui_host='0.0.0.0'); logging_level=logging.INFO, - # ) - # ray.init(object_store_memory=int(2e9), redis_max_memory=int(1e9), local_mode=True, plasma_directory='/tmp') #, memory=int(8e9), local_mode=True # local_mode (bool): If true, the code will be executed serially. This is useful for debugging. # when true on_train_result and on_episode_end operate in the same current directory as the script. A3C is crashing in local mode, so didn't use it and had to work around by giving full path + filename in stats_file_name.; also has argument driver_object_store_memory=, plasma_directory='/tmp' - elif config.algorithm == 'A3C': #hack - init_ray(log_level=log_level, tmp_dir=tmp_dir) - # ray.init(object_store_memory=int(2e9), redis_max_memory=int(1e9), - # temp_dir=tmp_dir, - # logging_level=log_level, - # # local_mode=True, - # # webui_host='0.0.0.0'); logging_level=logging.INFO, - # ) # ray.init(object_store_memory=int(2e9), redis_max_memory=int(1e9), local_mode=True, plasma_directory='/tmp') - else: - init_ray(log_level=log_level, tmp_dir=tmp_dir, local_mode=True)
- - # ray.init(object_store_memory=int(2e9), redis_max_memory=int(1e9), - # temp_dir=tmp_dir, - # logging_level=log_level, - # local_mode=True, - # # webui_host='0.0.0.0'); logging_level=logging.INFO, - # ) - -
[docs]def init_stats_file(stats_file_name, columns_to_write): - fout = open(stats_file_name, 'a') #hardcoded - fout.write('# training_iteration, algorithm, ') - for column in columns_to_write: - # if config_type == "agent": - # if config_algorithm == 'SAC' and key == "critic_learning_rate": - # real_key = "lr" #hack due to Ray's weird ConfigSpaces - # fout.write(real_key + ', ') - # elif config_algorithm == 'SAC' and key == "fcnet_hiddens": - # #hack due to Ray's weird ConfigSpaces - # fout.write('fcnet_hiddens' + ', ') - # else: - # fout.write(key + ', ') - # else: - fout.write(column + ', ') - fout.write('timesteps_total, episode_reward_mean, episode_len_mean\n') # , mem_used_mb - fout.close()
- -
[docs]def setup_ray_callbacks(stats_file_prefix, variable_configs_deepcopy, hacky_timesteps_total, config_algorithm): - # Setup Ray callbacks - # Ray callback to write training stats to CSV file at end of every training iteration - #hack Didn't know how to move this function to config. It requires the filename which _has_ to be possible to set in run_experiments.py. Had to take care of stats_file_prefix, variable_configs_deepcopy, hacky_timesteps_total, config_algorithm; and had to initialise file writing in here (config_processor). - def on_train_result(info): - training_iteration = info["result"]["training_iteration"] - # algorithm = info["trainer"]._name - - # Writes every iteration, would slow things down. #hack - fout = open(stats_file_prefix + '.csv', 'a') #hardcoded - fout.write(str(training_iteration) + ' ' + config_algorithm + ' ') - for config_type, config_dict in variable_configs_deepcopy.items(): - for key in config_dict: - if config_type == "env": - field_val = info["result"]["config"]["env_config"][key] - if isinstance(field_val, float): - str_to_write = '%.2e' % field_val - elif type(field_val) == list: - str_to_write = "[" - for elem in field_val: - # print(key) - str_to_write += '%.2e' % elem if isinstance(elem, float) else str(elem) - str_to_write += "," - str_to_write += "]" - else: - str_to_write = str(field_val).replace(' ', '') - str_to_write += ' ' - fout.write(str_to_write) - elif config_type == "agent": - if config_algorithm == 'SAC' and key == "critic_learning_rate": - real_key = "lr" #hack due to Ray's weird ConfigSpaces - fout.write('%.2e' % info["result"]["config"]['optimization'][key].replace(' ', '') + ' ') - elif config_algorithm == 'SAC' and key == "fcnet_hiddens": - #hack due to Ray's weird ConfigSpaces - str_to_write = str(info["result"]["config"]["Q_model"][key]).replace(' ', '') + ' ' - fout.write(str_to_write) - # elif config_algorithm == 'SAC' and key == "policy_model": - # #hack due to Ray's weird ConfigSpaces - # pass - # fout.write(str(info["result"]["config"][key]['fcnet_hiddens']).replace(' ', '') + ' ') - else: - if key == "exploration_fraction" and "exploration_fraction" not in info["result"]["config"]: #hack ray 0.7.3 will have exploration_fraction but not versions later than ~0.9 - field_val = info["result"]["config"]["exploration_config"]["epsilon_timesteps"] / hacky_timesteps_total # convert to fraction to be similar to old exploration_fraction - else: - field_val = info["result"]["config"][key] - str_to_write = '%.2e' % field_val if isinstance(field_val, float) else str(field_val).replace(' ', '') - str_to_write += ' ' - fout.write(str_to_write) - elif config_type == "model": - # if key == 'conv_filters': - fout.write(str(info["result"]["config"]["model"][key]).replace(' ', '') + ' ') - - # Write train stats - timesteps_total = info["result"]["timesteps_total"] # also has episodes_total and training_iteration - episode_reward_mean = info["result"]["episode_reward_mean"] # also has max and min - # print("Custom_metrics: ", info["result"]["step_reward_mean"], info["result"]["step_reward_max"], info["result"]["step_reward_min"]) - episode_len_mean = info["result"]["episode_len_mean"] - - - # ##TODO write CSV stats configs only once in each case, write runtime and memory, td_error - check tempoRL logs; - # import os, psutil - # mem_used_mb = psutil.Process(os.getpid()).memory_info().rss / 1024 ** 2 - - fout.write(str(timesteps_total) + ' ' + '%.2e' % episode_reward_mean + - ' ' + '%.2e' % episode_len_mean # + ' ' + '%.2e' % mem_used_mb - + '\n') # timesteps_total always HAS to be the 1st written: analysis.py depends on it - fout.close() - - - - # print("##### stats_file_name: ", stats_file_name) - # print(os.getcwd()) - - # We did not manage to find an easy way to log evaluation stats for Ray without the following hack which demarcates the end of a training iteration in the evaluation stats file - if info["result"]["config"]["evaluation_interval"] is not None: - stats_file_eval = stats_file_prefix + '_eval.csv' - fout = open(stats_file_eval, 'a') #hardcoded - - fout.write('#HACK STRING EVAL\n') - fout.close() - - info["result"]["callback_ok"] = True - - - # Ray callback to write evaluation stats to CSV file at end of every training iteration - # on_episode_end is used because these results won't be available on_train_result - # but only after every episode has ended during evaluation (evaluation phase is - # checked for by using dummy_eval) - def on_episode_end(info): - if "dummy_eval" in info["env"].get_unwrapped()[0].config: - # print("###on_episode_end info", info["env"].get_unwrapped()[0].config["make_denser"], info["episode"].total_reward, info["episode"].length) #, info["episode"]._agent_reward_history) - reward_this_episode = info["episode"].total_reward - length_this_episode = info["episode"].length - stats_file_eval = stats_file_prefix + '_eval.csv' - fout = open(stats_file_eval, 'a') #hardcoded - fout.write('%.2e' % reward_this_episode + ' ' + str(length_this_episode) + "\n") - fout.close() - - def on_episode_step(info): - episode = info["episode"] - if "step_reward" not in episode.custom_metrics: - episode.custom_metrics["step_reward"] = [] - step_reward = episode.total_reward - else: - step_reward = episode.total_reward - np.sum(episode.custom_metrics["step_reward"]) - episode.custom_metrics["step_reward"].append(step_reward) # This line - # should not be executed the 1st time this function is called because - # no step has actually taken place then (Ray 0.9.0)!! - # episode.custom_metrics = {} - # episode.user_data = {} - # episode.hist_data = {} - # Next 2 are the same, except 1st one is total episodic reward _per_ agent - # episode.agent_rewards = defaultdict(float) - # episode.total_reward += reward - # only hack to get per step reward seems to be to store prev total_reward - # and subtract it from that - # episode._agent_reward_history[agent_id].append(reward) - - return on_train_result, on_episode_end
- -
[docs]def get_list_of_varying_configs(var_configs, mode='grid', num_configs=None): - ''' - var_configs: dict of dicts of lists as values - A dict of dicts with lists as the leaf values to allow each - configuration option to take multiple possible values. - ''' - - if mode == 'grid': - varying_configs = get_grid_of_configs(var_configs) - - elif mode == 'random': - varying_configs = get_random_configs(var_configs, num_configs=num_configs) - elif mode == 'sobol': - varying_configs = sobol_configs_from_config_dict(var_configs, num_configs=num_configs) - - - list_of_configs = [] - - for enum_conf_1, current_config in enumerate(varying_configs): - env_config = {"env": {}} - model_config = {"model": {}} - agent_config = {"agent": {}} - - for config_type, config_dict in var_configs.items(): - for key in config_dict: - # if config_type == "env_config": # There is a dummy seed in the env_config because it's not used in the environment. It implies a different seed for the agent on every launch as the seed for Ray is not being set here. I faced problems with Ray's seeding process. - if config_type == "env": - env_config["env"][key] = current_config[list(var_configs["env"]).index(key)] - - elif config_type == "agent": #hack All these are hacks to get around different limitations - num_configs_done = len(list(var_configs["env"])) - agent_config["agent"][key] = current_config[num_configs_done + list(var_configs[config_type]).index(key)] - - elif config_type == "model": - num_configs_done = len(list(var_configs["env"])) + len(list(var_configs["agent"])) - model_config["model"][key] = current_config[num_configs_done + list(var_configs[config_type]).index(key)] - - combined_config = {**agent_config, **model_config, **env_config} - - list_of_configs.append(combined_config) - - return list_of_configs
- - -
[docs]def get_grid_of_configs(var_configs): - value_tuples = [] - - # #TODO Currently, the var_configs dict is nested, might want to make it - # single level. However, the config dicts used in Ray are nested, so keep it - # like this for now. Further, the 2nd level division chosen for configs - # currently, i.e., env, agent, model is a bit arbitrary, but better like - # this since it can be compliant with Ray and other frameworks and additional - # processing can take place in framework_specific_processing() below. - for config_type, config_dict in var_configs.items(): - for key in config_dict: - assert type(var_configs[config_type][key]) == list, "var_configs should be a dict of dicts with lists as the leaf values to allow each configuration option to take multiple possible values" - value_tuples.append(var_configs[config_type][key]) - - import itertools - if len(value_tuples) == 0: - cartesian_product_configs = [] # Edge case, else it'd become [()]. - else: - cartesian_product_configs = list(itertools.product(*value_tuples)) - - print("Total number of configs. to run:", len(cartesian_product_configs)) - - return cartesian_product_configs
- -
[docs]def get_random_configs(var_configs, num_configs): - ''' - var_configs: dict of dicts of strings or tuples as values - A dict of dicts with strings or tuples as the leaf values which encode - a ConfigSpace. - - #TODO Currently num_configs is fixed for each config_type (env, agent or - model) for this and get_sobol_configs() - ''' - - random_configs = [] - - for config_type, config_dict in var_configs.items(): - if len(config_dict) > 0: - cs = create_config_space_from_config_dict(config_dict) - print("Variable ConfigSpace:") - print(cs) - random_configs += cs.sample_configuration(size=num_configs) - # print("type(random_configs):", type(random_configs)) - else: - pass - - for i in range(len(random_configs)): - # if random_configs[i].get_dictionary()["train_batch_size"] == 4 \ - # and random_configs[i].get_dictionary()["buffer_size"] < 33: - # print("Config:", i, "train_batch_size, buffer_size:", random_configs[i].get_dictionary()["train_batch_size"], random_configs[i].get_dictionary()["buffer_size"]) - random_configs[i] = tuple(random_configs[i].get_dictionary().values()) #hack ####TODO Change run_experiments.py and here to directly pass whole config dict to run_experiments.py. Would need to replace in every config.py file. - print(random_configs[0]) - print(random_configs[1]) - - return random_configs
- -
[docs]def create_config_space_from_config_dict(config_dict): - ''' - ''' - import ConfigSpace as CS - cs = CS.ConfigurationSpace(seed=1234) # #seed #random - import ConfigSpace.hyperparameters as CSH - import json - - for key in config_dict: - val = config_dict[key] - if "int" in val: - lower = int(val.split("[")[1].split(",")[0].strip()) - upper = int(val.split("]")[0].split(",")[-1].strip()) - log = True if "log" in val else False - cs.add_hyperparameter(CSH.UniformIntegerHyperparameter(name=key, lower=lower, upper=upper, log=log)) - elif "float" in val: - lower = float(val.split("[")[1].split(",")[0].strip()) - upper = float(val.split("]")[0].split(",")[-1].strip()) - log = True if "log" in val else False - cs.add_hyperparameter(CSH.UniformFloatHyperparameter(name=key, lower=lower, upper=upper, log=log)) - elif "cat" in val: - choices = json.loads("[" + val.split("[")[1].split("]")[0] + "]") # Seems faster than ast.literal_eval (See https://stackoverflow.com/questions/1894269/how-to-convert-string-representation-of-list-to-a-list) - cs.add_hyperparameter(CSH.CategoricalHyperparameter(name=key, choices=choices)) - # print(type(CSH.CategoricalHyperparameter(name=key, choices=choices).choices[0])) - - return cs
- -
[docs]def sobol_configs_from_config_dict(var_configs, num_configs): - ''' - ''' - - sobol_configs = [] - - for config_type, config_dict in var_configs.items(): - - num_dims = 0 - for key in config_dict: - val = config_dict[key] - if type(val) == tuple: # i.e. a constant value - pass - else: # i.e. a variable value - num_dims += 1 - - print("Generating sobol sequence with " + str(num_configs) + " and " \ - + str(num_dims) + " dimensions:") - - from scipy.optimize._shgo_lib.sobol_seq import Sobol # Only generates real vectors in range 0 to 1 per dimension - import json - sobol_gen = Sobol() - sobol = sobol_gen.i4_sobol_generate(num_dims, num_configs, skip=0) - print(sobol) - - for sample in sobol: - # print(sample) - sobol_configs.append({}) # new config - j = 0 - for key in config_dict: - val = config_dict[key] - if type(val) == tuple: # i.e. a constant value - sobol_configs[-1][key] = val[0] - # The rest are config spaces for param settings - elif "int" in val: - lower = float(val.split("[")[1].split(",")[0].strip()) - upper = float(val.split("]")[0].split(",")[-1].strip()) - log = True if "log" in val else False - #TODO log vals - sobol_val = lower + (upper - lower) * sample[j] - sobol_configs[-1][key] = int(sobol_val) - j += 1 - elif "float" in val: - lower = float(val.split("[")[1].split(",")[0].strip()) - upper = float(val.split("]")[0].split(",")[-1].strip()) - log = True if "log" in val else False - if log: - lower = np.log(lower) - upper = np.log(upper) - sobol_val = lower + (upper - lower) * sample[j] - if log: - sobol_val = np.exp(sobol_val) - if key == "reward_dist": - sobol_val = [sobol_val, 1.0] - sobol_configs[-1][key] = sobol_val - j += 1 - elif "cat" in val: - choices = json.loads("[" + val.split("[")[1].split("]")[0] + "]") # Seems faster than ast.literal_eval (See https://stackoverflow.com/questions/1894269/how-to-convert-string-representation-of-list-to-a-list) - len_c = len(choices) - if sample[j] == 1.0: #TODO remove? Don't know if sobol samples include 1.0 - sample[j] -= 1e-10 - index = int(sample[j] * len_c) - sobol_configs[-1][key] = choices[index] - j += 1 - - # import pprint - # pp = pprint.PrettyPrinter(indent=4) - - for i, conf in enumerate(sobol_configs): - sobol_configs[i] = tuple(conf.values()) #hack - # print(conf) - # pp.pprint(sobol_configs[i]) - print(sobol_configs[0]) - print(sobol_configs[1]) - - return sobol_configs
- - - -
[docs]def combined_processing(*static_configs, varying_configs, framework='ray', - algorithm): - ''' - varying_configs is a list of dict of dicts with structure of each element - in the list as: { - "env": {...} - "agent": {...} - "model": {...} - } - ''' - # print(len(configs)) - # print(type(configs)) - # print(type(*configs)) - - # Pre-processing common to frameworks: - for i, varying_config in enumerate(varying_configs): - - # ###IMP This needs to be done before merging because otherwise - # varying_config["env"] clashes with "env" key of Ray Tune config later. - varying_config = {"env_config": varying_config["env"], \ - **varying_config["agent"], \ - "model": varying_config["model"]} - varying_configs[i] = varying_config - - - # Ray specific pre-processing - if framework.lower() == 'ray': - ... - - - # Stable Baselines specific pre-processing - elif framework.lower() == 'stable_baselines': - ... - - - else: - raise ValueError("Framework passed was not a valid option. It was: " \ - + framework + ". Available options are: ray and stable_baselines.") - - - # Merge all configs into one - final_configs = [] - for i in range(len(varying_configs)): - static_configs_copy = copy.deepcopy(static_configs) - merged_conf = deepmerge_multiple_dicts(*static_configs_copy, varying_configs[i]) - final_configs.append(merged_conf) - - - # Post-processing common to frameworks: - for i, final_config in enumerate(final_configs): - if final_configs[i]["env"] in mujoco_envs: - if "time_unit" in final_configs[i]["env_config"]: # #hack This is - # needed so that the environment runs the same amount of seconds of - # simulation, even though episode steps are different. - final_configs[i]["horizon"] /= \ - final_configs[i]["env_config"]["time_unit"] - final_configs[i]["horizon"] = int(final_configs[i]["horizon"]) - - final_configs[i]["learning_starts"] /= \ - final_configs[i]["env_config"]["time_unit"] - final_configs[i]["learning_starts"] = \ - int(final_configs[i]["learning_starts"]) - - final_configs[i]["timesteps_per_iteration"] /= \ - final_configs[i]["env_config"]["time_unit"] - final_configs[i]["timesteps_per_iteration"] =\ - int(final_configs[i]["timesteps_per_iteration"]) - - final_configs[i]["evaluation_config"]["horizon"] /=\ - final_configs[i]["env_config"]["time_unit"] - final_configs[i]["evaluation_config"]["horizon"] =\ - int(final_configs[i]["evaluation_config"]["horizon"]) - - final_configs[i]["train_batch_size"] *=\ - final_configs[i]["env_config"]["time_unit"] # this is needed - # because Ray (until version 0.8.6 I think) fixes the - # ratio of number of samples trained/number of steps sampled - # in environment - final_configs[i]["train_batch_size"] = \ - int(final_configs[i]["train_batch_size"]) - - # #hack Common #mujoco wrapper to allow Mujoco envs to be wrapped by - # MujocoEnvWrapper (which fiddles with lower-level Mujoco stuff) and - # then by GymEnvWrapper which is more general and basically adds - # dimensions from MDPP which are common to discrete and continuous - # environments - - # if final_configs[i]["env"] in mujoco_envs: - - # #default settings for #timesteps_total - if final_configs[i]["env"] in ["HalfCheetahWrapper-v3"]: #hack - timesteps_total = 3000000 - - from mdp_playground.envs.mujoco_env_wrapper import get_mujoco_wrapper #hack - from gym.envs.mujoco.half_cheetah_v3 import HalfCheetahEnv - wrapped_mujoco_env = get_mujoco_wrapper(HalfCheetahEnv) - register_env("HalfCheetahWrapper-v3", lambda config: create_gym_env_wrapper_mujoco_wrapper(config, wrapped_mujoco_env)) - - elif final_configs[i]["env"] in ["HopperWrapper-v3"]: #hack - timesteps_total = 1000000 - - from mdp_playground.envs.mujoco_env_wrapper import get_mujoco_wrapper #hack - from gym.envs.mujoco.hopper_v3 import HopperEnv - wrapped_mujoco_env = get_mujoco_wrapper(HopperEnv) - register_env("HopperWrapper-v3", lambda config: create_gym_env_wrapper_mujoco_wrapper(config, wrapped_mujoco_env)) - - elif final_configs[i]["env"] in ["PusherWrapper-v2"]: #hack - timesteps_total = 500000 - - from mdp_playground.envs.mujoco_env_wrapper import get_mujoco_wrapper #hack - from gym.envs.mujoco.pusher import PusherEnv - wrapped_mujoco_env = get_mujoco_wrapper(PusherEnv) - register_env("PusherWrapper-v2", lambda config: create_gym_env_wrapper_mujoco_wrapper(config, wrapped_mujoco_env)) - - elif final_configs[i]["env"] in ["ReacherWrapper-v2"]: #hack - timesteps_total = 500000 - - from mdp_playground.envs.mujoco_env_wrapper import get_mujoco_wrapper #hack - from gym.envs.mujoco.reacher import ReacherEnv - wrapped_mujoco_env = get_mujoco_wrapper(ReacherEnv) - register_env("ReacherWrapper-v2", lambda config: create_gym_env_wrapper_mujoco_wrapper(config, wrapped_mujoco_env)) - - elif final_configs[i]["env"] in ["GymEnvWrapper-Atari"]: #hack - if "AtariEnv" in final_configs[i]["env_config"]: - timesteps_total = 10_000_000 - - else: - if algorithm == 'DQN': - timesteps_total = 20000 - elif algorithm == 'A3C': #hack - timesteps_total = 150000 - else: #if algorithm == 'DDPG': #hack - timesteps_total = 20000 - - if final_configs[i]["env"] in mujoco_envs: - if "time_unit" in final_configs[i]["env_config"]: #hack This is needed so that the environment runs the same amount of seconds of simulation, even though episode steps are different. - timesteps_total /= final_configs[i]["env_config"]["time_unit"] - timesteps_total = int(timesteps_total) - - - final_configs[i]["timesteps_total"] = timesteps_total - - # Post-processing for Ray: - if framework.lower() == 'ray': - for i in range(len(final_configs)): - # for config_type in varying_config: - for key in final_configs[i]: - value = final_configs[i][key] - - if algorithm == 'SAC': - if key == 'critic_learning_rate': #hack - final_configs[i]['optimization'] = { - key: value, - 'actor_learning_rate': value, - 'entropy_learning_rate': value, - } - if key == 'fcnet_hiddens': #hack - final_configs[i]['Q_model'] = { - key: value, - "fcnet_activation": "relu", - } - final_configs[i]['policy_model'] = { - key: value, - "fcnet_activation": "relu", - } - - if algorithm == 'DDPG': ###TODO Find a better way to enforce these?? Especially problematic for TD3 because then more values for target_noise_clip are witten to CSVs than actually used during HPO but for normal (non-HPO) runs this needs to be not done. - if key == "critic_lr": - final_configs[i]["actor_lr"] = value - if key == "critic_hiddens": - final_configs[i]["actor_hiddens"] = value - if algorithm == 'TD3': - if key == "target_noise_clip_relative": - final_configs[i]["target_noise_clip"] = final_configs[i]["target_noise_clip_relative"] * final_configs[i]["target_noise"] - del final_configs[i]["target_noise_clip_relative"] #hack have to delete it otherwise Ray will crash for unknown config param. - - elif key == "model": - for key_2 in final_configs[i][key]: - if key_2 == "use_lstm": - final_configs[i][key]["max_seq_len"] = final_configs[i]["env_config"]["delay"] + final_configs[i]["env_config"]["sequence_length"] + 1 - - - # Post-processing for Stable Baselines: - elif framework.lower() == 'stable_baselines': - ... - - return final_configs
- - -
[docs]def create_gym_env_wrapper_mujoco_wrapper(config, wrapped_mujoco_env): - '''Creates a GymEnvWrapper around a MujocoEnvWrapper - ''' - from mdp_playground.envs.gym_env_wrapper import GymEnvWrapper - me = wrapped_mujoco_env(**config) - gew = GymEnvWrapper(me, **config) ##IMP Had initially thought to put this config in config["GymEnvWrapper"] but because of code below which converts var_env_configs to env_config, it's best to leave those configs as top level configs in the dict! - return gew
- - -
[docs]def deepmerge_multiple_dicts(*configs, overwrite=True): - ''' - ''' - merged_configs = {} - for i in range(len(configs)): - # print(i) - merged_configs = deepmerge(merged_configs, configs[i], overwrite=overwrite) - - return merged_configs
- - -from functools import reduce -
[docs]def deepmerge(a, b, path=None, overwrite=True): - '''Merges dict b into dict a - - overwrite : bool - Overwrites value in a with value in b if True with a warning, else raises Exception - - Based on: https://stackoverflow.com/questions/7204805/how-to-merge-dictionaries-of-dictionaries/7205107#7205107 - ''' - if path is None: path = [] - for key in b: - if key in a: - if isinstance(a[key], dict) and isinstance(b[key], dict): - deepmerge(a[key], b[key], path + [str(key)]) - elif a[key] == b[key]: - pass # same leaf value - else: - if overwrite: - warnings.warn("Overwrote value " + str(a[key]) + " with " \ - + str(b[key]) + " while merging dicts.") - a[key] = b[key] - else: - raise Exception('Conflict at %s' % '.'.join(path + [str(key)])\ - + str(a[key]) + " conflicts with " \ - + str(b[key]) + " while merging dicts.") - else: - a[key] = b[key] - return a
- - -
[docs]def post_processing(framework='ray'): - if framework=='ray': - import ray - ray.shutdown()
- - -
[docs]def create_gym_env_wrapper_atari(config): - from gym.envs.atari import AtariEnv - from mdp_playground.envs.gym_env_wrapper import GymEnvWrapper - ae = AtariEnv(**config["AtariEnv"]) - gew = GymEnvWrapper(ae, **config) ##IMP Had initially thought to put this config in config["GymEnvWrapper"] but because of code below which converts var_env_configs to env_config, it's best to leave those configs as top level configs in the dict! - return gew
- - -
[docs]def create_gym_env_wrapper_frame_stack_atari(config): #hack ###TODO remove? - '''When using frameStack GymEnvWrapper should wrap AtariEnv using wrap_deepmind_ray and therefore this function sets "wrap_deepmind_ray": True and 'frame_skip': 1 inside config so as to keep config same as for create_gym_env_wrapper_atari above and reduce manual errors when switching between the 2. - ''' - config["wrap_deepmind_ray"] = True #hack - config["frame_skip"] = 1 #hack - from gym.envs.atari import AtariEnv - from mdp_playground.envs.gym_env_wrapper import GymEnvWrapper - import gym - game = config["AtariEnv"]["game"] - game = ''.join([g.capitalize() for g in game.split('_')]) - ae = gym.make('{}NoFrameskip-v4'.format(game)) - gew = GymEnvWrapper(ae, **config) ##IMP Had initially thought to put this config in config["GymEnvWrapper"] but because of code below which converts var_env_configs to env_config, it's best to leave those configs as top level configs in the dict! - return gew
- -register_env("RLToy-v0", lambda config: RLToyEnv(**config)) -register_env("GymEnvWrapper-Atari", \ - lambda config: create_gym_env_wrapper_atari(config)) -register_env("GymEnvWrapperFrameStack-Atari", lambda config: create_gym_env_wrapper_frame_stack_atari(config)) -
- -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_modules/mdp_playground/envs/gym_env_wrapper.html b/docs/_build/html/_modules/mdp_playground/envs/gym_env_wrapper.html deleted file mode 100644 index a11160e..0000000 --- a/docs/_build/html/_modules/mdp_playground/envs/gym_env_wrapper.html +++ /dev/null @@ -1,766 +0,0 @@ - - - - - - - - mdp_playground.envs.gym_env_wrapper — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -

Source code for mdp_playground.envs.gym_env_wrapper

-import gym
-import copy
-import numpy as np
-import sys
-from gym.spaces import Box, Tuple
-from gym.wrappers import AtariPreprocessing
-from ray.rllib.env.atari_wrappers import wrap_deepmind, is_atari
-from mdp_playground.envs.rl_toy_env import RLToyEnv
-
-# def get_gym_wrapper(base_class):
-
-
[docs]class GymEnvWrapper(gym.Env): - '''Wraps an OpenAI Gym environment to be able to modify its dimensions corresponding to MDP Playground. The documentation for the supported dimensions below can be found in mdp_playground/envs/rl_toy_env.py. - - Currently supported dimensions: - transition noise (discrete) - reward delay - reward noise - - Also supports wrapping with AtariPreprocessing from OpenAI Gym or wrap_deepmind from Ray Rllib. - - ''' - # Should not be a gym.Wrapper because 1) gym.Wrapper has member variables observation_space and action_space while here with irrelevant_features we would have multiple observation_spaces and this could cause conflict with code that assumes any subclass of gym.Wrapper should have these member variables. - # However, it _should_ be at least a gym.Env - # Does it need to be a subclass of base_class because some external code may check if it's an AtariEnv, for instance, and do further stuff based on that? - -
[docs] def __init__(self, env, **config): - self.config = copy.deepcopy(config) - # self.env = config["env"] - self.env = env - - seed_int = None - if "seed" in config: - seed_int = config["seed"] - - self.seed(seed_int) #seed - ###IMP Move below code from here to seed()? Because if seed is called during the run of an env, the expectation is that all obs., act. space, etc. seeds are set? Only Atari in Gym seems to do something similar, the others I saw there don't seem to set seed for obs., act. spaces. - self.env.seed(seed_int) #seed ###IMP Apparently Atari also has a seed. :/ Without this, for beam_rider(?), about 1 in 5 times I got reward of 88.0 and 44.0 the remaining times with the same action sequence!! With setting this seed, I got the same reward of 44.0 when I ran about 20 times.; ##TODO If this is really a wrapper, should it be modifying the seed of the env? - obs_space_seed = self.np_random.randint(sys.maxsize) #random - act_space_seed = self.np_random.randint(sys.maxsize) #random - self.env.observation_space.seed(obs_space_seed) #seed - self.env.action_space.seed(act_space_seed) #seed - - # if "dummy_eval" in config: #hack - # del config["dummy_eval"] - if "delay" in config: - self.delay = config["delay"] - assert config["delay"] >= 0 - self.reward_buffer = [0.0] * (self.delay) - else: - self.delay = 0 - - if "transition_noise" in config: - self.transition_noise = config["transition_noise"] - if config["state_space_type"] == "continuous": - assert callable(self.transition_noise), "transition_noise must be a function when env is continuous, it was of type:" + str(type(self.transition_noise)) - else: - assert self.transition_noise <= 1.0 and self.transition_noise >= 0.0, "transition_noise must be a value in [0.0, 1.0] when env is discrete, it was:" + str(self.transition_noise) - else: - if config["state_space_type"] == "discrete": - self.transition_noise = 0.0 - else: - self.transition_noise = lambda a: 0.0 - - if "reward_noise" in config: - if callable(config["reward_noise"]): - self.reward_noise = config["reward_noise"] - else: - reward_noise_std = config["reward_noise"] - self.reward_noise = lambda a: a.normal(0, reward_noise_std) - else: - self.reward_noise = None - - if "wrap_deepmind_ray" in config and config["wrap_deepmind_ray"]: #hack ##TODO remove? - self.env = wrap_deepmind(self.env, dim=42, framestack=True) - elif "atari_preprocessing" in config and config["atari_preprocessing"]: - self.frame_skip = 4 #default for AtariPreprocessing - if "frame_skip" in config: - self.frame_skip = config["frame_skip"] - self.grayscale_obs = False - if "grayscale_obs" in config: - self.grayscale_obs = config["grayscale_obs"] - - # Use AtariPreprocessing with frame_skip - self.env = AtariPreprocessing(self.env, frame_skip=self.frame_skip, grayscale_obs=self.grayscale_obs, noop_max=1) # noop_max set to 1 because we want to keep the vanilla env as deterministic as possible and setting it 0 was not allowed. ##TODO noop_max=0 is poosible in new Gym version, so update Gym version. - print("self.env.noop_max set to: ", self.env.noop_max) - - if "irrelevant_features" in config: - # self.irrelevant_features = config["irrelevant_features"] - irr_toy_env_conf = config["irrelevant_features"] - if "seed" not in irr_toy_env_conf: - irr_toy_env_conf["seed"] = self.np_random.randint(sys.maxsize) #random - - self.irr_toy_env = RLToyEnv(**irr_toy_env_conf) - - if config["state_space_type"] == "discrete": - self.action_space = Tuple((self.env.action_space, self.irr_toy_env.action_space)) - self.observation_space = Tuple((self.env.observation_space, self.irr_toy_env.observation_space)) ###TODO for image observations, concatenate to 1 obs. space here and in step() and reset()? - else: ####TODO Check the test case added for cont. irr features case and code for it in run_experiments.py. - env_obs_low = self.env.observation_space.low - env_obs_high = self.env.observation_space.high - env_obs_dtype = env_obs_low.dtype - env_obs_shape = env_obs_low.shape - irr_env_obs_low = self.irr_toy_env.observation_space.low - irr_env_obs_high = self.irr_toy_env.observation_space.high - irr_env_obs_dtype = self.irr_toy_env.observation_space.low.dtype - assert env_obs_dtype == irr_env_obs_dtype, "Datatypes of base env and irrelevant toy env should match. Were: " + str(env_obs_dtype) + ", " + str(irr_env_obs_dtype) - ext_low = np.concatenate((env_obs_low, irr_env_obs_low)) - ext_high = np.concatenate((env_obs_high, irr_env_obs_high)) - self.observation_space = Box(low=ext_low, high=ext_high, dtype=env_obs_dtype) - - env_act_low = self.env.action_space.low - env_act_high = self.env.action_space.high - env_act_dtype = env_act_low.dtype - self.env_act_shape = env_act_low.shape - assert len(self.env_act_shape) == 1, "Length of shape of action space should be 1." - irr_env_act_low = self.irr_toy_env.action_space.low - irr_env_act_high = self.irr_toy_env.action_space.high - irr_env_act_dtype = irr_env_act_low.dtype - # assert env_obs_dtype == env_act_dtype, "Datatypes of obs. and act. of base env should match. Were: " + str(env_obs_dtype) + ", " + str(env_act_dtype) #TODO Apparently, observations are np.float64 and actions np.float32 for Mujoco. - ext_low = np.concatenate((env_act_low, irr_env_act_low)) - ext_high = np.concatenate((env_act_high, irr_env_act_high)) - self.action_space = Box(low=ext_low, high=ext_high, dtype=env_act_dtype) #TODO Use BoxExtended here and above? - - self.observation_space.seed(obs_space_seed) #seed - self.action_space.seed(act_space_seed) #seed - else: - self.action_space = self.env.action_space - self.observation_space = self.env.observation_space - - - self.total_episodes = 0 - - # if "action_loss_weight" in config: #hack - # del config["action_loss_weight"] - # if "action_space_max" in config: #hack - # action_space_max = config["action_space_max"] - # del config["action_space_max"] - # if "time_unit" in config: #hack - # time_unit = config["time_unit"] - # del config["time_unit"] - # if "dummy_seed" in config: #hack - # del config["dummy_seed"] - - super(GymEnvWrapper, self).__init__()
- # if "action_space_max" in locals(): - # print("Setting Mujoco self.action_space.low, self.action_space.high from:", self.action_space.low, self.action_space.high) - # self.action_space.low *= action_space_max - # self.action_space.high *= action_space_max - # print("to:", self.action_space.low, self.action_space.high) - - # if base_class == HalfCheetahEnv and action_space_max >= 4: #hack - # self.model.opt.timestep /= 2 # 0.005 - # self.frame_skip *= 2 - # print("Setting Mujoco timestep to", self.model.opt.timestep, "half of the usual to avoid instabilities. At the same time action repeat increased to twice its usual.") - - # if "time_unit" in locals(): #hack In HalfCheetah, this is needed because the reward function is dependent on the time_unit because it depends on velocity achieved which depends on amount of time torque was applied. In Pusher, Reacher, it is also needed because the reward is similar to the distance from current position to goal at _each_ step, which means if we calculate the reward multiple times in the same amount of "real" time, we'd need to average out the reward the more times we calculate the reward in the same amount of "real" time (i.e., when we have shorter acting timesteps). This is not the case with the toy enviroments because there the reward is amount of distance moved from current position to goal in the current timestep, so it's dependent on "real" time and not on acting timesteps. - # self.frame_skip *= time_unit - # self.frame_skip = int(self.frame_skip) - # self._ctrl_cost_weight *= time_unit - # self._forward_reward_weight *= time_unit - # print("Setting Mujoco self.frame_skip, self._ctrl_cost_weight, self._forward_reward_weight to", self.frame_skip, self._ctrl_cost_weight, self._forward_reward_weight, "corresponding to time_unit in config.") - -
[docs] def step(self, action): - # next_state, reward, done, info = super(GymEnvWrapper, self).step(action) - self.total_transitions_episode += 1 - - if self.config["state_space_type"] == "discrete" and self.transition_noise > 0.0: - probs = np.ones(shape=(self.env.action_space.n,)) * self.transition_noise / (self.env.action_space.n - 1) - probs[action] = 1 - self.transition_noise - old_action = action - action = int(self.np_random.choice(self.env.action_space.n, size=1, p=probs)) #random - if old_action != action: - # print("NOISE inserted", old_action, action) - self.total_noisy_transitions_episode += 1 - else: # cont. envs - pass ###TODO - # self.total_abs_noise_in_transition_episode += np.abs(noise_in_transition) - - - if "irrelevant_features" in self.config: - if self.config["state_space_type"] == "discrete": - next_state, reward, done, info = self.env.step(action[0]) - next_state_irr, _, done_irr, _ = self.irr_toy_env.step(action[1]) - next_state = tuple([next_state, next_state_irr]) - else: - next_state, reward, done, info = self.env.step(action[:self.env_act_shape[0]]) - next_state_irr, _, done_irr, _ = self.irr_toy_env.step(action[self.env_act_shape[0]:]) - next_state = np.concatenate((next_state, next_state_irr)) - else: - next_state, reward, done, info = self.env.step(action) - - if done: - reward = np.sum(self.reward_buffer) # if episode is finished return the rewards that were delayed and not handed out before ##TODO add test case for this - else: - self.reward_buffer.append(reward) - old_reward = reward - reward = self.reward_buffer[0] - # print("rewards:", self.reward_buffer, old_reward, reward) - del self.reward_buffer[0] - - noise_in_reward = self.reward_noise(self.np_random) if self.reward_noise else 0 #random ###TODO Would be better to parameterise this in terms of state, action and time_step as well. Would need to change implementation to have a queue for the rewards achieved and then pick the reward that was generated delay timesteps ago. - self.total_abs_noise_in_reward_episode += np.abs(noise_in_reward) - self.total_reward_episode += reward - reward += noise_in_reward - - return next_state, reward, done, info
- -
[docs] def reset(self): - # on episode "end" stuff (to not be invoked when reset() called when self.total_episodes = 0; end is in quotes because it may not be a true episode end reached by reaching a terminal state, but reset() may have been called in the middle of an episode): - if not self.total_episodes == 0: - print("Noise stats for previous episode num.: " + str(self.total_episodes) + " (total abs. noise in rewards, total abs. noise in transitions, total reward, total noisy transitions, total transitions): " + str(self.total_abs_noise_in_reward_episode) + " " + str(self.total_abs_noise_in_transition_episode) + " " + str(self.total_reward_episode) + " " + str(self.total_noisy_transitions_episode) + " " + str(self.total_transitions_episode)) - - # on episode start stuff: - self.reward_buffer = [0.0] * (self.delay) - - self.total_episodes += 1 - - self.total_abs_noise_in_reward_episode = 0 - self.total_abs_noise_in_transition_episode = 0 # only present in continuous spaces - self.total_noisy_transitions_episode = 0 # only present in discrete spaces - self.total_reward_episode = 0 - self.total_transitions_episode = 0 - - if "irrelevant_features" in self.config: - if self.config["state_space_type"] == "discrete": - reset_state = self.env.reset() - reset_state_irr = self.irr_toy_env.reset() - reset_state = tuple([reset_state, reset_state_irr]) - else: - reset_state = self.env.reset() - reset_state_irr = self.irr_toy_env.reset() - reset_state = np.concatenate((reset_state, reset_state_irr)) - else: - reset_state = self.env.reset() - return reset_state
- # return super(GymEnvWrapper, self).reset() - -
[docs] def seed(self, seed=None): - """Initialises the Numpy RNG for the environment by calling a utility for this in Gym. - - Parameters - ---------- - seed : int - seed to initialise the np_random instance held by the environment. Cannot use numpy.int64 or similar because Gym doesn't accept it. - - Returns - ------- - int - The seed returned by Gym - """ - # If seed is None, you get a randomly generated seed from gym.utils... - self.np_random, self.seed_ = gym.utils.seeding.np_random(seed) #random - print("Env SEED set to: " + str(seed) + ". Returned seed from Gym: " + str(self.seed_)) - - return self.seed_
- - - - # return GymEnvWrapper - - -# from mdp_playground.envs.gym_env_wrapper import get_gym_wrapper -# from gym.envs.atari import AtariEnv -# from gym.wrappers import AtariPreprocessing -# AtariPreprocessing() -# AtariEnvWrapper = get_gym_wrapper(AtariEnv) -# from ray.tune.registry import register_env -# register_env("AtariEnvWrapper", lambda config: AtariEnvWrapper(**config)) -# aew = AtariEnvWrapper(**{'game': 'breakout', 'obs_type': 'image', 'frameskip': 4}) -# ob = aew.reset() - -# from mdp_playground.envs.gym_env_wrapper import GymEnvWrapper -# from gym.envs.atari import AtariEnv -# ae = AtariEnv(**{'game': 'beam_rider', 'obs_type': 'image', 'frameskip': 1}) -# aew = GymEnvWrapper(ae, **{'reward_noise': lambda a: a.normal(0, 0.1), 'transition_noise': 0.1, 'delay': 1, 'frame_skip': 4, "atari_preprocessing": True, "state_space_type": "discrete", 'seed': 0}) -# ob = aew.reset() -# print(ob.shape) -# print(ob) -# total_reward = 0.0 -# for i in range(200): -# act = aew.action_space.sample() -# next_state, reward, done, info = aew.step(act) -# print(reward, done, act) -# if reward > 10: -# print("reward in step:", i, reward) -# total_reward += reward -# print("total_reward:", total_reward) -# aew.reset() - -# # AtariPreprocessing() -# # from ray.tune.registry import register_env -# # register_env("AtariEnvWrapper", lambda config: AtariEnvWrapper(**config)) -
- -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_modules/mdp_playground/envs/mujoco_env_wrapper.html b/docs/_build/html/_modules/mdp_playground/envs/mujoco_env_wrapper.html deleted file mode 100644 index dd9a434..0000000 --- a/docs/_build/html/_modules/mdp_playground/envs/mujoco_env_wrapper.html +++ /dev/null @@ -1,558 +0,0 @@ - - - - - - - - mdp_playground.envs.mujoco_env_wrapper — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -

Source code for mdp_playground.envs.mujoco_env_wrapper

-# from gym.envs.mujoco.mujoco_env import MujocoEnv
-from gym.envs.mujoco.half_cheetah_v3 import HalfCheetahEnv
-from gym.envs.mujoco.pusher import PusherEnv
-from gym.envs.mujoco.reacher import ReacherEnv
-import copy
-
-
[docs]def get_mujoco_wrapper(base_class): - '''Wraps a mujoco-py environment to be able to modify its XML attributes and inject the dimensions from MDP Playground. The values for these dimensions are passed in a config dict as for mdp_playground.envs.RLToyEnv. - - Currently supported dimensions: - time_unit - action_space_max - - For both of these dimensions the scalar value passed in the dict is used to multiply the base environments values. For the Mujoco envs, the time_unit is achieved by multiplying the Gym Mujoco env's frame_skip and thus needs to be such that time_unit * frame_skip is an integer. The time_unit is NOT achieved by changing Mujoco's timestep because that would change the numerical integration done my Mujoco. - - ''' - #TODO This makes a subclass and not a wrapper. Change name. Or make it a wrapper by using composition? Some frameworks might need an instance of this class to also be an instance of base_class? - - class MujocoEnvWrapper(base_class): - def __init__(self, **config): # Gets passed env_config from run_experiments.py - self.config = copy.deepcopy(config) - self.base_class = base_class - if "dummy_eval" in config: #hack We need to delete these from config because either Gym or Ray complains when extraneous configs present - del config["dummy_eval"] - if "transition_noise" in config: #hack - del config["transition_noise"] - if "reward_noise" in config: #hack - del config["reward_noise"] - if "action_loss_weight" in config: #hack - del config["action_loss_weight"] - if "action_space_max" in config: #hack - action_space_max = config["action_space_max"] - del config["action_space_max"] - if "time_unit" in config: #hack - self.time_unit = config["time_unit"] - del config["time_unit"] - if "dummy_seed" in config: #hack - del config["dummy_seed"] - - if "MujocoEnv" not in config: - config["MujocoEnv"] = {} - - super(MujocoEnvWrapper, self).__init__(**config["MujocoEnv"]) #hack ###IMP This helps by sending only Mujoco specific config to Mujoco, if anything else is sent by using **config, program crashes because each 'MujocoEnv', e.g. HalfCheetahV3, has a static call signature for __init__ ##TODO Thanks to this, now the above del statements can be removed I think. - self.model.opt.disableflags = 128 ##IMP disables clamping of controls to the range in the XML, i.e., [-1, 1] - if "action_space_max" in locals(): - print("Setting Mujoco self.action_space.low, self.action_space.high from:", self.action_space.low, self.action_space.high) - self.action_space.low *= action_space_max - self.action_space.high *= action_space_max - print("to:", self.action_space.low, self.action_space.high) - - if base_class == HalfCheetahEnv and action_space_max >= 4: #hack - self.model.opt.timestep /= 2 # 0.005 - self.frame_skip *= 2 - print("Setting Mujoco timestep to", self.model.opt.timestep, "half of the usual to avoid instabilities. At the same time action repeat increased to twice its usual.") - - if "time_unit" in self.config: #hack In HalfCheetah, this is needed because the reward function is dependent on the time_unit because it depends on velocity achieved which depends on amount of time torque was applied. In Pusher, Reacher, it is also needed because the reward is similar to the distance from current position to goal at _each_ step, which means if we calculate the reward multiple times in the same amount of "real" time, we'd need to average out the reward the more times we calculate the reward in the same amount of "real" time (i.e., when we have shorter acting timesteps). This is not the case with the toy enviroments because there the reward is amount of distance moved from current position to goal in the current timestep, so it's dependent on "real" time and not on acting timesteps. - print("Original frame_skip for Mujoco Env:", self.frame_skip) - self.frame_skip *= self.time_unit - self.frame_skip = int(self.frame_skip) - print("Setting Mujoco self.frame_skip to", self.frame_skip, "corresponding to time_unit in config.") - assert self.frame_skip > 0, "self.frame_skip was set to < 0. Please check your time_unit setting. It was: " + str(self.time_unit) - - if base_class == HalfCheetahEnv: #hack could include other similarly defined envs from Gym Mujoco - self._ctrl_cost_weight *= self.time_unit - self._forward_reward_weight *= self.time_unit - print("Setting Mujoco self._ctrl_cost_weight, self._forward_reward_weight to", self._ctrl_cost_weight, self._forward_reward_weight, "corresponding to time_unit in config.") - - def step(self, action): #hack - obs, reward, done, info = super(MujocoEnvWrapper, self).step(action) - if self.base_class in [PusherEnv, ReacherEnv] and "time_unit" in self.config: - reward *= self.time_unit - return obs, reward, done, info - - - return MujocoEnvWrapper
- -# from mdp_playground.envs.mujoco_env_wrapper import get_mujoco_wrapper #hack -# -# from gym.envs.mujoco.reacher import ReacherEnv -# ReacherWrapperV2 = get_mujoco_wrapper(ReacherEnv) -# config = {"time_unit": 0.2} -# rw2 = ReacherWrapperV2(**config) -# o = rw2.reset() -# rw2.seed(0) -# rw2.step(1) -
- -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_modules/mdp_playground/envs/rl_toy_env.html b/docs/_build/html/_modules/mdp_playground/envs/rl_toy_env.html deleted file mode 100644 index 98d7c9f..0000000 --- a/docs/_build/html/_modules/mdp_playground/envs/rl_toy_env.html +++ /dev/null @@ -1,2090 +0,0 @@ - - - - - - - - mdp_playground.envs.rl_toy_env — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -

Source code for mdp_playground.envs.rl_toy_env

-from __future__ import absolute_import
-from __future__ import division
-from __future__ import print_function
-
-import sys, os
-import warnings
-import logging
-import copy
-from datetime import datetime
-import numpy as np
-import scipy
-from scipy import stats
-from scipy.spatial import distance
-import gym
-from mdp_playground.spaces import BoxExtended, DiscreteExtended, TupleExtended,\
-        ImageMultiDiscrete, ImageContinuous
-
-
-
[docs]class RLToyEnv(gym.Env): - """ - The base toy environment in MDP Playground. It is parameterised by a config dict and can be instantiated to be an MDP with any of the possible dimensions from the accompanying research paper. The class extends OpenAI Gym's environment gym.Env. - - The accompanying paper is available at: https://arxiv.org/abs/1909.07750. - - Instead of implementing a new class for every type of MDP, the intent is to capture as many common dimensions across different types of environments as possible and to be able to control the difficulty of an environment by allowing fine-grained control over each of these dimensions. The focus is to be as flexible as possible. - - The configuration for the environment is passed as a dict at initialisation and contains all the information needed to determine the dynamics of the MDP that the instantiated environment will emulate. We recommend looking at the examples in example.py to begin using the environment since the dimensions and config options are mostly self-explanatory. If you want to specify custom MDPs, please see the use_custom_mdp config option below. For more details, we list here the dimensions and config options (their names here correspond to the keys to be passed in the config dict): - state_space_type : str - Specifies what the environment type is. Options are "continuous", "discrete" and "grid". The "grid" environment is, basically, a discretised version of the continuous environment. - delay : int >= 0 - Delays each reward by this number of timesteps. - sequence_length : int >= 1 - Intrinsic sequence length of the reward function of an environment. For discrete environments, randomly selected sequences of this length are set to be rewardable at initialisation if use_custom_mdp = false and generate_random_mdp = true. - transition_noise : float in range [0, 1] or Python function(rng) - For discrete environments, it is a float that specifies the fraction of times the environment transitions to a noisy next state at each timestep, independently and uniformly at random. - For continuous environments, if it's a float, it's used as the standard deviation of an i.i.d. normal distribution of noise. If it is a Python function with one argument, it is added to next state. The argument is the Random Number Generator (RNG) of the environment which is an np.random.RandomState object. This RNG should be used to perform calls to the desired random function to be used as noise to ensure reproducibility. - reward_noise : float or Python function(rng) - If it's a float, it's used as the standard deviation of an i.i.d. normal distribution of noise. - If it's a Python function with one argument, it is added to the reward given at every time step. The argument is the Random Number Generator (RNG) of the environment which is an np.random.RandomState object. This RNG should be used to perform calls to the desired random function to be used as noise to ensure reproducibility. - reward_density : float in range [0, 1] - The fraction of possible sequences of a given length that will be selected to be rewardable at initialisation time. - reward_scale : float - Multiplies the rewards by this value at every time step. - reward_shift : float - This value is added to the reward at every time step. - diameter : int > 0 - For discrete environments, if diameter = d, the set of states is set to be a d-partite graph (and NOT a complete d-partite graph), where, if we order the d sets as 1, 2, .., d, states from set 1 will have actions leading to states in set 2 and so on, with the final set d having actions leading to states in set 1. Number of actions for each state will, thus, be = (number of states) / (d). - terminal_state_density : float in range [0, 1] - For discrete environments, the fraction of states that are terminal; the terminal states are fixed to the "last" states when we consider them to be ordered by their numerical value. This is w.l.o.g. because discrete states are categorical. For continuous environments, please see terminal_states and term_state_edge for how to control terminal states. - term_state_reward : float - Adds this to the reward if a terminal state was reached at the current time step. - image_representations : boolean - Boolean to associate an image as the external observation with every discrete categorical state. - For discrete envs, this is handled by an mdp_playground.spaces.ImageMultiDiscrete object. It associates the image of an n + 3 sided polygon for a categorical state n. More details can be found in the documentation for the ImageMultiDiscrete class. - For continuous and grid envs, this is handled by an mdp_playground.spaces.ImageContinuous object. More details can be found in the documentation for the ImageContinuous class. - irrelevant_features : boolean - If True, an additional irrelevant sub-space (irrelevant to achieving rewards) is present as part of the observation space. This sub-space has its own transition dynamics independent of the dynamics of the relevant sub-space. - For discrete environments, additionally, state_space_size must be specified as a list. - For continuous environments, the option relevant_indices must be specified. This option specifies the dimensions relevant to achieving rewards. - For grid environments, nothing additional needs to be done as relevant grid shape is also used as the irrelevant grid shape. - use_custom_mdp : boolean - If true, users specify their own transition and reward functions using the config options transition_function and reward_function (see below). Optionally, they can also use init_state_dist and terminal_states for discrete spaces (see below). - transition_function : Python function(state, action) or a 2-D numpy.ndarray - A Python function emulating P(s, a). For discrete envs it's also possible to specify an |S|x|A| transition matrix. - reward_function : Python function(state_sequence, action_sequence) or a 2-D numpy.ndarray - A Python function emulating R(state_sequence, action_sequence). The state_sequence is recorded by the environment and transition_function is called before reward_function, so the "current" state (when step() was called) and next state are the last 2 states in the sequence. - For discrete environments, it's also possible to specify an |S|x|A| transition matrix where reward is assumed to be a function over the "current" state and action. - If use_custom_mdp = false and the environment is continuous, this is a string that chooses one of the following predefined reward functions: move_along_a_line or move_to_a_point. - If use_custom_mdp = false and the environment is grid, this is a string that chooses one of the following predefined reward functions: move_to_a_point. Support for sequences is planned. - - Also see make_denser documentation. - - - Specific to discrete environments: - state_space_size : int > 0 or list of length 2 - A number specifying size of the state space for normal discrete environments and a list of len = 2 when irrelevant_features is True (The list contains sizes of relevant and irrelevant sub-spaces where the 1st sub-space is assumed relevant and the 2nd sub-space is assumed irrelevant). - NOTE: When automatically generating MDPs, do not specify this value as its value depends on the action_space_size and the diameter as state_space_size = action_space_size * diameter. - action_space_size : int > 0 - Similar description as state_space_size. When automatically generating MDPs, however, its value determines the state_space_size. - reward_dist : list with 2 floats or a Python function(env_rng, reward_sequence_dict) - If it's a list with 2 floats, then these 2 values are interpreted as a closed interval and taken as the end points of a categorical distribution which points equally spaced along the interval. - If it's a Python function, it samples rewards for the rewardable_sequences dict of the environment. The rewardable_sequences dict of the environment holds the rewardable_sequences with the key as a tuple holding the sequence and value as the reward handed out. The 1st argument for the reward_dist function is the Random Number Generator (RNG) of the environment which is an np.random.RandomState object. This RNG should be used to perform calls to the desired random function to be used to sample rewards to ensure reproducibility. The 2nd argument is the rewardable_sequences dict of the environment. This is available because one may need access to the already created reward sequences in the reward_dist function. - init_state_dist : 1-D numpy.ndarray - Specifies an array of initialisation probabilities for the discrete state space. - terminal_states : Python function(state) or 1-D numpy.ndarray - A Python function with the state as argument that returns whether the state is terminal. If this is specified as an array, the array lists the discrete states that are terminal. - - Specific to image_representations for discrete envs: - image_transforms : str - String containing the transforms that must be applied to the image representations. As long as one of the following words is present in the string - shift, scale, rotate, flip - the corresponding transform will be applied at random to the polygon in the image representation whenever an observation is generated. Care is either explicitly taken that the polygon remains inside the image region or a warning is generated. - sh_quant : int - An int to quantise the shift transforms. - scale_range : (float, float) - A tuple of real numbers to specify (min_scaling, max_scaling). - ro_quant : int - An int to quantise the rotation transforms. - - Specific to continuous environments: - state_space_dim : int - A number specifying state space dimensionality. A Gym Box space of this dimensionality will be instantiated. - action_space_dim : int - Same description as state_space_dim. This is currently set equal to the state_space_dim and doesn't need to specified. - relevant_indices : list - A list that provides the dimensions relevant to achieving rewards for continuous environments. The dynamics for these dimensions are independent of the dynamics for the remaining (irrelevant) dimensions. - state_space_max : float - Max absolute value that a dimension of the space can take. A Gym Box will be instantiated with range [-state_space_max, state_space_max]. Sampling will be done as for Gym Box spaces. - action_space_max : float - Similar description as for state_space_max. - terminal_states : numpy.ndarray - The centres of hypercube sub-spaces which are terminal. - term_state_edge : float - The edge of the hypercube sub-spaces which are terminal. - transition_dynamics_order : int - An order of n implies that the n-th state derivative is set equal to the action/inertia. - inertia : float or numpy.ndarray - inertia of the rigid body or point object that is being simulated. If numpy.ndarray, it specifies independent inertiae for the dimensions and the shape should be (state_space_dim,). - time_unit : float - time duration over which the action is applied to the system. - target_point : numpy.ndarray - The target point in case move_to_a_point is the reward_function. If make_denser is false, target_radius determines distance from the target point at which the sparse reward is handed out. - action_loss_weight : float - A coefficient to multiply the norm of the action and subtract it from the reward to penalise the action magnitude. - - Specific to grid environments: - grid_shape : tuple - Shape of the grid environment. If irrelevant_features is True, this is replicated to add a grid which is irrelevant to the reward. - target_point : numpy.ndarray - The target point in case move_to_a_point is the reward_function. If make_denser is false, reward is only handed out when the target point is reached. - terminal_states : Python function(state) or 1-D numpy.ndarray - Same description as for terminal_states under discrete envs - - Other important config: - Specific to discrete environments: - repeats_in_sequences : boolean - If true, allows rewardable sequences to have repeating states in them. - maximally_connected : boolean - If true, sets the transition function such that every state in independent set i can transition to every state in independent set i + 1. If false, then sets the transition function such that a state in independent set i may have any state in independent set i + 1 as the next state for a transition. - reward_every_n_steps : boolean - Hand out rewards only at multiples of sequence_length steps. This makes the probability that an agent is executing overlapping rewarding sequences 0. This makes it simpler to evaluate HRL algorithms and whether they can "discretise" time correctly. Noise is added at every step, regardless of this setting. Currently, not implemented for either the make_denser = true case or for continuous and grid environments. - generate_random_mdp : boolean - If true, automatically generate MDPs when use_custom_mdp = false. Currently, this option doesn't need to be specified because random MDPs are always generated when use_custom_mdp = false. - - Specific to continuous environments: - none as of now - - For all, continuous, discrete and grid environments: - make_denser : boolean - If true, makes the reward denser in environments. - For discrete environments, hands out a partial reward for completing partial sequences. - For continuous environments, for reward function move_to_a_point, the base reward handed out is equal to the distance moved towards the target point in the current timestep. - For grid envs, the base reward handed out is equal to the Manhattan distance moved towards the target point in the current timestep. - seed : int or dict - Recommended to be passed as an int which generates seeds to be used for the various components of the environment. It is, however, possible to control individual seeds by passing it as a dict. Please see the default initialisation for seeds below to see how to do that. - log_filename : str - The name of the log file to which logs are written. - log_level : logging.LOG_LEVEL option - Python log level for logging - - Below, we list the important attributes and methods for this class. - - Attributes - ---------- - config : dict - the config contains all the details required to generate an environment - seed : int or dict - recommended to set to an int, which would set seeds for the env, relevant and irrelevant and externally visible observation and action spaces automatically. If fine-grained control over the seeds is necessary, a dict, with key values as in the source code further below, can be passed. - observation_space : Gym.Space - The externally visible observation space for the enviroment. - action_space : Gym.Space - The externally visible action space for the enviroment. - rewardable_sequences : dict - holds the rewardable sequences. The keys are tuples of rewardable sequences and values are the rewards handed out. When make_denser is True for discrete environments, this dict also holds the rewardable partial sequences. - - Methods - ------- - init_terminal_states() - Initialises terminal states, T - init_init_state_dist() - Initialises initial state distribution, rho_0 - init_transition_function() - Initialises transition function, P - init_reward_function() - Initialises reward function, R - transition_function(state, action) - the transition function of the MDP, P - P(state, action) - defined as a lambda function in the call to init_transition_function() and is equivalent to calling transition_function() - reward_function(state, action) - the reward function of the MDP, R - R(state, action) - defined as a lambda function in the call to init_reward_function() and is equivalent to calling reward_function() - get_augmented_state() - gets underlying Markovian state of the MDP - reset() - Resets environment state - seed() - Sets the seed for the numpy RNG used by the environment (state and action spaces have their own seeds as well) - step(action, imaginary_rollout=False) - Performs 1 transition of the MDP - """ - -
[docs] def __init__(self, **config): # = None): - """Initialises the MDP to be emulated using the settings provided in config. - - Parameters - ---------- - config : dict - the member variable config is initialised to this value after inserting defaults - """ - - print("Passed config:", config, "\n") - - # Set default settings for config to be able to use class without any config being passed - if len(config) == 0: #is None: - # config = {} - - # Discrete spaces configs: - config["state_space_type"] = "discrete" # TODO if states are assumed categorical in discrete setting, need to have an embedding for their OHE when using NNs; do the encoding on the training end! - config["state_space_size"] = 8 # To be given as an integer for simple Discrete environment like Gym's. To be given as a list of integers for a MultiDiscrete environment like Gym's #TODO Rename state_space_size and action_space_size to be relevant_... wherever irrelevant dimensions are not used. - config["action_space_size"] = 8 - - # Continuous spaces configs: - # config["state_space_type"] = "continuous" - # config["state_space_dim"] = 2 - # config["action_space_dim"] = 2 - # config["transition_dynamics_order"] = 1 - # config["inertia"] = 1 # 1 unit, e.g. kg for mass, or kg * m^2 for moment of inertia. - # config["state_space_max"] = 5 # Will be a Box in the range [-max, max] - # config["action_space_max"] = 5 # Will be a Box in the range [-max, max] - # config["time_unit"] = 0.01 # Discretization of time domain - # config["terminal_states"] = [[0.0, 1.0], [1.0, 0.0]] - # config["term_state_edge"] = 1.0 # Terminal states will be in a hypercube centred around the terminal states given above with the edge of the hypercube of this length. - - # config for user specified P, R, rho_0, T. Examples here are for discrete spaces - # config["transition_function"] = np.array([[4 - i for i in range(config["state_space_size"])] for j in range(config["action_space_size"])]) #TODO ###IMP For all these prob. dist., there's currently a difference in what is returned for discrete vs continuous! - # config["reward_function"] = np.array([[4 - i for i in range(config["state_space_size"])] for j in range(config["action_space_size"])]) - # config["init_state_dist"] = np.array([i/10 for i in range(config["state_space_size"])]) - # config["terminal_states"] = np.array([config["state_space_size"] - 1]) # Can be discrete array or function to test terminal or not (e.g. for discrete and continuous spaces we may prefer 1 of the 2) #TODO currently always the same terminal state for a given environment state space size; have another variable named terminal_states to make semantic sense of variable name. - - - config["generate_random_mdp"] = True ###IMP # This supersedes previous settings and generates a random transition function, a random reward function (for random specific sequences) - config["delay"] = 0 - config["sequence_length"] = 1 - config["repeats_in_sequences"] = False - config["reward_scale"] = 1.0 - config["reward_density"] = 0.25 # Number between 0 and 1 -# config["transition_noise"] = 0.2 # Currently the fractional chance of transitioning to one of the remaining states when given the deterministic transition function - in future allow this to be given as function; keep in mind that the transition function itself could be made a stochastic function - does that qualify as noise though? -# config["reward_noise"] = lambda a: a.normal(0, 0.1) #random #hack # a probability function added to reward function - # config["transition_noise"] = lambda a: a.normal(0, 0.1) #random #hack # a probability function added to transition function in cont. spaces - config["make_denser"] = False - config["terminal_state_density"] = 0.25 # Number between 0 and 1 - config["maximally_connected"] = True # Make every state reachable from every state; If maximally_connected, then no. of actions has to be at least equal to no. of states( - 1 if without self-loop); if repeating sequences allowed, then we have to have self-loops. Self-loops are ok even in non-repeating sequences - we just have a harder search problem then! Or make it maximally connected by having transitions to as many different states as possible - the row for P would have as many different transitions as possible! - # print(config) - #TODO asserts for the rest of the config settings - # next: To implement delay, we can keep the previous observations to make state Markovian or keep an info bit in the state to denote that; Buffer length increase by fixed delay and fixed sequence length; current reward is incremented when any of the satisfying conditions (based on previous states) matches - - config["seed"] = 0 - - # Print initial "banner" - screen_output_width = 132 #hardcoded #TODO get from system - repeat_equal_sign = (screen_output_width - 20) // 2 - set_ansi_escape = "\033[32;1m" - reset_ansi_escape = "\033[0m" - print(set_ansi_escape + "=" * repeat_equal_sign + "Initialising Toy MDP" + "=" * repeat_equal_sign + reset_ansi_escape) - print("Current working directory:", os.getcwd()) - - # Set other default settings for config to use if config is passed without any values for them - if "log_level" not in config: - self.log_level = logging.CRITICAL #logging.NOTSET - else: - self.log_level = config["log_level"] - - # print('self.log_level', self.log_level) - logging.getLogger(__name__).setLevel(self.log_level) - # fmtr = logging.Formatter(fmt='%(message)s - %(levelname)s - %(name)s - %(asctime)s', datefmt='%m.%d.%Y %I:%M:%S %p', style='%') - # sh = logging.StreamHandler() - # sh.setFormatter(fmt=fmtr) - self.logger = logging.getLogger(__name__) - # self.logger.addHandler(sh) - - if "log_filename" in config: - # self.log_filename = __name__ + '_' + datetime.today().strftime('%m.%d.%Y_%I:%M:%S_%f') + '.log' #TODO Make a directoy 'log/' and store there. - # else: - if not self.logger.handlers: # checks that handlers is [], before adding a file logger, otherwise we would have multiple loggers to file if multiple RLToyEnvs were instantiated by the same process. - self.log_filename = config["log_filename"] - # logging.basicConfig(filename='/tmp/' + self.log_filename, filemode='a', format='%(message)s - %(levelname)s - %(name)s - %(asctime)s', datefmt='%m.%d.%Y %I:%M:%S %p', level=self.log_level) - log_file_handler = logging.FileHandler(self.log_filename) - self.logger.addHandler(log_file_handler) - # log_filename = "logs/output.log" - # os.makedirs(os.path.dirname(log_filename), exist_ok=True) - - - #seed - if "seed" not in config: #####IMP It's very important to not modify the config dict since it may be shared across multiple instances of the Env in the same process and could lead to very hard to catch bugs (I faced problems with Ray's A3C) - self.seed_int = None - need_to_gen_seeds = True - elif type(config["seed"]) == dict: - self.seed_dict = config["seed"] - need_to_gen_seeds = False - elif type(config["seed"]) == int: # should be an int then. Gym doesn't accept np.int64, etc.. - self.seed_int = config["seed"] - need_to_gen_seeds = True - else: - raise TypeError("Unsupported data type for seed: ", type(config["seed"])) - - #seed #TODO move to seed() so that obs., act. space, etc. have their seeds reset too when env seed is reset? - if need_to_gen_seeds: - self.seed_dict = {} - self.seed_dict["env"] = self.seed_int - self.seed(self.seed_dict["env"]) - ##IMP All these diff. seeds may not be needed (you could have one seed for the joint relevant + irrelevant parts). But they allow for easy separation of the relevant and irrelevant dimensions!! _And_ the seed remaining the same for the underlying discrete environment makes it easier to write tests! - self.seed_dict["relevant_state_space"] = self.np_random.randint(sys.maxsize) #random - self.seed_dict["relevant_action_space"] = self.np_random.randint(sys.maxsize) #random - self.seed_dict["irrelevant_state_space"] = self.np_random.randint(sys.maxsize) #random - self.seed_dict["irrelevant_action_space"] = self.np_random.randint(sys.maxsize) #random - self.seed_dict["state_space"] = self.np_random.randint(sys.maxsize) #IMP This is currently used to sample only for continuous spaces and not used for discrete spaces by the Environment. User might want to sample from it for multi-discrete environments. #random - self.seed_dict["action_space"] = self.np_random.randint(sys.maxsize) #IMP This IS currently used to sample random actions by the RL agent for both discrete and continuous environments (but not used anywhere by the Environment). #random - self.seed_dict["image_representations"] = self.np_random.randint(sys.maxsize) #random - # print("Mersenne0, dummy_eval:", self.np_random.get_state()[2], "dummy_eval" in config) - else: # if seed dict was passed - self.seed(self.seed_dict["env"]) - # print("Mersenne0 (dict), dummy_eval:", self.np_random.get_state()[2], "dummy_eval" in config) - - self.logger.warning('Seeds set to:' + str(self.seed_dict)) - # print(f'Seeds set to {self.seed_dict=}') # Available from Python 3.8 - - config["state_space_type"] = config["state_space_type"].lower() - - #defaults ###TODO throw warning in case unknown config option is passed - if "use_custom_mdp" not in config: - self.use_custom_mdp = False - else: - self.use_custom_mdp = config["use_custom_mdp"] - if self.use_custom_mdp: - assert "transition_function" in config - assert "reward_function" in config - # if config["state_space_type"] == "discrete": - # assert "init_state_dist" in config - - if not self.use_custom_mdp: - if "generate_random_mdp" not in config: - self.generate_random_mdp = True - else: - self.generate_random_mdp = config["generate_random_mdp"] - - if "term_state_reward" not in config: - self.term_state_reward = 0.0 - else: - self.term_state_reward = config["term_state_reward"] - - if "delay" not in config: - self.delay = 0 - else: - self.delay = config["delay"] - self.reward_buffer = [0.0] * (self.delay) - - if "sequence_length" not in config: - self.sequence_length = 1 - else: - self.sequence_length = config["sequence_length"] - - if "reward_density" not in config: - self.reward_density = 0.25 - else: - self.reward_density = config["reward_density"] - - if "make_denser" not in config: - self.make_denser = False - else: - self.make_denser = config["make_denser"] - - if "maximally_connected" not in config: - self.maximally_connected = True - else: - self.maximally_connected = config["maximally_connected"] - - if "reward_noise" in config: - if callable(config["reward_noise"]): - self.reward_noise = config["reward_noise"] - else: - reward_noise_std = config["reward_noise"] - self.reward_noise = lambda a: a.normal(0, reward_noise_std) - else: - self.reward_noise = None - - if "transition_noise" in config: - if config["state_space_type"] == "continuous": - if callable(config["transition_noise"]): - self.transition_noise = config["transition_noise"] - else: - p_noise_std = config["transition_noise"] - self.transition_noise = lambda a: a.normal(0, p_noise_std) - else: # discrete case - self.transition_noise = config["transition_noise"] - else: # no transition noise - self.transition_noise = None - - if "reward_scale" not in config: - self.reward_scale = 1.0 - else: - self.reward_scale = config["reward_scale"] - - if "reward_shift" not in config: - self.reward_shift = 0.0 - else: - self.reward_shift = config["reward_shift"] - - if "irrelevant_features" not in config: - self.irrelevant_features = False - else: - self.irrelevant_features = config["irrelevant_features"] - - if "image_representations" not in config: - self.image_representations = False - else: - self.image_representations = config["image_representations"] - if "image_transforms" in config: - assert config["state_space_type"] == "discrete", "Image "\ - "transforms are only applicable to discrete envs." - self.image_transforms = config["image_transforms"] - else: - self.image_transforms = "none" - - if "image_width" in config: - self.image_width = config["image_width"] - else: - self.image_width = 100 - - if "image_height" in config: - self.image_height = config["image_height"] - else: - self.image_height = 100 - - # The following transforms are only applicable in discrete envs: - if config["state_space_type"] == "discrete": - if "image_sh_quant" not in config: - if 'shift' in self.image_transforms: - warnings.warn("Setting image shift quantisation to the \ - default of 1, since no config value was provided for it.") - self.image_sh_quant = 1 - else: - self.image_sh_quant = None - else: - self.image_sh_quant = config["image_sh_quant"] - - if "image_ro_quant" not in config: - if 'rotate' in self.image_transforms: - warnings.warn("Setting image rotate quantisation to the \ - default of 1, since no config value was provided for it.") - self.image_ro_quant = 1 - else: - self.image_ro_quant = None - else: - self.image_ro_quant = config["image_ro_quant"] - - if "image_scale_range" not in config: - if 'scale' in self.image_transforms: - warnings.warn("Setting image scale range to the default \ - of (0.5, 1.5), since no config value was provided for it.") - self.image_scale_range = (0.5, 1.5) - else: - self.image_scale_range = None - else: - self.image_scale_range = config["image_scale_range"] - - if config["state_space_type"] == "discrete": - if "reward_dist" not in config: - self.reward_dist = None - else: - self.reward_dist = config["reward_dist"] - - if "diameter" not in config: - self.diameter = 1 - else: - self.diameter = config["diameter"] - - elif config["state_space_type"] == "continuous": - # if not self.use_custom_mdp: - self.state_space_dim = config["state_space_dim"] - - if "transition_dynamics_order" not in config: - self.dynamics_order = 1 - else: - self.dynamics_order = config["transition_dynamics_order"] - - if 'inertia' not in config: - self.inertia = 1.0 - else: - self.inertia = config["inertia"] - - if 'time_unit' not in config: - self.time_unit = 1.0 - else: - self.time_unit = config["time_unit"] - - if 'target_radius' not in config: - self.target_radius = 0.05 - else: - self.target_radius = config["target_radius"] - - elif config["state_space_type"] == "grid": - assert "grid_shape" in config - self.grid_shape = config["grid_shape"] - else: - raise ValueError("Unknown state_space_type") - - - - if "action_loss_weight" not in config: - self.action_loss_weight = 0.0 - else: - self.action_loss_weight = config["action_loss_weight"] - - if "reward_every_n_steps" not in config: - self.reward_every_n_steps = False - else: - self.reward_every_n_steps = config["reward_every_n_steps"] - - if 'repeats_in_sequences' not in config: - self.repeats_in_sequences = False - else: - self.repeats_in_sequences = config['repeats_in_sequences'] - - - self.dtype = np.float32 if "dtype" not in config else config["dtype"] - - - if config["state_space_type"] == "discrete": - if self.irrelevant_features: - assert len(config["action_space_size"]) == 2, "Currently, 1st sub-state (and action) space is assumed to be relevant to rewards and 2nd one is irrelevant. Please provide a list with sizes for the 2." - self.action_space_size = config["action_space_size"] - else: # uni-discrete space - assert isinstance(config["action_space_size"], int), "Did you mean to turn irrelevant_features? If so, please set irrelevant_features = True in config. If not, please provide an int for action_space_size." - self.action_space_size = [config["action_space_size"]] # Make a list to be able to iterate over observation spaces in for loops later - # assert type(config["state_space_size"]) == int, 'config["state_space_size"] has to be provided as an int when we have a simple Discrete environment. Was:' + str(type(config["state_space_size"])) - if self.use_custom_mdp: - self.state_space_size = [config["state_space_size"]] - else: - self.state_space_size = np.array(self.action_space_size) * np.array(self.diameter) - # assert (np.array(self.state_space_size) % np.array(self.diameter) == 0).all(), "state_space_size should be a multiple of the diameter to allow for the generation of regularly connected MDPs." - elif config["state_space_type"] == "continuous": - self.action_space_dim = self.state_space_dim - if self.irrelevant_features: - assert "relevant_indices" in config, "Please provide dimensions\ - of state space relevant to rewards." - if "relevant_indices" not in config: - config["relevant_indices"] = range(self.state_space_dim) - # config["irrelevant_indices"] = list(set(range(len(config["state_space_dim"]))) - set(config["relevant_indices"])) - elif config["state_space_type"] == "grid": - # Repeat the grid for the irrelevant part as well - if self.irrelevant_features: - self.grid_shape = self.grid_shape * 2 - - - - - if ("init_state_dist" in config) and ("relevant_init_state_dist" not in config): - config["relevant_init_state_dist"] = config["init_state_dist"] - - - assert self.sequence_length > 0, "config[\"sequence_length\"] <= 0. Set to: " + str(self.sequence_length) # also should be int - if "maximally_connected" in config and config["maximally_connected"]: ###TODO remove - pass - # assert config["state_space_size"] == config["action_space_size"], "config[\"state_space_size\"] != config[\"action_space_size\"]. For maximally_connected transition graphs, they should be equal. Please provide valid values. Vals: " + str(config["state_space_size"]) + " " + str(config["action_space_size"]) + ". In future, \"maximally_connected\" graphs are planned to be supported!" - # assert config["irrelevant_state_space_size"] == config["irrelevant_action_space_size"], "config[\"irrelevant_state_space_size\"] != config[\"irrelevant_action_space_size\"]. For maximally_connected transition graphs, they should be equal. Please provide valid values! Vals: " + str(config["irrelevant_state_space_size"]) + " " + str(config["irrelevant_action_space_size"]) + ". In future, \"maximally_connected\" graphs are planned to be supported!" #TODO Currently, irrelevant dimensions have a P similar to that of relevant dimensions. Should this be decoupled? - - if config["state_space_type"] == 'continuous': - # assert config["state_space_dim"] == config["action_space_dim"], "For continuous spaces, state_space_dim has to be = action_space_dim. state_space_dim was: " + str(config["state_space_dim"]) + " action_space_dim was: " + str(config["action_space_dim"]) - if config["reward_function"] == "move_to_a_point": - assert self.sequence_length == 1 - self.target_point = np.array(config["target_point"], dtype=self.dtype) - assert self.target_point.shape == (len(config["relevant_indices"]),), "target_point should have dimensionality = relevant_state_space dimensionality" - elif config["state_space_type"] == "grid": - if config["reward_function"] == "move_to_a_point": - self.target_point = config["target_point"] - - self.config = config - self.augmented_state_length = self.sequence_length + self.delay + 1 - - self.total_episodes = 0 - - # This init_...() is done before the others below because it's needed - # for image_representations for continuous - self.init_terminal_states() - - if config["state_space_type"] == "discrete": - self.observation_spaces = [DiscreteExtended(self.state_space_size[0], seed=self.seed_dict["relevant_state_space"])] #seed #hardcoded, many time below as well - self.action_spaces = [DiscreteExtended(self.action_space_size[0], seed=self.seed_dict["relevant_action_space"])] #seed #hardcoded - if self.irrelevant_features: - self.observation_spaces.append(DiscreteExtended(self.state_space_size[1], seed=self.seed_dict["irrelevant_state_space"])) #seed #hardcoded - self.action_spaces.append(DiscreteExtended(self.action_space_size[1], seed=self.seed_dict["irrelevant_action_space"])) #seed #hardcoded - # Commented code below may used to generalise relevant sub-spaces to more than the current max of 2. - # self.observation_spaces = [None] * len(config["all_indices"]) - # for i in config["relevant_indices"]: - # self.observation_spaces[i] = - # self.action_spaces[i] = DiscreteExtended(self.action_space_size[i], seed=self.seed_dict["relevant_action_space"]) #seed - # for i in config["irrelevant_indices"]: - # self.observation_spaces[i] = DiscreteExtended(self.state_space_size[i], seed=self.seed_dict["irrelevant_state_space"])) #seed # hack - # self.action_spaces[i] = DiscreteExtended(self.action_space_size[i], seed=self.seed_dict["irrelevant_action_space"]) #seed - - if self.image_representations: - # underlying_obs_space = MultiDiscreteExtended(self.state_space_size, seed=self.seed_dict["state_space"]) #seed - self.observation_space = ImageMultiDiscrete(self.state_space_size, width=self.image_width, height=self.image_height, transforms=self.image_transforms, sh_quant=self.image_sh_quant, scale_range=self.image_scale_range, ro_quant=self.image_ro_quant, circle_radius=20, seed=self.seed_dict["image_representations"]) #seed - if self.irrelevant_features: - self.action_space = TupleExtended(self.action_spaces, seed=self.seed_dict["action_space"]) #seed - else: - self.action_space = self.action_spaces[0] - else: - if self.irrelevant_features: - self.observation_space = TupleExtended(self.observation_spaces, seed=self.seed_dict["state_space"]) #seed # hack #TODO Gym (and so Ray) apparently needs observation_space as a member of an env. - self.action_space = TupleExtended(self.action_spaces, seed=self.seed_dict["action_space"]) #seed - else: - self.observation_space = self.observation_spaces[0] - self.action_space = self.action_spaces[0] - - - elif config["state_space_type"] == 'continuous': - self.state_space_max = config["state_space_max"] \ - if 'state_space_max' in config else np.inf # should we - # select a random max? #test? - self.feature_space = BoxExtended(-self.state_space_max,\ - self.state_space_max, shape=(self.state_space_dim,),\ - seed=self.seed_dict["state_space"], dtype=self.dtype) #seed - # hack #TODO # low and high are 1st 2 and required arguments - # for instantiating BoxExtended - - self.action_space_max = config["action_space_max"] \ - if 'action_space_max' in config else np.inf #test? - # config["action_space_max"] = \ - # num_to_list(config["action_space_max"]) * config["action_space_dim"] - self.action_space = BoxExtended(-self.action_space_max,\ - self.action_space_max, shape=(self.action_space_dim,),\ - seed=self.seed_dict["action_space"], dtype=self.dtype) # #seed - # hack #TODO - - - if self.image_representations: - self.observation_space = ImageContinuous(self.feature_space,\ - width=self.image_width, height=self.image_height, \ - term_spaces=self.term_spaces, target_point=self.target_point,\ - circle_radius=5, seed=self.seed_dict["image_representations"]) # #seed - else: - self.observation_space = self.feature_space - - elif config["state_space_type"] == "grid": - underlying_space_maxes = list_to_float_np_array(self.grid_shape) - - - # The min for grid envs is 0, 0, 0, ... - self.feature_space = BoxExtended(0 * underlying_space_maxes,\ - underlying_space_maxes,\ - seed=self.seed_dict["state_space"], dtype=self.dtype) # #seed - - lows = np.array([-1] * len(self.grid_shape)) - highs = np.array([1] * len(self.grid_shape)) - self.action_space = BoxExtended(lows, highs, seed=self.seed_dict["action_space"],\ - dtype=np.int64) # #seed - - - if self.image_representations: - target_pt = list_to_float_np_array(self.target_point) - self.observation_space = ImageContinuous(self.feature_space,\ - width=self.image_width, height=self.image_height, \ - term_spaces=self.term_spaces, target_point=target_pt,\ - circle_radius=5, grid_shape=self.grid_shape,\ - seed=self.seed_dict["image_representations"]) # #seed - else: - self.observation_space = self.feature_space - - - - # if config["action_space_type"] == "discrete": - # if not config["generate_random_mdp"]: - # # self.logger.error("User defined P and R are currently not supported.") ##TODO - # # sys.exit(1) - # self.P = config["transition_function"] if callable(config["transition_function"]) else lambda s, a: config["transition_function"][s, a] ##IMP callable may not be optimal always since it was deprecated in Python 3.0 and 3.1 - # self.R = config["reward_function"] if callable(config["reward_function"]) else lambda s, a: config["reward_function"][s, a] - # else: - ##TODO Support imaginary rollouts for continuous envs. and user-defined P and R? Will do it depending on demand for it. In fact, for imagined rollouts, let our code handle storing augmented_state, curr_state, etc. in separate variables, so that it's easy for user to perform imagined rollouts instead of having to maintain their own state and action sequences. - #TODO Generate state and action space sizes also randomly? - - ###IMP The order in which the following inits are called is important, so don't change!! - self.init_init_state_dist() #init_state_dist: Initialises uniform distribution over non-terminal states for discrete distribution; After looking into Gym code, I can say that for continuous, it's uniform over non-terminal if limits are [a, b], shifted exponential if exactly one of the limits is np.inf, normal if both limits are np.inf - this sampling is independent for each dimension (and is done for the defined limits for the respective dimension). - self.init_transition_function() - # print("Mersenne1, dummy_eval:", self.np_random.get_state()[2], "dummy_eval" in self.config) - self.init_reward_function() - - self.curr_obs = self.reset() #TODO Maybe not call it here, since Gym seems to expect to _always_ call this method when using an environment; make this seedable? DO NOT do seed dependent initialization in reset() otherwise the initial state distrbution will always be at the same state at every call to reset()!! (Gym env has its own seed? Yes, it does, as does also space); - - self.logger.info("self.augmented_state, len: " + str(self.augmented_state) + ", " + str(len(self.augmented_state))) - self.logger.info("MDP Playground toy env instantiated with config: " + str(self.config)) - print("MDP Playground toy env instantiated with config: " + str(self.config))
- - -
[docs] def init_terminal_states(self): - """Initialises terminal state set to be the 'last' states for discrete environments. For continuous environments, terminal states will be in a hypercube centred around config['terminal_states'] with the edge of the hypercube of length config['term_state_edge']. - - """ - if self.config["state_space_type"] == "discrete": - if self.use_custom_mdp and not "terminal_state_density" in self.config: # custom/user-defined terminal states - self.is_terminal_state = self.config["terminal_states"] if callable(self.config["terminal_states"]) else lambda s: s in self.config["terminal_states"] - else: - # Define the no. of terminal states per independent set of the state space - self.num_terminal_states = int(self.config["terminal_state_density"] * self.action_space_size[0]) #hardcoded ####IMP Using action_space_size since it contains state_space_size // diameter - # if self.num_terminal_states == 0: # Have at least 1 terminal state? - # warnings.warn("WARNING: int(terminal_state_density * relevant_state_space_size) was 0. Setting num_terminal_states to be 1!") - # self.num_terminal_states = 1 - self.config["terminal_states"] = np.array([j * self.action_space_size[0] - 1 - i for j in range(1, self.diameter + 1) for i in range(self.num_terminal_states)]) # terminal states inited to be at the "end" of the sorted states - self.logger.warning("Inited terminal states to self.config['terminal_states']: " + str(self.config["terminal_states"]) + ". Total " + str(self.num_terminal_states)) - self.is_terminal_state = lambda s: s in self.config["terminal_states"] - - elif self.config["state_space_type"] == "continuous": - # print("# TODO for cont. spaces: term states") - self.term_spaces = [] - - if 'terminal_states' in self.config: ##TODO For continuous spaces, could also generate terminal spaces based on a terminal_state_density given by user (Currently, user specifies terminal state points around which hypercubes in state space are terminal. If the user want a specific density and not hypercubes, the user has to design the terminal states they specify such that they would have a given density in space.). But only for state spaces with limits? For state spaces without limits, could do it for a limited subspace of the inifinite state space 1st and then repeat that pattern indefinitely along each dimension's axis. #test? - if callable(self.config["terminal_states"]): - self.is_terminal_state = self.config["terminal_states"] - else: - for i in range(len(self.config["terminal_states"])): # List of centres of terminal state regions. - assert len(self.config["terminal_states"][i]) == len(self.config["relevant_indices"]), "Specified terminal state centres should have dimensionality = number of relevant_indices. That was not the case for centre no.: " + str(i) + "" - lows = np.array([self.config["terminal_states"][i][j] - self.config["term_state_edge"]/2 for j in range(len(self.config["relevant_indices"]))]) - highs = np.array([self.config["terminal_states"][i][j] + self.config["term_state_edge"]/2 for j in range(len(self.config["relevant_indices"]))]) - # print("Term state lows, highs:", lows, highs) - self.term_spaces.append(BoxExtended(low=lows, high=highs, seed=self.seed_, dtype=self.dtype)) #seed #hack #TODO - self.logger.debug("self.term_spaces samples:" + str(self.term_spaces[0].sample()) + str(self.term_spaces[-1].sample())) - - self.is_terminal_state = lambda s: np.any([self.term_spaces[i].contains(s[self.config["relevant_indices"]]) for i in range(len(self.term_spaces))]) ### TODO for cont. #test? - - else: # no custom/user-defined terminal states - self.is_terminal_state = lambda s: False - - elif self.config["state_space_type"] == "grid": - self.term_spaces = [] - - if 'terminal_states' in self.config: - if callable(self.config["terminal_states"]): - self.is_terminal_state = self.config["terminal_states"] - else: - for i in range(len(self.config["terminal_states"])): # List of - # terminal states on the grid - term_state = list_to_float_np_array(self.config["terminal_states"][i]) - lows = term_state - highs = term_state # #hardcoded - self.term_spaces.append(BoxExtended(low=lows, high=highs,\ - seed=self.seed_, dtype=np.int64)) #seed #hack #TODO - - def is_term(s): - cont_state = list_to_float_np_array(s) - return np.any([self.term_spaces[i].contains(cont_state) \ - for i in range(len(self.term_spaces))]) - - - self.is_terminal_state = is_term - - else: # no custom/user-defined terminal states - self.is_terminal_state = lambda s: False
- - -
[docs] def init_init_state_dist(self): - """Initialises initial state distrbution, rho_0, to be uniform over the non-terminal states for discrete environments. For both discrete and continuous environments, the uniform sampling over non-terminal states is taken care of in reset() when setting the initial state for an episode. - - """ - # relevant dimensions part - if self.config["state_space_type"] == "discrete": - if self.use_custom_mdp and "init_state_dist" in self.config: # custom/user-defined phi_0 - # self.config["relevant_init_state_dist"] = #TODO make this also a lambda function? - pass - else: - # For relevant sub-space - non_term_state_space_size = self.action_space_size[0] - self.num_terminal_states #hardcoded - self.config["relevant_init_state_dist"] = ([1 / (non_term_state_space_size * self.diameter) for i in range(non_term_state_space_size)] + [0 for i in range(self.num_terminal_states)]) * self.diameter #TODO Currently only uniform distribution over non-terminal states; Use Dirichlet distribution to select prob. distribution to use? - #TODO make init_state_dist the default sample() for state space? - self.config["relevant_init_state_dist"] = np.array(self.config["relevant_init_state_dist"]) - self.logger.warning("self.relevant_init_state_dist:" + str(self.config["relevant_init_state_dist"])) - - #irrelevant sub-space - if self.irrelevant_features: - non_term_state_space_size = self.state_space_size[1] #hardcoded - self.config["irrelevant_init_state_dist"] = ([1 / (non_term_state_space_size) for i in range(non_term_state_space_size)]) # diameter not needed here as we directly take the state_space_size in the prev. line - self.config["irrelevant_init_state_dist"] = np.array(self.config["irrelevant_init_state_dist"]) - self.logger.warning("self.irrelevant_init_state_dist:" + str(self.config["irrelevant_init_state_dist"])) - - else: # if continuous or grid space - pass # this is handled in reset where we resample if we sample a term. state
- - -
[docs] def init_transition_function(self): - """Initialises transition function, P by selecting random next states for every (state, action) tuple for discrete environments. For continuous environments, we have 1 option for the transition function which varies depending on dynamics order and inertia and time_unit for a point object. - - """ - - if self.config["state_space_type"] == "discrete": - if self.use_custom_mdp: # custom/user-defined P - # - pass - else: - # relevant dimensions part - self.config["transition_function"] = np.zeros(shape=(self.state_space_size[0], self.action_space_size[0]), dtype=object) #hardcoded - self.config["transition_function"][:] = -1 #IMP # To avoid having a valid value from the state space before we actually assign a usable value below! - if self.maximally_connected: - if self.diameter == 1: #hack # TODO Remove this if block; this case is currently separately handled just so that tests do not fail. Using prob=prob in the sample call causes the sampling to change even if the probabilities remain the same. All solutions I can think of are hacky except changing the expected values in all the test cases which would take quite some time. - for s in range(self.state_space_size[0]): - self.config["transition_function"][s] = self.observation_spaces[0].sample(size=self.action_space_size[0], replace=False) #random #TODO Preferably use the seed of the Env for this? #hardcoded - else: # if diam > 1 - for s in range(self.state_space_size[0]): - i_s = s // self.action_space_size[0] # select the current independent set number - - prob = np.zeros(shape=(self.state_space_size[0],)) - prob_next_states = np.ones(shape=(self.action_space_size[0],)) / self.action_space_size[0] - ind_1 = ((i_s + 1) * self.action_space_size[0]) % self.state_space_size[0] - ind_2 = ((i_s + 2) * self.action_space_size[0]) % self.state_space_size[0] - # print(ind_1, ind_2) - if ind_2 <= ind_1: # edge case - ind_2 += self.state_space_size[0] - prob[ind_1 : ind_2] = prob_next_states - self.config["transition_function"][s] = self.observation_spaces[0].sample(prob=prob, size=self.action_space_size[0], replace=False) #random #TODO Preferably use the seed of the Env for this? #hardcoded - - # hacky way to do the above - # self.config["transition_function"][s] = self.observation_spaces[0].sample(max=self.action_space_size[0], size=self.action_space_size[0], replace=False) #random #TODO Preferably use the seed of the Env for this? #hardcoded - # Set the transitions from current state to be to the next independent set's states - # self.config["transition_function"][s] += ((i_s + 1) * self.action_space_size[0]) % self.state_space_size[0] - else: # if not maximally_connected - for s in range(self.state_space_size[0]): - i_s = s // self.action_space_size[0] # select the current independent set number - - # Set the probabilities of the next state for the current independent set - prob = np.zeros(shape=(self.state_space_size[0],)) - prob_next_states = np.ones(shape=(self.action_space_size[0],)) / self.action_space_size[0] - ind_1 = ((i_s + 1) * self.action_space_size[0]) % self.state_space_size[0] - ind_2 = ((i_s + 2) * self.action_space_size[0]) % self.state_space_size[0] - # print(ind_1, ind_2) - if ind_2 <= ind_1: # edge case - ind_2 += self.state_space_size[0] - prob[ind_1 : ind_2] = prob_next_states - - for a in range(self.action_space_size[0]): - # prob[i_s * self.action_space_size[0] : (i_s + 1) * self.action_space_size[0]] = prob_next_states - self.config["transition_function"][s, a] = self.observation_spaces[0].sample(prob=prob) #random #TODO Preferably use the seed of the Env for this? - # Set the next state for terminal states to be themselves, for any action taken. - for i_s in range(self.diameter): - for s in range(self.action_space_size[0] - self.num_terminal_states, self.action_space_size[0]): - for a in range(self.action_space_size[0]): - assert self.is_terminal_state(i_s * self.action_space_size[0] + s) == True - self.config["transition_function"][i_s * self.action_space_size[0] + s, a] = i_s * self.action_space_size[0] + s # Setting P(s, a) = s for terminal states, for P() to be meaningful even if someone doesn't check for 'done' being = True - - - #irrelevant dimensions part - if self.irrelevant_features: #test - self.config["transition_function_irrelevant"] = np.zeros(shape=(self.state_space_size[1], self.action_space_size[1]), dtype=object) - self.config["transition_function_irrelevant"][:] = -1 #IMP # To avoid having a valid value from the state space before we actually assign a usable value below! - if self.maximally_connected: - for s in range(self.state_space_size[1]): - i_s = s // self.action_space_size[1] # select the current independent set number - - # Set the probabilities of the next state for the current independent set - prob = np.zeros(shape=(self.state_space_size[1],)) - prob_next_states = np.ones(shape=(self.action_space_size[1],)) / self.action_space_size[1] - ind_1 = ((i_s + 1) * self.action_space_size[1]) % self.state_space_size[1] - ind_2 = ((i_s + 2) * self.action_space_size[1]) % self.state_space_size[1] - print(ind_1, ind_2) - if ind_2 <= ind_1: # edge case - ind_2 += self.state_space_size[1] - prob[ind_1 : ind_2] = prob_next_states - - self.config["transition_function_irrelevant"][s] = self.observation_spaces[1].sample(prob=prob, size=self.action_space_size[1], replace=False) #random #TODO Preferably use the seed of the Env for this? #hardcoded - - # self.config["transition_function_irrelevant"][s] = self.observation_spaces[1].sample(max=self.action_space_size[1], size=self.action_space_size[1], replace=False) #random #TODO Preferably use the seed of the Env for this? - # self.config["transition_function_irrelevant"][s] += ((i_s + 1) * self.action_space_size[1]) % self.state_space_size[1] - else: - for s in range(self.state_space_size[1]): - i_s = s // self.action_space_size[1] # select the current independent set number - - # Set the probabilities of the next state for the current independent set - prob = np.zeros(shape=(self.state_space_size[1],)) - prob_next_states = np.ones(shape=(self.action_space_size[1],)) / self.action_space_size[1] - ind_1 = ((i_s + 1) * self.action_space_size[1]) % self.state_space_size[1] - ind_2 = ((i_s + 2) * self.action_space_size[1]) % self.state_space_size[1] - # print(ind_1, ind_2) - if ind_2 <= ind_1: # edge case - ind_2 += self.state_space_size[1] - prob[ind_1 : ind_2] = prob_next_states - - for a in range(self.action_space_size[1]): - # prob[i_s * self.action_space_size[1] : (i_s + 1) * self.action_space_size[1]] = prob_next_states - self.config["transition_function_irrelevant"][s, a] = self.observation_spaces[1].sample(prob=prob) #random #TODO Preferably use the seed of the Env for this? - - self.logger.warning(str(self.config["transition_function_irrelevant"]) + "init_transition_function _irrelevant" + str(type(self.config["transition_function_irrelevant"][0, 0]))) - - if not callable(self.config["transition_function"]): - self.transition_matrix = self.config["transition_function"] - self.config["transition_function"] = lambda s, a: self.transition_matrix[s, a] - print("transition_matrix inited to:\n" + str(self.transition_matrix) + "\nPython type of state: " + str(type(self.config["transition_function"](0, 0)))) # The Python type of the state can lead to hard to catch bugs - - else: # if continuous or grid space - # self.logger.debug("# TODO for cont. spaces") # transition function is a fixed parameterisation for cont. envs. right now. - pass - - - self.P = lambda s, a: self.transition_function(s, a)
- -
[docs] def init_reward_function(self): - """Initialises reward function, R by selecting random sequences to be rewardable for discrete environments. For continuous environments, we have fixed available options for the reward function. - - """ - # print("Mersenne2, dummy_eval:", self.np_random.get_state()[2], "dummy_eval" in self.config) - - #TODO Maybe refactor this code and put useful reusable permutation generators, etc. in one library - if self.config["state_space_type"] == "discrete": - if self.use_custom_mdp: # custom/user-defined R - if not callable(self.config["reward_function"]): - self.reward_matrix = self.config["reward_function"] - self.config["reward_function"] = lambda s, a: self.reward_matrix[s[-2], a] #hardcoded to be 2nd last state in state sequence passed to reward function, so that reward is R(s, a) when transition is s, a, r, s' - print("reward_matrix inited to:" + str(self.reward_matrix)) - else: - non_term_state_space_size = self.action_space_size[0] - self.num_terminal_states - - def get_sequences(maximum, length, fraction, repeats=False, diameter=1): - ''' - Returns random sequences of integers - - maximum: int - Max value of the integers in the sequence - length: int - Length of sequence - fraction: float - Fraction of total possible sequences to be returned - repeats: boolean - Allows repeats in returned sequences - diameter: int - Relates to the diameter of the MDP - ''' - - sequences = [] - - if repeats: - num_possible_sequences = (maximum) ** length - num_sel_sequences = int(fraction * num_possible_sequences) - if num_sel_sequences == 0: - num_sel_sequences = 1 - warnings.warn('0 rewardable sequences per independent set for given reward_density, sequence_length, diameter and terminal_state_density. Setting it to 1.') - sel_sequence_nums = self.np_random.choice(num_possible_sequences, size=num_sel_sequences, replace=False) #random # This assumes that all sequences have an equal likelihood of being selected for being a reward sequence; This line also makes it not possible to have this function be portable as part of a library because it use the np_random member variable of this class - for i_s in range(diameter): # Allow sequences to begin in any of the independent sets and therefore this loop is over the no. of independent sets(= diameter) - for i in range(num_sel_sequences): - curr_sequence_num = sel_sequence_nums[i] - specific_sequence = [] - while len(specific_sequence) != length: - specific_sequence.append(curr_sequence_num % (non_term_state_space_size) + ((len(specific_sequence) + i_s) % diameter) * self.action_space_size[0]) #TODO this uses a member variable of the class. Add another function param to receive this value? Name it independent set size? - curr_sequence_num = curr_sequence_num // (non_term_state_space_size) - #bottleneck When we sample sequences here, it could get very slow if reward_density is high; alternative would be to assign numbers to sequences and then sample these numbers without replacement and take those sequences - # specific_sequence = self.relevant_observation_space.sample(size=self.sequence_length, replace=True) # Be careful that sequence_length is less than state space size - sequences.append(specific_sequence) - self.logger.info("Total no. of rewarded sequences:" + str(len(sequences)) + str("Out of", num_possible_sequences) + "per independent set") - else: # if no repeats - assert length <= diameter * maximum, "When there are no repeats in sequences, the sequence length should be <= diameter * maximum." - permutations = [] - for i in range(length): - permutations.append(maximum - i // diameter) - # permutations = list(range(maximum + 1 - length, maximum + 1)) - self.logger.info("No. of choices for each element in a possible sequence (Total no. of permutations will be a product of this), no. of possible perms per independent set: " + str(permutations) + ", " + str(np.prod(permutations))) - - for i_s in range(diameter): # Allow sequences to begin in any of the independent sets and therefore this loop is over the no. of independent sets(= diameter). Could maybe sample independent set no. as "part" of sel_sequence_nums below and avoid this loop? - num_possible_permutations = np.prod(permutations) # Number of possible permutations/sequences for, say, a diameter of 3 and 24 total states and terminal_state_density = 0.25, i.e., 6 non-terminal states (out of 8 states) per independent set, for sequence length of 5 is np.prod([6, 6, 6, 5, 5]) * 3; the * diameter at the end is needed because the sequence can begin in any of the independent sets; However, for simplicity, we omit * diameter here and just perform the same procedure per independent set. This can lead to slightly fewer rewardable sequences than should be the case for a given reward_density - this is due int() in the next step - num_sel_sequences = int(fraction * num_possible_permutations) - if num_sel_sequences == 0: ##TODO Remove this test here and above? - num_sel_sequences = 1 - warnings.warn('0 rewardable sequences per independent set for given reward_density, sequence_length, diameter and terminal_state_density. Setting it to 1.') - # print("Mersenne3:", self.np_random.get_state()[2]) - sel_sequence_nums = self.np_random.choice(num_possible_permutations, size=num_sel_sequences, replace=False) #random # This assumes that all sequences have an equal likelihood of being selected for being a reward sequence; # TODO this code could be replaced with self.np_random.permutation(non_term_state_space_size)[self.sequence_length]? Replacement becomes a problem then! We have to keep sampling until we have all unique rewardable sequences. - # print("Mersenne4:", self.np_random.get_state()[2]) - - total_clashes = 0 - for i in range(num_sel_sequences): - curr_permutation = sel_sequence_nums[i] - seq_ = [] - curr_rem_digits = [] - for j in range(diameter): - curr_rem_digits.append(list(range(maximum))) # has to contain every number up to n so that any one of them can be picked as part of the sequence below - for enum, j in enumerate(permutations): # Goes from largest to smallest number among the factors of nPk - rem_ = curr_permutation % j - # rem_ = (enum // maximum) * maximum + rem_ - seq_.append(curr_rem_digits[(enum + i_s) % diameter][rem_] + ((enum + i_s) % diameter) * self.action_space_size[0]) # Use (enum + i_s) to allow other independent sets to have states beginning a rewardable sequence - del curr_rem_digits[(enum + i_s) % diameter][rem_] - # print("curr_rem_digits", curr_rem_digits) - curr_permutation = curr_permutation // j - - if seq_ in sequences: #hack - total_clashes += 1 #TODO remove these extra checks and assert below - sequences.append(seq_) - - self.logger.debug("Number of generated sequences that did not clash with an existing one when it was generated:" + str(total_clashes)) - assert total_clashes == 0, 'None of the generated sequences should have clashed with an existing rewardable sequence when it was generated. No. of times a clash was detected:' + str(total_clashes) - self.logger.info("Total no. of rewarded sequences:" + str(len(sequences)) + "Out of" + str(num_possible_permutations) + "per independent set") - - return sequences - - def insert_sequence(sequence): - ''' - Inserts rewardable sequences into the rewardable_sequences dict member variable - ''' - sequence = tuple(sequence) # tuples are immutable and can be used as keys for a dict - if callable(self.reward_dist): - self.rewardable_sequences[sequence] = self.reward_dist(self.np_random, self.rewardable_sequences) - else: - self.rewardable_sequences[sequence] = 1.0 # this is the default reward value, reward scaling will be handled later - self.logger.warning("specific_sequence that will be rewarded" + str(sequence)) #TODO impose a different distribution for these: independently sample state for each step of specific sequence; or conditionally dependent samples if we want something like DMPs/manifolds - if self.make_denser: - for ss_len in range(1, len(sequence)): - sub_sequence = tuple(sequence[:ss_len]) - if sub_sequence not in self.rewardable_sequences: - self.rewardable_sequences[sub_sequence] = 0.0 - self.rewardable_sequences[sub_sequence] += self.rewardable_sequences[sequence] * ss_len / len(sequence) # this could cause problems if we support variable sequence lengths and there are clashes in selected rewardable sequences - - - self.rewardable_sequences = {} - if self.repeats_in_sequences: - rewardable_sequences = get_sequences(maximum=non_term_state_space_size, length=self.sequence_length, fraction=self.reward_density, repeats=True, diameter=self.diameter) - - else: # if no repeats_in_sequences - rewardable_sequences = get_sequences(maximum=non_term_state_space_size, length=self.sequence_length, fraction=self.reward_density, repeats=False, diameter=self.diameter) - - # Common to both cases: repeats_in_sequences or not - if type(self.reward_dist) == list: # Specified as interval - reward_dist_ = self.reward_dist - num_rews = self.diameter * len(rewardable_sequences) - print("num_rewardable_sequences set to:", num_rews) - if num_rews == 1: - rews = [1.0] - else: - rews = np.linspace(reward_dist_[0], reward_dist_[1], num=num_rews) - assert rews[-1] == 1.0 - self.np_random.shuffle(rews) - - def get_rews(rng, r_dict): - return rews[len(r_dict)] - - self.reward_dist = get_rews - - if len(rewardable_sequences) > 1000: - warnings.warn('Too many rewardable sequences and/or too long rewardable sequence length. Environment might be too slow. Please consider setting the reward_density to be lower or reducing the sequence length. No. of rewardable sequences:' + str(len(rewardable_sequences))) #TODO Maybe even exit the program if too much memory is (expected to be) taken.; Took about 80s for 40k iterations of the for loop below on my laptop - - for specific_sequence in rewardable_sequences: - insert_sequence(specific_sequence) - # else: # "repeats" in sequences are allowed until diameter - 1 steps have been taken: We sample the sequences as the state number inside each independent set, which are numbered from 0 to action_space_size - 1 - # pass - - print("rewardable_sequences: " + str(self.rewardable_sequences)) #debug print - elif self.config["state_space_type"] == "continuous": - # self.logger.debug("# TODO for cont. spaces?: init_reward_function") # reward functions are fixed for cont. right now with a few available choices. - pass - elif self.config["state_space_type"] == "grid": - ... # ###TODO Make sequences compatible with grid - - self.R = lambda s, a: self.reward_function(s, a)
- - -
[docs] def transition_function(self, state, action): - """The transition function, P. - - Performs a transition according to the initialised P for discrete environments (with dynamics independent for relevant vs irrelevant dimension sub-spaces). For continuous environments, we have a fixed available option for the dynamics (which is the same for relevant or irrelevant dimensions): - The order of the system decides the dynamics. For an nth order system, the nth order derivative of the state is set to the action value / inertia for time_unit seconds. And then the dynamics are integrated over the time_unit to obtain the next state. - - Parameters - ---------- - state : list - The state that the environment will use to perform a transition. - action : list - The action that the environment will use to perform a transition. - - Returns - ------- - int or np.array - The state at the end of the current transition - """ - - if self.config["state_space_type"] == "discrete": - next_state = self.config["transition_function"](state, action) - if self.transition_noise: - probs = np.ones(shape=(self.state_space_size[0],)) * self.transition_noise / (self.state_space_size[0] - 1) - probs[next_state] = 1 - self.transition_noise - # TODO Samples according to new probs to get noisy discrete transition - new_next_state = self.observation_spaces[0].sample(prob=probs) #random - # print("noisy old next_state, new_next_state", next_state, new_next_state) - if next_state != new_next_state: - self.logger.info("NOISE inserted! old next_state, new_next_state" + str(next_state) + str(new_next_state)) - self.total_noisy_transitions_episode += 1 - # print("new probs:", probs, self.relevant_observation_space.sample(prob=probs)) - next_state = new_next_state - # assert np.sum(probs) == 1, str(np.sum(probs)) + " is not equal to " + str(1) - - elif self.config["state_space_type"] == "continuous": - ##TODO implement imagined transitions also for cont. spaces - if self.use_custom_mdp: - next_state = self.config["transition_function"](state, action) - else: - assert len(action.shape) == 1, 'Action should be specified as a 1-D tensor. However, shape of action was: ' + str(action.shape) - assert action.shape[0] == self.action_space_dim, 'Action shape is: ' + str(action.shape[0]) + '. Expected: ' + str(self.action_space_dim) - if self.action_space.contains(action): - ### TODO implement for multiple orders, currently only for 1st order systems. - # if self.dynamics_order == 1: - # next_state = state + action * self.time_unit / self.inertia - - # print('self.state_derivatives:', self.state_derivatives) - # Except the last member of state_derivatives, the other occupy the same place in memory. Could create a new copy of them every time, but I think this should be more efficient and as long as tests don't fail should be fine. - self.state_derivatives[-1] = action / self.inertia # action is presumed to be n-th order force ##TODO Could easily scale this per dimension to give different kinds of dynamics per dimension: maybe even sample this scale per dimension from a probability distribution to generate different random Ps? - factorial_array = scipy.special.factorial(np.arange(1, self.dynamics_order + 1)) # This is just to speed things up as scipy calculates the factorial only for largest array member - for i in range(self.dynamics_order): - for j in range(self.dynamics_order - i): - # print('i, j, self.state_derivatives, (self.time_unit**(j + 1)), factorial_array:', i, j, self.state_derivatives, (self.time_unit**(j + 1)), factorial_array) - self.state_derivatives[i] += self.state_derivatives[i + j + 1] * (self.time_unit**(j + 1)) / factorial_array[j] #+ state_derivatives_prev[i] Don't need to add previous value as it's already in there at the beginning ##### TODO Keep an old self.state_derivatives and a new one otherwise higher order derivatives will be overwritten before being used by lower order ones. - # print('self.state_derivatives:', self.state_derivatives) - next_state = self.state_derivatives[0] - - else: # if action is from outside allowed action_space - next_state = state - warnings.warn("WARNING: Action " + str(action) + " out of range of action space. Applying 0 action!!") - # if "transition_noise" in self.config: - noise_in_transition = self.transition_noise(self.np_random) if self.transition_noise else 0 #random - self.total_abs_noise_in_transition_episode += np.abs(noise_in_transition) - next_state += noise_in_transition ##IMP Noise is only applied to state and not to higher order derivatives - ### TODO Check if next_state is within state space bounds - if not self.observation_space.contains(next_state): - self.logger.info("next_state out of bounds. next_state, clipping to" + str(next_state) + str(np.clip(next_state, -self.state_space_max, self.state_space_max))) - next_state = np.clip(next_state, -self.state_space_max, self.state_space_max) # Could also "reflect" next_state when it goes out of bounds. Would seem more logical for a "wall", but would need to take care of multiple reflections near a corner/edge. - # Resets all higher order derivatives to 0 - zero_state = np.array([0.0] * (self.state_space_dim), dtype=self.dtype) - # #####IMP to have copy() otherwise it's the same array - # (in memory) at every position in the list: - self.state_derivatives = [zero_state.copy() for i in range(self.dynamics_order + 1)] - self.state_derivatives[0] = next_state - - if self.config["reward_function"] == "move_to_a_point": - if np.linalg.norm(np.array(next_state, dtype=self.dtype)[self.config["relevant_indices"]] - self.target_point) < self.target_radius: - self.reached_terminal = True - - elif self.config["state_space_type"] == "grid": - # state passed and returned is an np.array - # Need to check that dtype is int because Gym doesn't - if self.action_space.contains(action) and \ - np.array(action).dtype == np.int64: - if self.transition_noise: - # self.np_random.choice only works for 1-D arrays - if self.np_random.uniform() < self.transition_noise: # #random - while True: # Be careful of infinite loops - new_action = list(self.action_space.sample()) # #random - if new_action != action: - self.logger.info("NOISE inserted! old action, new_action" +\ - str(action) + str(new_action)) - # print(str(action) + str(new_action)) - self.total_noisy_transitions_episode += 1 - action = new_action - break - - next_state = [] - for i in range(len(self.grid_shape)): - # actions -1, 0, 1 represent back, noop, forward respt. - next_state.append(state[i] + action[i]) - if next_state[i] < 0: - self.logger.info("Underflow in grid next state. Bouncing back.") - next_state[i] = 0 - - if next_state[i] >= self.grid_shape[i]: - self.logger.info("Overflow in grid next state. Bouncing back.") - next_state[i] = self.grid_shape[i] - 1 - - else: # if action is from outside allowed action_space - next_state = list(state) - warnings.warn("WARNING: Action " + str(action) + " out of range"\ - " of action space. Applying noop action!!") - - - if self.config["reward_function"] == "move_to_a_point": - if self.target_point == next_state: - self.reached_terminal = True - - next_state = np.array(next_state) - - - return next_state
- -
[docs] def reward_function(self, state, action): - """The reward function, R. - - Rewards the sequences selected to be rewardable at initialisation for discrete environments. For continuous environments, we have fixed available options for the reward function: - move_to_a_point rewards for moving to a predefined location. It has sparse and dense settings. - move_along_a_line rewards moving along ANY direction in space as long as it's a fixed direction for sequence_length consecutive steps. - - Parameters - ---------- - state : list - The underlying MDP state (also called augmented state in this code) that the environment uses to calculate its reward. Normally, just the sequence of past states of length delay + sequence_length + 1. - action : single action dependent on action space - Action magnitudes are penalised immediately in the case of continuous spaces and, in effect, play no role for discrete spaces as the reward in that case only depends on sequences of states. We say "in effect" because it _is_ used in case of a custom R to calculate R(s, a) but that is equivalent to using the "next" state s' as the reward determining criterion in case of deterministic transitions. _Sequences_ of _actions_ are currently NOT used to calculate the reward. Since the underlying MDP dynamics are deterministic, a state and action map 1-to-1 with the next state and so, just a sequence of _states_ should be enough to calculate the reward. - - Returns - ------- - double - The reward at the end of the current transition - - #TODO Make reward depend on the action sequence too instead of just state sequence, as it is currently? - """ - - delay = self.delay - sequence_length = self.sequence_length - reward = 0.0 - # print("TEST", self.augmented_state[0 : self.augmented_state_length - delay], state, action, self.rewardable_sequences, type(state), type(self.rewardable_sequences)) - state_considered = state # if imaginary_rollout else self.augmented_state # When we imagine a rollout, the user has to provide full augmented state as the argument!! - # if not isinstance(state_considered, list): - # state_considered = [state_considered] # to get around case when sequence is an int; it should always be a list except if a user passes in a state; would rather force them to pass a list: assert for it!! - # TODO These asserts are only needed if imaginary_rollout is True, as users then pass in a state sequence - # if imaginary_rollout: - # assert isinstance(state_considered, list), "state passed in should be a list of states containing at the very least the state at beginning of the transition, s, and the one after it, s'. type was: " + str(type(state_considered)) - # assert len(state_considered) == self.augmented_state_length, "Length of list of states passed should be equal to self.augmented_state_length. It was: " + str(len(state_considered)) - - if self.use_custom_mdp: - reward = self.config["reward_function"](state_considered, action) - self.reward_buffer.append(reward) ##TODO Modify seq_len and delay code for discrete and continuous case to use buffer too? - reward = self.reward_buffer[0] - # print("rewards:", self.reward_buffer, old_reward, reward) - del self.reward_buffer[0] - - elif self.config["state_space_type"] == "discrete": - if np.isnan(state_considered[0]): - pass ###IMP: This check is to get around case of augmented_state_length being > 2, i.e. non-vanilla seq_len or delay, because then rewards may be handed out for the initial state being part of a sequence which is not fair since it is handed out without having the agent take an action. - else: - self.logger.debug("state_considered for reward:" + str(state_considered) + " with delay " + str(self.delay)) - if (not self.reward_every_n_steps or - (self.reward_every_n_steps and self.total_transitions_episode % self.sequence_length == delay)): ###TODO also implement this for make_denser case and continuous envs. - sub_seq = tuple(state_considered[1 : self.augmented_state_length - delay]) - if sub_seq in self.rewardable_sequences: - # print(state_considered, "with delay", self.delay, "rewarded with:", 1) - reward += self.rewardable_sequences[sub_seq] - else: - # print(state_considered, "with delay", self.delay, "NOT rewarded.") - pass - - self.logger.info("rew" + str(reward)) - - elif self.config["state_space_type"] == "continuous": - ##TODO Make reward for along a line case to be length of line travelled - sqrt(Sum of Squared distances from the line)? This should help with keeping the mean reward near 0. Since the principal component is always taken to be the direction of travel, this would mean a larger distance covered in that direction and hence would lead to +ve reward always and would mean larger random actions give a larger reward! Should penalise actions in proportion that scale then? - if np.isnan(state_considered[0][0]): # Instead of below commented out check, this is more robust for imaginary transitions - # if self.total_transitions_episode + 1 < self.augmented_state_length: # + 1 because augmented_state_length is always 1 greater than seq_len + del - pass #TODO - else: - if self.config["reward_function"] == "move_along_a_line": - # print("######reward test", self.total_transitions_episode, np.array(self.augmented_state), np.array(self.augmented_state).shape) - #test: 1. for checking 0 distance for same action being always applied; 2. similar to 1. but for different dynamics orders; 3. similar to 1 but for different action_space_dims; 4. for a known applied action case, check manually the results of the formulae and see that programmatic results match: should also have a unit version of 4. for dist_of_pt_from_line() and an integration version here for total_deviation calc.?. - data_ = np.array(state_considered, dtype=self.dtype)[1 : self.augmented_state_length - delay, self.config["relevant_indices"]] - data_mean = data_.mean(axis=0) - uu, dd, vv = np.linalg.svd(data_ - data_mean) - self.logger.info('uu.shape, dd.shape, vv.shape =' + str(uu.shape) + str(dd.shape) + str(vv.shape)) - line_end_pts = vv[0] * np.linspace(-1, 1, 2)[:, np.newaxis] # vv[0] = 1st eigenvector, corres. to Principal Component #hardcoded -100 to 100 to get a "long" line which should make calculations more robust(?: didn't seem to be the case for 1st few trials, so changed it to -1, 1; even tried up to 10000 - seems to get less precise for larger numbers) to numerical issues in dist_of_pt_from_line() below; newaxis added so that expected broadcasting takes place - line_end_pts += data_mean - - total_deviation = 0 - for data_pt in data_: # find total distance of all data points from the fit line above - total_deviation += dist_of_pt_from_line(data_pt, line_end_pts[0], line_end_pts[-1]) - self.logger.info('total_deviation of pts from fit line:' + str(total_deviation)) - - reward += ( - total_deviation / self.sequence_length ) - - elif self.config["reward_function"] == "move_to_a_point": # Could generate target points randomly but leaving it to the user to do that. #TODO Generate it randomly to have random Rs? - if self.make_denser == True: - old_relevant_state = np.array(state_considered, dtype=self.dtype)[-2 - delay, self.config["relevant_indices"]] - new_relevant_state = np.array(state_considered, dtype=self.dtype)[-1 - delay, self.config["relevant_indices"]] - reward = -np.linalg.norm(new_relevant_state - self.target_point) # Should allow other powers of the distance from target_point, or more norms? - reward += np.linalg.norm(old_relevant_state - self.target_point) # Reward is the distance moved towards the target point. - # Should rather be the change in distance to target point, so reward given is +ve if "correct" action was taken and so reward function is more natural (this _is_ the current implementation) - # It's true that giving the total -ve distance from target as the loss at every step gives a stronger signal to algorithm to make it move faster towards target but this seems more natural (as in the other case loss/reward go up quadratically with distance from target point while in this case it's linear). The value function is in both cases higher for states further from target. But isn't that okay? Since the greater the challenge (i.e. distance from target), the greater is the achieved overall reward at the end. - #TODO To enable seq_len, we can hand out reward if distance to target point is reduced (or increased - since that also gives a better signal than giving 0 in that case!!) for seq_len consecutive steps, otherwise 0 reward - however we need to hand out fixed reward for every "sequence" achieved otherwise, if we do it by adding the distance moved towards target in the sequence, it leads to much bigger rewards for larger seq_lens because of overlapping consecutive sequences. - # TODO also make_denser, sparse rewards only at target - else: # sparse reward - new_relevant_state = np.array(state_considered, dtype=self.dtype)[-1 - delay, self.config["relevant_indices"]] - if np.linalg.norm(new_relevant_state - self.target_point) < self.target_radius: - reward = 1.0 # Make the episode terminate as well? Don't need to. If algorithm is smart enough, it will stay in the radius and earn more reward. - - reward -= self.action_loss_weight * np.linalg.norm(np.array(action, dtype=self.dtype)) - - elif self.config["state_space_type"] == "grid": - if self.config["reward_function"] == "move_to_a_point": - if self.make_denser == True: - old_relevant_state = np.array(state_considered)[-2 - delay] - new_relevant_state = np.array(state_considered)[-1 - delay] - - manhat_dist_old = distance.cityblock(old_relevant_state,\ - np.array(self.target_point)) - manhat_dist_new = distance.cityblock(new_relevant_state,\ - np.array(self.target_point)) - - reward += manhat_dist_old - manhat_dist_new - - else: # sparse reward - new_relevant_state = np.array(state_considered)[-1 - delay] - if list(new_relevant_state) == self.target_point: - reward += 1.0 - - reward *= self.reward_scale - noise_in_reward = self.reward_noise(self.np_random) if self.reward_noise else 0 #random ###TODO Would be better to parameterise this in terms of state, action and time_step as well. Would need to change implementation to have a queue for the rewards achieved and then pick the reward that was generated delay timesteps ago. - self.total_abs_noise_in_reward_episode += np.abs(noise_in_reward) - self.total_reward_episode += reward - reward += noise_in_reward - reward += self.reward_shift - return reward
- -
[docs] def step(self, action, imaginary_rollout=False): - """The step function for the environment. - - Parameters - ---------- - action : int or np.array - The action that the environment will use to perform a transition. - imaginary_rollout: boolean - Option for the user to perform "imaginary" transitions, e.g., for model-based RL. If set to true, underlying augmented state of the MDP is not changed and user is responsible to maintain and provide a list of states to this function to be able to perform a rollout. - - Returns - ------- - int or np.array, double, boolean, dict - The next state, reward, whether the episode terminated and additional info dict at the end of the current transition - """ - - # For imaginary transitions, discussion: - # 1) Use external observation_space as argument to P() and R(). But then it's not possible for P and R to know underlying MDP state unless we pass it as another argument. This is not desirable as we want P and R to simply be functions of external state/observation and action. 2) The other possibility is how it's currently done: P and R _know_ the underlying state. But in this case, we need an extra imaginary_rollout argument to P and R and we can't perform imaginary rollouts longer than one step without asking the user to maintain a sequence of underlying states and actions to be passed as arguments to P and R. - # P and R knowing the underlying state seems a poor design choice to me because it makes the code structure more brittle, so I propose that step() handles the underlying state vs external observation conversion and user can use P and R with underlying state. And step should handle the case of imaginary rollouts by building a tree of transitions and allowing rollback to states along the tree. However, user will probably want access to P and R by using only observations as well instead of the underlying state. In this case, P and R need to be aware of underlying state and be able to store imaginary rollouts if needed. - - - # Transform multi-discrete to discrete for discrete state spaces with irrelevant dimensions; needed only for imaginary rollouts, otherwise, internal augmented state is used. - - if imaginary_rollout: - print("Imaginary rollouts are currently not supported.") - sys.exit(1) - - - if self.config["state_space_type"] == "discrete": - if self.irrelevant_features: - state, action, state_irrelevant, action_irrelevant = self.curr_state[0], action[0], self.curr_state[1], action[1], - else: - state, action = self.curr_state, action - else: # cont. or grid case - state, action = self.curr_state, action - - - ### TODO Decide whether to give reward before or after transition ("after" would mean taking next state into account and seems more logical to me) - make it a dimension? - R(s) or R(s, a) or R(s, a, s')? I'd say give it after and store the old state in the augmented_state to be able to let the R have any of the above possible forms. That would also solve the problem of implicit 1-step delay with giving it before. _And_ would not give any reward for already being in a rewarding state in the 1st step but _would_ give a reward if 1 moved to a rewardable state - even if called with R(s, a) because s' is stored in the augmented_state! #####IMP - - next_state = self.P(state, action) ###TODO P uses last state while R uses augmented state; for cont. env, P does know underlying state_derivatives - we don't want this to be the case for the imaginary rollout scenario; - - # if imaginary_rollout: - # pass - # # print("imaginary_rollout") # Since transition_function currently depends only on current state and action, we don't need to do anything here! - # else: - del self.augmented_state[0] - if self.config["state_space_type"] == "discrete": - self.augmented_state.append(next_state) - elif self.config["state_space_type"] == "continuous": - self.augmented_state.append(next_state.copy()) - elif self.config["state_space_type"] == "grid": - self.augmented_state.append([next_state[i] for i in range(2)]) - - self.total_transitions_episode += 1 - - self.reward = self.R(self.augmented_state, action) - - #irrelevant dimensions part - if self.config["state_space_type"] == "discrete": - if self.irrelevant_features: - next_state_irrelevant = self.config["transition_function_irrelevant"][state_irrelevant, action_irrelevant] - if self.transition_noise: - probs = np.ones(shape=(self.state_space_size[1],)) * self.transition_noise / (self.state_space_size[1] - 1) - probs[next_state_irrelevant] = 1 - self.transition_noise - new_next_state_irrelevant = self.observation_spaces[1].sample(prob=probs) #random - # if next_state_irrelevant != new_next_state_irrelevant: - # print("NOISE inserted! old next_state_irrelevant, new_next_state_irrelevant", next_state_irrelevant, new_next_state_irrelevant) - # self.total_noisy_transitions_irrelevant_episode += 1 - next_state_irrelevant = new_next_state_irrelevant - - - # Transform discrete back to multi-discrete if needed - if self.config["state_space_type"] == "discrete": - if self.irrelevant_features: - next_obs = next_state = (next_state, next_state_irrelevant) - else: - next_obs = next_state - else: # cont. or grid space - next_obs = next_state - - if self.image_representations: - next_obs = self.observation_space.get_concatenated_image(next_state) - - self.curr_state = next_state - self.curr_obs = next_obs - - - self.done = self.is_terminal_state(self.augmented_state[-1]) or self.reached_terminal #### TODO curr_state is external state, while we need to check relevant state for terminality! Done - by using augmented_state now instead of curr_state! - if self.done: - self.reward += self.term_state_reward * self.reward_scale # Scale before or after? - self.logger.info('sas\'r: ' + str(self.augmented_state[-2]) + ' ' + str(action) + ' ' + str(self.augmented_state[-1]) + ' ' + str(self.reward)) - - return self.curr_obs, self.reward, self.done, self.get_augmented_state()
- -
[docs] def get_augmented_state(self): - '''Intended to return the full augmented state which would be Markovian. (However, it's not Markovian wrt the noise in P and R because we're not returning the underlying RNG.) Currently, returns the augmented state which is the sequence of length "delay + sequence_length + 1" of past states for both discrete and continuous environments. Additonally, the current state derivatives are also returned for continuous environments. - - Returns - ------- - dict - Contains at the end of the current transition - - #TODO For noisy processes, this would need the noise distribution and random seed too. Also add the irrelevant state parts, etc.? We don't need the irrelevant parts for the state to be Markovian. - ''' - if self.config["state_space_type"] == "discrete": - augmented_state_dict = {"curr_state": self.curr_state, "curr_obs": self.curr_obs, "augmented_state": self.augmented_state} - elif self.config["state_space_type"] == "continuous": - augmented_state_dict = {"curr_state": self.curr_state, "curr_obs": self.curr_obs, "augmented_state": self.augmented_state, "state_derivatives": self.state_derivatives} - elif self.config["state_space_type"] == "grid": - augmented_state_dict = {"curr_state": self.curr_state, \ - "curr_obs": self.curr_obs, \ - "augmented_state": self.augmented_state} - - return augmented_state_dict
- - -
[docs] def reset(self): - '''Resets the environment for the beginning of an episode and samples a start state from rho_0. For discrete environments uses the defined rho_0 directly. For continuous environments, samples a state and resamples until a non-terminal state is sampled. - - Returns - ------- - int or np.array - The start state for a new episode. - ''' - - # on episode "end" stuff (to not be invoked when reset() called when self.total_episodes = 0; end is in quotes because it may not be a true episode end reached by reaching a terminal state, but reset() may have been called in the middle of an episode): - if not self.total_episodes == 0: - self.logger.info("Noise stats for previous episode num.: " + str(self.total_episodes) + " (total abs. noise in rewards, total abs. noise in transitions, total reward, total noisy transitions, total transitions): " + str(self.total_abs_noise_in_reward_episode) + " " + str(self.total_abs_noise_in_transition_episode) + " " + str(self.total_reward_episode) + " " + str(self.total_noisy_transitions_episode) + " " + str(self.total_transitions_episode)) - - # on episode start stuff: - self.reward_buffer = [0.0] * (self.delay) - - self.total_episodes += 1 - - if self.config["state_space_type"] == "discrete": - self.curr_state_relevant = self.np_random.choice(self.state_space_size[0], p=self.config["relevant_init_state_dist"]) #random - self.curr_state = self.curr_state_relevant # curr_state set here already in case if statement below is not entered - if self.irrelevant_features: - self.curr_state_irrelevant = self.np_random.choice(self.state_space_size[1], p=self.config["irrelevant_init_state_dist"]) #random - self.curr_state = (self.curr_state_relevant, self.curr_state_irrelevant) - self.logger.info("RESET called. Relevant part of state reset to:" + str(self.curr_state_relevant)) - self.logger.info("Irrelevant part of state reset to:" + str(self.curr_state_irrelevant)) - - self.augmented_state = [np.nan for i in range(self.augmented_state_length - 1)] - self.augmented_state.append(self.curr_state_relevant) - # self.augmented_state = np.array(self.augmented_state) # Do NOT make an np.array out of it because we want to test existence of the array in an array of arrays which is not possible with np.array! - elif self.config["state_space_type"] == "continuous": - # self.logger.debug("#TODO for cont. spaces: reset") - while True: # Be careful about infinite loops - term_space_was_sampled = False - self.curr_state = self.feature_space.sample() #random - if self.is_terminal_state(self.curr_state): - j = None - for i in range(len(self.term_spaces)): # Could this sampling be made more efficient? In general, the non-terminal space could have any shape and assiging equal sampling probability to each point in this space is pretty hard. - if self.term_spaces[i].contains(self.curr_state): - j = i - self.logger.info("A state was sampled in term state subspace. Therefore, resampling. State was, subspace was:" + str(self.curr_state) + str(j)) ##TODO Move this logic into a new class in Gym spaces that can contain subspaces for term states! (with warning/error if term subspaces cover whole state space, or even a lot of it) - term_space_was_sampled = True - # break - if not term_space_was_sampled: - break - - # if not self.use_custom_mdp: - # init the state derivatives needed for continuous spaces - zero_state = np.array([0.0] * (self.state_space_dim), dtype=self.dtype) - self.state_derivatives = [zero_state.copy() for i in range(self.dynamics_order + 1)] #####IMP to have copy() otherwise it's the same array (in memory) at every position in the list - self.state_derivatives[0] = self.curr_state - - self.augmented_state = [[np.nan] * self.state_space_dim for i in range(self.augmented_state_length - 1)] - self.augmented_state.append(self.curr_state.copy()) - - elif self.config["state_space_type"] == "grid": - # Need to set self.curr_state, self.augmented_state - while True: # Be careful about infinite loops - term_space_was_sampled = False - # curr_state is an np.array while curr_state_relevant is a list - self.curr_state = self.feature_space.sample().astype(int) # #random - self.curr_state_relevant = list(self.curr_state[[0, 1]]) # #hardcoded - if self.is_terminal_state(self.curr_state_relevant): - self.logger.info("A terminal state was sampled. Therefore,"\ - " resampling. State was:" + str(self.curr_state)) - term_space_was_sampled = True - break - if not term_space_was_sampled: - break - - self.augmented_state = [np.nan for i in range(\ - self.augmented_state_length - 1)] - self.augmented_state.append(self.curr_state_relevant) - - - - if self.image_representations: - self.curr_obs = self.observation_space.get_concatenated_image(self.curr_state) - else: - self.curr_obs = self.curr_state - - self.logger.info("RESET called. curr_state reset to: " + str(self.curr_state)) - self.reached_terminal = False - - self.total_abs_noise_in_reward_episode = 0 - self.total_abs_noise_in_transition_episode = 0 # only present in continuous spaces - self.total_noisy_transitions_episode = 0 # only present in discrete spaces - self.total_reward_episode = 0 - self.total_transitions_episode = 0 - - self.logger.info(" self.delay, self.sequence_length:" + str(self.delay) + str(self.sequence_length)) - - return self.curr_obs
- -
[docs] def seed(self, seed=None): - """Initialises the Numpy RNG for the environment by calling a utility for this in Gym. - - The environment has its own RNG and so do the state and action spaces held by the environment. - - Parameters - ---------- - seed : int - seed to initialise the np_random instance held by the environment. Cannot use numpy.int64 or similar because Gym doesn't accept it. - - Returns - ------- - int - The seed returned by Gym - """ - # If seed is None, you get a randomly generated seed from gym.utils... - self.np_random, self.seed_ = gym.utils.seeding.np_random(seed) #random - print("Env SEED set to: " + str(seed) + ". Returned seed from Gym: " + str(self.seed_)) - return self.seed_
- - -
[docs]def dist_of_pt_from_line(pt, ptA, ptB): - '''Returns shortest distance of a point from a line defined by 2 points - ptA and ptB. Based on: https://softwareengineering.stackexchange.com/questions/168572/distance-from-point-to-n-dimensional-line - ''' - - tolerance = 1e-13 - lineAB = ptA - ptB - lineApt = ptA - pt - dot_product = np.dot(lineAB, lineApt) - if np.linalg.norm(lineAB) < tolerance: - return 0 - else: - proj = dot_product / np.linalg.norm(lineAB) #### TODO could lead to division by zero if line is a null vector! - sq_dist = np.linalg.norm(lineApt)**2 - proj**2 - - if sq_dist < 0: - if sq_dist < tolerance: - logging.warning('The squared distance calculated in dist_of_pt_from_line() using Pythagoras\' theorem was less than the tolerance allowed. It was: ' + str(sq_dist) + '. Tolerance was: -' + str(tolerance)) # logging.warn() has been deprecated since Python 3.3 and we should use logging.warning. - sq_dist = 0 - dist = np.sqrt(sq_dist) - # print('pt, ptA, ptB, lineAB, lineApt, dot_product, proj, dist:', pt, ptA, ptB, lineAB, lineApt, dot_product, proj, dist) - return dist
- -
[docs]def list_to_float_np_array(lis): - '''Converts list to numpy float array - ''' - return np.array(list(float(i) for i in lis))
- - -if __name__ == "__main__": - - config = {} - config["seed"] = 0 #seed, 7 worked for initially sampling within term state subspace - - # Simple discrete environment usage example - # config["state_space_type"] = "discrete" - # config["state_space_size"] = 6 - # config["action_space_size"] = 6 - # config["reward_density"] = 0.25 # Number between 0 and 1 - # config["make_denser"] = True - # config["terminal_state_density"] = 0.25 # Number between 0 and 1 - # config["maximally_connected"] = True # Make every state reachable from every state - # config["repeats_in_sequences"] = False - # config["delay"] = 1 - # config["sequence_length"] = 3 - # config["reward_scale"] = 1.0 - # # config["transition_noise"] = 0.2 # Currently the fractional chance of transitioning to one of the remaining states when given the deterministic transition function - in future allow this to be given as function; keep in mind that the transition function itself could be made a stochastic function - does that qualify as noise though? - # # config["reward_noise"] = lambda a: a.normal(0, 0.1) #random #hack # a probability function added to reward function - - # Simple continuous environment usage example - # config["state_space_type"] = "continuous" - # config["state_space_dim"] = 2 - # config["action_space_dim"] = 2 - # config["transition_dynamics_order"] = 1 - # config["inertia"] = 1 # 1 unit, e.g. kg for mass, or kg * m^2 for moment of inertia. - # config["state_space_max"] = 5 # Will be a Box in the range [-max, max] - # config["action_space_max"] = 1 # Will be a Box in the range [-max, max] - # config["time_unit"] = 1 # Discretization of time domain - # config["terminal_states"] = [[0.0, 1.0], [1.0, 0.0]] - # config["term_state_edge"] = 1.0 # Terminal states will be in a hypercube centred around the terminal states given above with the edge of the hypercube of this length. - # - # config["delay"] = 1 - # config["sequence_length"] = 10 - # config["reward_scale"] = 1.0 - # # config["reward_noise"] = lambda a: a.normal(0, 0.1) #random #hack # a probability function added to reward function - # # config["transition_noise"] = lambda a: a.normal(0, 0.1) #random #hack # a probability function added to transition function in cont. spaces - # config["reward_function"] = "move_along_a_line" - - config["generate_random_mdp"] = True # This supersedes previous settings and generates a random transition function, a random reward function (for random specific sequences) - env = RLToyEnv(**config) - state = copy.copy(env.get_augmented_state()['curr_state']) - for _ in range(20): - # env.render() # For GUI - action = env.action_space.sample() # take a #random action - # action = np.array([1, 1, 1, 1]) # just to test if acting "in a line" works - next_state, reward, done, info = env.step(action) - print("sars', done =", state, action, reward, next_state, done, "\n") - state = copy.copy(next_state) - env.reset() - env.close() - - # import sys - # sys.exit(0) -
- -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_modules/mdp_playground/scripts/run_experiments.html b/docs/_build/html/_modules/mdp_playground/scripts/run_experiments.html deleted file mode 100644 index 8b3445a..0000000 --- a/docs/_build/html/_modules/mdp_playground/scripts/run_experiments.html +++ /dev/null @@ -1,698 +0,0 @@ - - - - - - - - mdp_playground.scripts.run_experiments — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -

Source code for mdp_playground.scripts.run_experiments

-'''Script to run experiments on MDP Playground.
-
-Takes a configuration file, experiment name and config number to run as
-optional arguments.
-'''
-
-from __future__ import absolute_import
-from __future__ import division
-from __future__ import print_function
-
-import argparse
-import mdp_playground.config_processor as config_processor
-import os
-import logging
-import dill as pickle
-
-from ray import tune
-
-# import configparser
-import pprint
-pp = pprint.PrettyPrinter(indent=4)
-
-
-
[docs]def main(args): - #TODO Different seeds for Ray Trainer (TF, numpy, Python; Torch, Env), Environment (it has multiple sources of randomness too), Ray Evaluator - # docstring at beginning of the file is stored in __doc__ - parser = argparse.ArgumentParser(description=__doc__) - parser.add_argument('-c', '--config-file', dest='config_file', - action='store', default='default_config', - help='Configuration file containing configuration to run ' - 'experiments. It must be a Python file so config can be ' - 'given programmatically. There are 2 types of configs - ' - 'VARIABLE CONFIG across the experiments and STATIC CONFIG ' - 'across the experiments. \nVARIABLE CONFIGS: The ' - 'OrderedDicts var_env_configs, var_agent_configs and ' - 'var_model_configs hold configuration options that are ' - 'variable for the environment, agent and model across the ' - 'current experiment. For each configuration option, the ' - 'option is the key in the dict and its value is a list of ' - 'values it can take for the current experiment. A ' - 'Cartesian product of these lists is taken to generate ' - 'various possible configurations to be run. For example, ' - 'you might want to vary "delay" for the current ' - 'experiment. Then "delay" would be a key in ' - 'var_env_configs dict and its value would be a list of ' - 'values it can take. Because Ray does not have a common ' - 'way to address this specification of configurations for ' - 'its agents, there are a few hacky ways to set ' - 'var_agent_configs and var_model_configs currently. ' - 'Please see sample experiment config files in the ' - 'experiments directory to see how to set the values for a ' - 'given algorithm. \n STATIC CONFIGS: env_config, ' - 'agent_config and model_config are dicts which hold the ' - 'static configuration for the current experiment as a ' - 'normal Python dict.') - # ####TODO Update docs regarding how to get configs to run: i.e., Cartesian - # product, or random, etc. - parser.add_argument('-e', '--exp-name', dest='exp_name', action='store', - default='mdpp_default_experiment', - help='The user-chosen name of the experiment. This is used' - ' as the prefix of the output files (the prefix also ' - 'contains config_num if that is provided). It will save ' - 'stats to 2 CSV files, with the filenames as the one given' - ' as argument' - ' and another file with an extra "_eval" in the filename ' - 'that contains evaluation stats during the training. ' - 'Appends to existing files or creates new ones if they ' - 'don\'t exist.') - parser.add_argument('-n', '--config-num', dest='config_num', action='store', - default=None, type=int, - help='Used for running the configurations of experiments ' - 'in parallel. This is appended to the prefix of the output' - ' files (after exp_name).' - ' A Cartesian product of different configuration values ' - 'for the experiment will be taken and ordered as a list ' - 'and this number corresponds to the configuration number ' - 'in this list. Please look in to the code for details.') - # ###TODO Remove? #hack to run 1000 x 1000 env configs x agent configs. - # Storing all million of them in memory may be too inefficient? - parser.add_argument('-a', '--agent-config-num', dest='agent_config_num', - action='store', default=None, type=int, - help='Used for running the configurations of experiments ' - 'in parallel. This is appended to the prefix of the output' - ' files (after exp_name).') - parser.add_argument('-f', '--framework', dest='framework', action='store', - default='ray', type=str, help='Specify framework to run ' - 'experiments (Current options: Ray Rllib, Stable Baselines' - ').') - parser.add_argument('-m', '--save-model', dest='save_model', action='store', - default=False, type=bool, - help='Option to save trained NN model and framework \ - generated files at the end of ' - 'training.') - parser.add_argument('-t', '--framework-dir', dest='framework_dir', - action='store', default='/tmp/', type=str, - help='Prefix of directory to be used by underlying ' - 'framework (e.g. Ray Rllib, Stable Baselines 3). This ' - 'name will be passed to the framework.') - # parser.add_argument('-t', '--tune-hps', dest='tune_hps', action='store', - # default=False, type=bool, - # help='Used for tuning the hyperparameters that can be ' - # 'used for experiments later.' - # ' A Cartesian product of different configuration values ' - # 'for the experiment will be taken and ordered as a list ' - # 'and this number corresponds to the configuration number' - # ' in this list.' - # ' Please look in to the code for details.') - parser.add_argument('-l', '--log-level', default='WARNING', - help='Set log level.') - - - args = parser.parse_args(args) - print("Parsed arguments:", args) - - log_levels = { - 'CRITICIAL': logging.CRITICAL, - 'ERROR': logging.ERROR, - 'WARNING': logging.WARNING, - 'INFO': logging.INFO, - 'DEBUG': logging.DEBUG, - 'NOTSET': logging.NOTSET - } - - try: - log_level_ = log_levels[args.log_level] - except ValueError: - logging.error("Log level {} not in {}.".format(args.log_level, - log_levels.keys())) - - config_file = args.config_file - - if args.config_file[-3:] == '.py': - config_file = args.config_file[:-3] - - # print("config_file_path:", config_file_path) - - stats_file_name = os.path.abspath(args.exp_name) - - if args.config_num is not None: - stats_file_name += '_' + str(args.config_num) - # elif args.agent_config_num is not None: ###IMP Commented out! If we append both these nums then, that can lead to 1M small files for 1000x1000 configs which doesn't play well with our Nemo cluster. - # stats_file_name += '_' + str(args.agent_config_num) - - print("Stats file being written to:", stats_file_name) - - config, final_configs = config_processor.process_configs(config_file, stats_file_prefix=stats_file_name, framework=args.framework, config_num=args.config_num, log_level=log_level_, framework_dir=args.framework_dir) - - print("Configuration number(s) that will be run:", "all" if args.config_num is None else args.config_num) - - - # import default_config - # print("default_config:", default_config) - # print(os.path.abspath(args.config_file)) # 'experiments/dqn_seq_del.py' - - - import time - start = time.time() - - - - if args.config_num is None: - # final_configs = config.final_configs - print("Total number of configs to run:", len(final_configs)) - pass - else: - final_configs = [final_configs[args.config_num]] - - - - - for enum_conf_1, current_config_ in enumerate(final_configs): - print("current_config of agent to be run:", current_config_, enum_conf_1) - - algorithm = config.algorithm - - - tune_config = current_config_ - print("tune_config:",) - pp.pprint(tune_config) - - - if 'timesteps_total' in dir(config): - timesteps_total = config.timesteps_total - else: - timesteps_total = tune_config["timesteps_total"] - - del tune_config["timesteps_total"] #hack Ray doesn't allow unknown configs - - - print("\n\033[1;32m======== Running on environment: " + tune_config["env"] \ - + " =========\033[0;0m\n") - print("\n\033[1;32m======== for " + str(timesteps_total) \ - + " steps =========\033[0;0m\n") - - analysis = tune.run( - algorithm, - name=algorithm + '_' + str(stats_file_name.split('/')[-1]) + '_' \ - , ####IMP "name" has to be specified, otherwise, - # it may lead to clashing for temp file in ~/ray_results/... directory. - stop={ - "timesteps_total": timesteps_total, - }, - config=tune_config, - checkpoint_at_end=args.save_model, - local_dir=args.framework_dir + '/_ray_results_' + str(args.config_num), - #return_trials=True # add trials = tune.run( above - ) - - if args.save_model: - pickle.dump(analysis, open("{}_analysis.pickle".format(args.exp_name), - "wb")) - - config_processor.post_processing(framework=args.framework) - - end = time.time() - print("No. of seconds to run:", end - start)
- - -
[docs]def cli(): - import sys - main(sys.argv[1:])
- - -if __name__ == '__main__': - cli() -
- -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_modules/mdp_playground/spaces/box_extended.html b/docs/_build/html/_modules/mdp_playground/spaces/box_extended.html deleted file mode 100644 index 7a727ab..0000000 --- a/docs/_build/html/_modules/mdp_playground/spaces/box_extended.html +++ /dev/null @@ -1,488 +0,0 @@ - - - - - - - - mdp_playground.spaces.box_extended — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -

Source code for mdp_playground.spaces.box_extended

-import numpy as np
-import gym
-from gym.spaces import Box
-
-
[docs]class BoxExtended(Box): - -
[docs] def __init__(self, low, high, shape=None, dtype=np.float32, seed=None): - super(BoxExtended, self).__init__(low, high, shape=shape, dtype=dtype) - super(BoxExtended, self).seed(seed=seed)
- - # def sample(self, prob=None, size=1, replace=True): - # sampled = np.squeeze(self.np_random.choice(self.n, size=size, p=prob, replace=replace)) - # if sampled.shape == (): - # sampled = int(sampled) #TODO Just made it an int otherwise np.array(scalar) looks ugly in output. - # return sampled -
- -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_modules/mdp_playground/spaces/discrete_extended.html b/docs/_build/html/_modules/mdp_playground/spaces/discrete_extended.html deleted file mode 100644 index e4ca0f4..0000000 --- a/docs/_build/html/_modules/mdp_playground/spaces/discrete_extended.html +++ /dev/null @@ -1,490 +0,0 @@ - - - - - - - - mdp_playground.spaces.discrete_extended — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -

Source code for mdp_playground.spaces.discrete_extended

-import numpy as np
-import gym
-from gym.spaces import Discrete
-
-
[docs]class DiscreteExtended(Discrete): - -
[docs] def __init__(self, n, seed=None): - super(DiscreteExtended, self).__init__(n) - super(DiscreteExtended, self).seed(seed=seed)
- -
[docs] def sample(self, max=None, prob=None, size=1, replace=True): - if max == None: #hack This was done when diameter was introduced as a dimension so as not to have to change the tests which would fail. - max = self.n - sampled = np.squeeze(self.np_random.choice(max, size=size, p=prob, replace=replace)) - if sampled.shape == (): - sampled = int(sampled) #TODO Just made it an int otherwise np.array(scalar) looks ugly in output. - return sampled
-
- -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_modules/mdp_playground/spaces/image_continuous.html b/docs/_build/html/_modules/mdp_playground/spaces/image_continuous.html deleted file mode 100644 index 7208a78..0000000 --- a/docs/_build/html/_modules/mdp_playground/spaces/image_continuous.html +++ /dev/null @@ -1,708 +0,0 @@ - - - - - - - - mdp_playground.spaces.image_continuous — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -

Source code for mdp_playground.spaces.image_continuous

-import warnings
-import numpy as np
-import gym
-from gym.spaces import Box, Space
-import PIL.ImageDraw as ImageDraw
-import PIL.Image as Image
-from PIL.Image import FLIP_LEFT_RIGHT, FLIP_TOP_BOTTOM
-import os
-
-
[docs]class ImageContinuous(Box): - '''A space that maps a continuous 1- or 2-D space 1-to-1 to images so that the - images may be used as representations for corresponding continuous environments. - - Methods - ------- - get_concatenated_image(continuous_obs) - Gets an image representation for a given feature space observation - ''' - -
[docs] def __init__(self, feature_space, term_spaces=None, width=100, height=100,\ - circle_radius=5, target_point=None, relevant_indices=[0,1],\ - seed=None, grid_shape=None, dtype=np.uint8): - ''' - Parameters - ---------- - feature_space : Gym.spaces.Box - The feature space to which this class associates images as external - observations - term_spaces : list of Gym.spaces.Box - Sub-spaces of the feature space which are terminal - width : int - The width of the image - height : int - The height of the image - circle_radius : int - The radius of the circle which represents the agent and target point - target_point : np.array - - relevant_indices : list - - grid_shape : tuple of length 2 - - seed : int - Seed for this space - ''' - # ##TODO Define a common superclass for this and ImageMultiDiscrete - self.feature_space = feature_space - assert (self.feature_space.high != np.inf).any() - assert (self.feature_space.low != -np.inf).any() - self.width = width - self.height = height - # Warn if resolution is too low? - self.circle_radius = circle_radius - self.target_point = target_point - self.term_spaces = term_spaces - self.relevant_indices = relevant_indices - all_indices = set(range(self.feature_space.shape[0])) - self.irrelevant_indices = list(all_indices - set(self.relevant_indices)) - if len(self.irrelevant_indices) == 0: - self.irrelevant_features = False - else: - self.irrelevant_features = True - if grid_shape is not None: - self.draw_grid = True - assert type(grid_shape == tuple) and \ - (len(grid_shape) == 2 or len(grid_shape) == 4) - # Could also assert that self.width is divisible by grid_shape[0], etc. - self.grid_shape = grid_shape - else: - self.draw_grid = False - - self.goal_colour = (0, 255, 0) - self.agent_colour = (0, 0, 255) - self.term_colour = (255, 0, 0) - self.bg_colour = (0, 0, 0) - self.line_colour = (255, 255, 255) - - assert len(feature_space.shape) == 1 - relevant_dims = len(relevant_indices) - irr_dims = len(self.irrelevant_indices) - assert relevant_dims <= 2 and irr_dims <=2, "Image observations are "\ - "supported only "\ - "for 1- or 2-D feature spaces." - - - # Shape has 1 appended for Ray Rllib to be compatible IIRC - super(ImageContinuous, self).__init__(shape=(width, height, 1), \ - dtype=dtype, low=0, high=255) - super(ImageContinuous, self).seed(seed=seed) - - if self.target_point is not None: - if self.draw_grid: - target_point += 0.5 - self.target_point_pixel = self.convert_to_pixel(target_point)
- - -
[docs] def generate_image(self, position, relevant=True): - ''' - Parameters - ---------- - position : np.array - - ''' - # Use RGB - image_ = Image.new("RGB", (self.width, self.height), color=self.bg_colour) - # Use L for black and white 8-bit pixels instead of RGB in case not - # using custom images - # image_ = Image.new("L", (self.width, self.height)) - draw = ImageDraw.Draw(image_) - - # Draw in decreasing order of importance: - # grid lines, term_spaces, etc. first, so that others are drawn over them - if self.draw_grid: - position = position.astype(float) - position += 0.5 - offset = 0 if relevant else 2 - for i in range(1, self.grid_shape[0 + offset] + 1): # +1 because this is along - # concatentation dimension when stitching together images below in - # get_concatenated_image - x_ = i * self.width // self.grid_shape[0 + offset] - 1 # -1 to not go outside - # image size for the last line drawn - y_ = self.height - start_pt = (x_, y_) - y_ = 0 - end_pt = (x_, y_) - draw.line([start_pt, end_pt], fill=self.line_colour) - - for j in range(1, self.grid_shape[1 + offset]): - x_ = self.width - y_ = j * self.height // self.grid_shape[0 + offset] - start_pt = (x_, y_) - x_ = 0 - end_pt = (x_, y_) - draw.line([start_pt, end_pt], fill=self.line_colour) - - if self.term_spaces is not None and relevant: - for term_space in self.term_spaces: - low = self.convert_to_pixel(term_space.low) - if self.draw_grid: - high = self.convert_to_pixel(term_space.high + 1.) - else: - high = self.convert_to_pixel(term_space.high) - - leftUpPoint = tuple((low)) - rightDownPoint = tuple((high)) - twoPointList = [leftUpPoint, rightDownPoint] - draw.rectangle(twoPointList, fill=self.term_colour) - - R = self.circle_radius - - if self.target_point is not None and relevant: - # print("draw2", self.target_point_pixel) - leftUpPoint = tuple((self.target_point_pixel - R)) - rightDownPoint = tuple((self.target_point_pixel + R)) - twoPointList = [leftUpPoint, rightDownPoint] - draw.ellipse(twoPointList, fill=self.goal_colour) - - pos_pixel = self.convert_to_pixel(position) - # print("draw1", pos_pixel) - # Draw circle https://stackoverflow.com/a/2980931/11063709 - leftUpPoint = tuple(pos_pixel - R) - rightDownPoint = tuple(pos_pixel + R) - twoPointList = [leftUpPoint, rightDownPoint] - draw.ellipse(twoPointList, fill=self.agent_colour) - - - - - # Because numpy is row-major and Image is column major, need to transpose - # ret_arr = np.array(image_).T # For 2-D - ret_arr = np.transpose(np.array(image_), axes=(1, 0, 2)) - - return ret_arr
- -
[docs] def get_concatenated_image(self, obs): - '''Gets the "stitched together" image made from images corresponding to - each continuous sub-space within the continuous space, concatenated - along the X-axis. - ''' - concatenated_image = [] - # For relevant/irrelevant sub-spaces: - concatenated_image.append(self.generate_image(obs[self.relevant_indices])) - if self.irrelevant_features: - irr_image = self.generate_image(obs[self.irrelevant_indices], relevant=False) - concatenated_image.append(irr_image) - - concatenated_image = np.concatenate(tuple(concatenated_image), axis=0) - - return np.atleast_3d(concatenated_image) # because Ray expects an
- # image to have >=3 dims - -
[docs] def convert_to_pixel(self, position): - ''' - ''' - # It's implicit that both relevant and irrelevant sub-spaces have the - # same max and min here: - max = self.feature_space.high[self.relevant_indices] - min = self.feature_space.low[self.relevant_indices] - pos_pixel = ((position - min) / (max - min)) - pos_pixel = (pos_pixel * self.shape[:2]).astype(int) - - return pos_pixel
- - -
[docs] def sample(self): - - sampled = self.feature_space.sample() - return self.get_concatenated_image(sampled)
- - def __repr__(self): - return "{} with continuous underlying space of shape: {} and "\ - "images of resolution: {} and dtype: {}".format(self.__class__,\ - self.feature_space.shape,\ - self.shape, self.dtype) - -
[docs] def contains(self, x): - """ - Return boolean specifying if x is a valid - member of this space - """ - if x.shape == (self.width, self.height, 1): #TODO compare each pixel for all possible images? - return True
- -
[docs] def to_jsonable(self, sample_n): - """Convert a batch of samples from this space to a JSONable data type.""" - # By default, assume identity is JSONable - raise NotImplementedError
- -
[docs] def from_jsonable(self, sample_n): - """Convert a JSONable data type to a batch of samples from this space.""" - # By default, assume identity is JSONable - raise NotImplementedError
- - def __eq__(self, other): - raise NotImplementedError
-
- -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_modules/mdp_playground/spaces/image_multi_discrete.html b/docs/_build/html/_modules/mdp_playground/spaces/image_multi_discrete.html deleted file mode 100644 index 59ef588..0000000 --- a/docs/_build/html/_modules/mdp_playground/spaces/image_multi_discrete.html +++ /dev/null @@ -1,728 +0,0 @@ - - - - - - - - mdp_playground.spaces.image_multi_discrete — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -

Source code for mdp_playground.spaces.image_multi_discrete

-import warnings
-import numpy as np
-import gym
-from gym.spaces import Box, Discrete, MultiDiscrete, Space
-import PIL.ImageDraw as ImageDraw
-import PIL.Image as Image
-from PIL.Image import FLIP_LEFT_RIGHT, FLIP_TOP_BOTTOM
-import os
-
-
[docs]class ImageMultiDiscrete(Box): - '''A space that maps a (multi-)discrete space 1-to-1 to images so that the images may be used as representations for corresponding (multi-)discrete states. A MultiDiscrete space will have multiple dimensions. For each of these dimensions, there is a size that represents the number of categorical states that correspond to that dimension. For size = n, each of these categorical states is numbered from 0 to n-1. For each categorical state numbered n, we associate a polygon with n + 3 sides. This polygon is present in the image associated with this dimension. The images generated for all the dimensions are concatenated together by placing them side by side in the order of the dimensions in Space. Any of the transforms - rotate, flip, scale, shift - can be associated with an object of this class, to apply at random to polygons in the images whenever they are generated. - - Methods - ------- - get_concatenated_image(multi_discrete_state) - Gets an image representation for a given multi_discrete_state - ''' - -
[docs] def __init__(self, state_space_sizes, width=100, height=100, circle_radius=20, transforms='rotate,flip,scale,shift', sh_quant=1, scale_range=(0.5,1.5), ro_quant=1, seed=None, use_custom_images=None, cust_path=None, dtype=np.uint8): # , polygon_sides=4 - ''' - Parameters - ---------- - state_space_sizes : list - The underlying (multi-)discrete state space sizes to which this class associates images as external observations - width : int - The width of the image - height : int - The height of the image - circle_radius : int - The radius of the circle in which the associated polygons are inscribed - transforms : str - Comma separated string specifiying which transforms are applied to images. (Commas are not actually needed, but are recommended for readability, since it's only the presence of the string representing the corresponding transform that is checked for.) - sh_quant : int - An int to quantise the shift transforms. - scale_range: tuple of floats with length = 2 - A tuple of real numbers to specify (min_scaling, max_scaling) for the scale transform. - ro_quant : int - An int to quantise the rotation transforms. - seed : int - seed for randomly applied transformations and NOT for the underlying state space - use_custom_images : str or None - If None, then default setting of no custom textures or images. If this value is "textures" or "images", then all images in the cust_path directories are loaded in alphabetical order and correspond 1-to-1 with discrete states which are in numeric order. If this value is "textures", the textures are applied to the polygons that would have been generated for the default setting (of no custom textures or images). If this value is "images", then the custom images are drawn in a square (with side length = circle_radius * sqrt(2)) in the centre of the polygon when no transforms are applied. When the underlying state space sizes are multi-discrete, the 1-to-1 state number to image mapping is the same for all discrete sub-spaces. - cust_path : str or None - The directory containing the custom images to be loaded - ''' - self.width = width - self.height = height - # Warn if resolution is too low? - self.circle_radius = circle_radius - self.transforms = transforms - self.sh_quant = sh_quant - self.ro_quant = ro_quant - self.scale_range = scale_range - - # self.state_space = state_space - self.use_custom_images = use_custom_images - - # if isinstance(state_space, Discrete): - # state_space_sizes = [state_space.n] # can be an int to map images to discrete spaces or it can be a list to map images (each image = multiple images, one for each discrete dimension, concatenated along the X-axis) to multi-discrete spaces - # elif isinstance(state_space, MultiDiscrete): - # state_space_sizes = list(state_space.nvec) - # else: - # raise TypeError('ImageMultiDiscrete can only hold a Discrete or MultiDiscrete object from Gym. Provided object was of type: ' + str(type(state_space))) - - self.state_space_sizes = state_space_sizes - - - if use_custom_images is not None: ###TODO test for textures, custom images - cust_imgs = [] - # cust_arrs = [] - for img_file in sorted(os.listdir(cust_path)): - img_ = Image.open(cust_path + '/' + img_file) - cust_imgs.append(img_) - # The following code might be used to resize the texture to a canonical size here already or to tile the texture. - # sq_width = circle_radius * 2 # np.sqrt(2) - # self.sq_width = sq_width - # img_ = img_.resize((sq_width, sq_width)) - # cust_imgs.append(img_) - # img_arr = np.array(img_) - # cust_arrs.append(img_arr) - assert len(cust_imgs) > max(state_space_sizes), "cust_path should be a directory with at least as many as the larget Discrete sub-space in the MultiDiscrete space." - #"The cust_path should be a directory with only texture images, at least as many as the larget Discrete sub-space in the MultiDiscrete space." - self.cust_imgs = cust_imgs - - - # self.shape = (width, height, 1) - super(ImageMultiDiscrete, self).__init__(shape=(width, height, 1), dtype=dtype, low=0, high=255) # - super(ImageMultiDiscrete, self).seed(seed=seed) #
- - # def seed(self, seed=None): - # pass - - # def generate_images(self, state_space_size): #, polygon_sides - # states_ = np.ndarray(shape=(state_space_size, self.width, self.height), dtype=np.uint8) # can't use 1 for 4th dim of array as, for L grayscale colour space, converting to np.array() gives only 2-D which throws broadcast error when assigning to this array below - # for curr_state in range(state_space_size): - # states_[curr_state] = self.generate_image(curr_state) # , curr_state + 2 - At least 2 sides for a polygon (including a line as a polygon here), so + 2. - # - # return states_ - - def generate_image(self, discrete_state): #, state_space_size, polygon_sides - polygon_sides = discrete_state + 3 - sh_quant = self.sh_quant - ro_quant = self.ro_quant - scale_range = self.scale_range - - if self.use_custom_images is not None: # textures / custom images - image_ = Image.new("RGB", (self.width, self.height)) # Use RGB for textures / custom images - else: - image_ = Image.new("L", (self.width, self.height)) # Use L for black and white 8-bit pixels instead of RGB in case not using custom images - draw = ImageDraw.Draw(image_) - - R = self.circle_radius - shift_w = int(self.width / 2) - shift_h = int(self.height / 2) - - if "scale" in self.transforms: - # max_R = 0.6 * min(self.width, self.height) / 2 # Not sure whether to make this depend on provided R as well - # min_R = 0.1 * min(self.width, self.height) / 2 # /2 because it's R, 0.6 and 0.1 to allow some wiggle for shift below and not make too small - max_R = scale_range[1] * R - if int(max_R) > min(self.width, self.height) / 2: - warnings.warn("Maximum possible size of polygon might be too big for the given resolution. It's set to: " + str(max_R)) - max_R = np.log(max_R) - min_R = scale_range[0] * R - if int(min_R) < 3: - warnings.warn("Minimum possible size of polygon might be too small and lead too much noise in image. It's set to: " + str(min_R)) - min_R = np.log(min_R) - log_sample = min_R + self.np_random.random() * (max_R - min_R) - sample_ = np.exp(log_sample) - R = int(sample_) - # print("R", min_R, max_R) - - if "shift" in self.transforms: - max_shift_w = self.width / 2 - R - max_shift_h = self.height / 2 - R - add_shift_w = self.np_random.randint(-max_shift_w + 1, max_shift_w) - add_shift_h = self.np_random.randint(-max_shift_h + 1, max_shift_h) - add_shift_w = (add_shift_w // sh_quant) * sh_quant - add_shift_h = (add_shift_h // sh_quant) * sh_quant - # print("shift_w, shift_h", add_shift_w, add_shift_h) - shift_w += add_shift_w - shift_h += add_shift_h - - if self.use_custom_images == "images": - pass - else: - # Trace polygon - points_ = [] - for i in range(polygon_sides): - angle = (2 * np.pi / polygon_sides) * i - point = (int(shift_w + R * np.cos(angle)), - int(shift_h + R * np.sin(angle))) - points_.append(point) - - # Render polygon if using default or textures, else use custom image - if self.use_custom_images == "textures": - draw.polygon(points_, fill=(255, 255, 255)) - img_arr_ = np.array(image_) - tex_img = self.cust_imgs[discrete_state] - tex_img = tex_img.resize((R * 2, R * 2)) - tex_arr = np.array(tex_img) - top_left = (shift_h - tex_arr.shape[0]//2, shift_w - tex_arr.shape[1]//2) - bottom_right = (shift_h + tex_arr.shape[0]//2, shift_w + tex_arr.shape[1]//2) - img_arr_[top_left[0]:bottom_right[0], top_left[1]:bottom_right[1]] //= 255 - img_arr_[top_left[0]:bottom_right[0], top_left[1]:bottom_right[1]] *= tex_arr # //255 to make white pixels be (1, 1, 1) - so when multiplied it's a mask; shift_h and shift_w interchanged as numpy is row major - # texed_img = - image_ = Image.fromarray(img_arr_, 'RGB') - elif self.use_custom_images == "images": - img_arr_ = np.array(image_) - tex_img = self.cust_imgs[discrete_state] - sq_width = int(R * np.sqrt(2)) # For textures it is not square root because polygons like a pentagon would go outside the sqrt(2) region. - if sq_width % 2 == 1: # If sq_width is not even, it causes errors with the //2 below. - sq_width += 1 - tex_img = tex_img.resize((sq_width, sq_width)) - tex_arr = np.array(tex_img) - top_left = (shift_h - tex_arr.shape[0]//2, shift_w - tex_arr.shape[1]//2) - bottom_right = (shift_h + tex_arr.shape[0]//2, shift_w + tex_arr.shape[1]//2) - img_arr_[top_left[0]:bottom_right[0], top_left[1]:bottom_right[1]] = tex_arr - image_ = Image.fromarray(img_arr_, 'RGB') - else: - draw.polygon(points_, fill=(255)) - - if "rotate" in self.transforms: ###TODO rotation can lead to image going out of bounds. - # rotation_ = (360 / polygon_sides) * (discrete_state / state_space_size) # Need to divide by polygon_sides because - rotation = self.np_random.randint(360) - rotation = (rotation // ro_quant) * ro_quant - # print("rotation", rotation) - image_ = image_.rotate(rotation) - # image_.rotate( - - if "flip" in self.transforms: - if self.np_random.randint(2) == 0: # Only flip half the times - if self.np_random.randint(2) == 0: - image_ = image_.transpose(FLIP_LEFT_RIGHT) - else: - image_ = image_.transpose(FLIP_TOP_BOTTOM) - - # Because numpy is row-major and Image is column major, need to transpose - if self.use_custom_images is None: - ret_arr = np.array(image_).T - else: - ret_arr = np.transpose(np.array(image_), axes=(1, 0, 2)) - - return ret_arr - -
[docs] def get_concatenated_image(self, multi_discrete_state,): - '''Gets the "stitched together" image made from images corresponding to each discrete sub-space within the multidiscrete space, concatenated along the X-axis - ''' - if type(multi_discrete_state) == int: - multi_discrete_state = [multi_discrete_state] - concatenated_image = [] - for i in range(len(self.state_space_sizes)): # For each Discrete sub-space - concatenated_image.append(self.generate_image(multi_discrete_state[i])) - # for i in range(len(self.disjoint_states)): - # concatenated_image.append(self.disjoint_states[i][multi_discrete_state[i]]) - concatenated_image = np.concatenate(tuple(concatenated_image), axis=0) - - return np.atleast_3d(concatenated_image) # because Ray expects an image to have >=3 dims
- - # def get_multi_discrete_state(self, - -
[docs] def sample(self): - sss = np.array(self.state_space_sizes) - sampled = (self.np_random.random_sample(sss.shape) * sss).astype(self.dtype) # Based on Gym's MultiDiscrete sampling - # if type(sampled) == int: - # sampled = [sampled] - sampled = list(sampled) - - return self.get_concatenated_image(sampled)
- - def __repr__(self): - return "{} with multi-discrete space of shape: {} and "\ - "images of resolution: {} and dtype: {}".format(self.__class__,\ - self.state_space_sizes,\ - self.shape, self.dtype) - -
[docs] def contains(self, x): - """ - Return boolean specifying if x is a valid - member of this space - """ - if x.shape == (self.width, self.height, 1): #TODO compare each pixel for all possible images? - return True
- -
[docs] def to_jsonable(self, sample_n): - """Convert a batch of samples from this space to a JSONable data type.""" - # By default, assume identity is JSONable - raise NotImplementedError
- -
[docs] def from_jsonable(self, sample_n): - """Convert a JSONable data type to a batch of samples from this space.""" - # By default, assume identity is JSONable - raise NotImplementedError
- - def __eq__(self, other): - raise NotImplementedError
-
- -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_modules/mdp_playground/spaces/multi_discrete_extended.html b/docs/_build/html/_modules/mdp_playground/spaces/multi_discrete_extended.html deleted file mode 100644 index f4d9a6d..0000000 --- a/docs/_build/html/_modules/mdp_playground/spaces/multi_discrete_extended.html +++ /dev/null @@ -1,491 +0,0 @@ - - - - - - - - mdp_playground.spaces.multi_discrete_extended — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -

Source code for mdp_playground.spaces.multi_discrete_extended

-import numpy as np
-import gym
-from gym.spaces import MultiDiscrete
-
-
[docs]class MultiDiscreteExtended(MultiDiscrete): - ''' - Currently, this class doesn't do anything special except allowing to seed from __init__(). - ''' - -
[docs] def __init__(self, nvec, seed=None): - super(MultiDiscreteExtended, self).__init__(nvec) - super(MultiDiscreteExtended, self).seed(seed=seed)
- - # def sample(self, prob=None, size=1, replace=True): - # sampled = np.squeeze(self.np_random.choice(self.n, size=size, p=prob, replace=replace)) - # if sampled.shape == (): - # sampled = int(sampled) #TODO Just made it an int otherwise np.array(scalar) looks ugly in output. - # return sampled -
- -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_modules/mdp_playground/spaces/test_image_continuous.html b/docs/_build/html/_modules/mdp_playground/spaces/test_image_continuous.html deleted file mode 100644 index 2e91514..0000000 --- a/docs/_build/html/_modules/mdp_playground/spaces/test_image_continuous.html +++ /dev/null @@ -1,546 +0,0 @@ - - - - - - - - mdp_playground.spaces.test_image_continuous — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -

Source code for mdp_playground.spaces.test_image_continuous

-import unittest
-import numpy as np
-from mdp_playground.spaces.image_continuous import ImageContinuous
-from gym.spaces import Box
-# import PIL.ImageDraw as ImageDraw
-import PIL.Image as Image
-# import PIL.ImageOps as ImageOps
-
-
-
[docs]class TestImageContinuous(unittest.TestCase): - - def test_image_continuous(self): - lows = 0.0 - highs = 20.0 - cs2 = Box(shape=(2,), low=lows, high=highs,) - cs4 = Box(shape=(4,), low=lows, high=highs,) - - imc = ImageContinuous(cs2, width=100, height=100,) - pos = np.array([5.0, 7.0]) - img1 = Image.fromarray(np.squeeze(imc.generate_image(pos)), 'RGB') - # img1 = ImageOps.invert(img1) - img1.show() - # img1.save("cont_state_no_target.pdf") - - target = np.array([10, 10]) - imc = ImageContinuous(cs2, target_point=target, width=100, height=100,) - img1 = Image.fromarray(np.squeeze(imc.generate_image(pos)), 'RGB') - img1.show() - # img1.save("cont_state_target.pdf") - - # Terminal sub-spaces - lows = np.array([2., 4.]) - highs = np.array([3., 6.]) - cs2_term1 = Box(low=lows, high=highs,) - lows = np.array([12., 3.]) - highs = np.array([13., 4.]) - cs2_term2 = Box(low=lows, high=highs,) - term_spaces = [cs2_term1, cs2_term2] - - target = np.array([10, 10]) - imc = ImageContinuous(cs2, target_point=target, term_spaces=term_spaces,\ - width=100, height=100,) - pos = np.array([5.0, 7.0]) - img1 = Image.fromarray(np.squeeze(imc.get_concatenated_image(pos)), 'RGB') - img1.show() - # img1.save("cont_state_target_terminal_states.pdf") - - - # Irrelevant features - target = np.array([10, 10]) - imc = ImageContinuous(cs4, target_point=target, width=400, height=400,) - pos = np.array([5.0, 7.0, 10.0, 15.0]) - img1 = Image.fromarray(np.squeeze(imc.get_concatenated_image(pos)), 'RGB') - img1.show() - # print(imc.get_concatenated_image(pos).shape) - - # Random sample and __repr__ - imc = ImageContinuous(cs4, target_point=target, width=400, height=400,) - # print(imc) - img1 = Image.fromarray(np.squeeze(imc.sample()), 'RGB') - img1.show() - - - # Draw grid - imc = ImageContinuous(cs4, target_point=target, width=400, height=400, - grid=(5,5)) - img1 = Image.fromarray(np.squeeze(imc.sample()), 'RGB') - img1.show()
- - - -if __name__ == '__main__': - unittest.main() -
- -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_modules/mdp_playground/spaces/test_image_multi_discrete.html b/docs/_build/html/_modules/mdp_playground/spaces/test_image_multi_discrete.html deleted file mode 100644 index e19c1eb..0000000 --- a/docs/_build/html/_modules/mdp_playground/spaces/test_image_multi_discrete.html +++ /dev/null @@ -1,563 +0,0 @@ - - - - - - - - mdp_playground.spaces.test_image_multi_discrete — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -

Source code for mdp_playground.spaces.test_image_multi_discrete

-import unittest
-import numpy as np
-from mdp_playground.spaces.image_multi_discrete import ImageMultiDiscrete
-from gym.spaces import Discrete, MultiDiscrete
-# import gym
-# from gym.spaces import MultiDiscrete
-# # from .space import Space
-# import PIL.ImageDraw as ImageDraw
-# import PIL.Image as Image
-
-
-
[docs]class TestImageMultiDiscrete(unittest.TestCase): - - def test_image_multi_discrete(self): - ds4 = Discrete(4) - ds4 = [ds4.n] - print(ds4) - imd = ImageMultiDiscrete(ds4, transforms='shift') - from PIL import Image - # img1 = Image.fromarray(imd.disjoint_states[0][1], 'L') - img1 = Image.fromarray(np.squeeze(imd.get_concatenated_image(3)), 'L') - img1.show() - - imd = ImageMultiDiscrete(ds4, transforms='scale,shift,rotate,flip', use_custom_images="textures", cust_path='/home/rajanr/textures') - img1 = Image.fromarray(np.squeeze(imd.get_concatenated_image(2)), 'RGB') - img1.show() - - imd = ImageMultiDiscrete(ds4, transforms='scale,shift,rotate,flip', use_custom_images="images", cust_path='/home/rajanr/textures') - img1 = Image.fromarray(np.squeeze(imd.get_concatenated_image(1)), 'RGB') - img1.show() - - imd = ImageMultiDiscrete(ds4, transforms='scale') - img1 = Image.fromarray(np.squeeze(imd.get_concatenated_image(3)), 'L') - img1.show() - - imd = ImageMultiDiscrete(ds4, transforms='rotate') - img1 = Image.fromarray(np.squeeze(imd.get_concatenated_image(3)), 'L') - img1.show() - - imd = ImageMultiDiscrete(ds4, transforms='flip') - img1 = Image.fromarray(np.squeeze(imd.get_concatenated_image(3)), 'L') - img1.show() - - imd = ImageMultiDiscrete(ds4, transforms='shift') - img1 = Image.fromarray(np.squeeze(imd.get_concatenated_image(2)), 'L') - img1.show() - imd = ImageMultiDiscrete(ds4, transforms='scale') - img1 = Image.fromarray(np.squeeze(imd.get_concatenated_image(2)), 'L') - img1.show() - imd = ImageMultiDiscrete(ds4, transforms='rotate') - img1 = Image.fromarray(np.squeeze(imd.get_concatenated_image(2)), 'L') - img1.show() - imd = ImageMultiDiscrete(ds4, transforms='flip') - img1 = Image.fromarray(np.squeeze(imd.get_concatenated_image(2)), 'L') - img1.show() - - - imd = ImageMultiDiscrete(ds4, transforms='shift') - img1 = Image.fromarray(np.squeeze(imd.get_concatenated_image(1)), 'L') - img1.show() - imd = ImageMultiDiscrete(ds4, transforms='scale') - img1 = Image.fromarray(np.squeeze(imd.get_concatenated_image(1)), 'L') - img1.show() - imd = ImageMultiDiscrete(ds4, transforms='rotate') - img1 = Image.fromarray(np.squeeze(imd.get_concatenated_image(1)), 'L') - img1.show() - imd = ImageMultiDiscrete(ds4, transforms='flip') - img1 = Image.fromarray(np.squeeze(imd.get_concatenated_image(1)), 'L') - img1.show() - - imd = ImageMultiDiscrete(ds4, transforms='shift') - img1 = Image.fromarray(np.squeeze(imd.get_concatenated_image(0)), 'L') - img1.show() - imd = ImageMultiDiscrete(ds4, transforms='scale') - img1 = Image.fromarray(np.squeeze(imd.get_concatenated_image(0)), 'L') - img1.show() - imd = ImageMultiDiscrete(ds4, transforms='rotate') - img1 = Image.fromarray(np.squeeze(imd.get_concatenated_image(0)), 'L') - img1.show() - imd = ImageMultiDiscrete(ds4, transforms='flip') - img1 = Image.fromarray(np.squeeze(imd.get_concatenated_image(0)), 'L') - img1.show()
- - # imd = ImageMultiDiscrete(ds4, 100, 100) - # from PIL import Image - # img1 = Image.fromarray(imd.disjoint_states[0][1], 'L') - - -if __name__ == '__main__': - unittest.main() -
- -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_modules/mdp_playground/spaces/tuple_extended.html b/docs/_build/html/_modules/mdp_playground/spaces/tuple_extended.html deleted file mode 100644 index aa4beb3..0000000 --- a/docs/_build/html/_modules/mdp_playground/spaces/tuple_extended.html +++ /dev/null @@ -1,491 +0,0 @@ - - - - - - - - mdp_playground.spaces.tuple_extended — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -

Source code for mdp_playground.spaces.tuple_extended

-import numpy as np
-import gym
-from gym.spaces import Tuple
-
-
[docs]class TupleExtended(Tuple): - ''' - Currently, this class doesn't do anything special except allowing to seed from __init__(). - ''' - -
[docs] def __init__(self, spaces, seed=None): - super(TupleExtended, self).__init__(spaces) - super(TupleExtended, self).seed(seed=seed)
- - # def sample(self, prob=None, size=1, replace=True): - # sampled = np.squeeze(self.np_random.choice(self.n, size=size, p=prob, replace=replace)) - # if sampled.shape == (): - # sampled = int(sampled) #TODO Just made it an int otherwise np.array(scalar) looks ugly in output. - # return sampled -
- -
- - -
- - -
- -
-
- -
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.analysis.analysis.MDPP_Analysis.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.analysis.analysis.MDPP_Analysis.rst.txt deleted file mode 100644 index 8da7e3e..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.analysis.analysis.MDPP_Analysis.rst.txt +++ /dev/null @@ -1,33 +0,0 @@ -mdp\_playground.analysis.analysis.MDPP\_Analysis -================================================ - -.. currentmodule:: mdp_playground.analysis.analysis - -.. autoclass:: MDPP_Analysis - :members: <-- add at least this line - :show-inheritance: <-- plus I want to show inheritance... - :inherited-members: <-- ...and inherited members too - - - .. automethod:: __init__ - - - .. rubric:: Methods - - .. autosummary:: - - ~MDPP_Analysis.__init__ - ~MDPP_Analysis.gather_stats - ~MDPP_Analysis.get_exp_data - ~MDPP_Analysis.load_data - ~MDPP_Analysis.plot_1d_dimensions - ~MDPP_Analysis.plot_2d_heatmap - ~MDPP_Analysis.plot_bar - ~MDPP_Analysis.plot_learning_curves - ~MDPP_Analysis.plot_radar - - - - - - \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.analysis.analysis.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.analysis.analysis.rst.txt deleted file mode 100644 index 03b72fb..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.analysis.analysis.rst.txt +++ /dev/null @@ -1,31 +0,0 @@ -mdp\_playground.analysis.analysis -================================= - -.. automodule:: mdp_playground.analysis.analysis - - - - - - - - - - - - .. rubric:: Classes - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - - MDPP_Analysis - - - - - - - - - diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.analysis.radar_chart.radar_factory.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.analysis.radar_chart.radar_factory.rst.txt deleted file mode 100644 index b0fe812..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.analysis.radar_chart.radar_factory.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.analysis.radar\_chart.radar\_factory -==================================================== - -.. currentmodule:: mdp_playground.analysis.radar_chart - -.. autofunction:: radar_factory \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.analysis.radar_chart.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.analysis.radar_chart.rst.txt deleted file mode 100644 index 68efda4..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.analysis.radar_chart.rst.txt +++ /dev/null @@ -1,30 +0,0 @@ -mdp\_playground.analysis.radar\_chart -===================================== - -.. automodule:: mdp_playground.analysis.radar_chart - - - - - - - - .. rubric:: Functions - - .. autosummary:: - :toctree: - - radar_factory - - - - - - - - - - - - - diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.analysis.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.analysis.rst.txt deleted file mode 100644 index 1a7989f..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.analysis.rst.txt +++ /dev/null @@ -1,33 +0,0 @@ -mdp\_playground.analysis -======================== - -.. automodule:: mdp_playground.analysis - - - - - - - - - - - - - - - - - - - -.. rubric:: Modules - -.. autosummary:: - :toctree: - :template: custom-module-template.rst - :recursive: - - mdp_playground.analysis.analysis - mdp_playground.analysis.radar_chart - diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.combined_processing.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.combined_processing.rst.txt deleted file mode 100644 index 093aef1..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.combined_processing.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.combined\_processing -======================================================================== - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: combined_processing \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.create_config_space_from_config_dict.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.create_config_space_from_config_dict.rst.txt deleted file mode 100644 index f1cc1c7..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.create_config_space_from_config_dict.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.create\_config\_space\_from\_config\_dict -============================================================================================= - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: create_config_space_from_config_dict \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_atari.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_atari.rst.txt deleted file mode 100644 index 71dd9f1..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_atari.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.create\_gym\_env\_wrapper\_atari -==================================================================================== - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: create_gym_env_wrapper_atari \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_frame_stack_atari.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_frame_stack_atari.rst.txt deleted file mode 100644 index 217325f..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_frame_stack_atari.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.create\_gym\_env\_wrapper\_frame\_stack\_atari -================================================================================================== - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: create_gym_env_wrapper_frame_stack_atari \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_mujoco_wrapper.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_mujoco_wrapper.rst.txt deleted file mode 100644 index 492153a..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_mujoco_wrapper.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.create\_gym\_env\_wrapper\_mujoco\_wrapper -============================================================================================== - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: create_gym_env_wrapper_mujoco_wrapper \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.deepmerge.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.deepmerge.rst.txt deleted file mode 100644 index 3104dea..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.deepmerge.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.deepmerge -============================================================= - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: deepmerge \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.deepmerge_multiple_dicts.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.deepmerge_multiple_dicts.rst.txt deleted file mode 100644 index 7678762..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.deepmerge_multiple_dicts.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.deepmerge\_multiple\_dicts -============================================================================== - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: deepmerge_multiple_dicts \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.get_grid_of_configs.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.get_grid_of_configs.rst.txt deleted file mode 100644 index 7a93e08..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.get_grid_of_configs.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.get\_grid\_of\_configs -========================================================================== - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: get_grid_of_configs \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.get_list_of_varying_configs.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.get_list_of_varying_configs.rst.txt deleted file mode 100644 index a5ba203..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.get_list_of_varying_configs.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.get\_list\_of\_varying\_configs -=================================================================================== - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: get_list_of_varying_configs \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.get_random_configs.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.get_random_configs.rst.txt deleted file mode 100644 index fe92ca6..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.get_random_configs.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.get\_random\_configs -======================================================================== - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: get_random_configs \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.init_ray.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.init_ray.rst.txt deleted file mode 100644 index dc93cc9..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.init_ray.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.init\_ray -============================================================= - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: init_ray \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.init_stats_file.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.init_stats_file.rst.txt deleted file mode 100644 index 47737e5..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.init_stats_file.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.init\_stats\_file -===================================================================== - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: init_stats_file \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.post_processing.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.post_processing.rst.txt deleted file mode 100644 index f57eb60..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.post_processing.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.post\_processing -==================================================================== - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: post_processing \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.process_configs.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.process_configs.rst.txt deleted file mode 100644 index 7e158ac..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.process_configs.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.process\_configs -==================================================================== - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: process_configs \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.rst.txt deleted file mode 100644 index b5742a8..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.rst.txt +++ /dev/null @@ -1,46 +0,0 @@ -mdp\_playground.config\_processor.config\_processor -=================================================== - -.. automodule:: mdp_playground.config_processor.config_processor - - - - - - - - .. rubric:: Functions - - .. autosummary:: - :toctree: - - combined_processing - create_config_space_from_config_dict - create_gym_env_wrapper_atari - create_gym_env_wrapper_frame_stack_atari - create_gym_env_wrapper_mujoco_wrapper - deepmerge - deepmerge_multiple_dicts - get_grid_of_configs - get_list_of_varying_configs - get_random_configs - init_ray - init_stats_file - post_processing - process_configs - setup_ray - setup_ray_callbacks - sobol_configs_from_config_dict - - - - - - - - - - - - - diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.setup_ray.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.setup_ray.rst.txt deleted file mode 100644 index f6577f5..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.setup_ray.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.setup\_ray -============================================================== - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: setup_ray \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.setup_ray_callbacks.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.setup_ray_callbacks.rst.txt deleted file mode 100644 index 53b1b2c..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.setup_ray_callbacks.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.setup\_ray\_callbacks -========================================================================= - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: setup_ray_callbacks \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.sobol_configs_from_config_dict.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.sobol_configs_from_config_dict.rst.txt deleted file mode 100644 index 861cca9..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.config_processor.sobol_configs_from_config_dict.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.config\_processor.config\_processor.sobol\_configs\_from\_config\_dict -====================================================================================== - -.. currentmodule:: mdp_playground.config_processor.config_processor - -.. autofunction:: sobol_configs_from_config_dict \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.rst.txt deleted file mode 100644 index 580b8a0..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.config_processor.rst.txt +++ /dev/null @@ -1,32 +0,0 @@ -mdp\_playground.config\_processor -================================= - -.. automodule:: mdp_playground.config_processor - - - - - - - - - - - - - - - - - - - -.. rubric:: Modules - -.. autosummary:: - :toctree: - :template: custom-module-template.rst - :recursive: - - mdp_playground.config_processor.config_processor - diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.envs.gym_env_wrapper.GymEnvWrapper.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.envs.gym_env_wrapper.GymEnvWrapper.rst.txt deleted file mode 100644 index 6f22959..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.envs.gym_env_wrapper.GymEnvWrapper.rst.txt +++ /dev/null @@ -1,41 +0,0 @@ -mdp\_playground.envs.gym\_env\_wrapper.GymEnvWrapper -==================================================== - -.. currentmodule:: mdp_playground.envs.gym_env_wrapper - -.. autoclass:: GymEnvWrapper - :members: <-- add at least this line - :show-inheritance: <-- plus I want to show inheritance... - :inherited-members: <-- ...and inherited members too - - - .. automethod:: __init__ - - - .. rubric:: Methods - - .. autosummary:: - - ~GymEnvWrapper.__init__ - ~GymEnvWrapper.close - ~GymEnvWrapper.render - ~GymEnvWrapper.reset - ~GymEnvWrapper.seed - ~GymEnvWrapper.step - - - - - - .. rubric:: Attributes - - .. autosummary:: - - ~GymEnvWrapper.action_space - ~GymEnvWrapper.metadata - ~GymEnvWrapper.observation_space - ~GymEnvWrapper.reward_range - ~GymEnvWrapper.spec - ~GymEnvWrapper.unwrapped - - \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.envs.gym_env_wrapper.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.envs.gym_env_wrapper.rst.txt deleted file mode 100644 index d07b529..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.envs.gym_env_wrapper.rst.txt +++ /dev/null @@ -1,31 +0,0 @@ -mdp\_playground.envs.gym\_env\_wrapper -====================================== - -.. automodule:: mdp_playground.envs.gym_env_wrapper - - - - - - - - - - - - .. rubric:: Classes - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - - GymEnvWrapper - - - - - - - - - diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.envs.mujoco_env_wrapper.get_mujoco_wrapper.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.envs.mujoco_env_wrapper.get_mujoco_wrapper.rst.txt deleted file mode 100644 index a674ee6..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.envs.mujoco_env_wrapper.get_mujoco_wrapper.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.envs.mujoco\_env\_wrapper.get\_mujoco\_wrapper -============================================================== - -.. currentmodule:: mdp_playground.envs.mujoco_env_wrapper - -.. autofunction:: get_mujoco_wrapper \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.envs.mujoco_env_wrapper.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.envs.mujoco_env_wrapper.rst.txt deleted file mode 100644 index 147fa86..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.envs.mujoco_env_wrapper.rst.txt +++ /dev/null @@ -1,30 +0,0 @@ -mdp\_playground.envs.mujoco\_env\_wrapper -========================================= - -.. automodule:: mdp_playground.envs.mujoco_env_wrapper - - - - - - - - .. rubric:: Functions - - .. autosummary:: - :toctree: - - get_mujoco_wrapper - - - - - - - - - - - - - diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.envs.rl_toy_env.RLToyEnv.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.envs.rl_toy_env.RLToyEnv.rst.txt deleted file mode 100644 index 32de278..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.envs.rl_toy_env.RLToyEnv.rst.txt +++ /dev/null @@ -1,48 +0,0 @@ -mdp\_playground.envs.rl\_toy\_env.RLToyEnv -========================================== - -.. currentmodule:: mdp_playground.envs.rl_toy_env - -.. autoclass:: RLToyEnv - :members: <-- add at least this line - :show-inheritance: <-- plus I want to show inheritance... - :inherited-members: <-- ...and inherited members too - - - .. automethod:: __init__ - - - .. rubric:: Methods - - .. autosummary:: - - ~RLToyEnv.__init__ - ~RLToyEnv.close - ~RLToyEnv.get_augmented_state - ~RLToyEnv.init_init_state_dist - ~RLToyEnv.init_reward_function - ~RLToyEnv.init_terminal_states - ~RLToyEnv.init_transition_function - ~RLToyEnv.render - ~RLToyEnv.reset - ~RLToyEnv.reward_function - ~RLToyEnv.seed - ~RLToyEnv.step - ~RLToyEnv.transition_function - - - - - - .. rubric:: Attributes - - .. autosummary:: - - ~RLToyEnv.action_space - ~RLToyEnv.metadata - ~RLToyEnv.observation_space - ~RLToyEnv.reward_range - ~RLToyEnv.spec - ~RLToyEnv.unwrapped - - \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.envs.rl_toy_env.dist_of_pt_from_line.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.envs.rl_toy_env.dist_of_pt_from_line.rst.txt deleted file mode 100644 index dddd0d2..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.envs.rl_toy_env.dist_of_pt_from_line.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.envs.rl\_toy\_env.dist\_of\_pt\_from\_line -========================================================== - -.. currentmodule:: mdp_playground.envs.rl_toy_env - -.. autofunction:: dist_of_pt_from_line \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.envs.rl_toy_env.list_to_float_np_array.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.envs.rl_toy_env.list_to_float_np_array.rst.txt deleted file mode 100644 index f454d29..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.envs.rl_toy_env.list_to_float_np_array.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.envs.rl\_toy\_env.list\_to\_float\_np\_array -============================================================ - -.. currentmodule:: mdp_playground.envs.rl_toy_env - -.. autofunction:: list_to_float_np_array \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.envs.rl_toy_env.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.envs.rl_toy_env.rst.txt deleted file mode 100644 index 37ad2c0..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.envs.rl_toy_env.rst.txt +++ /dev/null @@ -1,39 +0,0 @@ -mdp\_playground.envs.rl\_toy\_env -================================= - -.. automodule:: mdp_playground.envs.rl_toy_env - - - - - - - - .. rubric:: Functions - - .. autosummary:: - :toctree: - - dist_of_pt_from_line - list_to_float_np_array - - - - - - .. rubric:: Classes - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - - RLToyEnv - - - - - - - - - diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.envs.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.envs.rst.txt deleted file mode 100644 index bd1ccef..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.envs.rst.txt +++ /dev/null @@ -1,34 +0,0 @@ -mdp\_playground.envs -==================== - -.. automodule:: mdp_playground.envs - - - - - - - - - - - - - - - - - - - -.. rubric:: Modules - -.. autosummary:: - :toctree: - :template: custom-module-template.rst - :recursive: - - mdp_playground.envs.gym_env_wrapper - mdp_playground.envs.mujoco_env_wrapper - mdp_playground.envs.rl_toy_env - diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.rst.txt deleted file mode 100644 index 3cb835f..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.rst.txt +++ /dev/null @@ -1,36 +0,0 @@ -mdp\_playground -=============== - -.. automodule:: mdp_playground - - - - - - - - - - - - - - - - - - - -.. rubric:: Modules - -.. autosummary:: - :toctree: - :template: custom-module-template.rst - :recursive: - - mdp_playground.analysis - mdp_playground.config_processor - mdp_playground.envs - mdp_playground.scripts - mdp_playground.spaces - diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.scripts.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.scripts.rst.txt deleted file mode 100644 index f2ca0ab..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.scripts.rst.txt +++ /dev/null @@ -1,32 +0,0 @@ -mdp\_playground.scripts -======================= - -.. automodule:: mdp_playground.scripts - - - - - - - - - - - - - - - - - - - -.. rubric:: Modules - -.. autosummary:: - :toctree: - :template: custom-module-template.rst - :recursive: - - mdp_playground.scripts.run_experiments - diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.scripts.run_experiments.cli.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.scripts.run_experiments.cli.rst.txt deleted file mode 100644 index ebb6c30..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.scripts.run_experiments.cli.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.scripts.run\_experiments.cli -============================================ - -.. currentmodule:: mdp_playground.scripts.run_experiments - -.. autofunction:: cli \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.scripts.run_experiments.main.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.scripts.run_experiments.main.rst.txt deleted file mode 100644 index bc22eb9..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.scripts.run_experiments.main.rst.txt +++ /dev/null @@ -1,6 +0,0 @@ -mdp\_playground.scripts.run\_experiments.main -============================================= - -.. currentmodule:: mdp_playground.scripts.run_experiments - -.. autofunction:: main \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.scripts.run_experiments.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.scripts.run_experiments.rst.txt deleted file mode 100644 index 6167d3f..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.scripts.run_experiments.rst.txt +++ /dev/null @@ -1,31 +0,0 @@ -mdp\_playground.scripts.run\_experiments -======================================== - -.. automodule:: mdp_playground.scripts.run_experiments - - - - - - - - .. rubric:: Functions - - .. autosummary:: - :toctree: - - cli - main - - - - - - - - - - - - - diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.box_extended.BoxExtended.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.box_extended.BoxExtended.rst.txt deleted file mode 100644 index e282a07..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.box_extended.BoxExtended.rst.txt +++ /dev/null @@ -1,31 +0,0 @@ -mdp\_playground.spaces.box\_extended.BoxExtended -================================================ - -.. currentmodule:: mdp_playground.spaces.box_extended - -.. autoclass:: BoxExtended - :members: <-- add at least this line - :show-inheritance: <-- plus I want to show inheritance... - :inherited-members: <-- ...and inherited members too - - - .. automethod:: __init__ - - - .. rubric:: Methods - - .. autosummary:: - - ~BoxExtended.__init__ - ~BoxExtended.contains - ~BoxExtended.from_jsonable - ~BoxExtended.is_bounded - ~BoxExtended.sample - ~BoxExtended.seed - ~BoxExtended.to_jsonable - - - - - - \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.box_extended.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.box_extended.rst.txt deleted file mode 100644 index cfcc644..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.box_extended.rst.txt +++ /dev/null @@ -1,31 +0,0 @@ -mdp\_playground.spaces.box\_extended -==================================== - -.. automodule:: mdp_playground.spaces.box_extended - - - - - - - - - - - - .. rubric:: Classes - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - - BoxExtended - - - - - - - - - diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.discrete_extended.DiscreteExtended.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.discrete_extended.DiscreteExtended.rst.txt deleted file mode 100644 index f9fe31f..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.discrete_extended.DiscreteExtended.rst.txt +++ /dev/null @@ -1,30 +0,0 @@ -mdp\_playground.spaces.discrete\_extended.DiscreteExtended -========================================================== - -.. currentmodule:: mdp_playground.spaces.discrete_extended - -.. autoclass:: DiscreteExtended - :members: <-- add at least this line - :show-inheritance: <-- plus I want to show inheritance... - :inherited-members: <-- ...and inherited members too - - - .. automethod:: __init__ - - - .. rubric:: Methods - - .. autosummary:: - - ~DiscreteExtended.__init__ - ~DiscreteExtended.contains - ~DiscreteExtended.from_jsonable - ~DiscreteExtended.sample - ~DiscreteExtended.seed - ~DiscreteExtended.to_jsonable - - - - - - \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.discrete_extended.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.discrete_extended.rst.txt deleted file mode 100644 index 5afdc8e..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.discrete_extended.rst.txt +++ /dev/null @@ -1,31 +0,0 @@ -mdp\_playground.spaces.discrete\_extended -========================================= - -.. automodule:: mdp_playground.spaces.discrete_extended - - - - - - - - - - - - .. rubric:: Classes - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - - DiscreteExtended - - - - - - - - - diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.image_continuous.ImageContinuous.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.image_continuous.ImageContinuous.rst.txt deleted file mode 100644 index e7c188d..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.image_continuous.ImageContinuous.rst.txt +++ /dev/null @@ -1,34 +0,0 @@ -mdp\_playground.spaces.image\_continuous.ImageContinuous -======================================================== - -.. currentmodule:: mdp_playground.spaces.image_continuous - -.. autoclass:: ImageContinuous - :members: <-- add at least this line - :show-inheritance: <-- plus I want to show inheritance... - :inherited-members: <-- ...and inherited members too - - - .. automethod:: __init__ - - - .. rubric:: Methods - - .. autosummary:: - - ~ImageContinuous.__init__ - ~ImageContinuous.contains - ~ImageContinuous.convert_to_pixel - ~ImageContinuous.from_jsonable - ~ImageContinuous.generate_image - ~ImageContinuous.get_concatenated_image - ~ImageContinuous.is_bounded - ~ImageContinuous.sample - ~ImageContinuous.seed - ~ImageContinuous.to_jsonable - - - - - - \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.image_continuous.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.image_continuous.rst.txt deleted file mode 100644 index 79292e9..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.image_continuous.rst.txt +++ /dev/null @@ -1,31 +0,0 @@ -mdp\_playground.spaces.image\_continuous -======================================== - -.. automodule:: mdp_playground.spaces.image_continuous - - - - - - - - - - - - .. rubric:: Classes - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - - ImageContinuous - - - - - - - - - diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.image_multi_discrete.ImageMultiDiscrete.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.image_multi_discrete.ImageMultiDiscrete.rst.txt deleted file mode 100644 index 8759dc6..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.image_multi_discrete.ImageMultiDiscrete.rst.txt +++ /dev/null @@ -1,33 +0,0 @@ -mdp\_playground.spaces.image\_multi\_discrete.ImageMultiDiscrete -================================================================ - -.. currentmodule:: mdp_playground.spaces.image_multi_discrete - -.. autoclass:: ImageMultiDiscrete - :members: <-- add at least this line - :show-inheritance: <-- plus I want to show inheritance... - :inherited-members: <-- ...and inherited members too - - - .. automethod:: __init__ - - - .. rubric:: Methods - - .. autosummary:: - - ~ImageMultiDiscrete.__init__ - ~ImageMultiDiscrete.contains - ~ImageMultiDiscrete.from_jsonable - ~ImageMultiDiscrete.generate_image - ~ImageMultiDiscrete.get_concatenated_image - ~ImageMultiDiscrete.is_bounded - ~ImageMultiDiscrete.sample - ~ImageMultiDiscrete.seed - ~ImageMultiDiscrete.to_jsonable - - - - - - \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.image_multi_discrete.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.image_multi_discrete.rst.txt deleted file mode 100644 index 6c2c8c8..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.image_multi_discrete.rst.txt +++ /dev/null @@ -1,31 +0,0 @@ -mdp\_playground.spaces.image\_multi\_discrete -============================================= - -.. automodule:: mdp_playground.spaces.image_multi_discrete - - - - - - - - - - - - .. rubric:: Classes - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - - ImageMultiDiscrete - - - - - - - - - diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.multi_discrete_extended.MultiDiscreteExtended.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.multi_discrete_extended.MultiDiscreteExtended.rst.txt deleted file mode 100644 index d3c6a7f..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.multi_discrete_extended.MultiDiscreteExtended.rst.txt +++ /dev/null @@ -1,30 +0,0 @@ -mdp\_playground.spaces.multi\_discrete\_extended.MultiDiscreteExtended -====================================================================== - -.. currentmodule:: mdp_playground.spaces.multi_discrete_extended - -.. autoclass:: MultiDiscreteExtended - :members: <-- add at least this line - :show-inheritance: <-- plus I want to show inheritance... - :inherited-members: <-- ...and inherited members too - - - .. automethod:: __init__ - - - .. rubric:: Methods - - .. autosummary:: - - ~MultiDiscreteExtended.__init__ - ~MultiDiscreteExtended.contains - ~MultiDiscreteExtended.from_jsonable - ~MultiDiscreteExtended.sample - ~MultiDiscreteExtended.seed - ~MultiDiscreteExtended.to_jsonable - - - - - - \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.multi_discrete_extended.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.multi_discrete_extended.rst.txt deleted file mode 100644 index d3a62d4..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.multi_discrete_extended.rst.txt +++ /dev/null @@ -1,31 +0,0 @@ -mdp\_playground.spaces.multi\_discrete\_extended -================================================ - -.. automodule:: mdp_playground.spaces.multi_discrete_extended - - - - - - - - - - - - .. rubric:: Classes - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - - MultiDiscreteExtended - - - - - - - - - diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.rst.txt deleted file mode 100644 index 31538c8..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.rst.txt +++ /dev/null @@ -1,39 +0,0 @@ -mdp\_playground.spaces -====================== - -.. automodule:: mdp_playground.spaces - - - - - - - - - - - - - - - - - - - -.. rubric:: Modules - -.. autosummary:: - :toctree: - :template: custom-module-template.rst - :recursive: - - mdp_playground.spaces.box_extended - mdp_playground.spaces.discrete_extended - mdp_playground.spaces.image_continuous - mdp_playground.spaces.image_multi_discrete - mdp_playground.spaces.multi_discrete_extended - mdp_playground.spaces.test_image_continuous - mdp_playground.spaces.test_image_multi_discrete - mdp_playground.spaces.tuple_extended - diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.test_image_continuous.TestImageContinuous.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.test_image_continuous.TestImageContinuous.rst.txt deleted file mode 100644 index d44cd67..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.test_image_continuous.TestImageContinuous.rst.txt +++ /dev/null @@ -1,97 +0,0 @@ -mdp\_playground.spaces.test\_image\_continuous.TestImageContinuous -================================================================== - -.. currentmodule:: mdp_playground.spaces.test_image_continuous - -.. autoclass:: TestImageContinuous - :members: <-- add at least this line - :show-inheritance: <-- plus I want to show inheritance... - :inherited-members: <-- ...and inherited members too - - - .. automethod:: __init__ - - - .. rubric:: Methods - - .. autosummary:: - - ~TestImageContinuous.__init__ - ~TestImageContinuous.addCleanup - ~TestImageContinuous.addTypeEqualityFunc - ~TestImageContinuous.assertAlmostEqual - ~TestImageContinuous.assertAlmostEquals - ~TestImageContinuous.assertCountEqual - ~TestImageContinuous.assertDictContainsSubset - ~TestImageContinuous.assertDictEqual - ~TestImageContinuous.assertEqual - ~TestImageContinuous.assertEquals - ~TestImageContinuous.assertFalse - ~TestImageContinuous.assertGreater - ~TestImageContinuous.assertGreaterEqual - ~TestImageContinuous.assertIn - ~TestImageContinuous.assertIs - ~TestImageContinuous.assertIsInstance - ~TestImageContinuous.assertIsNone - ~TestImageContinuous.assertIsNot - ~TestImageContinuous.assertIsNotNone - ~TestImageContinuous.assertLess - ~TestImageContinuous.assertLessEqual - ~TestImageContinuous.assertListEqual - ~TestImageContinuous.assertLogs - ~TestImageContinuous.assertMultiLineEqual - ~TestImageContinuous.assertNotAlmostEqual - ~TestImageContinuous.assertNotAlmostEquals - ~TestImageContinuous.assertNotEqual - ~TestImageContinuous.assertNotEquals - ~TestImageContinuous.assertNotIn - ~TestImageContinuous.assertNotIsInstance - ~TestImageContinuous.assertNotRegex - ~TestImageContinuous.assertNotRegexpMatches - ~TestImageContinuous.assertRaises - ~TestImageContinuous.assertRaisesRegex - ~TestImageContinuous.assertRaisesRegexp - ~TestImageContinuous.assertRegex - ~TestImageContinuous.assertRegexpMatches - ~TestImageContinuous.assertSequenceEqual - ~TestImageContinuous.assertSetEqual - ~TestImageContinuous.assertTrue - ~TestImageContinuous.assertTupleEqual - ~TestImageContinuous.assertWarns - ~TestImageContinuous.assertWarnsRegex - ~TestImageContinuous.assert_ - ~TestImageContinuous.countTestCases - ~TestImageContinuous.debug - ~TestImageContinuous.defaultTestResult - ~TestImageContinuous.doCleanups - ~TestImageContinuous.fail - ~TestImageContinuous.failIf - ~TestImageContinuous.failIfAlmostEqual - ~TestImageContinuous.failIfEqual - ~TestImageContinuous.failUnless - ~TestImageContinuous.failUnlessAlmostEqual - ~TestImageContinuous.failUnlessEqual - ~TestImageContinuous.failUnlessRaises - ~TestImageContinuous.id - ~TestImageContinuous.run - ~TestImageContinuous.setUp - ~TestImageContinuous.setUpClass - ~TestImageContinuous.shortDescription - ~TestImageContinuous.skipTest - ~TestImageContinuous.subTest - ~TestImageContinuous.tearDown - ~TestImageContinuous.tearDownClass - ~TestImageContinuous.test_image_continuous - - - - - - .. rubric:: Attributes - - .. autosummary:: - - ~TestImageContinuous.longMessage - ~TestImageContinuous.maxDiff - - \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.test_image_continuous.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.test_image_continuous.rst.txt deleted file mode 100644 index fe148bd..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.test_image_continuous.rst.txt +++ /dev/null @@ -1,31 +0,0 @@ -mdp\_playground.spaces.test\_image\_continuous -============================================== - -.. automodule:: mdp_playground.spaces.test_image_continuous - - - - - - - - - - - - .. rubric:: Classes - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - - TestImageContinuous - - - - - - - - - diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.test_image_multi_discrete.TestImageMultiDiscrete.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.test_image_multi_discrete.TestImageMultiDiscrete.rst.txt deleted file mode 100644 index 227f542..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.test_image_multi_discrete.TestImageMultiDiscrete.rst.txt +++ /dev/null @@ -1,97 +0,0 @@ -mdp\_playground.spaces.test\_image\_multi\_discrete.TestImageMultiDiscrete -========================================================================== - -.. currentmodule:: mdp_playground.spaces.test_image_multi_discrete - -.. autoclass:: TestImageMultiDiscrete - :members: <-- add at least this line - :show-inheritance: <-- plus I want to show inheritance... - :inherited-members: <-- ...and inherited members too - - - .. automethod:: __init__ - - - .. rubric:: Methods - - .. autosummary:: - - ~TestImageMultiDiscrete.__init__ - ~TestImageMultiDiscrete.addCleanup - ~TestImageMultiDiscrete.addTypeEqualityFunc - ~TestImageMultiDiscrete.assertAlmostEqual - ~TestImageMultiDiscrete.assertAlmostEquals - ~TestImageMultiDiscrete.assertCountEqual - ~TestImageMultiDiscrete.assertDictContainsSubset - ~TestImageMultiDiscrete.assertDictEqual - ~TestImageMultiDiscrete.assertEqual - ~TestImageMultiDiscrete.assertEquals - ~TestImageMultiDiscrete.assertFalse - ~TestImageMultiDiscrete.assertGreater - ~TestImageMultiDiscrete.assertGreaterEqual - ~TestImageMultiDiscrete.assertIn - ~TestImageMultiDiscrete.assertIs - ~TestImageMultiDiscrete.assertIsInstance - ~TestImageMultiDiscrete.assertIsNone - ~TestImageMultiDiscrete.assertIsNot - ~TestImageMultiDiscrete.assertIsNotNone - ~TestImageMultiDiscrete.assertLess - ~TestImageMultiDiscrete.assertLessEqual - ~TestImageMultiDiscrete.assertListEqual - ~TestImageMultiDiscrete.assertLogs - ~TestImageMultiDiscrete.assertMultiLineEqual - ~TestImageMultiDiscrete.assertNotAlmostEqual - ~TestImageMultiDiscrete.assertNotAlmostEquals - ~TestImageMultiDiscrete.assertNotEqual - ~TestImageMultiDiscrete.assertNotEquals - ~TestImageMultiDiscrete.assertNotIn - ~TestImageMultiDiscrete.assertNotIsInstance - ~TestImageMultiDiscrete.assertNotRegex - ~TestImageMultiDiscrete.assertNotRegexpMatches - ~TestImageMultiDiscrete.assertRaises - ~TestImageMultiDiscrete.assertRaisesRegex - ~TestImageMultiDiscrete.assertRaisesRegexp - ~TestImageMultiDiscrete.assertRegex - ~TestImageMultiDiscrete.assertRegexpMatches - ~TestImageMultiDiscrete.assertSequenceEqual - ~TestImageMultiDiscrete.assertSetEqual - ~TestImageMultiDiscrete.assertTrue - ~TestImageMultiDiscrete.assertTupleEqual - ~TestImageMultiDiscrete.assertWarns - ~TestImageMultiDiscrete.assertWarnsRegex - ~TestImageMultiDiscrete.assert_ - ~TestImageMultiDiscrete.countTestCases - ~TestImageMultiDiscrete.debug - ~TestImageMultiDiscrete.defaultTestResult - ~TestImageMultiDiscrete.doCleanups - ~TestImageMultiDiscrete.fail - ~TestImageMultiDiscrete.failIf - ~TestImageMultiDiscrete.failIfAlmostEqual - ~TestImageMultiDiscrete.failIfEqual - ~TestImageMultiDiscrete.failUnless - ~TestImageMultiDiscrete.failUnlessAlmostEqual - ~TestImageMultiDiscrete.failUnlessEqual - ~TestImageMultiDiscrete.failUnlessRaises - ~TestImageMultiDiscrete.id - ~TestImageMultiDiscrete.run - ~TestImageMultiDiscrete.setUp - ~TestImageMultiDiscrete.setUpClass - ~TestImageMultiDiscrete.shortDescription - ~TestImageMultiDiscrete.skipTest - ~TestImageMultiDiscrete.subTest - ~TestImageMultiDiscrete.tearDown - ~TestImageMultiDiscrete.tearDownClass - ~TestImageMultiDiscrete.test_image_multi_discrete - - - - - - .. rubric:: Attributes - - .. autosummary:: - - ~TestImageMultiDiscrete.longMessage - ~TestImageMultiDiscrete.maxDiff - - \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.test_image_multi_discrete.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.test_image_multi_discrete.rst.txt deleted file mode 100644 index c6cda6e..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.test_image_multi_discrete.rst.txt +++ /dev/null @@ -1,31 +0,0 @@ -mdp\_playground.spaces.test\_image\_multi\_discrete -=================================================== - -.. automodule:: mdp_playground.spaces.test_image_multi_discrete - - - - - - - - - - - - .. rubric:: Classes - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - - TestImageMultiDiscrete - - - - - - - - - diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.tuple_extended.TupleExtended.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.tuple_extended.TupleExtended.rst.txt deleted file mode 100644 index d6a2459..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.tuple_extended.TupleExtended.rst.txt +++ /dev/null @@ -1,30 +0,0 @@ -mdp\_playground.spaces.tuple\_extended.TupleExtended -==================================================== - -.. currentmodule:: mdp_playground.spaces.tuple_extended - -.. autoclass:: TupleExtended - :members: <-- add at least this line - :show-inheritance: <-- plus I want to show inheritance... - :inherited-members: <-- ...and inherited members too - - - .. automethod:: __init__ - - - .. rubric:: Methods - - .. autosummary:: - - ~TupleExtended.__init__ - ~TupleExtended.contains - ~TupleExtended.from_jsonable - ~TupleExtended.sample - ~TupleExtended.seed - ~TupleExtended.to_jsonable - - - - - - \ No newline at end of file diff --git a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.tuple_extended.rst.txt b/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.tuple_extended.rst.txt deleted file mode 100644 index 90f83a6..0000000 --- a/docs/_build/html/_sources/_autosummary/mdp_playground.spaces.tuple_extended.rst.txt +++ /dev/null @@ -1,31 +0,0 @@ -mdp\_playground.spaces.tuple\_extended -====================================== - -.. automodule:: mdp_playground.spaces.tuple_extended - - - - - - - - - - - - .. rubric:: Classes - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - - TupleExtended - - - - - - - - - diff --git a/docs/_build/html/_sources/index.rst.txt b/docs/_build/html/_sources/index.rst.txt deleted file mode 100644 index 3286cdd..0000000 --- a/docs/_build/html/_sources/index.rst.txt +++ /dev/null @@ -1,11 +0,0 @@ -Welcome to MDPP's documentation! -================================== - -For now, this only contains docs automatically generated from the code's docblocks. - -.. autosummary:: - :toctree: _autosummary - :template: custom-module-template.rst - :recursive: - - mdp_playground diff --git a/docs/_build/html/_static/__init__.py b/docs/_build/html/_static/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/docs/_build/html/_static/basic.css b/docs/_build/html/_static/basic.css deleted file mode 100644 index 5d8ae08..0000000 --- a/docs/_build/html/_static/basic.css +++ /dev/null @@ -1,861 +0,0 @@ -/* - * basic.css - * ~~~~~~~~~ - * - * Sphinx stylesheet -- basic theme. - * - * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/* -- main layout ----------------------------------------------------------- */ - -div.clearer { - clear: both; -} - -div.section::after { - display: block; - content: ''; - clear: left; -} - -/* -- relbar ---------------------------------------------------------------- */ - -div.related { - width: 100%; - font-size: 90%; -} - -div.related h3 { - display: none; -} - -div.related ul { - margin: 0; - padding: 0 0 0 10px; - list-style: none; -} - -div.related li { - display: inline; -} - -div.related li.right { - float: right; - margin-right: 5px; -} - -/* -- sidebar --------------------------------------------------------------- */ - -div.sphinxsidebarwrapper { - padding: 10px 5px 0 10px; -} - -div.sphinxsidebar { - float: left; - width: 270px; - margin-left: -100%; - font-size: 90%; - word-wrap: break-word; - overflow-wrap : break-word; -} - -div.sphinxsidebar ul { - list-style: none; -} - -div.sphinxsidebar ul ul, -div.sphinxsidebar ul.want-points { - margin-left: 20px; - list-style: square; -} - -div.sphinxsidebar ul ul { - margin-top: 0; - margin-bottom: 0; -} - -div.sphinxsidebar form { - margin-top: 10px; -} - -div.sphinxsidebar input { - border: 1px solid #98dbcc; - font-family: sans-serif; - font-size: 1em; -} - -div.sphinxsidebar #searchbox form.search { - overflow: hidden; -} - -div.sphinxsidebar #searchbox input[type="text"] { - float: left; - width: 80%; - padding: 0.25em; - box-sizing: border-box; -} - -div.sphinxsidebar #searchbox input[type="submit"] { - float: left; - width: 20%; - border-left: none; - padding: 0.25em; - box-sizing: border-box; -} - - -img { - border: 0; - max-width: 100%; -} - -/* -- search page ----------------------------------------------------------- */ - -ul.search { - margin: 10px 0 0 20px; - padding: 0; -} - -ul.search li { - padding: 5px 0 5px 20px; - background-image: url(file.png); - background-repeat: no-repeat; - background-position: 0 7px; -} - -ul.search li a { - font-weight: bold; -} - -ul.search li div.context { - color: #888; - margin: 2px 0 0 30px; - text-align: left; -} - -ul.keywordmatches li.goodmatch a { - font-weight: bold; -} - -/* -- index page ------------------------------------------------------------ */ - -table.contentstable { - width: 90%; - margin-left: auto; - margin-right: auto; -} - -table.contentstable p.biglink { - line-height: 150%; -} - -a.biglink { - font-size: 1.3em; -} - -span.linkdescr { - font-style: italic; - padding-top: 5px; - font-size: 90%; -} - -/* -- general index --------------------------------------------------------- */ - -table.indextable { - width: 100%; -} - -table.indextable td { - text-align: left; - vertical-align: top; -} - -table.indextable ul { - margin-top: 0; - margin-bottom: 0; - list-style-type: none; -} - -table.indextable > tbody > tr > td > ul { - padding-left: 0em; -} - -table.indextable tr.pcap { - height: 10px; -} - -table.indextable tr.cap { - margin-top: 10px; - background-color: #f2f2f2; -} - -img.toggler { - margin-right: 3px; - margin-top: 3px; - cursor: pointer; -} - -div.modindex-jumpbox { - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - margin: 1em 0 1em 0; - padding: 0.4em; -} - -div.genindex-jumpbox { - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - margin: 1em 0 1em 0; - padding: 0.4em; -} - -/* -- domain module index --------------------------------------------------- */ - -table.modindextable td { - padding: 2px; - border-collapse: collapse; -} - -/* -- general body styles --------------------------------------------------- */ - -div.body { - min-width: 450px; - max-width: 800px; -} - -div.body p, div.body dd, div.body li, div.body blockquote { - -moz-hyphens: auto; - -ms-hyphens: auto; - -webkit-hyphens: auto; - hyphens: auto; -} - -a.headerlink { - visibility: hidden; -} - -a.brackets:before, -span.brackets > a:before{ - content: "["; -} - -a.brackets:after, -span.brackets > a:after { - content: "]"; -} - -h1:hover > a.headerlink, -h2:hover > a.headerlink, -h3:hover > a.headerlink, -h4:hover > a.headerlink, -h5:hover > a.headerlink, -h6:hover > a.headerlink, -dt:hover > a.headerlink, -caption:hover > a.headerlink, -p.caption:hover > a.headerlink, -div.code-block-caption:hover > a.headerlink { - visibility: visible; -} - -div.body p.caption { - text-align: inherit; -} - -div.body td { - text-align: left; -} - -.first { - margin-top: 0 !important; -} - -p.rubric { - margin-top: 30px; - font-weight: bold; -} - -img.align-left, figure.align-left, .figure.align-left, object.align-left { - clear: left; - float: left; - margin-right: 1em; -} - -img.align-right, figure.align-right, .figure.align-right, object.align-right { - clear: right; - float: right; - margin-left: 1em; -} - -img.align-center, figure.align-center, .figure.align-center, object.align-center { - display: block; - margin-left: auto; - margin-right: auto; -} - -img.align-default, figure.align-default, .figure.align-default { - display: block; - margin-left: auto; - margin-right: auto; -} - -.align-left { - text-align: left; -} - -.align-center { - text-align: center; -} - -.align-default { - text-align: center; -} - -.align-right { - text-align: right; -} - -/* -- sidebars -------------------------------------------------------------- */ - -div.sidebar, -aside.sidebar { - margin: 0 0 0.5em 1em; - border: 1px solid #ddb; - padding: 7px; - background-color: #ffe; - width: 40%; - float: right; - clear: right; - overflow-x: auto; -} - -p.sidebar-title { - font-weight: bold; -} - -div.admonition, div.topic, blockquote { - clear: left; -} - -/* -- topics ---------------------------------------------------------------- */ - -div.topic { - border: 1px solid #ccc; - padding: 7px; - margin: 10px 0 10px 0; -} - -p.topic-title { - font-size: 1.1em; - font-weight: bold; - margin-top: 10px; -} - -/* -- admonitions ----------------------------------------------------------- */ - -div.admonition { - margin-top: 10px; - margin-bottom: 10px; - padding: 7px; -} - -div.admonition dt { - font-weight: bold; -} - -p.admonition-title { - margin: 0px 10px 5px 0px; - font-weight: bold; -} - -div.body p.centered { - text-align: center; - margin-top: 25px; -} - -/* -- content of sidebars/topics/admonitions -------------------------------- */ - -div.sidebar > :last-child, -aside.sidebar > :last-child, -div.topic > :last-child, -div.admonition > :last-child { - margin-bottom: 0; -} - -div.sidebar::after, -aside.sidebar::after, -div.topic::after, -div.admonition::after, -blockquote::after { - display: block; - content: ''; - clear: both; -} - -/* -- tables ---------------------------------------------------------------- */ - -table.docutils { - margin-top: 10px; - margin-bottom: 10px; - border: 0; - border-collapse: collapse; -} - -table.align-center { - margin-left: auto; - margin-right: auto; -} - -table.align-default { - margin-left: auto; - margin-right: auto; -} - -table caption span.caption-number { - font-style: italic; -} - -table caption span.caption-text { -} - -table.docutils td, table.docutils th { - padding: 1px 8px 1px 5px; - border-top: 0; - border-left: 0; - border-right: 0; - border-bottom: 1px solid #aaa; -} - -table.footnote td, table.footnote th { - border: 0 !important; -} - -th { - text-align: left; - padding-right: 5px; -} - -table.citation { - border-left: solid 1px gray; - margin-left: 1px; -} - -table.citation td { - border-bottom: none; -} - -th > :first-child, -td > :first-child { - margin-top: 0px; -} - -th > :last-child, -td > :last-child { - margin-bottom: 0px; -} - -/* -- figures --------------------------------------------------------------- */ - -div.figure, figure { - margin: 0.5em; - padding: 0.5em; -} - -div.figure p.caption, figcaption { - padding: 0.3em; -} - -div.figure p.caption span.caption-number, -figcaption span.caption-number { - font-style: italic; -} - -div.figure p.caption span.caption-text, -figcaption span.caption-text { -} - -/* -- field list styles ----------------------------------------------------- */ - -table.field-list td, table.field-list th { - border: 0 !important; -} - -.field-list ul { - margin: 0; - padding-left: 1em; -} - -.field-list p { - margin: 0; -} - -.field-name { - -moz-hyphens: manual; - -ms-hyphens: manual; - -webkit-hyphens: manual; - hyphens: manual; -} - -/* -- hlist styles ---------------------------------------------------------- */ - -table.hlist { - margin: 1em 0; -} - -table.hlist td { - vertical-align: top; -} - - -/* -- other body styles ----------------------------------------------------- */ - -ol.arabic { - list-style: decimal; -} - -ol.loweralpha { - list-style: lower-alpha; -} - -ol.upperalpha { - list-style: upper-alpha; -} - -ol.lowerroman { - list-style: lower-roman; -} - -ol.upperroman { - list-style: upper-roman; -} - -:not(li) > ol > li:first-child > :first-child, -:not(li) > ul > li:first-child > :first-child { - margin-top: 0px; -} - -:not(li) > ol > li:last-child > :last-child, -:not(li) > ul > li:last-child > :last-child { - margin-bottom: 0px; -} - -ol.simple ol p, -ol.simple ul p, -ul.simple ol p, -ul.simple ul p { - margin-top: 0; -} - -ol.simple > li:not(:first-child) > p, -ul.simple > li:not(:first-child) > p { - margin-top: 0; -} - -ol.simple p, -ul.simple p { - margin-bottom: 0; -} - -dl.footnote > dt, -dl.citation > dt { - float: left; - margin-right: 0.5em; -} - -dl.footnote > dd, -dl.citation > dd { - margin-bottom: 0em; -} - -dl.footnote > dd:after, -dl.citation > dd:after { - content: ""; - clear: both; -} - -dl.field-list { - display: grid; - grid-template-columns: fit-content(30%) auto; -} - -dl.field-list > dt { - font-weight: bold; - word-break: break-word; - padding-left: 0.5em; - padding-right: 5px; -} - -dl.field-list > dt:after { - content: ":"; -} - -dl.field-list > dd { - padding-left: 0.5em; - margin-top: 0em; - margin-left: 0em; - margin-bottom: 0em; -} - -dl { - margin-bottom: 15px; -} - -dd > :first-child { - margin-top: 0px; -} - -dd ul, dd table { - margin-bottom: 10px; -} - -dd { - margin-top: 3px; - margin-bottom: 10px; - margin-left: 30px; -} - -dl > dd:last-child, -dl > dd:last-child > :last-child { - margin-bottom: 0; -} - -dt:target, span.highlighted { - background-color: #fbe54e; -} - -rect.highlighted { - fill: #fbe54e; -} - -dl.glossary dt { - font-weight: bold; - font-size: 1.1em; -} - -.optional { - font-size: 1.3em; -} - -.sig-paren { - font-size: larger; -} - -.versionmodified { - font-style: italic; -} - -.system-message { - background-color: #fda; - padding: 5px; - border: 3px solid red; -} - -.footnote:target { - background-color: #ffa; -} - -.line-block { - display: block; - margin-top: 1em; - margin-bottom: 1em; -} - -.line-block .line-block { - margin-top: 0; - margin-bottom: 0; - margin-left: 1.5em; -} - -.guilabel, .menuselection { - font-family: sans-serif; -} - -.accelerator { - text-decoration: underline; -} - -.classifier { - font-style: oblique; -} - -.classifier:before { - font-style: normal; - margin: 0.5em; - content: ":"; -} - -abbr, acronym { - border-bottom: dotted 1px; - cursor: help; -} - -/* -- code displays --------------------------------------------------------- */ - -pre { - overflow: auto; - overflow-y: hidden; /* fixes display issues on Chrome browsers */ -} - -pre, div[class*="highlight-"] { - clear: both; -} - -span.pre { - -moz-hyphens: none; - -ms-hyphens: none; - -webkit-hyphens: none; - hyphens: none; -} - -div[class*="highlight-"] { - margin: 1em 0; -} - -td.linenos pre { - border: 0; - background-color: transparent; - color: #aaa; -} - -table.highlighttable { - display: block; -} - -table.highlighttable tbody { - display: block; -} - -table.highlighttable tr { - display: flex; -} - -table.highlighttable td { - margin: 0; - padding: 0; -} - -table.highlighttable td.linenos { - padding-right: 0.5em; -} - -table.highlighttable td.code { - flex: 1; - overflow: hidden; -} - -.highlight .hll { - display: block; -} - -div.highlight pre, -table.highlighttable pre { - margin: 0; -} - -div.code-block-caption + div { - margin-top: 0; -} - -div.code-block-caption { - margin-top: 1em; - padding: 2px 5px; - font-size: small; -} - -div.code-block-caption code { - background-color: transparent; -} - -table.highlighttable td.linenos, -span.linenos, -div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */ - user-select: none; -} - -div.code-block-caption span.caption-number { - padding: 0.1em 0.3em; - font-style: italic; -} - -div.code-block-caption span.caption-text { -} - -div.literal-block-wrapper { - margin: 1em 0; -} - -code.descname { - background-color: transparent; - font-weight: bold; - font-size: 1.2em; -} - -code.descclassname { - background-color: transparent; -} - -code.xref, a code { - background-color: transparent; - font-weight: bold; -} - -h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { - background-color: transparent; -} - -.viewcode-link { - float: right; -} - -.viewcode-back { - float: right; - font-family: sans-serif; -} - -div.viewcode-block:target { - margin: -1px -10px; - padding: 0 10px; -} - -/* -- math display ---------------------------------------------------------- */ - -img.math { - vertical-align: middle; -} - -div.body div.math p { - text-align: center; -} - -span.eqno { - float: right; -} - -span.eqno a.headerlink { - position: absolute; - z-index: 1; -} - -div.math:hover a.headerlink { - visibility: visible; -} - -/* -- printout stylesheet --------------------------------------------------- */ - -@media print { - div.document, - div.documentwrapper, - div.bodywrapper { - margin: 0 !important; - width: 100%; - } - - div.sphinxsidebar, - div.related, - div.footer, - #top-link { - display: none; - } -} \ No newline at end of file diff --git a/docs/_build/html/_static/css/index.c5995385ac14fb8791e8eb36b4908be2.css b/docs/_build/html/_static/css/index.c5995385ac14fb8791e8eb36b4908be2.css deleted file mode 100644 index 655656d..0000000 --- a/docs/_build/html/_static/css/index.c5995385ac14fb8791e8eb36b4908be2.css +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * Bootstrap v4.5.0 (https://getbootstrap.com/) - * Copyright 2011-2020 The Bootstrap Authors - * Copyright 2011-2020 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */:root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#007bff;--secondary:#6c757d;--success:#28a745;--info:#17a2b8;--warning:#ffc107;--danger:#dc3545;--light:#f8f9fa;--dark:#343a40;--breakpoint-xs:0;--breakpoint-sm:540px;--breakpoint-md:720px;--breakpoint-lg:960px;--breakpoint-xl:1200px;--font-family-sans-serif:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}*,:after,:before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-size:1rem;line-height:1.5;color:#212529;text-align:left}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;text-decoration:underline dotted;cursor:help;border-bottom:0;text-decoration-skip-ink:none}address{font-style:normal;line-height:inherit}address,dl,ol,ul{margin-bottom:1rem}dl,ol,ul{margin-top:0}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;background-color:transparent}a:hover{color:#0056b3}a:not([href]),a:not([href]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{border-style:none}img,svg{vertical-align:middle}svg{overflow:hidden}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:2.5rem}.h2,h2{font-size:2rem}.h3,h3{font-size:1.75rem}.h4,h4{font-size:1.5rem}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:6rem}.display-1,.display-2{font-weight:300;line-height:1.2}.display-2{font-size:5.5rem}.display-3{font-size:4.5rem}.display-3,.display-4{font-weight:300;line-height:1.2}.display-4{font-size:3.5rem}hr{margin-top:1rem;margin-bottom:1rem;border-top:1px solid rgba(0,0,0,.1)}.small,small{font-size:80%;font-weight:400}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-inline,.list-unstyled{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:90%;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote-footer{display:block;font-size:80%;color:#6c757d}.blockquote-footer:before{content:"\2014\00A0"}.img-fluid,.img-thumbnail{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid #dee2e6;border-radius:.25rem}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:90%;color:#6c757d}code{font-size:87.5%;color:#e83e8c;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:87.5%;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:100%;font-weight:700}pre{display:block;font-size:87.5%;color:#212529}pre code{font-size:inherit;color:inherit;word-break:normal}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:540px){.container{max-width:540px}}@media (min-width:720px){.container{max-width:720px}}@media (min-width:960px){.container{max-width:960px}}@media (min-width:1200px){.container{max-width:1400px}}.container-fluid,.container-lg,.container-md,.container-sm,.container-xl{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:540px){.container,.container-sm{max-width:540px}}@media (min-width:720px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:960px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1400px}}.row{display:flex;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}.no-gutters{margin-right:0;margin-left:0}.no-gutters>.col,.no-gutters>[class*=col-]{padding-right:0;padding-left:0}.col,.col-1,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-10,.col-11,.col-12,.col-auto,.col-lg,.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-auto,.col-md,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-md-auto,.col-sm,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-auto,.col-xl,.col-xl-1,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-auto{position:relative;width:100%;padding-right:15px;padding-left:15px}.col{flex-basis:0;flex-grow:1;min-width:0;max-width:100%}.row-cols-1>*{flex:0 0 100%;max-width:100%}.row-cols-2>*{flex:0 0 50%;max-width:50%}.row-cols-3>*{flex:0 0 33.33333%;max-width:33.33333%}.row-cols-4>*{flex:0 0 25%;max-width:25%}.row-cols-5>*{flex:0 0 20%;max-width:20%}.row-cols-6>*{flex:0 0 16.66667%;max-width:16.66667%}.col-auto{flex:0 0 auto;width:auto;max-width:100%}.col-1{flex:0 0 8.33333%;max-width:8.33333%}.col-2{flex:0 0 16.66667%;max-width:16.66667%}.col-3{flex:0 0 25%;max-width:25%}.col-4{flex:0 0 33.33333%;max-width:33.33333%}.col-5{flex:0 0 41.66667%;max-width:41.66667%}.col-6{flex:0 0 50%;max-width:50%}.col-7{flex:0 0 58.33333%;max-width:58.33333%}.col-8{flex:0 0 66.66667%;max-width:66.66667%}.col-9{flex:0 0 75%;max-width:75%}.col-10{flex:0 0 83.33333%;max-width:83.33333%}.col-11{flex:0 0 91.66667%;max-width:91.66667%}.col-12{flex:0 0 100%;max-width:100%}.order-first{order:-1}.order-last{order:13}.order-0{order:0}.order-1{order:1}.order-2{order:2}.order-3{order:3}.order-4{order:4}.order-5{order:5}.order-6{order:6}.order-7{order:7}.order-8{order:8}.order-9{order:9}.order-10{order:10}.order-11{order:11}.order-12{order:12}.offset-1{margin-left:8.33333%}.offset-2{margin-left:16.66667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.33333%}.offset-5{margin-left:41.66667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.33333%}.offset-8{margin-left:66.66667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.33333%}.offset-11{margin-left:91.66667%}@media (min-width:540px){.col-sm{flex-basis:0;flex-grow:1;min-width:0;max-width:100%}.row-cols-sm-1>*{flex:0 0 100%;max-width:100%}.row-cols-sm-2>*{flex:0 0 50%;max-width:50%}.row-cols-sm-3>*{flex:0 0 33.33333%;max-width:33.33333%}.row-cols-sm-4>*{flex:0 0 25%;max-width:25%}.row-cols-sm-5>*{flex:0 0 20%;max-width:20%}.row-cols-sm-6>*{flex:0 0 16.66667%;max-width:16.66667%}.col-sm-auto{flex:0 0 auto;width:auto;max-width:100%}.col-sm-1{flex:0 0 8.33333%;max-width:8.33333%}.col-sm-2{flex:0 0 16.66667%;max-width:16.66667%}.col-sm-3{flex:0 0 25%;max-width:25%}.col-sm-4{flex:0 0 33.33333%;max-width:33.33333%}.col-sm-5{flex:0 0 41.66667%;max-width:41.66667%}.col-sm-6{flex:0 0 50%;max-width:50%}.col-sm-7{flex:0 0 58.33333%;max-width:58.33333%}.col-sm-8{flex:0 0 66.66667%;max-width:66.66667%}.col-sm-9{flex:0 0 75%;max-width:75%}.col-sm-10{flex:0 0 83.33333%;max-width:83.33333%}.col-sm-11{flex:0 0 91.66667%;max-width:91.66667%}.col-sm-12{flex:0 0 100%;max-width:100%}.order-sm-first{order:-1}.order-sm-last{order:13}.order-sm-0{order:0}.order-sm-1{order:1}.order-sm-2{order:2}.order-sm-3{order:3}.order-sm-4{order:4}.order-sm-5{order:5}.order-sm-6{order:6}.order-sm-7{order:7}.order-sm-8{order:8}.order-sm-9{order:9}.order-sm-10{order:10}.order-sm-11{order:11}.order-sm-12{order:12}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.33333%}.offset-sm-2{margin-left:16.66667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.33333%}.offset-sm-5{margin-left:41.66667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.33333%}.offset-sm-8{margin-left:66.66667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.33333%}.offset-sm-11{margin-left:91.66667%}}@media (min-width:720px){.col-md{flex-basis:0;flex-grow:1;min-width:0;max-width:100%}.row-cols-md-1>*{flex:0 0 100%;max-width:100%}.row-cols-md-2>*{flex:0 0 50%;max-width:50%}.row-cols-md-3>*{flex:0 0 33.33333%;max-width:33.33333%}.row-cols-md-4>*{flex:0 0 25%;max-width:25%}.row-cols-md-5>*{flex:0 0 20%;max-width:20%}.row-cols-md-6>*{flex:0 0 16.66667%;max-width:16.66667%}.col-md-auto{flex:0 0 auto;width:auto;max-width:100%}.col-md-1{flex:0 0 8.33333%;max-width:8.33333%}.col-md-2{flex:0 0 16.66667%;max-width:16.66667%}.col-md-3{flex:0 0 25%;max-width:25%}.col-md-4{flex:0 0 33.33333%;max-width:33.33333%}.col-md-5{flex:0 0 41.66667%;max-width:41.66667%}.col-md-6{flex:0 0 50%;max-width:50%}.col-md-7{flex:0 0 58.33333%;max-width:58.33333%}.col-md-8{flex:0 0 66.66667%;max-width:66.66667%}.col-md-9{flex:0 0 75%;max-width:75%}.col-md-10{flex:0 0 83.33333%;max-width:83.33333%}.col-md-11{flex:0 0 91.66667%;max-width:91.66667%}.col-md-12{flex:0 0 100%;max-width:100%}.order-md-first{order:-1}.order-md-last{order:13}.order-md-0{order:0}.order-md-1{order:1}.order-md-2{order:2}.order-md-3{order:3}.order-md-4{order:4}.order-md-5{order:5}.order-md-6{order:6}.order-md-7{order:7}.order-md-8{order:8}.order-md-9{order:9}.order-md-10{order:10}.order-md-11{order:11}.order-md-12{order:12}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.33333%}.offset-md-2{margin-left:16.66667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.33333%}.offset-md-5{margin-left:41.66667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.33333%}.offset-md-8{margin-left:66.66667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.33333%}.offset-md-11{margin-left:91.66667%}}@media (min-width:960px){.col-lg{flex-basis:0;flex-grow:1;min-width:0;max-width:100%}.row-cols-lg-1>*{flex:0 0 100%;max-width:100%}.row-cols-lg-2>*{flex:0 0 50%;max-width:50%}.row-cols-lg-3>*{flex:0 0 33.33333%;max-width:33.33333%}.row-cols-lg-4>*{flex:0 0 25%;max-width:25%}.row-cols-lg-5>*{flex:0 0 20%;max-width:20%}.row-cols-lg-6>*{flex:0 0 16.66667%;max-width:16.66667%}.col-lg-auto{flex:0 0 auto;width:auto;max-width:100%}.col-lg-1{flex:0 0 8.33333%;max-width:8.33333%}.col-lg-2{flex:0 0 16.66667%;max-width:16.66667%}.col-lg-3{flex:0 0 25%;max-width:25%}.col-lg-4{flex:0 0 33.33333%;max-width:33.33333%}.col-lg-5{flex:0 0 41.66667%;max-width:41.66667%}.col-lg-6{flex:0 0 50%;max-width:50%}.col-lg-7{flex:0 0 58.33333%;max-width:58.33333%}.col-lg-8{flex:0 0 66.66667%;max-width:66.66667%}.col-lg-9{flex:0 0 75%;max-width:75%}.col-lg-10{flex:0 0 83.33333%;max-width:83.33333%}.col-lg-11{flex:0 0 91.66667%;max-width:91.66667%}.col-lg-12{flex:0 0 100%;max-width:100%}.order-lg-first{order:-1}.order-lg-last{order:13}.order-lg-0{order:0}.order-lg-1{order:1}.order-lg-2{order:2}.order-lg-3{order:3}.order-lg-4{order:4}.order-lg-5{order:5}.order-lg-6{order:6}.order-lg-7{order:7}.order-lg-8{order:8}.order-lg-9{order:9}.order-lg-10{order:10}.order-lg-11{order:11}.order-lg-12{order:12}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.33333%}.offset-lg-2{margin-left:16.66667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.33333%}.offset-lg-5{margin-left:41.66667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.33333%}.offset-lg-8{margin-left:66.66667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.33333%}.offset-lg-11{margin-left:91.66667%}}@media (min-width:1200px){.col-xl{flex-basis:0;flex-grow:1;min-width:0;max-width:100%}.row-cols-xl-1>*{flex:0 0 100%;max-width:100%}.row-cols-xl-2>*{flex:0 0 50%;max-width:50%}.row-cols-xl-3>*{flex:0 0 33.33333%;max-width:33.33333%}.row-cols-xl-4>*{flex:0 0 25%;max-width:25%}.row-cols-xl-5>*{flex:0 0 20%;max-width:20%}.row-cols-xl-6>*{flex:0 0 16.66667%;max-width:16.66667%}.col-xl-auto{flex:0 0 auto;width:auto;max-width:100%}.col-xl-1{flex:0 0 8.33333%;max-width:8.33333%}.col-xl-2{flex:0 0 16.66667%;max-width:16.66667%}.col-xl-3{flex:0 0 25%;max-width:25%}.col-xl-4{flex:0 0 33.33333%;max-width:33.33333%}.col-xl-5{flex:0 0 41.66667%;max-width:41.66667%}.col-xl-6{flex:0 0 50%;max-width:50%}.col-xl-7{flex:0 0 58.33333%;max-width:58.33333%}.col-xl-8{flex:0 0 66.66667%;max-width:66.66667%}.col-xl-9{flex:0 0 75%;max-width:75%}.col-xl-10{flex:0 0 83.33333%;max-width:83.33333%}.col-xl-11{flex:0 0 91.66667%;max-width:91.66667%}.col-xl-12{flex:0 0 100%;max-width:100%}.order-xl-first{order:-1}.order-xl-last{order:13}.order-xl-0{order:0}.order-xl-1{order:1}.order-xl-2{order:2}.order-xl-3{order:3}.order-xl-4{order:4}.order-xl-5{order:5}.order-xl-6{order:6}.order-xl-7{order:7}.order-xl-8{order:8}.order-xl-9{order:9}.order-xl-10{order:10}.order-xl-11{order:11}.order-xl-12{order:12}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.33333%}.offset-xl-2{margin-left:16.66667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.33333%}.offset-xl-5{margin-left:41.66667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.33333%}.offset-xl-8{margin-left:66.66667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.33333%}.offset-xl-11{margin-left:91.66667%}}.table{width:100%;margin-bottom:1rem;color:#212529}.table td,.table th{padding:.75rem;vertical-align:top;border-top:1px solid #dee2e6}.table thead th{vertical-align:bottom;border-bottom:2px solid #dee2e6}.table tbody+tbody{border-top:2px solid #dee2e6}.table-sm td,.table-sm th{padding:.3rem}.table-bordered,.table-bordered td,.table-bordered th{border:1px solid #dee2e6}.table-bordered thead td,.table-bordered thead th{border-bottom-width:2px}.table-borderless tbody+tbody,.table-borderless td,.table-borderless th,.table-borderless thead th{border:0}.table-striped tbody tr:nth-of-type(odd){background-color:rgba(0,0,0,.05)}.table-hover tbody tr:hover{color:#212529;background-color:rgba(0,0,0,.075)}.table-primary,.table-primary>td,.table-primary>th{background-color:#b8daff}.table-primary tbody+tbody,.table-primary td,.table-primary th,.table-primary thead th{border-color:#7abaff}.table-hover .table-primary:hover,.table-hover .table-primary:hover>td,.table-hover .table-primary:hover>th{background-color:#9fcdff}.table-secondary,.table-secondary>td,.table-secondary>th{background-color:#d6d8db}.table-secondary tbody+tbody,.table-secondary td,.table-secondary th,.table-secondary thead th{border-color:#b3b7bb}.table-hover .table-secondary:hover,.table-hover .table-secondary:hover>td,.table-hover .table-secondary:hover>th{background-color:#c8cbcf}.table-success,.table-success>td,.table-success>th{background-color:#c3e6cb}.table-success tbody+tbody,.table-success td,.table-success th,.table-success thead th{border-color:#8fd19e}.table-hover .table-success:hover,.table-hover .table-success:hover>td,.table-hover .table-success:hover>th{background-color:#b1dfbb}.table-info,.table-info>td,.table-info>th{background-color:#bee5eb}.table-info tbody+tbody,.table-info td,.table-info th,.table-info thead th{border-color:#86cfda}.table-hover .table-info:hover,.table-hover .table-info:hover>td,.table-hover .table-info:hover>th{background-color:#abdde5}.table-warning,.table-warning>td,.table-warning>th{background-color:#ffeeba}.table-warning tbody+tbody,.table-warning td,.table-warning th,.table-warning thead th{border-color:#ffdf7e}.table-hover .table-warning:hover,.table-hover .table-warning:hover>td,.table-hover .table-warning:hover>th{background-color:#ffe8a1}.table-danger,.table-danger>td,.table-danger>th{background-color:#f5c6cb}.table-danger tbody+tbody,.table-danger td,.table-danger th,.table-danger thead th{border-color:#ed969e}.table-hover .table-danger:hover,.table-hover .table-danger:hover>td,.table-hover .table-danger:hover>th{background-color:#f1b0b7}.table-light,.table-light>td,.table-light>th{background-color:#fdfdfe}.table-light tbody+tbody,.table-light td,.table-light th,.table-light thead th{border-color:#fbfcfc}.table-hover .table-light:hover,.table-hover .table-light:hover>td,.table-hover .table-light:hover>th{background-color:#ececf6}.table-dark,.table-dark>td,.table-dark>th{background-color:#c6c8ca}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#95999c}.table-hover .table-dark:hover,.table-hover .table-dark:hover>td,.table-hover .table-dark:hover>th{background-color:#b9bbbe}.table-active,.table-active>td,.table-active>th,.table-hover .table-active:hover,.table-hover .table-active:hover>td,.table-hover .table-active:hover>th{background-color:rgba(0,0,0,.075)}.table .thead-dark th{color:#fff;background-color:#343a40;border-color:#454d55}.table .thead-light th{color:#495057;background-color:#e9ecef;border-color:#dee2e6}.table-dark{color:#fff;background-color:#343a40}.table-dark td,.table-dark th,.table-dark thead th{border-color:#454d55}.table-dark.table-bordered{border:0}.table-dark.table-striped tbody tr:nth-of-type(odd){background-color:hsla(0,0%,100%,.05)}.table-dark.table-hover tbody tr:hover{color:#fff;background-color:hsla(0,0%,100%,.075)}@media (max-width:539.98px){.table-responsive-sm{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-sm>.table-bordered{border:0}}@media (max-width:719.98px){.table-responsive-md{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-md>.table-bordered{border:0}}@media (max-width:959.98px){.table-responsive-lg{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-lg>.table-bordered{border:0}}@media (max-width:1199.98px){.table-responsive-xl{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-xl>.table-bordered{border:0}}.table-responsive{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive>.table-bordered{border:0}.form-control{display:block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control{transition:none}}.form-control::-ms-expand{background-color:transparent;border:0}.form-control:-moz-focusring{color:transparent;text-shadow:0 0 0 #495057}.form-control:focus{color:#495057;background-color:#fff;border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.form-control::placeholder{color:#6c757d;opacity:1}.form-control:disabled,.form-control[readonly]{background-color:#e9ecef;opacity:1}input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{appearance:none}select.form-control:focus::-ms-value{color:#495057;background-color:#fff}.form-control-file,.form-control-range{display:block;width:100%}.col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem;line-height:1.5}.col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem;line-height:1.5}.form-control-plaintext{display:block;width:100%;padding:.375rem 0;margin-bottom:0;font-size:1rem;line-height:1.5;color:#212529;background-color:transparent;border:solid transparent;border-width:1px 0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{height:calc(1.5em + .5rem + 2px);padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.form-control-lg{height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}select.form-control[multiple],select.form-control[size],textarea.form-control{height:auto}.form-group{margin-bottom:1rem}.form-text{display:block;margin-top:.25rem}.form-row{display:flex;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}.form-row>.col,.form-row>[class*=col-]{padding-right:5px;padding-left:5px}.form-check{position:relative;display:block;padding-left:1.25rem}.form-check-input{position:absolute;margin-top:.3rem;margin-left:-1.25rem}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{color:#6c757d}.form-check-label{margin-bottom:0}.form-check-inline{display:inline-flex;align-items:center;padding-left:0;margin-right:.75rem}.form-check-inline .form-check-input{position:static;margin-top:0;margin-right:.3125rem;margin-left:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#28a745}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(40,167,69,.9);border-radius:.25rem}.is-valid~.valid-feedback,.is-valid~.valid-tooltip,.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip{display:block}.form-control.is-valid,.was-validated .form-control:valid{border-color:#28a745;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.was-validated .form-control:valid:focus{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.custom-select.is-valid,.was-validated .custom-select:valid{border-color:#28a745;padding-right:calc(.75em + 2.3125rem);background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5'%3E%3Cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right .75rem center/8px 10px,url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3E%3C/svg%3E") #fff no-repeat center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem)}.custom-select.is-valid:focus,.was-validated .custom-select:valid:focus{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#28a745}.form-check-input.is-valid~.valid-feedback,.form-check-input.is-valid~.valid-tooltip,.was-validated .form-check-input:valid~.valid-feedback,.was-validated .form-check-input:valid~.valid-tooltip{display:block}.custom-control-input.is-valid~.custom-control-label,.was-validated .custom-control-input:valid~.custom-control-label{color:#28a745}.custom-control-input.is-valid~.custom-control-label:before,.was-validated .custom-control-input:valid~.custom-control-label:before{border-color:#28a745}.custom-control-input.is-valid:checked~.custom-control-label:before,.was-validated .custom-control-input:valid:checked~.custom-control-label:before{border-color:#34ce57;background-color:#34ce57}.custom-control-input.is-valid:focus~.custom-control-label:before,.was-validated .custom-control-input:valid:focus~.custom-control-label:before{box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.custom-control-input.is-valid:focus:not(:checked)~.custom-control-label:before,.custom-file-input.is-valid~.custom-file-label,.was-validated .custom-control-input:valid:focus:not(:checked)~.custom-control-label:before,.was-validated .custom-file-input:valid~.custom-file-label{border-color:#28a745}.custom-file-input.is-valid:focus~.custom-file-label,.was-validated .custom-file-input:valid:focus~.custom-file-label{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#dc3545}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(220,53,69,.9);border-radius:.25rem}.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip,.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip{display:block}.form-control.is-invalid,.was-validated .form-control:invalid{border-color:#dc3545;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545'%3E%3Ccircle cx='6' cy='6' r='4.5'/%3E%3Cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3E%3Ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-invalid:focus,.was-validated .form-control:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.custom-select.is-invalid,.was-validated .custom-select:invalid{border-color:#dc3545;padding-right:calc(.75em + 2.3125rem);background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5'%3E%3Cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right .75rem center/8px 10px,url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545'%3E%3Ccircle cx='6' cy='6' r='4.5'/%3E%3Cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3E%3Ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3E%3C/svg%3E") #fff no-repeat center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem)}.custom-select.is-invalid:focus,.was-validated .custom-select:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:#dc3545}.form-check-input.is-invalid~.invalid-feedback,.form-check-input.is-invalid~.invalid-tooltip,.was-validated .form-check-input:invalid~.invalid-feedback,.was-validated .form-check-input:invalid~.invalid-tooltip{display:block}.custom-control-input.is-invalid~.custom-control-label,.was-validated .custom-control-input:invalid~.custom-control-label{color:#dc3545}.custom-control-input.is-invalid~.custom-control-label:before,.was-validated .custom-control-input:invalid~.custom-control-label:before{border-color:#dc3545}.custom-control-input.is-invalid:checked~.custom-control-label:before,.was-validated .custom-control-input:invalid:checked~.custom-control-label:before{border-color:#e4606d;background-color:#e4606d}.custom-control-input.is-invalid:focus~.custom-control-label:before,.was-validated .custom-control-input:invalid:focus~.custom-control-label:before{box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.custom-control-input.is-invalid:focus:not(:checked)~.custom-control-label:before,.custom-file-input.is-invalid~.custom-file-label,.was-validated .custom-control-input:invalid:focus:not(:checked)~.custom-control-label:before,.was-validated .custom-file-input:invalid~.custom-file-label{border-color:#dc3545}.custom-file-input.is-invalid:focus~.custom-file-label,.was-validated .custom-file-input:invalid:focus~.custom-file-label{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.form-inline{display:flex;flex-flow:row wrap;align-items:center}.form-inline .form-check{width:100%}@media (min-width:540px){.form-inline label{justify-content:center}.form-inline .form-group,.form-inline label{display:flex;align-items:center;margin-bottom:0}.form-inline .form-group{flex:0 0 auto;flex-flow:row wrap}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-plaintext{display:inline-block}.form-inline .custom-select,.form-inline .input-group{width:auto}.form-inline .form-check{display:flex;align-items:center;justify-content:center;width:auto;padding-left:0}.form-inline .form-check-input{position:relative;flex-shrink:0;margin-top:0;margin-right:.25rem;margin-left:0}.form-inline .custom-control{align-items:center;justify-content:center}.form-inline .custom-control-label{margin-bottom:0}}.btn{display:inline-block;font-weight:400;color:#212529;text-align:center;vertical-align:middle;user-select:none;background-color:transparent;border:1px solid transparent;padding:.375rem .75rem;font-size:1rem;line-height:1.5;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:hover{color:#212529;text-decoration:none}.btn.focus,.btn:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.btn.disabled,.btn:disabled{opacity:.65}.btn:not(:disabled):not(.disabled){cursor:pointer}a.btn.disabled,fieldset:disabled a.btn{pointer-events:none}.btn-primary{color:#fff;background-color:#007bff;border-color:#007bff}.btn-primary.focus,.btn-primary:focus,.btn-primary:hover{color:#fff;background-color:#0069d9;border-color:#0062cc}.btn-primary.focus,.btn-primary:focus{box-shadow:0 0 0 .2rem rgba(38,143,255,.5)}.btn-primary.disabled,.btn-primary:disabled{color:#fff;background-color:#007bff;border-color:#007bff}.btn-primary:not(:disabled):not(.disabled).active,.btn-primary:not(:disabled):not(.disabled):active,.show>.btn-primary.dropdown-toggle{color:#fff;background-color:#0062cc;border-color:#005cbf}.btn-primary:not(:disabled):not(.disabled).active:focus,.btn-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(38,143,255,.5)}.btn-secondary{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary.focus,.btn-secondary:focus,.btn-secondary:hover{color:#fff;background-color:#5a6268;border-color:#545b62}.btn-secondary.focus,.btn-secondary:focus{box-shadow:0 0 0 .2rem rgba(130,138,145,.5)}.btn-secondary.disabled,.btn-secondary:disabled{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:not(:disabled):not(.disabled).active,.btn-secondary:not(:disabled):not(.disabled):active,.show>.btn-secondary.dropdown-toggle{color:#fff;background-color:#545b62;border-color:#4e555b}.btn-secondary:not(:disabled):not(.disabled).active:focus,.btn-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(130,138,145,.5)}.btn-success{color:#fff;background-color:#28a745;border-color:#28a745}.btn-success.focus,.btn-success:focus,.btn-success:hover{color:#fff;background-color:#218838;border-color:#1e7e34}.btn-success.focus,.btn-success:focus{box-shadow:0 0 0 .2rem rgba(72,180,97,.5)}.btn-success.disabled,.btn-success:disabled{color:#fff;background-color:#28a745;border-color:#28a745}.btn-success:not(:disabled):not(.disabled).active,.btn-success:not(:disabled):not(.disabled):active,.show>.btn-success.dropdown-toggle{color:#fff;background-color:#1e7e34;border-color:#1c7430}.btn-success:not(:disabled):not(.disabled).active:focus,.btn-success:not(:disabled):not(.disabled):active:focus,.show>.btn-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(72,180,97,.5)}.btn-info{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-info.focus,.btn-info:focus,.btn-info:hover{color:#fff;background-color:#138496;border-color:#117a8b}.btn-info.focus,.btn-info:focus{box-shadow:0 0 0 .2rem rgba(58,176,195,.5)}.btn-info.disabled,.btn-info:disabled{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-info:not(:disabled):not(.disabled).active,.btn-info:not(:disabled):not(.disabled):active,.show>.btn-info.dropdown-toggle{color:#fff;background-color:#117a8b;border-color:#10707f}.btn-info:not(:disabled):not(.disabled).active:focus,.btn-info:not(:disabled):not(.disabled):active:focus,.show>.btn-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(58,176,195,.5)}.btn-warning{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-warning.focus,.btn-warning:focus,.btn-warning:hover{color:#212529;background-color:#e0a800;border-color:#d39e00}.btn-warning.focus,.btn-warning:focus{box-shadow:0 0 0 .2rem rgba(222,170,12,.5)}.btn-warning.disabled,.btn-warning:disabled{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-warning:not(:disabled):not(.disabled).active,.btn-warning:not(:disabled):not(.disabled):active,.show>.btn-warning.dropdown-toggle{color:#212529;background-color:#d39e00;border-color:#c69500}.btn-warning:not(:disabled):not(.disabled).active:focus,.btn-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(222,170,12,.5)}.btn-danger{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger.focus,.btn-danger:focus,.btn-danger:hover{color:#fff;background-color:#c82333;border-color:#bd2130}.btn-danger.focus,.btn-danger:focus{box-shadow:0 0 0 .2rem rgba(225,83,97,.5)}.btn-danger.disabled,.btn-danger:disabled{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:not(:disabled):not(.disabled).active,.btn-danger:not(:disabled):not(.disabled):active,.show>.btn-danger.dropdown-toggle{color:#fff;background-color:#bd2130;border-color:#b21f2d}.btn-danger:not(:disabled):not(.disabled).active:focus,.btn-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(225,83,97,.5)}.btn-light{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light.focus,.btn-light:focus,.btn-light:hover{color:#212529;background-color:#e2e6ea;border-color:#dae0e5}.btn-light.focus,.btn-light:focus{box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.btn-light.disabled,.btn-light:disabled{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:not(:disabled):not(.disabled).active,.btn-light:not(:disabled):not(.disabled):active,.show>.btn-light.dropdown-toggle{color:#212529;background-color:#dae0e5;border-color:#d3d9df}.btn-light:not(:disabled):not(.disabled).active:focus,.btn-light:not(:disabled):not(.disabled):active:focus,.show>.btn-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.btn-dark{color:#fff;background-color:#343a40;border-color:#343a40}.btn-dark.focus,.btn-dark:focus,.btn-dark:hover{color:#fff;background-color:#23272b;border-color:#1d2124}.btn-dark.focus,.btn-dark:focus{box-shadow:0 0 0 .2rem rgba(82,88,93,.5)}.btn-dark.disabled,.btn-dark:disabled{color:#fff;background-color:#343a40;border-color:#343a40}.btn-dark:not(:disabled):not(.disabled).active,.btn-dark:not(:disabled):not(.disabled):active,.show>.btn-dark.dropdown-toggle{color:#fff;background-color:#1d2124;border-color:#171a1d}.btn-dark:not(:disabled):not(.disabled).active:focus,.btn-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(82,88,93,.5)}.btn-outline-primary{color:#007bff;border-color:#007bff}.btn-outline-primary:hover{color:#fff;background-color:#007bff;border-color:#007bff}.btn-outline-primary.focus,.btn-outline-primary:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{color:#007bff;background-color:transparent}.btn-outline-primary:not(:disabled):not(.disabled).active,.btn-outline-primary:not(:disabled):not(.disabled):active,.show>.btn-outline-primary.dropdown-toggle{color:#fff;background-color:#007bff;border-color:#007bff}.btn-outline-primary:not(:disabled):not(.disabled).active:focus,.btn-outline-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-outline-secondary{color:#6c757d;border-color:#6c757d}.btn-outline-secondary:hover{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-outline-secondary.focus,.btn-outline-secondary:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{color:#6c757d;background-color:transparent}.btn-outline-secondary:not(:disabled):not(.disabled).active,.btn-outline-secondary:not(:disabled):not(.disabled):active,.show>.btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-outline-secondary:not(:disabled):not(.disabled).active:focus,.btn-outline-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.btn-outline-success{color:#28a745;border-color:#28a745}.btn-outline-success:hover{color:#fff;background-color:#28a745;border-color:#28a745}.btn-outline-success.focus,.btn-outline-success:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{color:#28a745;background-color:transparent}.btn-outline-success:not(:disabled):not(.disabled).active,.btn-outline-success:not(:disabled):not(.disabled):active,.show>.btn-outline-success.dropdown-toggle{color:#fff;background-color:#28a745;border-color:#28a745}.btn-outline-success:not(:disabled):not(.disabled).active:focus,.btn-outline-success:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-outline-info{color:#17a2b8;border-color:#17a2b8}.btn-outline-info:hover{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-outline-info.focus,.btn-outline-info:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{color:#17a2b8;background-color:transparent}.btn-outline-info:not(:disabled):not(.disabled).active,.btn-outline-info:not(:disabled):not(.disabled):active,.show>.btn-outline-info.dropdown-toggle{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-outline-info:not(:disabled):not(.disabled).active:focus,.btn-outline-info:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-outline-warning{color:#ffc107;border-color:#ffc107}.btn-outline-warning:hover{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-outline-warning.focus,.btn-outline-warning:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{color:#ffc107;background-color:transparent}.btn-outline-warning:not(:disabled):not(.disabled).active,.btn-outline-warning:not(:disabled):not(.disabled):active,.show>.btn-outline-warning.dropdown-toggle{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-outline-warning:not(:disabled):not(.disabled).active:focus,.btn-outline-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-outline-danger{color:#dc3545;border-color:#dc3545}.btn-outline-danger:hover{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-outline-danger.focus,.btn-outline-danger:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{color:#dc3545;background-color:transparent}.btn-outline-danger:not(:disabled):not(.disabled).active,.btn-outline-danger:not(:disabled):not(.disabled):active,.show>.btn-outline-danger.dropdown-toggle{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-outline-danger:not(:disabled):not(.disabled).active:focus,.btn-outline-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-outline-light{color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:hover{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light.focus,.btn-outline-light:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-light.disabled,.btn-outline-light:disabled{color:#f8f9fa;background-color:transparent}.btn-outline-light:not(:disabled):not(.disabled).active,.btn-outline-light:not(:disabled):not(.disabled):active,.show>.btn-outline-light.dropdown-toggle{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:not(:disabled):not(.disabled).active:focus,.btn-outline-light:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-dark{color:#343a40;border-color:#343a40}.btn-outline-dark:hover{color:#fff;background-color:#343a40;border-color:#343a40}.btn-outline-dark.focus,.btn-outline-dark:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-outline-dark.disabled,.btn-outline-dark:disabled{color:#343a40;background-color:transparent}.btn-outline-dark:not(:disabled):not(.disabled).active,.btn-outline-dark:not(:disabled):not(.disabled):active,.show>.btn-outline-dark.dropdown-toggle{color:#fff;background-color:#343a40;border-color:#343a40}.btn-outline-dark:not(:disabled):not(.disabled).active:focus,.btn-outline-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-link{font-weight:400;color:#007bff;text-decoration:none}.btn-link:hover{color:#0056b3}.btn-link.focus,.btn-link:focus,.btn-link:hover{text-decoration:underline}.btn-link.disabled,.btn-link:disabled{color:#6c757d;pointer-events:none}.btn-group-lg>.btn,.btn-lg{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.btn-group-sm>.btn,.btn-sm{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:.5rem}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{position:relative;height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.dropdown,.dropleft,.dropright,.dropup{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty:after{margin-left:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.dropdown-menu-left{right:auto;left:0}.dropdown-menu-right{right:0;left:auto}@media (min-width:540px){.dropdown-menu-sm-left{right:auto;left:0}.dropdown-menu-sm-right{right:0;left:auto}}@media (min-width:720px){.dropdown-menu-md-left{right:auto;left:0}.dropdown-menu-md-right{right:0;left:auto}}@media (min-width:960px){.dropdown-menu-lg-left{right:auto;left:0}.dropdown-menu-lg-right{right:0;left:auto}}@media (min-width:1200px){.dropdown-menu-xl-left{right:auto;left:0}.dropdown-menu-xl-right{right:0;left:auto}}.dropup .dropdown-menu{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}.dropup .dropdown-toggle:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty:after{margin-left:0}.dropright .dropdown-menu{top:0;right:auto;left:100%;margin-top:0;margin-left:.125rem}.dropright .dropdown-toggle:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropright .dropdown-toggle:empty:after{margin-left:0}.dropright .dropdown-toggle:after{vertical-align:0}.dropleft .dropdown-menu{top:0;right:100%;left:auto;margin-top:0;margin-right:.125rem}.dropleft .dropdown-toggle:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";display:none}.dropleft .dropdown-toggle:before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropleft .dropdown-toggle:empty:after{margin-left:0}.dropleft .dropdown-toggle:before{vertical-align:0}.dropdown-menu[x-placement^=bottom],.dropdown-menu[x-placement^=left],.dropdown-menu[x-placement^=right],.dropdown-menu[x-placement^=top]{right:auto;bottom:auto}.dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid #e9ecef}.dropdown-item{display:block;width:100%;padding:.25rem 1.5rem;clear:both;font-weight:400;color:#212529;text-align:inherit;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:focus,.dropdown-item:hover{color:#16181b;text-decoration:none;background-color:#f8f9fa}.dropdown-item.active,.dropdown-item:active{color:#fff;text-decoration:none;background-color:#007bff}.dropdown-item.disabled,.dropdown-item:disabled{color:#6c757d;pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:.5rem 1.5rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}.dropdown-item-text{display:block;padding:.25rem 1.5rem;color:#212529}.btn-group,.btn-group-vertical{position:relative;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;flex:1 1 auto}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:1}.btn-toolbar{display:flex;flex-wrap:wrap;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group>.btn-group:not(:first-child),.btn-group>.btn:not(:first-child){margin-left:-1px}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split:after,.dropright .dropdown-toggle-split:after,.dropup .dropdown-toggle-split:after{margin-left:0}.dropleft .dropdown-toggle-split:before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{flex-direction:column;align-items:flex-start;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn-group:not(:first-child),.btn-group-vertical>.btn:not(:first-child){margin-top:-1px}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.btn-group-toggle>.btn,.btn-group-toggle>.btn-group>.btn{margin-bottom:0}.btn-group-toggle>.btn-group>.btn input[type=checkbox],.btn-group-toggle>.btn-group>.btn input[type=radio],.btn-group-toggle>.btn input[type=checkbox],.btn-group-toggle>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%}.input-group>.custom-file,.input-group>.custom-select,.input-group>.form-control,.input-group>.form-control-plaintext{position:relative;flex:1 1 auto;width:1%;min-width:0;margin-bottom:0}.input-group>.custom-file+.custom-file,.input-group>.custom-file+.custom-select,.input-group>.custom-file+.form-control,.input-group>.custom-select+.custom-file,.input-group>.custom-select+.custom-select,.input-group>.custom-select+.form-control,.input-group>.form-control+.custom-file,.input-group>.form-control+.custom-select,.input-group>.form-control+.form-control,.input-group>.form-control-plaintext+.custom-file,.input-group>.form-control-plaintext+.custom-select,.input-group>.form-control-plaintext+.form-control{margin-left:-1px}.input-group>.custom-file .custom-file-input:focus~.custom-file-label,.input-group>.custom-select:focus,.input-group>.form-control:focus{z-index:3}.input-group>.custom-file .custom-file-input:focus{z-index:4}.input-group>.custom-select:not(:last-child),.input-group>.form-control:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.custom-select:not(:first-child),.input-group>.form-control:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.custom-file{display:flex;align-items:center}.input-group>.custom-file:not(:last-child) .custom-file-label,.input-group>.custom-file:not(:last-child) .custom-file-label:after{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.custom-file:not(:first-child) .custom-file-label{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-append,.input-group-prepend{display:flex}.input-group-append .btn,.input-group-prepend .btn{position:relative;z-index:2}.input-group-append .btn:focus,.input-group-prepend .btn:focus{z-index:3}.input-group-append .btn+.btn,.input-group-append .btn+.input-group-text,.input-group-append .input-group-text+.btn,.input-group-append .input-group-text+.input-group-text,.input-group-prepend .btn+.btn,.input-group-prepend .btn+.input-group-text,.input-group-prepend .input-group-text+.btn,.input-group-prepend .input-group-text+.input-group-text{margin-left:-1px}.input-group-prepend{margin-right:-1px}.input-group-append{margin-left:-1px}.input-group-text{display:flex;align-items:center;padding:.375rem .75rem;margin-bottom:0;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.25rem}.input-group-text input[type=checkbox],.input-group-text input[type=radio]{margin-top:0}.input-group-lg>.custom-select,.input-group-lg>.form-control:not(textarea){height:calc(1.5em + 1rem + 2px)}.input-group-lg>.custom-select,.input-group-lg>.form-control,.input-group-lg>.input-group-append>.btn,.input-group-lg>.input-group-append>.input-group-text,.input-group-lg>.input-group-prepend>.btn,.input-group-lg>.input-group-prepend>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.input-group-sm>.custom-select,.input-group-sm>.form-control:not(textarea){height:calc(1.5em + .5rem + 2px)}.input-group-sm>.custom-select,.input-group-sm>.form-control,.input-group-sm>.input-group-append>.btn,.input-group-sm>.input-group-append>.input-group-text,.input-group-sm>.input-group-prepend>.btn,.input-group-sm>.input-group-prepend>.input-group-text{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.input-group-lg>.custom-select,.input-group-sm>.custom-select{padding-right:1.75rem}.input-group>.input-group-append:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group>.input-group-append:last-child>.input-group-text:not(:last-child),.input-group>.input-group-append:not(:last-child)>.btn,.input-group>.input-group-append:not(:last-child)>.input-group-text,.input-group>.input-group-prepend>.btn,.input-group>.input-group-prepend>.input-group-text{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.input-group-append>.btn,.input-group>.input-group-append>.input-group-text,.input-group>.input-group-prepend:first-child>.btn:not(:first-child),.input-group>.input-group-prepend:first-child>.input-group-text:not(:first-child),.input-group>.input-group-prepend:not(:first-child)>.btn,.input-group>.input-group-prepend:not(:first-child)>.input-group-text{border-top-left-radius:0;border-bottom-left-radius:0}.custom-control{position:relative;display:block;min-height:1.5rem;padding-left:1.5rem}.custom-control-inline{display:inline-flex;margin-right:1rem}.custom-control-input{position:absolute;left:0;z-index:-1;width:1rem;height:1.25rem;opacity:0}.custom-control-input:checked~.custom-control-label:before{color:#fff;border-color:#007bff;background-color:#007bff}.custom-control-input:focus~.custom-control-label:before{box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-control-input:focus:not(:checked)~.custom-control-label:before{border-color:#80bdff}.custom-control-input:not(:disabled):active~.custom-control-label:before{color:#fff;background-color:#b3d7ff;border-color:#b3d7ff}.custom-control-input:disabled~.custom-control-label,.custom-control-input[disabled]~.custom-control-label{color:#6c757d}.custom-control-input:disabled~.custom-control-label:before,.custom-control-input[disabled]~.custom-control-label:before{background-color:#e9ecef}.custom-control-label{position:relative;margin-bottom:0;vertical-align:top}.custom-control-label:before{pointer-events:none;background-color:#fff;border:1px solid #adb5bd}.custom-control-label:after,.custom-control-label:before{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;content:""}.custom-control-label:after{background:no-repeat 50%/50% 50%}.custom-checkbox .custom-control-label:before{border-radius:.25rem}.custom-checkbox .custom-control-input:checked~.custom-control-label:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26l2.974 2.99L8 2.193z'/%3E%3C/svg%3E")}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label:before{border-color:#007bff;background-color:#007bff}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Cpath stroke='%23fff' d='M0 2h4'/%3E%3C/svg%3E")}.custom-checkbox .custom-control-input:disabled:checked~.custom-control-label:before{background-color:rgba(0,123,255,.5)}.custom-checkbox .custom-control-input:disabled:indeterminate~.custom-control-label:before{background-color:rgba(0,123,255,.5)}.custom-radio .custom-control-label:before{border-radius:50%}.custom-radio .custom-control-input:checked~.custom-control-label:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23fff'/%3E%3C/svg%3E")}.custom-radio .custom-control-input:disabled:checked~.custom-control-label:before{background-color:rgba(0,123,255,.5)}.custom-switch{padding-left:2.25rem}.custom-switch .custom-control-label:before{left:-2.25rem;width:1.75rem;pointer-events:all;border-radius:.5rem}.custom-switch .custom-control-label:after{top:calc(.25rem + 2px);left:calc(-2.25rem + 2px);width:calc(1rem - 4px);height:calc(1rem - 4px);background-color:#adb5bd;border-radius:.5rem;transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.custom-switch .custom-control-label:after{transition:none}}.custom-switch .custom-control-input:checked~.custom-control-label:after{background-color:#fff;transform:translateX(.75rem)}.custom-switch .custom-control-input:disabled:checked~.custom-control-label:before{background-color:rgba(0,123,255,.5)}.custom-select{display:inline-block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem 1.75rem .375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;vertical-align:middle;background:#fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5'%3E%3Cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right .75rem center/8px 10px;border:1px solid #ced4da;border-radius:.25rem;appearance:none}.custom-select:focus{border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-select:focus::-ms-value{color:#495057;background-color:#fff}.custom-select[multiple],.custom-select[size]:not([size="1"]){height:auto;padding-right:.75rem;background-image:none}.custom-select:disabled{color:#6c757d;background-color:#e9ecef}.custom-select::-ms-expand{display:none}.custom-select:-moz-focusring{color:transparent;text-shadow:0 0 0 #495057}.custom-select-sm{height:calc(1.5em + .5rem + 2px);padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem}.custom-select-lg{height:calc(1.5em + 1rem + 2px);padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem}.custom-file{display:inline-block;margin-bottom:0}.custom-file,.custom-file-input{position:relative;width:100%;height:calc(1.5em + .75rem + 2px)}.custom-file-input{z-index:2;margin:0;opacity:0}.custom-file-input:focus~.custom-file-label{border-color:#80bdff;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-file-input:disabled~.custom-file-label,.custom-file-input[disabled]~.custom-file-label{background-color:#e9ecef}.custom-file-input:lang(en)~.custom-file-label:after{content:"Browse"}.custom-file-input~.custom-file-label[data-browse]:after{content:attr(data-browse)}.custom-file-label{left:0;z-index:1;height:calc(1.5em + .75rem + 2px);font-weight:400;background-color:#fff;border:1px solid #ced4da;border-radius:.25rem}.custom-file-label,.custom-file-label:after{position:absolute;top:0;right:0;padding:.375rem .75rem;line-height:1.5;color:#495057}.custom-file-label:after{bottom:0;z-index:3;display:block;height:calc(1.5em + .75rem);content:"Browse";background-color:#e9ecef;border-left:inherit;border-radius:0 .25rem .25rem 0}.custom-range{width:100%;height:1.4rem;padding:0;background-color:transparent;appearance:none}.custom-range:focus{outline:none}.custom-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range:focus::-ms-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range::-moz-focus-outer{border:0}.custom-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;background-color:#007bff;border:0;border-radius:1rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-webkit-slider-thumb{transition:none}}.custom-range::-webkit-slider-thumb:active{background-color:#b3d7ff}.custom-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.custom-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#007bff;border:0;border-radius:1rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-moz-range-thumb{transition:none}}.custom-range::-moz-range-thumb:active{background-color:#b3d7ff}.custom-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.custom-range::-ms-thumb{width:1rem;height:1rem;margin-top:0;margin-right:.2rem;margin-left:.2rem;background-color:#007bff;border:0;border-radius:1rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-ms-thumb{transition:none}}.custom-range::-ms-thumb:active{background-color:#b3d7ff}.custom-range::-ms-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:transparent;border-color:transparent;border-width:.5rem}.custom-range::-ms-fill-lower,.custom-range::-ms-fill-upper{background-color:#dee2e6;border-radius:1rem}.custom-range::-ms-fill-upper{margin-right:15px}.custom-range:disabled::-webkit-slider-thumb{background-color:#adb5bd}.custom-range:disabled::-webkit-slider-runnable-track{cursor:default}.custom-range:disabled::-moz-range-thumb{background-color:#adb5bd}.custom-range:disabled::-moz-range-track{cursor:default}.custom-range:disabled::-ms-thumb{background-color:#adb5bd}.custom-control-label:before,.custom-file-label,.custom-select{transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.custom-control-label:before,.custom-file-label,.custom-select{transition:none}}.nav{display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:.5rem 1rem}.nav-link:focus,.nav-link:hover{text-decoration:none}.nav-link.disabled{color:#6c757d;pointer-events:none;cursor:default}.nav-tabs{border-bottom:1px solid #dee2e6}.nav-tabs .nav-item{margin-bottom:-1px}.nav-tabs .nav-link{border:1px solid transparent;border-top-left-radius:.25rem;border-top-right-radius:.25rem}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{border-color:#e9ecef #e9ecef #dee2e6}.nav-tabs .nav-link.disabled{color:#6c757d;background-color:transparent;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:#495057;background-color:#fff;border-color:#dee2e6 #dee2e6 #fff}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.nav-pills .nav-link{border-radius:.25rem}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:#fff;background-color:#007bff}.nav-fill .nav-item{flex:1 1 auto;text-align:center}.nav-justified .nav-item{flex-basis:0;flex-grow:1;text-align:center}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{position:relative;padding:.5rem 1rem}.navbar,.navbar .container,.navbar .container-fluid,.navbar .container-lg,.navbar .container-md,.navbar .container-sm,.navbar .container-xl{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between}.navbar-brand{display:inline-block;padding-top:.3125rem;padding-bottom:.3125rem;margin-right:1rem;font-size:1.25rem;line-height:inherit;white-space:nowrap}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-nav{display:flex;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link{padding-right:0;padding-left:0}.navbar-nav .dropdown-menu{position:static;float:none}.navbar-text{display:inline-block;padding-top:.5rem;padding-bottom:.5rem}.navbar-collapse{flex-basis:100%;flex-grow:1;align-items:center}.navbar-toggler{padding:.25rem .75rem;font-size:1.25rem;line-height:1;background-color:transparent;border:1px solid transparent;border-radius:.25rem}.navbar-toggler:focus,.navbar-toggler:hover{text-decoration:none}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;content:"";background:no-repeat 50%;background-size:100% 100%}@media (max-width:539.98px){.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid,.navbar-expand-sm>.container-lg,.navbar-expand-sm>.container-md,.navbar-expand-sm>.container-sm,.navbar-expand-sm>.container-xl{padding-right:0;padding-left:0}}@media (min-width:540px){.navbar-expand-sm{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-sm .navbar-nav{flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid,.navbar-expand-sm>.container-lg,.navbar-expand-sm>.container-md,.navbar-expand-sm>.container-sm,.navbar-expand-sm>.container-xl{flex-wrap:nowrap}.navbar-expand-sm .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}}@media (max-width:719.98px){.navbar-expand-md>.container,.navbar-expand-md>.container-fluid,.navbar-expand-md>.container-lg,.navbar-expand-md>.container-md,.navbar-expand-md>.container-sm,.navbar-expand-md>.container-xl{padding-right:0;padding-left:0}}@media (min-width:720px){.navbar-expand-md{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-md .navbar-nav{flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-md>.container,.navbar-expand-md>.container-fluid,.navbar-expand-md>.container-lg,.navbar-expand-md>.container-md,.navbar-expand-md>.container-sm,.navbar-expand-md>.container-xl{flex-wrap:nowrap}.navbar-expand-md .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}}@media (max-width:959.98px){.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid,.navbar-expand-lg>.container-lg,.navbar-expand-lg>.container-md,.navbar-expand-lg>.container-sm,.navbar-expand-lg>.container-xl{padding-right:0;padding-left:0}}@media (min-width:960px){.navbar-expand-lg{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-lg .navbar-nav{flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid,.navbar-expand-lg>.container-lg,.navbar-expand-lg>.container-md,.navbar-expand-lg>.container-sm,.navbar-expand-lg>.container-xl{flex-wrap:nowrap}.navbar-expand-lg .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}}@media (max-width:1199.98px){.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid,.navbar-expand-xl>.container-lg,.navbar-expand-xl>.container-md,.navbar-expand-xl>.container-sm,.navbar-expand-xl>.container-xl{padding-right:0;padding-left:0}}@media (min-width:1200px){.navbar-expand-xl{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-xl .navbar-nav{flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid,.navbar-expand-xl>.container-lg,.navbar-expand-xl>.container-md,.navbar-expand-xl>.container-sm,.navbar-expand-xl>.container-xl{flex-wrap:nowrap}.navbar-expand-xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}}.navbar-expand{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand>.container,.navbar-expand>.container-fluid,.navbar-expand>.container-lg,.navbar-expand>.container-md,.navbar-expand>.container-sm,.navbar-expand>.container-xl{padding-right:0;padding-left:0}.navbar-expand .navbar-nav{flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand>.container,.navbar-expand>.container-fluid,.navbar-expand>.container-lg,.navbar-expand>.container-md,.navbar-expand>.container-sm,.navbar-expand>.container-xl{flex-wrap:nowrap}.navbar-expand .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-light .navbar-brand,.navbar-light .navbar-brand:focus,.navbar-light .navbar-brand:hover{color:rgba(0,0,0,.9)}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.5)}.navbar-light .navbar-nav .nav-link:focus,.navbar-light .navbar-nav .nav-link:hover{color:rgba(0,0,0,.7)}.navbar-light .navbar-nav .nav-link.disabled{color:rgba(0,0,0,.3)}.navbar-light .navbar-nav .active>.nav-link,.navbar-light .navbar-nav .nav-link.active,.navbar-light .navbar-nav .nav-link.show,.navbar-light .navbar-nav .show>.nav-link{color:rgba(0,0,0,.9)}.navbar-light .navbar-toggler{color:rgba(0,0,0,.5);border-color:rgba(0,0,0,.1)}.navbar-light .navbar-toggler-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30'%3E%3Cpath stroke='rgba(0,0,0,0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E")}.navbar-light .navbar-text{color:rgba(0,0,0,.5)}.navbar-light .navbar-text a,.navbar-light .navbar-text a:focus,.navbar-light .navbar-text a:hover{color:rgba(0,0,0,.9)}.navbar-dark .navbar-brand,.navbar-dark .navbar-brand:focus,.navbar-dark .navbar-brand:hover{color:#fff}.navbar-dark .navbar-nav .nav-link{color:hsla(0,0%,100%,.5)}.navbar-dark .navbar-nav .nav-link:focus,.navbar-dark .navbar-nav .nav-link:hover{color:hsla(0,0%,100%,.75)}.navbar-dark .navbar-nav .nav-link.disabled{color:hsla(0,0%,100%,.25)}.navbar-dark .navbar-nav .active>.nav-link,.navbar-dark .navbar-nav .nav-link.active,.navbar-dark .navbar-nav .nav-link.show,.navbar-dark .navbar-nav .show>.nav-link{color:#fff}.navbar-dark .navbar-toggler{color:hsla(0,0%,100%,.5);border-color:hsla(0,0%,100%,.1)}.navbar-dark .navbar-toggler-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30'%3E%3Cpath stroke='rgba(255,255,255,0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E")}.navbar-dark .navbar-text{color:hsla(0,0%,100%,.5)}.navbar-dark .navbar-text a,.navbar-dark .navbar-text a:focus,.navbar-dark .navbar-text a:hover{color:#fff}.card{position:relative;display:flex;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid rgba(0,0,0,.125);border-radius:.25rem}.card>hr{margin-right:0;margin-left:0}.card>.list-group{border-top:inherit;border-bottom:inherit}.card>.list-group:first-child{border-top-width:0;border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card>.list-group:last-child{border-bottom-width:0;border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card-body{flex:1 1 auto;min-height:1px;padding:1.25rem}.card-title{margin-bottom:.75rem}.card-subtitle{margin-top:-.375rem}.card-subtitle,.card-text:last-child{margin-bottom:0}.card-link:hover{text-decoration:none}.card-link+.card-link{margin-left:1.25rem}.card-header{padding:.75rem 1.25rem;margin-bottom:0;background-color:rgba(0,0,0,.03);border-bottom:1px solid rgba(0,0,0,.125)}.card-header:first-child{border-radius:calc(.25rem - 1px) calc(.25rem - 1px) 0 0}.card-header+.list-group .list-group-item:first-child{border-top:0}.card-footer{padding:.75rem 1.25rem;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.125)}.card-footer:last-child{border-radius:0 0 calc(.25rem - 1px) calc(.25rem - 1px)}.card-header-tabs{margin-bottom:-.75rem;border-bottom:0}.card-header-pills,.card-header-tabs{margin-right:-.625rem;margin-left:-.625rem}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1.25rem}.card-img,.card-img-bottom,.card-img-top{flex-shrink:0;width:100%}.card-img,.card-img-top{border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom{border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card-deck .card{margin-bottom:15px}@media (min-width:540px){.card-deck{display:flex;flex-flow:row wrap;margin-right:-15px;margin-left:-15px}.card-deck .card{flex:1 0 0%;margin-right:15px;margin-bottom:0;margin-left:15px}}.card-group>.card{margin-bottom:15px}@media (min-width:540px){.card-group{display:flex;flex-flow:row wrap}.card-group>.card{flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child) .card-header,.card-group>.card:not(:last-child) .card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child) .card-footer,.card-group>.card:not(:last-child) .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child) .card-header,.card-group>.card:not(:first-child) .card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child) .card-footer,.card-group>.card:not(:first-child) .card-img-bottom{border-bottom-left-radius:0}}.card-columns .card{margin-bottom:.75rem}@media (min-width:540px){.card-columns{column-count:3;column-gap:1.25rem;orphans:1;widows:1}.card-columns .card{display:inline-block;width:100%}}.accordion>.card{overflow:hidden}.accordion>.card:not(:last-of-type){border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.accordion>.card:not(:first-of-type){border-top-left-radius:0;border-top-right-radius:0}.accordion>.card>.card-header{border-radius:0;margin-bottom:-1px}.breadcrumb{flex-wrap:wrap;padding:.75rem 1rem;margin-bottom:1rem;list-style:none;background-color:#e9ecef;border-radius:.25rem}.breadcrumb,.breadcrumb-item{display:flex}.breadcrumb-item+.breadcrumb-item{padding-left:.5rem}.breadcrumb-item+.breadcrumb-item:before{display:inline-block;padding-right:.5rem;color:#6c757d;content:"/"}.breadcrumb-item+.breadcrumb-item:hover:before{text-decoration:underline;text-decoration:none}.breadcrumb-item.active{color:#6c757d}.pagination{display:flex;padding-left:0;list-style:none;border-radius:.25rem}.page-link{position:relative;display:block;padding:.5rem .75rem;margin-left:-1px;line-height:1.25;color:#007bff;background-color:#fff;border:1px solid #dee2e6}.page-link:hover{z-index:2;color:#0056b3;text-decoration:none;background-color:#e9ecef;border-color:#dee2e6}.page-link:focus{z-index:3;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.page-item:first-child .page-link{margin-left:0;border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.page-item:last-child .page-link{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.page-item.active .page-link{z-index:3;color:#fff;background-color:#007bff;border-color:#007bff}.page-item.disabled .page-link{color:#6c757d;pointer-events:none;cursor:auto;background-color:#fff;border-color:#dee2e6}.pagination-lg .page-link{padding:.75rem 1.5rem;font-size:1.25rem;line-height:1.5}.pagination-lg .page-item:first-child .page-link{border-top-left-radius:.3rem;border-bottom-left-radius:.3rem}.pagination-lg .page-item:last-child .page-link{border-top-right-radius:.3rem;border-bottom-right-radius:.3rem}.pagination-sm .page-link{padding:.25rem .5rem;font-size:.875rem;line-height:1.5}.pagination-sm .page-item:first-child .page-link{border-top-left-radius:.2rem;border-bottom-left-radius:.2rem}.pagination-sm .page-item:last-child .page-link{border-top-right-radius:.2rem;border-bottom-right-radius:.2rem}.badge{display:inline-block;padding:.25em .4em;font-size:75%;font-weight:700;line-height:1;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.badge{transition:none}}a.badge:focus,a.badge:hover{text-decoration:none}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.badge-pill{padding-right:.6em;padding-left:.6em;border-radius:10rem}.badge-primary{color:#fff;background-color:#007bff}a.badge-primary:focus,a.badge-primary:hover{color:#fff;background-color:#0062cc}a.badge-primary.focus,a.badge-primary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.badge-secondary{color:#fff;background-color:#6c757d}a.badge-secondary:focus,a.badge-secondary:hover{color:#fff;background-color:#545b62}a.badge-secondary.focus,a.badge-secondary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.badge-success{color:#fff;background-color:#28a745}a.badge-success:focus,a.badge-success:hover{color:#fff;background-color:#1e7e34}a.badge-success.focus,a.badge-success:focus{outline:0;box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.badge-info{color:#fff;background-color:#17a2b8}a.badge-info:focus,a.badge-info:hover{color:#fff;background-color:#117a8b}a.badge-info.focus,a.badge-info:focus{outline:0;box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.badge-warning{color:#212529;background-color:#ffc107}a.badge-warning:focus,a.badge-warning:hover{color:#212529;background-color:#d39e00}a.badge-warning.focus,a.badge-warning:focus{outline:0;box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.badge-danger{color:#fff;background-color:#dc3545}a.badge-danger:focus,a.badge-danger:hover{color:#fff;background-color:#bd2130}a.badge-danger.focus,a.badge-danger:focus{outline:0;box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.badge-light{color:#212529;background-color:#f8f9fa}a.badge-light:focus,a.badge-light:hover{color:#212529;background-color:#dae0e5}a.badge-light.focus,a.badge-light:focus{outline:0;box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.badge-dark{color:#fff;background-color:#343a40}a.badge-dark:focus,a.badge-dark:hover{color:#fff;background-color:#1d2124}a.badge-dark.focus,a.badge-dark:focus{outline:0;box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.jumbotron{padding:2rem 1rem;margin-bottom:2rem;background-color:#e9ecef;border-radius:.3rem}@media (min-width:540px){.jumbotron{padding:4rem 2rem}}.jumbotron-fluid{padding-right:0;padding-left:0;border-radius:0}.alert{position:relative;padding:.75rem 1.25rem;margin-bottom:1rem;border:1px solid transparent;border-radius:.25rem}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:4rem}.alert-dismissible .close{position:absolute;top:0;right:0;padding:.75rem 1.25rem;color:inherit}.alert-primary{color:#004085;background-color:#cce5ff;border-color:#b8daff}.alert-primary hr{border-top-color:#9fcdff}.alert-primary .alert-link{color:#002752}.alert-secondary{color:#383d41;background-color:#e2e3e5;border-color:#d6d8db}.alert-secondary hr{border-top-color:#c8cbcf}.alert-secondary .alert-link{color:#202326}.alert-success{color:#155724;background-color:#d4edda;border-color:#c3e6cb}.alert-success hr{border-top-color:#b1dfbb}.alert-success .alert-link{color:#0b2e13}.alert-info{color:#0c5460;background-color:#d1ecf1;border-color:#bee5eb}.alert-info hr{border-top-color:#abdde5}.alert-info .alert-link{color:#062c33}.alert-warning{color:#856404;background-color:#fff3cd;border-color:#ffeeba}.alert-warning hr{border-top-color:#ffe8a1}.alert-warning .alert-link{color:#533f03}.alert-danger{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.alert-danger hr{border-top-color:#f1b0b7}.alert-danger .alert-link{color:#491217}.alert-light{color:#818182;background-color:#fefefe;border-color:#fdfdfe}.alert-light hr{border-top-color:#ececf6}.alert-light .alert-link{color:#686868}.alert-dark{color:#1b1e21;background-color:#d6d8d9;border-color:#c6c8ca}.alert-dark hr{border-top-color:#b9bbbe}.alert-dark .alert-link{color:#040505}@keyframes progress-bar-stripes{0%{background-position:1rem 0}to{background-position:0 0}}.progress{height:1rem;line-height:0;font-size:.75rem;background-color:#e9ecef;border-radius:.25rem}.progress,.progress-bar{display:flex;overflow:hidden}.progress-bar{flex-direction:column;justify-content:center;color:#fff;text-align:center;white-space:nowrap;background-color:#007bff;transition:width .6s ease}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:1rem 1rem}.progress-bar-animated{animation:progress-bar-stripes 1s linear infinite}@media (prefers-reduced-motion:reduce){.progress-bar-animated{animation:none}}.media{display:flex;align-items:flex-start}.media-body{flex:1}.list-group{display:flex;flex-direction:column;padding-left:0;margin-bottom:0;border-radius:.25rem}.list-group-item-action{width:100%;color:#495057;text-align:inherit}.list-group-item-action:focus,.list-group-item-action:hover{z-index:1;color:#495057;text-decoration:none;background-color:#f8f9fa}.list-group-item-action:active{color:#212529;background-color:#e9ecef}.list-group-item{position:relative;display:block;padding:.75rem 1.25rem;background-color:#fff;border:1px solid rgba(0,0,0,.125)}.list-group-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.list-group-item:last-child{border-bottom-right-radius:inherit;border-bottom-left-radius:inherit}.list-group-item.disabled,.list-group-item:disabled{color:#6c757d;pointer-events:none;background-color:#fff}.list-group-item.active{z-index:2;color:#fff;background-color:#007bff;border-color:#007bff}.list-group-item+.list-group-item{border-top-width:0}.list-group-item+.list-group-item.active{margin-top:-1px;border-top-width:1px}.list-group-horizontal{flex-direction:row}.list-group-horizontal>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal>.list-group-item.active{margin-top:0}.list-group-horizontal>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}@media (min-width:540px){.list-group-horizontal-sm{flex-direction:row}.list-group-horizontal-sm>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-sm>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-sm>.list-group-item.active{margin-top:0}.list-group-horizontal-sm>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-sm>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:720px){.list-group-horizontal-md{flex-direction:row}.list-group-horizontal-md>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-md>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-md>.list-group-item.active{margin-top:0}.list-group-horizontal-md>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-md>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:960px){.list-group-horizontal-lg{flex-direction:row}.list-group-horizontal-lg>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-lg>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-lg>.list-group-item.active{margin-top:0}.list-group-horizontal-lg>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-lg>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:1200px){.list-group-horizontal-xl{flex-direction:row}.list-group-horizontal-xl>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-xl>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-xl>.list-group-item.active{margin-top:0}.list-group-horizontal-xl>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-xl>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}.list-group-flush{border-radius:0}.list-group-flush>.list-group-item{border-width:0 0 1px}.list-group-flush>.list-group-item:last-child{border-bottom-width:0}.list-group-item-primary{color:#004085;background-color:#b8daff}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{color:#004085;background-color:#9fcdff}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#004085;border-color:#004085}.list-group-item-secondary{color:#383d41;background-color:#d6d8db}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{color:#383d41;background-color:#c8cbcf}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#383d41;border-color:#383d41}.list-group-item-success{color:#155724;background-color:#c3e6cb}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{color:#155724;background-color:#b1dfbb}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#155724;border-color:#155724}.list-group-item-info{color:#0c5460;background-color:#bee5eb}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{color:#0c5460;background-color:#abdde5}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#0c5460;border-color:#0c5460}.list-group-item-warning{color:#856404;background-color:#ffeeba}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{color:#856404;background-color:#ffe8a1}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#856404;border-color:#856404}.list-group-item-danger{color:#721c24;background-color:#f5c6cb}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{color:#721c24;background-color:#f1b0b7}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#721c24;border-color:#721c24}.list-group-item-light{color:#818182;background-color:#fdfdfe}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{color:#818182;background-color:#ececf6}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#818182;border-color:#818182}.list-group-item-dark{color:#1b1e21;background-color:#c6c8ca}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{color:#1b1e21;background-color:#b9bbbe}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#1b1e21;border-color:#1b1e21}.close{float:right;font-size:1.5rem;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.5}.close:hover{color:#000;text-decoration:none}.close:not(:disabled):not(.disabled):focus,.close:not(:disabled):not(.disabled):hover{opacity:.75}button.close{padding:0;background-color:transparent;border:0}a.close.disabled{pointer-events:none}.toast{max-width:350px;overflow:hidden;font-size:.875rem;background-color:hsla(0,0%,100%,.85);background-clip:padding-box;border:1px solid rgba(0,0,0,.1);box-shadow:0 .25rem .75rem rgba(0,0,0,.1);backdrop-filter:blur(10px);opacity:0;border-radius:.25rem}.toast:not(:last-child){margin-bottom:.75rem}.toast.showing{opacity:1}.toast.show{display:block;opacity:1}.toast.hide{display:none}.toast-header{display:flex;align-items:center;padding:.25rem .75rem;color:#6c757d;background-color:hsla(0,0%,100%,.85);background-clip:padding-box;border-bottom:1px solid rgba(0,0,0,.05)}.toast-body{padding:.75rem}.modal-open{overflow:hidden}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal{position:fixed;top:0;left:0;z-index:1050;display:none;width:100%;height:100%;overflow:hidden;outline:0}.modal-dialog{position:relative;width:auto;margin:.5rem;pointer-events:none}.modal.fade .modal-dialog{transition:transform .3s ease-out;transform:translateY(-50px)}@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{transform:none}.modal.modal-static .modal-dialog{transform:scale(1.02)}.modal-dialog-scrollable{display:flex;max-height:calc(100% - 1rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 1rem);overflow:hidden}.modal-dialog-scrollable .modal-footer,.modal-dialog-scrollable .modal-header{flex-shrink:0}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - 1rem)}.modal-dialog-centered:before{display:block;height:calc(100vh - 1rem);height:min-content;content:""}.modal-dialog-centered.modal-dialog-scrollable{flex-direction:column;justify-content:center;height:100%}.modal-dialog-centered.modal-dialog-scrollable .modal-content{max-height:none}.modal-dialog-centered.modal-dialog-scrollable:before{content:none}.modal-content{position:relative;display:flex;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem;outline:0}.modal-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.5}.modal-header{display:flex;align-items:flex-start;justify-content:space-between;padding:1rem;border-bottom:1px solid #dee2e6;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.modal-header .close{padding:1rem;margin:-1rem -1rem -1rem auto}.modal-title{margin-bottom:0;line-height:1.5}.modal-body{position:relative;flex:1 1 auto;padding:1rem}.modal-footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;padding:.75rem;border-top:1px solid #dee2e6;border-bottom-right-radius:calc(.3rem - 1px);border-bottom-left-radius:calc(.3rem - 1px)}.modal-footer>*{margin:.25rem}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:540px){.modal-dialog{max-width:500px;margin:1.75rem auto}.modal-dialog-scrollable{max-height:calc(100% - 3.5rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 3.5rem)}.modal-dialog-centered{min-height:calc(100% - 3.5rem)}.modal-dialog-centered:before{height:calc(100vh - 3.5rem);height:min-content}.modal-sm{max-width:300px}}@media (min-width:960px){.modal-lg,.modal-xl{max-width:800px}}@media (min-width:1200px){.modal-xl{max-width:1140px}}.tooltip{position:absolute;z-index:1070;display:block;margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;opacity:0}.tooltip.show{opacity:.9}.tooltip .arrow{position:absolute;display:block;width:.8rem;height:.4rem}.tooltip .arrow:before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-auto[x-placement^=top],.bs-tooltip-top{padding:.4rem 0}.bs-tooltip-auto[x-placement^=top] .arrow,.bs-tooltip-top .arrow{bottom:0}.bs-tooltip-auto[x-placement^=top] .arrow:before,.bs-tooltip-top .arrow:before{top:0;border-width:.4rem .4rem 0;border-top-color:#000}.bs-tooltip-auto[x-placement^=right],.bs-tooltip-right{padding:0 .4rem}.bs-tooltip-auto[x-placement^=right] .arrow,.bs-tooltip-right .arrow{left:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=right] .arrow:before,.bs-tooltip-right .arrow:before{right:0;border-width:.4rem .4rem .4rem 0;border-right-color:#000}.bs-tooltip-auto[x-placement^=bottom],.bs-tooltip-bottom{padding:.4rem 0}.bs-tooltip-auto[x-placement^=bottom] .arrow,.bs-tooltip-bottom .arrow{top:0}.bs-tooltip-auto[x-placement^=bottom] .arrow:before,.bs-tooltip-bottom .arrow:before{bottom:0;border-width:0 .4rem .4rem;border-bottom-color:#000}.bs-tooltip-auto[x-placement^=left],.bs-tooltip-left{padding:0 .4rem}.bs-tooltip-auto[x-placement^=left] .arrow,.bs-tooltip-left .arrow{right:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=left] .arrow:before,.bs-tooltip-left .arrow:before{left:0;border-width:.4rem 0 .4rem .4rem;border-left-color:#000}.tooltip-inner{max-width:200px;padding:.25rem .5rem;color:#fff;text-align:center;background-color:#000;border-radius:.25rem}.popover{top:0;left:0;z-index:1060;max-width:276px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem}.popover,.popover .arrow{position:absolute;display:block}.popover .arrow{width:1rem;height:.5rem;margin:0 .3rem}.popover .arrow:after,.popover .arrow:before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid}.bs-popover-auto[x-placement^=top],.bs-popover-top{margin-bottom:.5rem}.bs-popover-auto[x-placement^=top]>.arrow,.bs-popover-top>.arrow{bottom:calc(-.5rem - 1px)}.bs-popover-auto[x-placement^=top]>.arrow:before,.bs-popover-top>.arrow:before{bottom:0;border-width:.5rem .5rem 0;border-top-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=top]>.arrow:after,.bs-popover-top>.arrow:after{bottom:1px;border-width:.5rem .5rem 0;border-top-color:#fff}.bs-popover-auto[x-placement^=right],.bs-popover-right{margin-left:.5rem}.bs-popover-auto[x-placement^=right]>.arrow,.bs-popover-right>.arrow{left:calc(-.5rem - 1px);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=right]>.arrow:before,.bs-popover-right>.arrow:before{left:0;border-width:.5rem .5rem .5rem 0;border-right-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=right]>.arrow:after,.bs-popover-right>.arrow:after{left:1px;border-width:.5rem .5rem .5rem 0;border-right-color:#fff}.bs-popover-auto[x-placement^=bottom],.bs-popover-bottom{margin-top:.5rem}.bs-popover-auto[x-placement^=bottom]>.arrow,.bs-popover-bottom>.arrow{top:calc(-.5rem - 1px)}.bs-popover-auto[x-placement^=bottom]>.arrow:before,.bs-popover-bottom>.arrow:before{top:0;border-width:0 .5rem .5rem;border-bottom-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=bottom]>.arrow:after,.bs-popover-bottom>.arrow:after{top:1px;border-width:0 .5rem .5rem;border-bottom-color:#fff}.bs-popover-auto[x-placement^=bottom] .popover-header:before,.bs-popover-bottom .popover-header:before{position:absolute;top:0;left:50%;display:block;width:1rem;margin-left:-.5rem;content:"";border-bottom:1px solid #f7f7f7}.bs-popover-auto[x-placement^=left],.bs-popover-left{margin-right:.5rem}.bs-popover-auto[x-placement^=left]>.arrow,.bs-popover-left>.arrow{right:calc(-.5rem - 1px);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=left]>.arrow:before,.bs-popover-left>.arrow:before{right:0;border-width:.5rem 0 .5rem .5rem;border-left-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=left]>.arrow:after,.bs-popover-left>.arrow:after{right:1px;border-width:.5rem 0 .5rem .5rem;border-left-color:#fff}.popover-header{padding:.5rem .75rem;margin-bottom:0;font-size:1rem;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.popover-header:empty{display:none}.popover-body{padding:.5rem .75rem;color:#212529}.carousel{position:relative}.carousel.pointer-event{touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner:after{display:block;clear:both;content:""}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;backface-visibility:hidden;transition:transform .6s ease-in-out}@media (prefers-reduced-motion:reduce){.carousel-item{transition:none}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.active.carousel-item-right,.carousel-item-next:not(.carousel-item-left){transform:translateX(100%)}.active.carousel-item-left,.carousel-item-prev:not(.carousel-item-right){transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;transition-property:opacity;transform:none}.carousel-fade .carousel-item-next.carousel-item-left,.carousel-fade .carousel-item-prev.carousel-item-right,.carousel-fade .carousel-item.active{z-index:1;opacity:1}.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{z-index:0;opacity:0;transition:opacity 0s .6s}@media (prefers-reduced-motion:reduce){.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{transition:none}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;width:15%;color:#fff;text-align:center;opacity:.5;transition:opacity .15s ease}@media (prefers-reduced-motion:reduce){.carousel-control-next,.carousel-control-prev{transition:none}}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:20px;height:20px;background:no-repeat 50%/100% 100%}.carousel-control-prev-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8'%3E%3Cpath d='M5.25 0l-4 4 4 4 1.5-1.5L4.25 4l2.5-2.5L5.25 0z'/%3E%3C/svg%3E")}.carousel-control-next-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8'%3E%3Cpath d='M2.75 0l-1.5 1.5L3.75 4l-2.5 2.5L2.75 8l4-4-4-4z'/%3E%3C/svg%3E")}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:15;display:flex;justify-content:center;padding-left:0;margin-right:15%;margin-left:15%;list-style:none}.carousel-indicators li{box-sizing:content-box;flex:0 1 auto;width:30px;height:3px;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#fff;background-clip:padding-box;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media (prefers-reduced-motion:reduce){.carousel-indicators li{transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center}@keyframes spinner-border{to{transform:rotate(1turn)}}.spinner-border{display:inline-block;width:2rem;height:2rem;vertical-align:text-bottom;border:.25em solid;border-right:.25em solid transparent;border-radius:50%;animation:spinner-border .75s linear infinite}.spinner-border-sm{width:1rem;height:1rem;border-width:.2em}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}.spinner-grow{display:inline-block;width:2rem;height:2rem;vertical-align:text-bottom;background-color:currentColor;border-radius:50%;opacity:0;animation:spinner-grow .75s linear infinite}.spinner-grow-sm{width:1rem;height:1rem}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.bg-primary{background-color:#007bff!important}a.bg-primary:focus,a.bg-primary:hover,button.bg-primary:focus,button.bg-primary:hover{background-color:#0062cc!important}.bg-secondary{background-color:#6c757d!important}a.bg-secondary:focus,a.bg-secondary:hover,button.bg-secondary:focus,button.bg-secondary:hover{background-color:#545b62!important}.bg-success{background-color:#28a745!important}a.bg-success:focus,a.bg-success:hover,button.bg-success:focus,button.bg-success:hover{background-color:#1e7e34!important}.bg-info{background-color:#17a2b8!important}a.bg-info:focus,a.bg-info:hover,button.bg-info:focus,button.bg-info:hover{background-color:#117a8b!important}.bg-warning{background-color:#ffc107!important}a.bg-warning:focus,a.bg-warning:hover,button.bg-warning:focus,button.bg-warning:hover{background-color:#d39e00!important}.bg-danger{background-color:#dc3545!important}a.bg-danger:focus,a.bg-danger:hover,button.bg-danger:focus,button.bg-danger:hover{background-color:#bd2130!important}.bg-light{background-color:#f8f9fa!important}a.bg-light:focus,a.bg-light:hover,button.bg-light:focus,button.bg-light:hover{background-color:#dae0e5!important}.bg-dark{background-color:#343a40!important}a.bg-dark:focus,a.bg-dark:hover,button.bg-dark:focus,button.bg-dark:hover{background-color:#1d2124!important}.bg-white{background-color:#fff!important}.bg-transparent{background-color:transparent!important}.border{border:1px solid #dee2e6!important}.border-top{border-top:1px solid #dee2e6!important}.border-right{border-right:1px solid #dee2e6!important}.border-bottom{border-bottom:1px solid #dee2e6!important}.border-left{border-left:1px solid #dee2e6!important}.border-0{border:0!important}.border-top-0{border-top:0!important}.border-right-0{border-right:0!important}.border-bottom-0{border-bottom:0!important}.border-left-0{border-left:0!important}.border-primary{border-color:#007bff!important}.border-secondary{border-color:#6c757d!important}.border-success{border-color:#28a745!important}.border-info{border-color:#17a2b8!important}.border-warning{border-color:#ffc107!important}.border-danger{border-color:#dc3545!important}.border-light{border-color:#f8f9fa!important}.border-dark{border-color:#343a40!important}.border-white{border-color:#fff!important}.rounded-sm{border-radius:.2rem!important}.rounded{border-radius:.25rem!important}.rounded-top{border-top-left-radius:.25rem!important}.rounded-right,.rounded-top{border-top-right-radius:.25rem!important}.rounded-bottom,.rounded-right{border-bottom-right-radius:.25rem!important}.rounded-bottom,.rounded-left{border-bottom-left-radius:.25rem!important}.rounded-left{border-top-left-radius:.25rem!important}.rounded-lg{border-radius:.3rem!important}.rounded-circle{border-radius:50%!important}.rounded-pill{border-radius:50rem!important}.rounded-0{border-radius:0!important}.clearfix:after{display:block;clear:both;content:""}.d-none{display:none!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:flex!important}.d-inline-flex{display:inline-flex!important}@media (min-width:540px){.d-sm-none{display:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:flex!important}.d-sm-inline-flex{display:inline-flex!important}}@media (min-width:720px){.d-md-none{display:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:flex!important}.d-md-inline-flex{display:inline-flex!important}}@media (min-width:960px){.d-lg-none{display:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:flex!important}.d-lg-inline-flex{display:inline-flex!important}}@media (min-width:1200px){.d-xl-none{display:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:flex!important}.d-xl-inline-flex{display:inline-flex!important}}@media print{.d-print-none{display:none!important}.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:flex!important}.d-print-inline-flex{display:inline-flex!important}}.embed-responsive{position:relative;display:block;width:100%;padding:0;overflow:hidden}.embed-responsive:before{display:block;content:""}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-21by9:before{padding-top:42.85714%}.embed-responsive-16by9:before{padding-top:56.25%}.embed-responsive-4by3:before{padding-top:75%}.embed-responsive-1by1:before{padding-top:100%}.flex-row{flex-direction:row!important}.flex-column{flex-direction:column!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-column-reverse{flex-direction:column-reverse!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.flex-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-fill{flex:1 1 auto!important}.flex-grow-0{flex-grow:0!important}.flex-grow-1{flex-grow:1!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.justify-content-start{justify-content:flex-start!important}.justify-content-end{justify-content:flex-end!important}.justify-content-center{justify-content:center!important}.justify-content-between{justify-content:space-between!important}.justify-content-around{justify-content:space-around!important}.align-items-start{align-items:flex-start!important}.align-items-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-baseline{align-items:baseline!important}.align-items-stretch{align-items:stretch!important}.align-content-start{align-content:flex-start!important}.align-content-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-between{align-content:space-between!important}.align-content-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-self-auto{align-self:auto!important}.align-self-start{align-self:flex-start!important}.align-self-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-baseline{align-self:baseline!important}.align-self-stretch{align-self:stretch!important}@media (min-width:540px){.flex-sm-row{flex-direction:row!important}.flex-sm-column{flex-direction:column!important}.flex-sm-row-reverse{flex-direction:row-reverse!important}.flex-sm-column-reverse{flex-direction:column-reverse!important}.flex-sm-wrap{flex-wrap:wrap!important}.flex-sm-nowrap{flex-wrap:nowrap!important}.flex-sm-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-sm-fill{flex:1 1 auto!important}.flex-sm-grow-0{flex-grow:0!important}.flex-sm-grow-1{flex-grow:1!important}.flex-sm-shrink-0{flex-shrink:0!important}.flex-sm-shrink-1{flex-shrink:1!important}.justify-content-sm-start{justify-content:flex-start!important}.justify-content-sm-end{justify-content:flex-end!important}.justify-content-sm-center{justify-content:center!important}.justify-content-sm-between{justify-content:space-between!important}.justify-content-sm-around{justify-content:space-around!important}.align-items-sm-start{align-items:flex-start!important}.align-items-sm-end{align-items:flex-end!important}.align-items-sm-center{align-items:center!important}.align-items-sm-baseline{align-items:baseline!important}.align-items-sm-stretch{align-items:stretch!important}.align-content-sm-start{align-content:flex-start!important}.align-content-sm-end{align-content:flex-end!important}.align-content-sm-center{align-content:center!important}.align-content-sm-between{align-content:space-between!important}.align-content-sm-around{align-content:space-around!important}.align-content-sm-stretch{align-content:stretch!important}.align-self-sm-auto{align-self:auto!important}.align-self-sm-start{align-self:flex-start!important}.align-self-sm-end{align-self:flex-end!important}.align-self-sm-center{align-self:center!important}.align-self-sm-baseline{align-self:baseline!important}.align-self-sm-stretch{align-self:stretch!important}}@media (min-width:720px){.flex-md-row{flex-direction:row!important}.flex-md-column{flex-direction:column!important}.flex-md-row-reverse{flex-direction:row-reverse!important}.flex-md-column-reverse{flex-direction:column-reverse!important}.flex-md-wrap{flex-wrap:wrap!important}.flex-md-nowrap{flex-wrap:nowrap!important}.flex-md-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-md-fill{flex:1 1 auto!important}.flex-md-grow-0{flex-grow:0!important}.flex-md-grow-1{flex-grow:1!important}.flex-md-shrink-0{flex-shrink:0!important}.flex-md-shrink-1{flex-shrink:1!important}.justify-content-md-start{justify-content:flex-start!important}.justify-content-md-end{justify-content:flex-end!important}.justify-content-md-center{justify-content:center!important}.justify-content-md-between{justify-content:space-between!important}.justify-content-md-around{justify-content:space-around!important}.align-items-md-start{align-items:flex-start!important}.align-items-md-end{align-items:flex-end!important}.align-items-md-center{align-items:center!important}.align-items-md-baseline{align-items:baseline!important}.align-items-md-stretch{align-items:stretch!important}.align-content-md-start{align-content:flex-start!important}.align-content-md-end{align-content:flex-end!important}.align-content-md-center{align-content:center!important}.align-content-md-between{align-content:space-between!important}.align-content-md-around{align-content:space-around!important}.align-content-md-stretch{align-content:stretch!important}.align-self-md-auto{align-self:auto!important}.align-self-md-start{align-self:flex-start!important}.align-self-md-end{align-self:flex-end!important}.align-self-md-center{align-self:center!important}.align-self-md-baseline{align-self:baseline!important}.align-self-md-stretch{align-self:stretch!important}}@media (min-width:960px){.flex-lg-row{flex-direction:row!important}.flex-lg-column{flex-direction:column!important}.flex-lg-row-reverse{flex-direction:row-reverse!important}.flex-lg-column-reverse{flex-direction:column-reverse!important}.flex-lg-wrap{flex-wrap:wrap!important}.flex-lg-nowrap{flex-wrap:nowrap!important}.flex-lg-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-lg-fill{flex:1 1 auto!important}.flex-lg-grow-0{flex-grow:0!important}.flex-lg-grow-1{flex-grow:1!important}.flex-lg-shrink-0{flex-shrink:0!important}.flex-lg-shrink-1{flex-shrink:1!important}.justify-content-lg-start{justify-content:flex-start!important}.justify-content-lg-end{justify-content:flex-end!important}.justify-content-lg-center{justify-content:center!important}.justify-content-lg-between{justify-content:space-between!important}.justify-content-lg-around{justify-content:space-around!important}.align-items-lg-start{align-items:flex-start!important}.align-items-lg-end{align-items:flex-end!important}.align-items-lg-center{align-items:center!important}.align-items-lg-baseline{align-items:baseline!important}.align-items-lg-stretch{align-items:stretch!important}.align-content-lg-start{align-content:flex-start!important}.align-content-lg-end{align-content:flex-end!important}.align-content-lg-center{align-content:center!important}.align-content-lg-between{align-content:space-between!important}.align-content-lg-around{align-content:space-around!important}.align-content-lg-stretch{align-content:stretch!important}.align-self-lg-auto{align-self:auto!important}.align-self-lg-start{align-self:flex-start!important}.align-self-lg-end{align-self:flex-end!important}.align-self-lg-center{align-self:center!important}.align-self-lg-baseline{align-self:baseline!important}.align-self-lg-stretch{align-self:stretch!important}}@media (min-width:1200px){.flex-xl-row{flex-direction:row!important}.flex-xl-column{flex-direction:column!important}.flex-xl-row-reverse{flex-direction:row-reverse!important}.flex-xl-column-reverse{flex-direction:column-reverse!important}.flex-xl-wrap{flex-wrap:wrap!important}.flex-xl-nowrap{flex-wrap:nowrap!important}.flex-xl-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-xl-fill{flex:1 1 auto!important}.flex-xl-grow-0{flex-grow:0!important}.flex-xl-grow-1{flex-grow:1!important}.flex-xl-shrink-0{flex-shrink:0!important}.flex-xl-shrink-1{flex-shrink:1!important}.justify-content-xl-start{justify-content:flex-start!important}.justify-content-xl-end{justify-content:flex-end!important}.justify-content-xl-center{justify-content:center!important}.justify-content-xl-between{justify-content:space-between!important}.justify-content-xl-around{justify-content:space-around!important}.align-items-xl-start{align-items:flex-start!important}.align-items-xl-end{align-items:flex-end!important}.align-items-xl-center{align-items:center!important}.align-items-xl-baseline{align-items:baseline!important}.align-items-xl-stretch{align-items:stretch!important}.align-content-xl-start{align-content:flex-start!important}.align-content-xl-end{align-content:flex-end!important}.align-content-xl-center{align-content:center!important}.align-content-xl-between{align-content:space-between!important}.align-content-xl-around{align-content:space-around!important}.align-content-xl-stretch{align-content:stretch!important}.align-self-xl-auto{align-self:auto!important}.align-self-xl-start{align-self:flex-start!important}.align-self-xl-end{align-self:flex-end!important}.align-self-xl-center{align-self:center!important}.align-self-xl-baseline{align-self:baseline!important}.align-self-xl-stretch{align-self:stretch!important}}.float-left{float:left!important}.float-right{float:right!important}.float-none{float:none!important}@media (min-width:540px){.float-sm-left{float:left!important}.float-sm-right{float:right!important}.float-sm-none{float:none!important}}@media (min-width:720px){.float-md-left{float:left!important}.float-md-right{float:right!important}.float-md-none{float:none!important}}@media (min-width:960px){.float-lg-left{float:left!important}.float-lg-right{float:right!important}.float-lg-none{float:none!important}}@media (min-width:1200px){.float-xl-left{float:left!important}.float-xl-right{float:right!important}.float-xl-none{float:none!important}}.user-select-all{user-select:all!important}.user-select-auto{user-select:auto!important}.user-select-none{user-select:none!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:sticky!important}.fixed-top{top:0}.fixed-bottom,.fixed-top{position:fixed;right:0;left:0;z-index:1030}.fixed-bottom{bottom:0}@supports (position:sticky){.sticky-top{position:sticky;top:0;z-index:1020}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal}.shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important}.shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}.shadow-none{box-shadow:none!important}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mw-100{max-width:100%!important}.mh-100{max-height:100%!important}.min-vw-100{min-width:100vw!important}.min-vh-100{min-height:100vh!important}.vw-100{width:100vw!important}.vh-100{height:100vh!important}.m-0{margin:0!important}.mt-0,.my-0{margin-top:0!important}.mr-0,.mx-0{margin-right:0!important}.mb-0,.my-0{margin-bottom:0!important}.ml-0,.mx-0{margin-left:0!important}.m-1{margin:.25rem!important}.mt-1,.my-1{margin-top:.25rem!important}.mr-1,.mx-1{margin-right:.25rem!important}.mb-1,.my-1{margin-bottom:.25rem!important}.ml-1,.mx-1{margin-left:.25rem!important}.m-2{margin:.5rem!important}.mt-2,.my-2{margin-top:.5rem!important}.mr-2,.mx-2{margin-right:.5rem!important}.mb-2,.my-2{margin-bottom:.5rem!important}.ml-2,.mx-2{margin-left:.5rem!important}.m-3{margin:1rem!important}.mt-3,.my-3{margin-top:1rem!important}.mr-3,.mx-3{margin-right:1rem!important}.mb-3,.my-3{margin-bottom:1rem!important}.ml-3,.mx-3{margin-left:1rem!important}.m-4{margin:1.5rem!important}.mt-4,.my-4{margin-top:1.5rem!important}.mr-4,.mx-4{margin-right:1.5rem!important}.mb-4,.my-4{margin-bottom:1.5rem!important}.ml-4,.mx-4{margin-left:1.5rem!important}.m-5{margin:3rem!important}.mt-5,.my-5{margin-top:3rem!important}.mr-5,.mx-5{margin-right:3rem!important}.mb-5,.my-5{margin-bottom:3rem!important}.ml-5,.mx-5{margin-left:3rem!important}.p-0{padding:0!important}.pt-0,.py-0{padding-top:0!important}.pr-0,.px-0{padding-right:0!important}.pb-0,.py-0{padding-bottom:0!important}.pl-0,.px-0{padding-left:0!important}.p-1{padding:.25rem!important}.pt-1,.py-1{padding-top:.25rem!important}.pr-1,.px-1{padding-right:.25rem!important}.pb-1,.py-1{padding-bottom:.25rem!important}.pl-1,.px-1{padding-left:.25rem!important}.p-2{padding:.5rem!important}.pt-2,.py-2{padding-top:.5rem!important}.pr-2,.px-2{padding-right:.5rem!important}.pb-2,.py-2{padding-bottom:.5rem!important}.pl-2,.px-2{padding-left:.5rem!important}.p-3{padding:1rem!important}.pt-3,.py-3{padding-top:1rem!important}.pr-3,.px-3{padding-right:1rem!important}.pb-3,.py-3{padding-bottom:1rem!important}.pl-3,.px-3{padding-left:1rem!important}.p-4{padding:1.5rem!important}.pt-4,.py-4{padding-top:1.5rem!important}.pr-4,.px-4{padding-right:1.5rem!important}.pb-4,.py-4{padding-bottom:1.5rem!important}.pl-4,.px-4{padding-left:1.5rem!important}.p-5{padding:3rem!important}.pt-5,.py-5{padding-top:3rem!important}.pr-5,.px-5{padding-right:3rem!important}.pb-5,.py-5{padding-bottom:3rem!important}.pl-5,.px-5{padding-left:3rem!important}.m-n1{margin:-.25rem!important}.mt-n1,.my-n1{margin-top:-.25rem!important}.mr-n1,.mx-n1{margin-right:-.25rem!important}.mb-n1,.my-n1{margin-bottom:-.25rem!important}.ml-n1,.mx-n1{margin-left:-.25rem!important}.m-n2{margin:-.5rem!important}.mt-n2,.my-n2{margin-top:-.5rem!important}.mr-n2,.mx-n2{margin-right:-.5rem!important}.mb-n2,.my-n2{margin-bottom:-.5rem!important}.ml-n2,.mx-n2{margin-left:-.5rem!important}.m-n3{margin:-1rem!important}.mt-n3,.my-n3{margin-top:-1rem!important}.mr-n3,.mx-n3{margin-right:-1rem!important}.mb-n3,.my-n3{margin-bottom:-1rem!important}.ml-n3,.mx-n3{margin-left:-1rem!important}.m-n4{margin:-1.5rem!important}.mt-n4,.my-n4{margin-top:-1.5rem!important}.mr-n4,.mx-n4{margin-right:-1.5rem!important}.mb-n4,.my-n4{margin-bottom:-1.5rem!important}.ml-n4,.mx-n4{margin-left:-1.5rem!important}.m-n5{margin:-3rem!important}.mt-n5,.my-n5{margin-top:-3rem!important}.mr-n5,.mx-n5{margin-right:-3rem!important}.mb-n5,.my-n5{margin-bottom:-3rem!important}.ml-n5,.mx-n5{margin-left:-3rem!important}.m-auto{margin:auto!important}.mt-auto,.my-auto{margin-top:auto!important}.mr-auto,.mx-auto{margin-right:auto!important}.mb-auto,.my-auto{margin-bottom:auto!important}.ml-auto,.mx-auto{margin-left:auto!important}@media (min-width:540px){.m-sm-0{margin:0!important}.mt-sm-0,.my-sm-0{margin-top:0!important}.mr-sm-0,.mx-sm-0{margin-right:0!important}.mb-sm-0,.my-sm-0{margin-bottom:0!important}.ml-sm-0,.mx-sm-0{margin-left:0!important}.m-sm-1{margin:.25rem!important}.mt-sm-1,.my-sm-1{margin-top:.25rem!important}.mr-sm-1,.mx-sm-1{margin-right:.25rem!important}.mb-sm-1,.my-sm-1{margin-bottom:.25rem!important}.ml-sm-1,.mx-sm-1{margin-left:.25rem!important}.m-sm-2{margin:.5rem!important}.mt-sm-2,.my-sm-2{margin-top:.5rem!important}.mr-sm-2,.mx-sm-2{margin-right:.5rem!important}.mb-sm-2,.my-sm-2{margin-bottom:.5rem!important}.ml-sm-2,.mx-sm-2{margin-left:.5rem!important}.m-sm-3{margin:1rem!important}.mt-sm-3,.my-sm-3{margin-top:1rem!important}.mr-sm-3,.mx-sm-3{margin-right:1rem!important}.mb-sm-3,.my-sm-3{margin-bottom:1rem!important}.ml-sm-3,.mx-sm-3{margin-left:1rem!important}.m-sm-4{margin:1.5rem!important}.mt-sm-4,.my-sm-4{margin-top:1.5rem!important}.mr-sm-4,.mx-sm-4{margin-right:1.5rem!important}.mb-sm-4,.my-sm-4{margin-bottom:1.5rem!important}.ml-sm-4,.mx-sm-4{margin-left:1.5rem!important}.m-sm-5{margin:3rem!important}.mt-sm-5,.my-sm-5{margin-top:3rem!important}.mr-sm-5,.mx-sm-5{margin-right:3rem!important}.mb-sm-5,.my-sm-5{margin-bottom:3rem!important}.ml-sm-5,.mx-sm-5{margin-left:3rem!important}.p-sm-0{padding:0!important}.pt-sm-0,.py-sm-0{padding-top:0!important}.pr-sm-0,.px-sm-0{padding-right:0!important}.pb-sm-0,.py-sm-0{padding-bottom:0!important}.pl-sm-0,.px-sm-0{padding-left:0!important}.p-sm-1{padding:.25rem!important}.pt-sm-1,.py-sm-1{padding-top:.25rem!important}.pr-sm-1,.px-sm-1{padding-right:.25rem!important}.pb-sm-1,.py-sm-1{padding-bottom:.25rem!important}.pl-sm-1,.px-sm-1{padding-left:.25rem!important}.p-sm-2{padding:.5rem!important}.pt-sm-2,.py-sm-2{padding-top:.5rem!important}.pr-sm-2,.px-sm-2{padding-right:.5rem!important}.pb-sm-2,.py-sm-2{padding-bottom:.5rem!important}.pl-sm-2,.px-sm-2{padding-left:.5rem!important}.p-sm-3{padding:1rem!important}.pt-sm-3,.py-sm-3{padding-top:1rem!important}.pr-sm-3,.px-sm-3{padding-right:1rem!important}.pb-sm-3,.py-sm-3{padding-bottom:1rem!important}.pl-sm-3,.px-sm-3{padding-left:1rem!important}.p-sm-4{padding:1.5rem!important}.pt-sm-4,.py-sm-4{padding-top:1.5rem!important}.pr-sm-4,.px-sm-4{padding-right:1.5rem!important}.pb-sm-4,.py-sm-4{padding-bottom:1.5rem!important}.pl-sm-4,.px-sm-4{padding-left:1.5rem!important}.p-sm-5{padding:3rem!important}.pt-sm-5,.py-sm-5{padding-top:3rem!important}.pr-sm-5,.px-sm-5{padding-right:3rem!important}.pb-sm-5,.py-sm-5{padding-bottom:3rem!important}.pl-sm-5,.px-sm-5{padding-left:3rem!important}.m-sm-n1{margin:-.25rem!important}.mt-sm-n1,.my-sm-n1{margin-top:-.25rem!important}.mr-sm-n1,.mx-sm-n1{margin-right:-.25rem!important}.mb-sm-n1,.my-sm-n1{margin-bottom:-.25rem!important}.ml-sm-n1,.mx-sm-n1{margin-left:-.25rem!important}.m-sm-n2{margin:-.5rem!important}.mt-sm-n2,.my-sm-n2{margin-top:-.5rem!important}.mr-sm-n2,.mx-sm-n2{margin-right:-.5rem!important}.mb-sm-n2,.my-sm-n2{margin-bottom:-.5rem!important}.ml-sm-n2,.mx-sm-n2{margin-left:-.5rem!important}.m-sm-n3{margin:-1rem!important}.mt-sm-n3,.my-sm-n3{margin-top:-1rem!important}.mr-sm-n3,.mx-sm-n3{margin-right:-1rem!important}.mb-sm-n3,.my-sm-n3{margin-bottom:-1rem!important}.ml-sm-n3,.mx-sm-n3{margin-left:-1rem!important}.m-sm-n4{margin:-1.5rem!important}.mt-sm-n4,.my-sm-n4{margin-top:-1.5rem!important}.mr-sm-n4,.mx-sm-n4{margin-right:-1.5rem!important}.mb-sm-n4,.my-sm-n4{margin-bottom:-1.5rem!important}.ml-sm-n4,.mx-sm-n4{margin-left:-1.5rem!important}.m-sm-n5{margin:-3rem!important}.mt-sm-n5,.my-sm-n5{margin-top:-3rem!important}.mr-sm-n5,.mx-sm-n5{margin-right:-3rem!important}.mb-sm-n5,.my-sm-n5{margin-bottom:-3rem!important}.ml-sm-n5,.mx-sm-n5{margin-left:-3rem!important}.m-sm-auto{margin:auto!important}.mt-sm-auto,.my-sm-auto{margin-top:auto!important}.mr-sm-auto,.mx-sm-auto{margin-right:auto!important}.mb-sm-auto,.my-sm-auto{margin-bottom:auto!important}.ml-sm-auto,.mx-sm-auto{margin-left:auto!important}}@media (min-width:720px){.m-md-0{margin:0!important}.mt-md-0,.my-md-0{margin-top:0!important}.mr-md-0,.mx-md-0{margin-right:0!important}.mb-md-0,.my-md-0{margin-bottom:0!important}.ml-md-0,.mx-md-0{margin-left:0!important}.m-md-1{margin:.25rem!important}.mt-md-1,.my-md-1{margin-top:.25rem!important}.mr-md-1,.mx-md-1{margin-right:.25rem!important}.mb-md-1,.my-md-1{margin-bottom:.25rem!important}.ml-md-1,.mx-md-1{margin-left:.25rem!important}.m-md-2{margin:.5rem!important}.mt-md-2,.my-md-2{margin-top:.5rem!important}.mr-md-2,.mx-md-2{margin-right:.5rem!important}.mb-md-2,.my-md-2{margin-bottom:.5rem!important}.ml-md-2,.mx-md-2{margin-left:.5rem!important}.m-md-3{margin:1rem!important}.mt-md-3,.my-md-3{margin-top:1rem!important}.mr-md-3,.mx-md-3{margin-right:1rem!important}.mb-md-3,.my-md-3{margin-bottom:1rem!important}.ml-md-3,.mx-md-3{margin-left:1rem!important}.m-md-4{margin:1.5rem!important}.mt-md-4,.my-md-4{margin-top:1.5rem!important}.mr-md-4,.mx-md-4{margin-right:1.5rem!important}.mb-md-4,.my-md-4{margin-bottom:1.5rem!important}.ml-md-4,.mx-md-4{margin-left:1.5rem!important}.m-md-5{margin:3rem!important}.mt-md-5,.my-md-5{margin-top:3rem!important}.mr-md-5,.mx-md-5{margin-right:3rem!important}.mb-md-5,.my-md-5{margin-bottom:3rem!important}.ml-md-5,.mx-md-5{margin-left:3rem!important}.p-md-0{padding:0!important}.pt-md-0,.py-md-0{padding-top:0!important}.pr-md-0,.px-md-0{padding-right:0!important}.pb-md-0,.py-md-0{padding-bottom:0!important}.pl-md-0,.px-md-0{padding-left:0!important}.p-md-1{padding:.25rem!important}.pt-md-1,.py-md-1{padding-top:.25rem!important}.pr-md-1,.px-md-1{padding-right:.25rem!important}.pb-md-1,.py-md-1{padding-bottom:.25rem!important}.pl-md-1,.px-md-1{padding-left:.25rem!important}.p-md-2{padding:.5rem!important}.pt-md-2,.py-md-2{padding-top:.5rem!important}.pr-md-2,.px-md-2{padding-right:.5rem!important}.pb-md-2,.py-md-2{padding-bottom:.5rem!important}.pl-md-2,.px-md-2{padding-left:.5rem!important}.p-md-3{padding:1rem!important}.pt-md-3,.py-md-3{padding-top:1rem!important}.pr-md-3,.px-md-3{padding-right:1rem!important}.pb-md-3,.py-md-3{padding-bottom:1rem!important}.pl-md-3,.px-md-3{padding-left:1rem!important}.p-md-4{padding:1.5rem!important}.pt-md-4,.py-md-4{padding-top:1.5rem!important}.pr-md-4,.px-md-4{padding-right:1.5rem!important}.pb-md-4,.py-md-4{padding-bottom:1.5rem!important}.pl-md-4,.px-md-4{padding-left:1.5rem!important}.p-md-5{padding:3rem!important}.pt-md-5,.py-md-5{padding-top:3rem!important}.pr-md-5,.px-md-5{padding-right:3rem!important}.pb-md-5,.py-md-5{padding-bottom:3rem!important}.pl-md-5,.px-md-5{padding-left:3rem!important}.m-md-n1{margin:-.25rem!important}.mt-md-n1,.my-md-n1{margin-top:-.25rem!important}.mr-md-n1,.mx-md-n1{margin-right:-.25rem!important}.mb-md-n1,.my-md-n1{margin-bottom:-.25rem!important}.ml-md-n1,.mx-md-n1{margin-left:-.25rem!important}.m-md-n2{margin:-.5rem!important}.mt-md-n2,.my-md-n2{margin-top:-.5rem!important}.mr-md-n2,.mx-md-n2{margin-right:-.5rem!important}.mb-md-n2,.my-md-n2{margin-bottom:-.5rem!important}.ml-md-n2,.mx-md-n2{margin-left:-.5rem!important}.m-md-n3{margin:-1rem!important}.mt-md-n3,.my-md-n3{margin-top:-1rem!important}.mr-md-n3,.mx-md-n3{margin-right:-1rem!important}.mb-md-n3,.my-md-n3{margin-bottom:-1rem!important}.ml-md-n3,.mx-md-n3{margin-left:-1rem!important}.m-md-n4{margin:-1.5rem!important}.mt-md-n4,.my-md-n4{margin-top:-1.5rem!important}.mr-md-n4,.mx-md-n4{margin-right:-1.5rem!important}.mb-md-n4,.my-md-n4{margin-bottom:-1.5rem!important}.ml-md-n4,.mx-md-n4{margin-left:-1.5rem!important}.m-md-n5{margin:-3rem!important}.mt-md-n5,.my-md-n5{margin-top:-3rem!important}.mr-md-n5,.mx-md-n5{margin-right:-3rem!important}.mb-md-n5,.my-md-n5{margin-bottom:-3rem!important}.ml-md-n5,.mx-md-n5{margin-left:-3rem!important}.m-md-auto{margin:auto!important}.mt-md-auto,.my-md-auto{margin-top:auto!important}.mr-md-auto,.mx-md-auto{margin-right:auto!important}.mb-md-auto,.my-md-auto{margin-bottom:auto!important}.ml-md-auto,.mx-md-auto{margin-left:auto!important}}@media (min-width:960px){.m-lg-0{margin:0!important}.mt-lg-0,.my-lg-0{margin-top:0!important}.mr-lg-0,.mx-lg-0{margin-right:0!important}.mb-lg-0,.my-lg-0{margin-bottom:0!important}.ml-lg-0,.mx-lg-0{margin-left:0!important}.m-lg-1{margin:.25rem!important}.mt-lg-1,.my-lg-1{margin-top:.25rem!important}.mr-lg-1,.mx-lg-1{margin-right:.25rem!important}.mb-lg-1,.my-lg-1{margin-bottom:.25rem!important}.ml-lg-1,.mx-lg-1{margin-left:.25rem!important}.m-lg-2{margin:.5rem!important}.mt-lg-2,.my-lg-2{margin-top:.5rem!important}.mr-lg-2,.mx-lg-2{margin-right:.5rem!important}.mb-lg-2,.my-lg-2{margin-bottom:.5rem!important}.ml-lg-2,.mx-lg-2{margin-left:.5rem!important}.m-lg-3{margin:1rem!important}.mt-lg-3,.my-lg-3{margin-top:1rem!important}.mr-lg-3,.mx-lg-3{margin-right:1rem!important}.mb-lg-3,.my-lg-3{margin-bottom:1rem!important}.ml-lg-3,.mx-lg-3{margin-left:1rem!important}.m-lg-4{margin:1.5rem!important}.mt-lg-4,.my-lg-4{margin-top:1.5rem!important}.mr-lg-4,.mx-lg-4{margin-right:1.5rem!important}.mb-lg-4,.my-lg-4{margin-bottom:1.5rem!important}.ml-lg-4,.mx-lg-4{margin-left:1.5rem!important}.m-lg-5{margin:3rem!important}.mt-lg-5,.my-lg-5{margin-top:3rem!important}.mr-lg-5,.mx-lg-5{margin-right:3rem!important}.mb-lg-5,.my-lg-5{margin-bottom:3rem!important}.ml-lg-5,.mx-lg-5{margin-left:3rem!important}.p-lg-0{padding:0!important}.pt-lg-0,.py-lg-0{padding-top:0!important}.pr-lg-0,.px-lg-0{padding-right:0!important}.pb-lg-0,.py-lg-0{padding-bottom:0!important}.pl-lg-0,.px-lg-0{padding-left:0!important}.p-lg-1{padding:.25rem!important}.pt-lg-1,.py-lg-1{padding-top:.25rem!important}.pr-lg-1,.px-lg-1{padding-right:.25rem!important}.pb-lg-1,.py-lg-1{padding-bottom:.25rem!important}.pl-lg-1,.px-lg-1{padding-left:.25rem!important}.p-lg-2{padding:.5rem!important}.pt-lg-2,.py-lg-2{padding-top:.5rem!important}.pr-lg-2,.px-lg-2{padding-right:.5rem!important}.pb-lg-2,.py-lg-2{padding-bottom:.5rem!important}.pl-lg-2,.px-lg-2{padding-left:.5rem!important}.p-lg-3{padding:1rem!important}.pt-lg-3,.py-lg-3{padding-top:1rem!important}.pr-lg-3,.px-lg-3{padding-right:1rem!important}.pb-lg-3,.py-lg-3{padding-bottom:1rem!important}.pl-lg-3,.px-lg-3{padding-left:1rem!important}.p-lg-4{padding:1.5rem!important}.pt-lg-4,.py-lg-4{padding-top:1.5rem!important}.pr-lg-4,.px-lg-4{padding-right:1.5rem!important}.pb-lg-4,.py-lg-4{padding-bottom:1.5rem!important}.pl-lg-4,.px-lg-4{padding-left:1.5rem!important}.p-lg-5{padding:3rem!important}.pt-lg-5,.py-lg-5{padding-top:3rem!important}.pr-lg-5,.px-lg-5{padding-right:3rem!important}.pb-lg-5,.py-lg-5{padding-bottom:3rem!important}.pl-lg-5,.px-lg-5{padding-left:3rem!important}.m-lg-n1{margin:-.25rem!important}.mt-lg-n1,.my-lg-n1{margin-top:-.25rem!important}.mr-lg-n1,.mx-lg-n1{margin-right:-.25rem!important}.mb-lg-n1,.my-lg-n1{margin-bottom:-.25rem!important}.ml-lg-n1,.mx-lg-n1{margin-left:-.25rem!important}.m-lg-n2{margin:-.5rem!important}.mt-lg-n2,.my-lg-n2{margin-top:-.5rem!important}.mr-lg-n2,.mx-lg-n2{margin-right:-.5rem!important}.mb-lg-n2,.my-lg-n2{margin-bottom:-.5rem!important}.ml-lg-n2,.mx-lg-n2{margin-left:-.5rem!important}.m-lg-n3{margin:-1rem!important}.mt-lg-n3,.my-lg-n3{margin-top:-1rem!important}.mr-lg-n3,.mx-lg-n3{margin-right:-1rem!important}.mb-lg-n3,.my-lg-n3{margin-bottom:-1rem!important}.ml-lg-n3,.mx-lg-n3{margin-left:-1rem!important}.m-lg-n4{margin:-1.5rem!important}.mt-lg-n4,.my-lg-n4{margin-top:-1.5rem!important}.mr-lg-n4,.mx-lg-n4{margin-right:-1.5rem!important}.mb-lg-n4,.my-lg-n4{margin-bottom:-1.5rem!important}.ml-lg-n4,.mx-lg-n4{margin-left:-1.5rem!important}.m-lg-n5{margin:-3rem!important}.mt-lg-n5,.my-lg-n5{margin-top:-3rem!important}.mr-lg-n5,.mx-lg-n5{margin-right:-3rem!important}.mb-lg-n5,.my-lg-n5{margin-bottom:-3rem!important}.ml-lg-n5,.mx-lg-n5{margin-left:-3rem!important}.m-lg-auto{margin:auto!important}.mt-lg-auto,.my-lg-auto{margin-top:auto!important}.mr-lg-auto,.mx-lg-auto{margin-right:auto!important}.mb-lg-auto,.my-lg-auto{margin-bottom:auto!important}.ml-lg-auto,.mx-lg-auto{margin-left:auto!important}}@media (min-width:1200px){.m-xl-0{margin:0!important}.mt-xl-0,.my-xl-0{margin-top:0!important}.mr-xl-0,.mx-xl-0{margin-right:0!important}.mb-xl-0,.my-xl-0{margin-bottom:0!important}.ml-xl-0,.mx-xl-0{margin-left:0!important}.m-xl-1{margin:.25rem!important}.mt-xl-1,.my-xl-1{margin-top:.25rem!important}.mr-xl-1,.mx-xl-1{margin-right:.25rem!important}.mb-xl-1,.my-xl-1{margin-bottom:.25rem!important}.ml-xl-1,.mx-xl-1{margin-left:.25rem!important}.m-xl-2{margin:.5rem!important}.mt-xl-2,.my-xl-2{margin-top:.5rem!important}.mr-xl-2,.mx-xl-2{margin-right:.5rem!important}.mb-xl-2,.my-xl-2{margin-bottom:.5rem!important}.ml-xl-2,.mx-xl-2{margin-left:.5rem!important}.m-xl-3{margin:1rem!important}.mt-xl-3,.my-xl-3{margin-top:1rem!important}.mr-xl-3,.mx-xl-3{margin-right:1rem!important}.mb-xl-3,.my-xl-3{margin-bottom:1rem!important}.ml-xl-3,.mx-xl-3{margin-left:1rem!important}.m-xl-4{margin:1.5rem!important}.mt-xl-4,.my-xl-4{margin-top:1.5rem!important}.mr-xl-4,.mx-xl-4{margin-right:1.5rem!important}.mb-xl-4,.my-xl-4{margin-bottom:1.5rem!important}.ml-xl-4,.mx-xl-4{margin-left:1.5rem!important}.m-xl-5{margin:3rem!important}.mt-xl-5,.my-xl-5{margin-top:3rem!important}.mr-xl-5,.mx-xl-5{margin-right:3rem!important}.mb-xl-5,.my-xl-5{margin-bottom:3rem!important}.ml-xl-5,.mx-xl-5{margin-left:3rem!important}.p-xl-0{padding:0!important}.pt-xl-0,.py-xl-0{padding-top:0!important}.pr-xl-0,.px-xl-0{padding-right:0!important}.pb-xl-0,.py-xl-0{padding-bottom:0!important}.pl-xl-0,.px-xl-0{padding-left:0!important}.p-xl-1{padding:.25rem!important}.pt-xl-1,.py-xl-1{padding-top:.25rem!important}.pr-xl-1,.px-xl-1{padding-right:.25rem!important}.pb-xl-1,.py-xl-1{padding-bottom:.25rem!important}.pl-xl-1,.px-xl-1{padding-left:.25rem!important}.p-xl-2{padding:.5rem!important}.pt-xl-2,.py-xl-2{padding-top:.5rem!important}.pr-xl-2,.px-xl-2{padding-right:.5rem!important}.pb-xl-2,.py-xl-2{padding-bottom:.5rem!important}.pl-xl-2,.px-xl-2{padding-left:.5rem!important}.p-xl-3{padding:1rem!important}.pt-xl-3,.py-xl-3{padding-top:1rem!important}.pr-xl-3,.px-xl-3{padding-right:1rem!important}.pb-xl-3,.py-xl-3{padding-bottom:1rem!important}.pl-xl-3,.px-xl-3{padding-left:1rem!important}.p-xl-4{padding:1.5rem!important}.pt-xl-4,.py-xl-4{padding-top:1.5rem!important}.pr-xl-4,.px-xl-4{padding-right:1.5rem!important}.pb-xl-4,.py-xl-4{padding-bottom:1.5rem!important}.pl-xl-4,.px-xl-4{padding-left:1.5rem!important}.p-xl-5{padding:3rem!important}.pt-xl-5,.py-xl-5{padding-top:3rem!important}.pr-xl-5,.px-xl-5{padding-right:3rem!important}.pb-xl-5,.py-xl-5{padding-bottom:3rem!important}.pl-xl-5,.px-xl-5{padding-left:3rem!important}.m-xl-n1{margin:-.25rem!important}.mt-xl-n1,.my-xl-n1{margin-top:-.25rem!important}.mr-xl-n1,.mx-xl-n1{margin-right:-.25rem!important}.mb-xl-n1,.my-xl-n1{margin-bottom:-.25rem!important}.ml-xl-n1,.mx-xl-n1{margin-left:-.25rem!important}.m-xl-n2{margin:-.5rem!important}.mt-xl-n2,.my-xl-n2{margin-top:-.5rem!important}.mr-xl-n2,.mx-xl-n2{margin-right:-.5rem!important}.mb-xl-n2,.my-xl-n2{margin-bottom:-.5rem!important}.ml-xl-n2,.mx-xl-n2{margin-left:-.5rem!important}.m-xl-n3{margin:-1rem!important}.mt-xl-n3,.my-xl-n3{margin-top:-1rem!important}.mr-xl-n3,.mx-xl-n3{margin-right:-1rem!important}.mb-xl-n3,.my-xl-n3{margin-bottom:-1rem!important}.ml-xl-n3,.mx-xl-n3{margin-left:-1rem!important}.m-xl-n4{margin:-1.5rem!important}.mt-xl-n4,.my-xl-n4{margin-top:-1.5rem!important}.mr-xl-n4,.mx-xl-n4{margin-right:-1.5rem!important}.mb-xl-n4,.my-xl-n4{margin-bottom:-1.5rem!important}.ml-xl-n4,.mx-xl-n4{margin-left:-1.5rem!important}.m-xl-n5{margin:-3rem!important}.mt-xl-n5,.my-xl-n5{margin-top:-3rem!important}.mr-xl-n5,.mx-xl-n5{margin-right:-3rem!important}.mb-xl-n5,.my-xl-n5{margin-bottom:-3rem!important}.ml-xl-n5,.mx-xl-n5{margin-left:-3rem!important}.m-xl-auto{margin:auto!important}.mt-xl-auto,.my-xl-auto{margin-top:auto!important}.mr-xl-auto,.mx-xl-auto{margin-right:auto!important}.mb-xl-auto,.my-xl-auto{margin-bottom:auto!important}.ml-xl-auto,.mx-xl-auto{margin-left:auto!important}}.stretched-link:after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:auto;content:"";background-color:transparent}.text-monospace{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace!important}.text-justify{text-align:justify!important}.text-wrap{white-space:normal!important}.text-nowrap{white-space:nowrap!important}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-left{text-align:left!important}.text-right{text-align:right!important}.text-center{text-align:center!important}@media (min-width:540px){.text-sm-left{text-align:left!important}.text-sm-right{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:720px){.text-md-left{text-align:left!important}.text-md-right{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:960px){.text-lg-left{text-align:left!important}.text-lg-right{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.text-xl-left{text-align:left!important}.text-xl-right{text-align:right!important}.text-xl-center{text-align:center!important}}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.font-weight-light{font-weight:300!important}.font-weight-lighter{font-weight:lighter!important}.font-weight-normal{font-weight:400!important}.font-weight-bold{font-weight:700!important}.font-weight-bolder{font-weight:bolder!important}.font-italic{font-style:italic!important}.text-white{color:#fff!important}.text-primary{color:#007bff!important}a.text-primary:focus,a.text-primary:hover{color:#0056b3!important}.text-secondary{color:#6c757d!important}a.text-secondary:focus,a.text-secondary:hover{color:#494f54!important}.text-success{color:#28a745!important}a.text-success:focus,a.text-success:hover{color:#19692c!important}.text-info{color:#17a2b8!important}a.text-info:focus,a.text-info:hover{color:#0f6674!important}.text-warning{color:#ffc107!important}a.text-warning:focus,a.text-warning:hover{color:#ba8b00!important}.text-danger{color:#dc3545!important}a.text-danger:focus,a.text-danger:hover{color:#a71d2a!important}.text-light{color:#f8f9fa!important}a.text-light:focus,a.text-light:hover{color:#cbd3da!important}.text-dark{color:#343a40!important}a.text-dark:focus,a.text-dark:hover{color:#121416!important}.text-body{color:#212529!important}.text-muted{color:#6c757d!important}.text-black-50{color:rgba(0,0,0,.5)!important}.text-white-50{color:hsla(0,0%,100%,.5)!important}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.text-decoration-none{text-decoration:none!important}.text-break{word-wrap:break-word!important}.text-reset{color:inherit!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}@media print{*,:after,:before{text-shadow:none!important;box-shadow:none!important}a:not(.btn){text-decoration:underline}abbr[title]:after{content:" (" attr(title) ")"}pre{white-space:pre-wrap!important}blockquote,pre{border:1px solid #adb5bd;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}@page{size:a3}.container,body{min-width:960px!important}.navbar{display:none}.badge{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #dee2e6!important}.table-dark{color:inherit}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#dee2e6}.table .thead-dark th{color:inherit;border-color:#dee2e6}}html{font-size:var(--pst-font-size-base);scroll-padding-top:calc(var(--pst-header-height) + 12px)}body{padding-top:calc(var(--pst-header-height) + 20px);background-color:#fff;font-family:var(--pst-font-family-base);font-weight:400;line-height:1.65;color:rgba(var(--pst-color-text-base),1)}p{margin-bottom:1.15rem;font-size:1em;color:rgba(var(--pst-color-paragraph),1)}p.rubric{border-bottom:1px solid #c9c9c9}a{color:rgba(var(--pst-color-link),1);text-decoration:none}a:hover{color:rgba(var(--pst-color-link-hover),1);text-decoration:underline}a.headerlink{color:rgba(var(--pst-color-headerlink),1);font-size:.8em;padding:0 4px;text-decoration:none}a.headerlink:hover{background-color:rgba(var(--pst-color-headerlink),1);color:rgba(var(--pst-color-headerlink-hover),1)}.heading-style,h1,h2,h3,h4,h5,h6{margin:2.75rem 0 1.05rem;font-family:var(--pst-font-family-heading);font-weight:400;line-height:1.15}h1{margin-top:0;font-size:var(--pst-font-size-h1);color:rgba(var(--pst-color-h1),1)}h2{font-size:var(--pst-font-size-h2);color:rgba(var(--pst-color-h2),1)}h3{font-size:var(--pst-font-size-h3);color:rgba(var(--pst-color-h3),1)}h4{font-size:var(--pst-font-size-h4);color:rgba(var(--pst-color-h4),1)}h5{font-size:var(--pst-font-size-h5);color:rgba(var(--pst-color-h5),1)}h6{font-size:var(--pst-font-size-h6);color:rgba(var(--pst-color-h6),1)}.text_small,small{font-size:var(--pst-font-size-milli)}hr{border:0;border-top:1px solid #e5e5e5}code,kbd,pre,samp{font-family:var(--pst-font-family-monospace)}code{color:rgba(var(--pst-color-inline-code),1)}pre{margin:1.5em 0;padding:10px;background-color:rgba(var(--pst-color-preformatted-background),1);color:rgba(var(--pst-color-preformatted-text),1);line-height:1.2em;border:1px solid #c9c9c9;box-shadow:1px 1px 1px #d8d8d8}.navbar{position:fixed;min-height:var(--pst-header-height);width:100%;padding:0}.navbar .container-xl{height:100%}@media (min-width:960px){.navbar #navbar-end>.navbar-end-item{display:inline-block}}.navbar-brand{position:relative;height:var(--pst-header-height);width:auto;padding:.5rem 0}.navbar-brand img{max-width:100%;height:100%;width:auto}.navbar-light{background:#fff!important;box-shadow:0 .125rem .25rem 0 rgba(0,0,0,.11)}.navbar-light .navbar-nav li a.nav-link{padding:0 .5rem;color:rgba(var(--pst-color-navbar-link),1)}.navbar-light .navbar-nav li a.nav-link:hover{color:rgba(var(--pst-color-navbar-link-hover),1)}.navbar-light .navbar-nav>.active>.nav-link{font-weight:600;color:rgba(var(--pst-color-navbar-link-active),1)}.navbar-header a{padding:0 15px}.admonition{margin:1.5625em auto;padding:0 .6rem .8rem!important;overflow:hidden;page-break-inside:avoid;border-left:.2rem solid;border-left-color:rgba(var(--pst-color-admonition-default),1);border-bottom-color:rgba(var(--pst-color-admonition-default),1);border-right-color:rgba(var(--pst-color-admonition-default),1);border-top-color:rgba(var(--pst-color-admonition-default),1);border-radius:.1rem;box-shadow:0 .2rem .5rem rgba(0,0,0,.05),0 0 .05rem rgba(0,0,0,.1);transition:color .25s,background-color .25s,border-color .25s}.admonition :last-child{margin-bottom:0}.admonition p.admonition-title~*{padding:0 1.4rem}.admonition>ol,.admonition>ul{margin-left:1em}.admonition .admonition-title{position:relative;margin:0 -.6rem!important;padding:.4rem .6rem .4rem 2rem;font-weight:700;background-color:rgba(var(--pst-color-admonition-default),.1)}.admonition .admonition-title:before{position:absolute;left:.6rem;width:1rem;height:1rem;color:rgba(var(--pst-color-admonition-default),1);font-family:Font Awesome\ 5 Free;font-weight:900;content:var(--pst-icon-admonition-default)}.admonition .admonition-title+*{margin-top:.4em}.admonition.attention{border-color:rgba(var(--pst-color-admonition-attention),1)}.admonition.attention .admonition-title{background-color:rgba(var(--pst-color-admonition-attention),.1)}.admonition.attention .admonition-title:before{color:rgba(var(--pst-color-admonition-attention),1);content:var(--pst-icon-admonition-attention)}.admonition.caution{border-color:rgba(var(--pst-color-admonition-caution),1)}.admonition.caution .admonition-title{background-color:rgba(var(--pst-color-admonition-caution),.1)}.admonition.caution .admonition-title:before{color:rgba(var(--pst-color-admonition-caution),1);content:var(--pst-icon-admonition-caution)}.admonition.warning{border-color:rgba(var(--pst-color-admonition-warning),1)}.admonition.warning .admonition-title{background-color:rgba(var(--pst-color-admonition-warning),.1)}.admonition.warning .admonition-title:before{color:rgba(var(--pst-color-admonition-warning),1);content:var(--pst-icon-admonition-warning)}.admonition.danger{border-color:rgba(var(--pst-color-admonition-danger),1)}.admonition.danger .admonition-title{background-color:rgba(var(--pst-color-admonition-danger),.1)}.admonition.danger .admonition-title:before{color:rgba(var(--pst-color-admonition-danger),1);content:var(--pst-icon-admonition-danger)}.admonition.error{border-color:rgba(var(--pst-color-admonition-error),1)}.admonition.error .admonition-title{background-color:rgba(var(--pst-color-admonition-error),.1)}.admonition.error .admonition-title:before{color:rgba(var(--pst-color-admonition-error),1);content:var(--pst-icon-admonition-error)}.admonition.hint{border-color:rgba(var(--pst-color-admonition-hint),1)}.admonition.hint .admonition-title{background-color:rgba(var(--pst-color-admonition-hint),.1)}.admonition.hint .admonition-title:before{color:rgba(var(--pst-color-admonition-hint),1);content:var(--pst-icon-admonition-hint)}.admonition.tip{border-color:rgba(var(--pst-color-admonition-tip),1)}.admonition.tip .admonition-title{background-color:rgba(var(--pst-color-admonition-tip),.1)}.admonition.tip .admonition-title:before{color:rgba(var(--pst-color-admonition-tip),1);content:var(--pst-icon-admonition-tip)}.admonition.important{border-color:rgba(var(--pst-color-admonition-important),1)}.admonition.important .admonition-title{background-color:rgba(var(--pst-color-admonition-important),.1)}.admonition.important .admonition-title:before{color:rgba(var(--pst-color-admonition-important),1);content:var(--pst-icon-admonition-important)}.admonition.note{border-color:rgba(var(--pst-color-admonition-note),1)}.admonition.note .admonition-title{background-color:rgba(var(--pst-color-admonition-note),.1)}.admonition.note .admonition-title:before{color:rgba(var(--pst-color-admonition-note),1);content:var(--pst-icon-admonition-note)}div.deprecated{margin-bottom:10px;margin-top:10px;padding:7px;background-color:#f3e5e5;border:1px solid #eed3d7;border-radius:.5rem}div.deprecated p{color:#b94a48;display:inline}.topic{background-color:#eee}.seealso dd{margin-top:0;margin-bottom:0}.viewcode-back{font-family:var(--pst-font-family-base)}.viewcode-block:target{background-color:#f4debf;border-top:1px solid #ac9;border-bottom:1px solid #ac9}span.guilabel{border:1px solid #7fbbe3;background:#e7f2fa;font-size:80%;font-weight:700;border-radius:4px;padding:2.4px 6px;margin:auto 2px}table.field-list{border-collapse:separate;border-spacing:10px;margin-left:1px}table.field-list th.field-name{padding:1px 8px 1px 5px;white-space:nowrap;background-color:#eee}table.field-list td.field-body p{font-style:italic}table.field-list td.field-body p>strong{font-style:normal}table.field-list td.field-body blockquote{border-left:none;margin:0 0 .3em;padding-left:30px}.table.autosummary td:first-child{white-space:nowrap}footer{width:100%;border-top:1px solid #ccc;padding:10px}footer .footer-item p{margin-bottom:0}.bd-search{position:relative;padding:1rem 15px;margin-right:-15px;margin-left:-15px}.bd-search .icon{position:absolute;color:#a4a6a7;left:25px;top:25px}.bd-search input{border-radius:0;border:0;border-bottom:1px solid #e5e5e5;padding-left:35px}.bd-toc{-ms-flex-order:2;order:2;height:calc(100vh - 2rem);overflow-y:auto}@supports (position:-webkit-sticky) or (position:sticky){.bd-toc{position:-webkit-sticky;position:sticky;top:calc(var(--pst-header-height) + 20px);height:calc(100vh - 5rem);overflow-y:auto}}.bd-toc .onthispage{color:#a4a6a7}.section-nav{padding-left:0;border-left:1px solid #eee;border-bottom:none}.section-nav ul{padding-left:1rem}.toc-entry,.toc-entry a{display:block}.toc-entry a{padding:.125rem 1.5rem;color:rgba(var(--pst-color-toc-link),1)}@media (min-width:1200px){.toc-entry a{padding-right:0}}.toc-entry a:hover{color:rgba(var(--pst-color-toc-link-hover),1);text-decoration:none}.bd-sidebar{padding-top:1em}@media (min-width:720px){.bd-sidebar{border-right:1px solid rgba(0,0,0,.1)}@supports (position:-webkit-sticky) or (position:sticky){.bd-sidebar{position:-webkit-sticky;position:sticky;top:calc(var(--pst-header-height) + 20px);z-index:1000;height:calc(100vh - var(--pst-header-height) - 20px)}}}.bd-sidebar.no-sidebar{border-right:0}.bd-links{padding-top:1rem;padding-bottom:1rem;margin-right:-15px;margin-left:-15px}@media (min-width:720px){.bd-links{display:block!important}@supports (position:-webkit-sticky) or (position:sticky){.bd-links{max-height:calc(100vh - 11rem);overflow-y:auto}}}.bd-sidenav{display:none}.bd-content{padding-top:20px}.bd-content .section{max-width:100%}.bd-content .section table{display:block;overflow:auto}.bd-toc-link{display:block;padding:.25rem 1.5rem;font-weight:600;color:rgba(0,0,0,.65)}.bd-toc-link:hover{color:rgba(0,0,0,.85);text-decoration:none}.bd-toc-item.active{margin-bottom:1rem}.bd-toc-item.active:not(:first-child){margin-top:1rem}.bd-toc-item.active>.bd-toc-link{color:rgba(0,0,0,.85)}.bd-toc-item.active>.bd-toc-link:hover{background-color:transparent}.bd-toc-item.active>.bd-sidenav{display:block}nav.bd-links p.caption{font-size:var(--pst-sidebar-caption-font-size);text-transform:uppercase;font-weight:700;position:relative;margin-top:1.25em;margin-bottom:.5em;padding:0 1.5rem;color:rgba(var(--pst-color-sidebar-caption),1)}nav.bd-links p.caption:first-child{margin-top:0}.bd-sidebar .nav{font-size:var(--pst-sidebar-font-size)}.bd-sidebar .nav ul{list-style:none;padding:0 0 0 1.5rem}.bd-sidebar .nav li>a{display:block;padding:.25rem 1.5rem;color:rgba(var(--pst-color-sidebar-link),1)}.bd-sidebar .nav li>a:hover{color:rgba(var(--pst-color-sidebar-link-hover),1);text-decoration:none;background-color:transparent}.bd-sidebar .nav li>a.reference.external:after{font-family:Font Awesome\ 5 Free;font-weight:900;content:"\f35d";font-size:.75em;margin-left:.3em}.bd-sidebar .nav .active:hover>a,.bd-sidebar .nav .active>a{font-weight:600;color:rgba(var(--pst-color-sidebar-link-active),1)}.toc-h2{font-size:.85rem}.toc-h3{font-size:.75rem}.toc-h4{font-size:.65rem}.toc-entry>.nav-link.active{font-weight:600;color:#130654;color:rgba(var(--pst-color-toc-link-active),1);background-color:transparent;border-left:2px solid rgba(var(--pst-color-toc-link-active),1)}.nav-link:hover{border-style:none}#navbar-main-elements li.nav-item i{font-size:.7rem;padding-left:2px;vertical-align:middle}.bd-toc .nav .nav{display:none}.bd-toc .nav .nav.visible,.bd-toc .nav>.active>ul{display:block}.prev-next-bottom{margin:20px 0}.prev-next-bottom a.left-prev,.prev-next-bottom a.right-next{padding:10px;border:1px solid rgba(0,0,0,.2);max-width:45%;overflow-x:hidden;color:rgba(0,0,0,.65)}.prev-next-bottom a.left-prev{float:left}.prev-next-bottom a.left-prev:before{content:"<< "}.prev-next-bottom a.right-next{float:right}.prev-next-bottom a.right-next:after{content:" >>"}.alert{padding-bottom:0}.alert-info a{color:#e83e8c}#navbar-icon-links i.fa,#navbar-icon-links i.fab,#navbar-icon-links i.far,#navbar-icon-links i.fas{vertical-align:middle;font-style:normal;font-size:1.5rem;line-height:1.25}#navbar-icon-links i.fa-github-square:before{color:#333}#navbar-icon-links i.fa-twitter-square:before{color:#55acee}#navbar-icon-links i.fa-gitlab:before{color:#548}#navbar-icon-links i.fa-bitbucket:before{color:#0052cc}.tocsection{border-left:1px solid #eee;padding:.3rem 1.5rem}.tocsection i{padding-right:.5rem}.editthispage{padding-top:2rem}.editthispage a{color:#130754}.xr-wrap[hidden]{display:block!important}.toctree-checkbox{position:absolute;display:none}.toctree-checkbox~ul{display:none}.toctree-checkbox~label i{transform:rotate(0deg)}.toctree-checkbox:checked~ul{display:block}.toctree-checkbox:checked~label i{transform:rotate(180deg)}.bd-sidebar li{position:relative}.bd-sidebar label{position:absolute;top:0;right:0;height:30px;width:30px;cursor:pointer;display:flex;justify-content:center;align-items:center}.bd-sidebar label:hover{background:rgba(var(--pst-color-sidebar-expander-background-hover),1)}.bd-sidebar label i{display:inline-block;font-size:.75rem;text-align:center}.bd-sidebar label i:hover{color:rgba(var(--pst-color-sidebar-link-hover),1)}.bd-sidebar li.has-children>.reference{padding-right:30px}div.doctest>div.highlight span.gp,span.linenos,table.highlighttable td.linenos{user-select:none!important;-webkit-user-select:text!important;-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important} \ No newline at end of file diff --git a/docs/_build/html/_static/css/theme.css b/docs/_build/html/_static/css/theme.css deleted file mode 100644 index 3f6e79d..0000000 --- a/docs/_build/html/_static/css/theme.css +++ /dev/null @@ -1,117 +0,0 @@ -:root { - /***************************************************************************** - * Theme config - **/ - --pst-header-height: 60px; - - /***************************************************************************** - * Font size - **/ - --pst-font-size-base: 15px; /* base font size - applied at body / html level */ - - /* heading font sizes */ - --pst-font-size-h1: 36px; - --pst-font-size-h2: 32px; - --pst-font-size-h3: 26px; - --pst-font-size-h4: 21px; - --pst-font-size-h5: 18px; - --pst-font-size-h6: 16px; - - /* smaller then heading font sizes*/ - --pst-font-size-milli: 12px; - - --pst-sidebar-font-size: .9em; - --pst-sidebar-caption-font-size: .9em; - - /***************************************************************************** - * Font family - **/ - /* These are adapted from https://systemfontstack.com/ */ - --pst-font-family-base-system: -apple-system, BlinkMacSystemFont, Segoe UI, "Helvetica Neue", - Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol; - --pst-font-family-monospace-system: "SFMono-Regular", Menlo, Consolas, Monaco, - Liberation Mono, Lucida Console, monospace; - - --pst-font-family-base: var(--pst-font-family-base-system); - --pst-font-family-heading: var(--pst-font-family-base); - --pst-font-family-monospace: var(--pst-font-family-monospace-system); - - /***************************************************************************** - * Color - * - * Colors are defined in rgb string way, "red, green, blue" - **/ - --pst-color-primary: 19, 6, 84; - --pst-color-success: 40, 167, 69; - --pst-color-info: 0, 123, 255; /*23, 162, 184;*/ - --pst-color-warning: 255, 193, 7; - --pst-color-danger: 220, 53, 69; - --pst-color-text-base: 51, 51, 51; - - --pst-color-h1: var(--pst-color-primary); - --pst-color-h2: var(--pst-color-primary); - --pst-color-h3: var(--pst-color-text-base); - --pst-color-h4: var(--pst-color-text-base); - --pst-color-h5: var(--pst-color-text-base); - --pst-color-h6: var(--pst-color-text-base); - --pst-color-paragraph: var(--pst-color-text-base); - --pst-color-link: 0, 91, 129; - --pst-color-link-hover: 227, 46, 0; - --pst-color-headerlink: 198, 15, 15; - --pst-color-headerlink-hover: 255, 255, 255; - --pst-color-preformatted-text: 34, 34, 34; - --pst-color-preformatted-background: 250, 250, 250; - --pst-color-inline-code: 232, 62, 140; - - --pst-color-active-navigation: 19, 6, 84; - --pst-color-navbar-link: 77, 77, 77; - --pst-color-navbar-link-hover: var(--pst-color-active-navigation); - --pst-color-navbar-link-active: var(--pst-color-active-navigation); - --pst-color-sidebar-link: 77, 77, 77; - --pst-color-sidebar-link-hover: var(--pst-color-active-navigation); - --pst-color-sidebar-link-active: var(--pst-color-active-navigation); - --pst-color-sidebar-expander-background-hover: 244, 244, 244; - --pst-color-sidebar-caption: 77, 77, 77; - --pst-color-toc-link: 119, 117, 122; - --pst-color-toc-link-hover: var(--pst-color-active-navigation); - --pst-color-toc-link-active: var(--pst-color-active-navigation); - - /***************************************************************************** - * Icon - **/ - - /* font awesome icons*/ - --pst-icon-check-circle: '\f058'; - --pst-icon-info-circle: '\f05a'; - --pst-icon-exclamation-triangle: '\f071'; - --pst-icon-exclamation-circle: '\f06a'; - --pst-icon-times-circle: '\f057'; - --pst-icon-lightbulb: '\f0eb'; - - /***************************************************************************** - * Admonitions - **/ - - --pst-color-admonition-default: var(--pst-color-info); - --pst-color-admonition-note: var(--pst-color-info); - --pst-color-admonition-attention: var(--pst-color-warning); - --pst-color-admonition-caution: var(--pst-color-warning); - --pst-color-admonition-warning: var(--pst-color-warning); - --pst-color-admonition-danger: var(--pst-color-danger); - --pst-color-admonition-error: var(--pst-color-danger); - --pst-color-admonition-hint: var(--pst-color-success); - --pst-color-admonition-tip: var(--pst-color-success); - --pst-color-admonition-important: var(--pst-color-success); - - --pst-icon-admonition-default: var(--pst-icon-info-circle); - --pst-icon-admonition-note: var(--pst-icon-info-circle); - --pst-icon-admonition-attention: var(--pst-icon-exclamation-circle); - --pst-icon-admonition-caution: var(--pst-icon-exclamation-triangle); - --pst-icon-admonition-warning: var(--pst-icon-exclamation-triangle); - --pst-icon-admonition-danger: var(--pst-icon-exclamation-triangle); - --pst-icon-admonition-error: var(--pst-icon-times-circle); - --pst-icon-admonition-hint: var(--pst-icon-lightbulb); - --pst-icon-admonition-tip: var(--pst-icon-lightbulb); - --pst-icon-admonition-important: var(--pst-icon-exclamation-circle); - -} diff --git a/docs/_build/html/_static/doctools.js b/docs/_build/html/_static/doctools.js deleted file mode 100644 index 61ac9d2..0000000 --- a/docs/_build/html/_static/doctools.js +++ /dev/null @@ -1,321 +0,0 @@ -/* - * doctools.js - * ~~~~~~~~~~~ - * - * Sphinx JavaScript utilities for all documentation. - * - * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/** - * select a different prefix for underscore - */ -$u = _.noConflict(); - -/** - * make the code below compatible with browsers without - * an installed firebug like debugger -if (!window.console || !console.firebug) { - var names = ["log", "debug", "info", "warn", "error", "assert", "dir", - "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", - "profile", "profileEnd"]; - window.console = {}; - for (var i = 0; i < names.length; ++i) - window.console[names[i]] = function() {}; -} - */ - -/** - * small helper function to urldecode strings - * - * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL - */ -jQuery.urldecode = function(x) { - if (!x) { - return x - } - return decodeURIComponent(x.replace(/\+/g, ' ')); -}; - -/** - * small helper function to urlencode strings - */ -jQuery.urlencode = encodeURIComponent; - -/** - * This function returns the parsed url parameters of the - * current request. Multiple values per key are supported, - * it will always return arrays of strings for the value parts. - */ -jQuery.getQueryParameters = function(s) { - if (typeof s === 'undefined') - s = document.location.search; - var parts = s.substr(s.indexOf('?') + 1).split('&'); - var result = {}; - for (var i = 0; i < parts.length; i++) { - var tmp = parts[i].split('=', 2); - var key = jQuery.urldecode(tmp[0]); - var value = jQuery.urldecode(tmp[1]); - if (key in result) - result[key].push(value); - else - result[key] = [value]; - } - return result; -}; - -/** - * highlight a given string on a jquery object by wrapping it in - * span elements with the given class name. - */ -jQuery.fn.highlightText = function(text, className) { - function highlight(node, addItems) { - if (node.nodeType === 3) { - var val = node.nodeValue; - var pos = val.toLowerCase().indexOf(text); - if (pos >= 0 && - !jQuery(node.parentNode).hasClass(className) && - !jQuery(node.parentNode).hasClass("nohighlight")) { - var span; - var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); - if (isInSVG) { - span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); - } else { - span = document.createElement("span"); - span.className = className; - } - span.appendChild(document.createTextNode(val.substr(pos, text.length))); - node.parentNode.insertBefore(span, node.parentNode.insertBefore( - document.createTextNode(val.substr(pos + text.length)), - node.nextSibling)); - node.nodeValue = val.substr(0, pos); - if (isInSVG) { - var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); - var bbox = node.parentElement.getBBox(); - rect.x.baseVal.value = bbox.x; - rect.y.baseVal.value = bbox.y; - rect.width.baseVal.value = bbox.width; - rect.height.baseVal.value = bbox.height; - rect.setAttribute('class', className); - addItems.push({ - "parent": node.parentNode, - "target": rect}); - } - } - } - else if (!jQuery(node).is("button, select, textarea")) { - jQuery.each(node.childNodes, function() { - highlight(this, addItems); - }); - } - } - var addItems = []; - var result = this.each(function() { - highlight(this, addItems); - }); - for (var i = 0; i < addItems.length; ++i) { - jQuery(addItems[i].parent).before(addItems[i].target); - } - return result; -}; - -/* - * backward compatibility for jQuery.browser - * This will be supported until firefox bug is fixed. - */ -if (!jQuery.browser) { - jQuery.uaMatch = function(ua) { - ua = ua.toLowerCase(); - - var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || - /(webkit)[ \/]([\w.]+)/.exec(ua) || - /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || - /(msie) ([\w.]+)/.exec(ua) || - ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || - []; - - return { - browser: match[ 1 ] || "", - version: match[ 2 ] || "0" - }; - }; - jQuery.browser = {}; - jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; -} - -/** - * Small JavaScript module for the documentation. - */ -var Documentation = { - - init : function() { - this.fixFirefoxAnchorBug(); - this.highlightSearchWords(); - this.initIndexTable(); - if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) { - this.initOnKeyListeners(); - } - }, - - /** - * i18n support - */ - TRANSLATIONS : {}, - PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; }, - LOCALE : 'unknown', - - // gettext and ngettext don't access this so that the functions - // can safely bound to a different name (_ = Documentation.gettext) - gettext : function(string) { - var translated = Documentation.TRANSLATIONS[string]; - if (typeof translated === 'undefined') - return string; - return (typeof translated === 'string') ? translated : translated[0]; - }, - - ngettext : function(singular, plural, n) { - var translated = Documentation.TRANSLATIONS[singular]; - if (typeof translated === 'undefined') - return (n == 1) ? singular : plural; - return translated[Documentation.PLURALEXPR(n)]; - }, - - addTranslations : function(catalog) { - for (var key in catalog.messages) - this.TRANSLATIONS[key] = catalog.messages[key]; - this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); - this.LOCALE = catalog.locale; - }, - - /** - * add context elements like header anchor links - */ - addContextElements : function() { - $('div[id] > :header:first').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this headline')). - appendTo(this); - }); - $('dt[id]').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this definition')). - appendTo(this); - }); - }, - - /** - * workaround a firefox stupidity - * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 - */ - fixFirefoxAnchorBug : function() { - if (document.location.hash && $.browser.mozilla) - window.setTimeout(function() { - document.location.href += ''; - }, 10); - }, - - /** - * highlight the search words provided in the url in the text - */ - highlightSearchWords : function() { - var params = $.getQueryParameters(); - var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; - if (terms.length) { - var body = $('div.body'); - if (!body.length) { - body = $('body'); - } - window.setTimeout(function() { - $.each(terms, function() { - body.highlightText(this.toLowerCase(), 'highlighted'); - }); - }, 10); - $('') - .appendTo($('#searchbox')); - } - }, - - /** - * init the domain index toggle buttons - */ - initIndexTable : function() { - var togglers = $('img.toggler').click(function() { - var src = $(this).attr('src'); - var idnum = $(this).attr('id').substr(7); - $('tr.cg-' + idnum).toggle(); - if (src.substr(-9) === 'minus.png') - $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); - else - $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); - }).css('display', ''); - if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { - togglers.click(); - } - }, - - /** - * helper function to hide the search marks again - */ - hideSearchWords : function() { - $('#searchbox .highlight-link').fadeOut(300); - $('span.highlighted').removeClass('highlighted'); - }, - - /** - * make the url absolute - */ - makeURL : function(relativeURL) { - return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; - }, - - /** - * get the current relative url - */ - getCurrentURL : function() { - var path = document.location.pathname; - var parts = path.split(/\//); - $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { - if (this === '..') - parts.pop(); - }); - var url = parts.join('/'); - return path.substring(url.lastIndexOf('/') + 1, path.length - 1); - }, - - initOnKeyListeners: function() { - $(document).keydown(function(event) { - var activeElementType = document.activeElement.tagName; - // don't navigate when in search box, textarea, dropdown or button - if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT' - && activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey - && !event.shiftKey) { - switch (event.keyCode) { - case 37: // left - var prevHref = $('link[rel="prev"]').prop('href'); - if (prevHref) { - window.location.href = prevHref; - return false; - } - case 39: // right - var nextHref = $('link[rel="next"]').prop('href'); - if (nextHref) { - window.location.href = nextHref; - return false; - } - } - } - }); - } -}; - -// quick alias for translations -_ = Documentation.gettext; - -$(document).ready(function() { - Documentation.init(); -}); diff --git a/docs/_build/html/_static/documentation_options.js b/docs/_build/html/_static/documentation_options.js deleted file mode 100644 index 0f6506b..0000000 --- a/docs/_build/html/_static/documentation_options.js +++ /dev/null @@ -1,12 +0,0 @@ -var DOCUMENTATION_OPTIONS = { - URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '0.0.1', - LANGUAGE: 'None', - COLLAPSE_INDEX: false, - BUILDER: 'html', - FILE_SUFFIX: '.html', - LINK_SUFFIX: '.html', - HAS_SOURCE: true, - SOURCELINK_SUFFIX: '.txt', - NAVIGATION_WITH_KEYS: true -}; \ No newline at end of file diff --git a/docs/_build/html/_static/file.png b/docs/_build/html/_static/file.png deleted file mode 100644 index a858a41..0000000 Binary files a/docs/_build/html/_static/file.png and /dev/null differ diff --git a/docs/_build/html/_static/images/logo_binder.svg b/docs/_build/html/_static/images/logo_binder.svg deleted file mode 100644 index 45fecf7..0000000 --- a/docs/_build/html/_static/images/logo_binder.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - -logo - - - - - - - - diff --git a/docs/_build/html/_static/images/logo_colab.png b/docs/_build/html/_static/images/logo_colab.png deleted file mode 100644 index b7560ec..0000000 Binary files a/docs/_build/html/_static/images/logo_colab.png and /dev/null differ diff --git a/docs/_build/html/_static/images/logo_jupyterhub.svg b/docs/_build/html/_static/images/logo_jupyterhub.svg deleted file mode 100644 index 60cfe9f..0000000 --- a/docs/_build/html/_static/images/logo_jupyterhub.svg +++ /dev/null @@ -1 +0,0 @@ -logo_jupyterhubHub diff --git a/docs/_build/html/_static/jquery-3.5.1.js b/docs/_build/html/_static/jquery-3.5.1.js deleted file mode 100644 index 5093733..0000000 --- a/docs/_build/html/_static/jquery-3.5.1.js +++ /dev/null @@ -1,10872 +0,0 @@ -/*! - * jQuery JavaScript Library v3.5.1 - * https://jquery.com/ - * - * Includes Sizzle.js - * https://sizzlejs.com/ - * - * Copyright JS Foundation and other contributors - * Released under the MIT license - * https://jquery.org/license - * - * Date: 2020-05-04T22:49Z - */ -( function( global, factory ) { - - "use strict"; - - if ( typeof module === "object" && typeof module.exports === "object" ) { - - // For CommonJS and CommonJS-like environments where a proper `window` - // is present, execute the factory and get jQuery. - // For environments that do not have a `window` with a `document` - // (such as Node.js), expose a factory as module.exports. - // This accentuates the need for the creation of a real `window`. - // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info. - module.exports = global.document ? - factory( global, true ) : - function( w ) { - if ( !w.document ) { - throw new Error( "jQuery requires a window with a document" ); - } - return factory( w ); - }; - } else { - factory( global ); - } - -// Pass this if window is not defined yet -} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - -// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 -// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode -// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common -// enough that all such attempts are guarded in a try block. -"use strict"; - -var arr = []; - -var getProto = Object.getPrototypeOf; - -var slice = arr.slice; - -var flat = arr.flat ? function( array ) { - return arr.flat.call( array ); -} : function( array ) { - return arr.concat.apply( [], array ); -}; - - -var push = arr.push; - -var indexOf = arr.indexOf; - -var class2type = {}; - -var toString = class2type.toString; - -var hasOwn = class2type.hasOwnProperty; - -var fnToString = hasOwn.toString; - -var ObjectFunctionString = fnToString.call( Object ); - -var support = {}; - -var isFunction = function isFunction( obj ) { - - // Support: Chrome <=57, Firefox <=52 - // In some browsers, typeof returns "function" for HTML elements - // (i.e., `typeof document.createElement( "object" ) === "function"`). - // We don't want to classify *any* DOM node as a function. - return typeof obj === "function" && typeof obj.nodeType !== "number"; - }; - - -var isWindow = function isWindow( obj ) { - return obj != null && obj === obj.window; - }; - - -var document = window.document; - - - - var preservedScriptAttributes = { - type: true, - src: true, - nonce: true, - noModule: true - }; - - function DOMEval( code, node, doc ) { - doc = doc || document; - - var i, val, - script = doc.createElement( "script" ); - - script.text = code; - if ( node ) { - for ( i in preservedScriptAttributes ) { - - // Support: Firefox 64+, Edge 18+ - // Some browsers don't support the "nonce" property on scripts. - // On the other hand, just using `getAttribute` is not enough as - // the `nonce` attribute is reset to an empty string whenever it - // becomes browsing-context connected. - // See https://github.com/whatwg/html/issues/2369 - // See https://html.spec.whatwg.org/#nonce-attributes - // The `node.getAttribute` check was added for the sake of - // `jQuery.globalEval` so that it can fake a nonce-containing node - // via an object. - val = node[ i ] || node.getAttribute && node.getAttribute( i ); - if ( val ) { - script.setAttribute( i, val ); - } - } - } - doc.head.appendChild( script ).parentNode.removeChild( script ); - } - - -function toType( obj ) { - if ( obj == null ) { - return obj + ""; - } - - // Support: Android <=2.3 only (functionish RegExp) - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call( obj ) ] || "object" : - typeof obj; -} -/* global Symbol */ -// Defining this global in .eslintrc.json would create a danger of using the global -// unguarded in another place, it seems safer to define global only for this module - - - -var - version = "3.5.1", - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - - // The jQuery object is actually just the init constructor 'enhanced' - // Need init if jQuery is called (just allow error to be thrown if not included) - return new jQuery.fn.init( selector, context ); - }; - -jQuery.fn = jQuery.prototype = { - - // The current version of jQuery being used - jquery: version, - - constructor: jQuery, - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - - // Return all the elements in a clean array - if ( num == null ) { - return slice.call( this ); - } - - // Return just the one element from the set - return num < 0 ? this[ num + this.length ] : this[ num ]; - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - each: function( callback ) { - return jQuery.each( this, callback ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map( this, function( elem, i ) { - return callback.call( elem, i, elem ); - } ) ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - even: function() { - return this.pushStack( jQuery.grep( this, function( _elem, i ) { - return ( i + 1 ) % 2; - } ) ); - }, - - odd: function() { - return this.pushStack( jQuery.grep( this, function( _elem, i ) { - return i % 2; - } ) ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); - }, - - end: function() { - return this.prevObject || this.constructor(); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: arr.sort, - splice: arr.splice -}; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[ 0 ] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - - // Skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !isFunction( target ) ) { - target = {}; - } - - // Extend jQuery itself if only one argument is passed - if ( i === length ) { - target = this; - i--; - } - - for ( ; i < length; i++ ) { - - // Only deal with non-null/undefined values - if ( ( options = arguments[ i ] ) != null ) { - - // Extend the base object - for ( name in options ) { - copy = options[ name ]; - - // Prevent Object.prototype pollution - // Prevent never-ending loop - if ( name === "__proto__" || target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject( copy ) || - ( copyIsArray = Array.isArray( copy ) ) ) ) { - src = target[ name ]; - - // Ensure proper type for the source value - if ( copyIsArray && !Array.isArray( src ) ) { - clone = []; - } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { - clone = {}; - } else { - clone = src; - } - copyIsArray = false; - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend( { - - // Unique for each copy of jQuery on the page - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - isPlainObject: function( obj ) { - var proto, Ctor; - - // Detect obvious negatives - // Use toString instead of jQuery.type to catch host objects - if ( !obj || toString.call( obj ) !== "[object Object]" ) { - return false; - } - - proto = getProto( obj ); - - // Objects with no prototype (e.g., `Object.create( null )`) are plain - if ( !proto ) { - return true; - } - - // Objects with prototype are plain iff they were constructed by a global Object function - Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; - return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; - }, - - isEmptyObject: function( obj ) { - var name; - - for ( name in obj ) { - return false; - } - return true; - }, - - // Evaluates a script in a provided context; falls back to the global one - // if not specified. - globalEval: function( code, options, doc ) { - DOMEval( code, { nonce: options && options.nonce }, doc ); - }, - - each: function( obj, callback ) { - var length, i = 0; - - if ( isArrayLike( obj ) ) { - length = obj.length; - for ( ; i < length; i++ ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } else { - for ( i in obj ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } - - return obj; - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArrayLike( Object( arr ) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - return arr == null ? -1 : indexOf.call( arr, elem, i ); - }, - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - for ( ; j < len; j++ ) { - first[ i++ ] = second[ j ]; - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var length, value, - i = 0, - ret = []; - - // Go through the array, translating each of the items to their new values - if ( isArrayLike( elems ) ) { - length = elems.length; - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return flat( ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -} ); - -if ( typeof Symbol === "function" ) { - jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; -} - -// Populate the class2type map -jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), -function( _i, name ) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -} ); - -function isArrayLike( obj ) { - - // Support: real iOS 8.2 only (not reproducible in simulator) - // `in` check used to prevent JIT error (gh-2145) - // hasOwn isn't used here due to false negatives - // regarding Nodelist length in IE - var length = !!obj && "length" in obj && obj.length, - type = toType( obj ); - - if ( isFunction( obj ) || isWindow( obj ) ) { - return false; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = -/*! - * Sizzle CSS Selector Engine v2.3.5 - * https://sizzlejs.com/ - * - * Copyright JS Foundation and other contributors - * Released under the MIT license - * https://js.foundation/ - * - * Date: 2020-03-14 - */ -( function( window ) { -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + 1 * new Date(), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - nonnativeSelectorCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // Instance methods - hasOwn = ( {} ).hasOwnProperty, - arr = [], - pop = arr.pop, - pushNative = arr.push, - push = arr.push, - slice = arr.slice, - - // Use a stripped-down indexOf as it's faster than native - // https://jsperf.com/thor-indexof-vs-for/5 - indexOf = function( list, elem ) { - var i = 0, - len = list.length; - for ( ; i < len; i++ ) { - if ( list[ i ] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" + - "ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - - // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram - identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + - "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + - - // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + - - // "Attribute values must be CSS identifiers [capture 5] - // or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + - whitespace + "*\\]", - - pseudos = ":(" + identifier + ")(?:\\((" + - - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: - // 1. quoted (capture 3; capture 4 or capture 5) - "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - - // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - - // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rwhitespace = new RegExp( whitespace + "+", "g" ), - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + - whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + - "*" ), - rdescend = new RegExp( whitespace + "|>" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + identifier + ")" ), - "CLASS": new RegExp( "^\\.(" + identifier + ")" ), - "TAG": new RegExp( "^(" + identifier + "|[*])" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + - whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + - whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + - "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + - "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rhtml = /HTML$/i, - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - - // CSS escapes - // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ), - funescape = function( escape, nonHex ) { - var high = "0x" + escape.slice( 1 ) - 0x10000; - - return nonHex ? - - // Strip the backslash prefix from a non-hex escape sequence - nonHex : - - // Replace a hexadecimal escape sequence with the encoded Unicode code point - // Support: IE <=11+ - // For values outside the Basic Multilingual Plane (BMP), manually construct a - // surrogate pair - high < 0 ? - String.fromCharCode( high + 0x10000 ) : - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }, - - // CSS string/identifier serialization - // https://drafts.csswg.org/cssom/#common-serializing-idioms - rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, - fcssescape = function( ch, asCodePoint ) { - if ( asCodePoint ) { - - // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER - if ( ch === "\0" ) { - return "\uFFFD"; - } - - // Control characters and (dependent upon position) numbers get escaped as code points - return ch.slice( 0, -1 ) + "\\" + - ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; - } - - // Other potentially-special ASCII characters get backslash-escaped - return "\\" + ch; - }, - - // Used for iframes - // See setDocument() - // Removing the function wrapper causes a "Permission Denied" - // error in IE - unloadHandler = function() { - setDocument(); - }, - - inDisabledFieldset = addCombinator( - function( elem ) { - return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; - }, - { dir: "parentNode", next: "legend" } - ); - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - ( arr = slice.call( preferredDoc.childNodes ) ), - preferredDoc.childNodes - ); - - // Support: Android<4.0 - // Detect silently failing push.apply - // eslint-disable-next-line no-unused-expressions - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - pushNative.apply( target, slice.call( els ) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - - // Can't trust NodeList.length - while ( ( target[ j++ ] = els[ i++ ] ) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var m, i, elem, nid, match, groups, newSelector, - newContext = context && context.ownerDocument, - - // nodeType defaults to 9, since context defaults to document - nodeType = context ? context.nodeType : 9; - - results = results || []; - - // Return early from calls with invalid selector or context - if ( typeof selector !== "string" || !selector || - nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { - - return results; - } - - // Try to shortcut find operations (as opposed to filters) in HTML documents - if ( !seed ) { - setDocument( context ); - context = context || document; - - if ( documentIsHTML ) { - - // If the selector is sufficiently simple, try using a "get*By*" DOM method - // (excepting DocumentFragment context, where the methods don't exist) - if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) { - - // ID selector - if ( ( m = match[ 1 ] ) ) { - - // Document context - if ( nodeType === 9 ) { - if ( ( elem = context.getElementById( m ) ) ) { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - - // Element context - } else { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( newContext && ( elem = newContext.getElementById( m ) ) && - contains( context, elem ) && - elem.id === m ) { - - results.push( elem ); - return results; - } - } - - // Type selector - } else if ( match[ 2 ] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Class selector - } else if ( ( m = match[ 3 ] ) && support.getElementsByClassName && - context.getElementsByClassName ) { - - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // Take advantage of querySelectorAll - if ( support.qsa && - !nonnativeSelectorCache[ selector + " " ] && - ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) && - - // Support: IE 8 only - // Exclude object elements - ( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) { - - newSelector = selector; - newContext = context; - - // qSA considers elements outside a scoping root when evaluating child or - // descendant combinators, which is not what we want. - // In such cases, we work around the behavior by prefixing every selector in the - // list with an ID selector referencing the scope context. - // The technique has to be used as well when a leading combinator is used - // as such selectors are not recognized by querySelectorAll. - // Thanks to Andrew Dupont for this technique. - if ( nodeType === 1 && - ( rdescend.test( selector ) || rcombinators.test( selector ) ) ) { - - // Expand context for sibling selectors - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || - context; - - // We can use :scope instead of the ID hack if the browser - // supports it & if we're not changing the context. - if ( newContext !== context || !support.scope ) { - - // Capture the context ID, setting it first if necessary - if ( ( nid = context.getAttribute( "id" ) ) ) { - nid = nid.replace( rcssescape, fcssescape ); - } else { - context.setAttribute( "id", ( nid = expando ) ); - } - } - - // Prefix every selector in the list - groups = tokenize( selector ); - i = groups.length; - while ( i-- ) { - groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " + - toSelector( groups[ i ] ); - } - newSelector = groups.join( "," ); - } - - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch ( qsaError ) { - nonnativeSelectorCache( selector, true ); - } finally { - if ( nid === expando ) { - context.removeAttribute( "id" ); - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {function(string, object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key + " " ) > Expr.cacheLength ) { - - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return ( cache[ key + " " ] = value ); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created element and returns a boolean result - */ -function assert( fn ) { - var el = document.createElement( "fieldset" ); - - try { - return !!fn( el ); - } catch ( e ) { - return false; - } finally { - - // Remove from its parent by default - if ( el.parentNode ) { - el.parentNode.removeChild( el ); - } - - // release memory in IE - el = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split( "|" ), - i = arr.length; - - while ( i-- ) { - Expr.attrHandle[ arr[ i ] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - a.sourceIndex - b.sourceIndex; - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( ( cur = cur.nextSibling ) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return ( name === "input" || name === "button" ) && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for :enabled/:disabled - * @param {Boolean} disabled true for :disabled; false for :enabled - */ -function createDisabledPseudo( disabled ) { - - // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable - return function( elem ) { - - // Only certain elements can match :enabled or :disabled - // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled - // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled - if ( "form" in elem ) { - - // Check for inherited disabledness on relevant non-disabled elements: - // * listed form-associated elements in a disabled fieldset - // https://html.spec.whatwg.org/multipage/forms.html#category-listed - // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled - // * option elements in a disabled optgroup - // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled - // All such elements have a "form" property. - if ( elem.parentNode && elem.disabled === false ) { - - // Option elements defer to a parent optgroup if present - if ( "label" in elem ) { - if ( "label" in elem.parentNode ) { - return elem.parentNode.disabled === disabled; - } else { - return elem.disabled === disabled; - } - } - - // Support: IE 6 - 11 - // Use the isDisabled shortcut property to check for disabled fieldset ancestors - return elem.isDisabled === disabled || - - // Where there is no isDisabled, check manually - /* jshint -W018 */ - elem.isDisabled !== !disabled && - inDisabledFieldset( elem ) === disabled; - } - - return elem.disabled === disabled; - - // Try to winnow out elements that can't be disabled before trusting the disabled property. - // Some victims get caught in our net (label, legend, menu, track), but it shouldn't - // even exist on them, let alone have a boolean value. - } else if ( "label" in elem ) { - return elem.disabled === disabled; - } - - // Remaining elements are neither :enabled nor :disabled - return false; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction( function( argument ) { - argument = +argument; - return markFunction( function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ ( j = matchIndexes[ i ] ) ] ) { - seed[ j ] = !( matches[ j ] = seed[ j ] ); - } - } - } ); - } ); -} - -/** - * Checks a node for validity as a Sizzle context - * @param {Element|Object=} context - * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value - */ -function testContext( context ) { - return context && typeof context.getElementsByTagName !== "undefined" && context; -} - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Detects XML nodes - * @param {Element|Object} elem An element or a document - * @returns {Boolean} True iff elem is a non-HTML XML node - */ -isXML = Sizzle.isXML = function( elem ) { - var namespace = elem.namespaceURI, - docElem = ( elem.ownerDocument || elem ).documentElement; - - // Support: IE <=8 - // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes - // https://bugs.jquery.com/ticket/4833 - return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" ); -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, subWindow, - doc = node ? node.ownerDocument || node : preferredDoc; - - // Return early if doc is invalid or already selected - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Update global variables - document = doc; - docElem = document.documentElement; - documentIsHTML = !isXML( document ); - - // Support: IE 9 - 11+, Edge 12 - 18+ - // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( preferredDoc != document && - ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) { - - // Support: IE 11, Edge - if ( subWindow.addEventListener ) { - subWindow.addEventListener( "unload", unloadHandler, false ); - - // Support: IE 9 - 10 only - } else if ( subWindow.attachEvent ) { - subWindow.attachEvent( "onunload", unloadHandler ); - } - } - - // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only, - // Safari 4 - 5 only, Opera <=11.6 - 12.x only - // IE/Edge & older browsers don't support the :scope pseudo-class. - // Support: Safari 6.0 only - // Safari 6.0 supports :scope but it's an alias of :root there. - support.scope = assert( function( el ) { - docElem.appendChild( el ).appendChild( document.createElement( "div" ) ); - return typeof el.querySelectorAll !== "undefined" && - !el.querySelectorAll( ":scope fieldset div" ).length; - } ); - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties - // (excepting IE8 booleans) - support.attributes = assert( function( el ) { - el.className = "i"; - return !el.getAttribute( "className" ); - } ); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert( function( el ) { - el.appendChild( document.createComment( "" ) ); - return !el.getElementsByTagName( "*" ).length; - } ); - - // Support: IE<9 - support.getElementsByClassName = rnative.test( document.getElementsByClassName ); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programmatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert( function( el ) { - docElem.appendChild( el ).id = expando; - return !document.getElementsByName || !document.getElementsByName( expando ).length; - } ); - - // ID filter and find - if ( support.getById ) { - Expr.filter[ "ID" ] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute( "id" ) === attrId; - }; - }; - Expr.find[ "ID" ] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var elem = context.getElementById( id ); - return elem ? [ elem ] : []; - } - }; - } else { - Expr.filter[ "ID" ] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== "undefined" && - elem.getAttributeNode( "id" ); - return node && node.value === attrId; - }; - }; - - // Support: IE 6 - 7 only - // getElementById is not reliable as a find shortcut - Expr.find[ "ID" ] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var node, i, elems, - elem = context.getElementById( id ); - - if ( elem ) { - - // Verify the id attribute - node = elem.getAttributeNode( "id" ); - if ( node && node.value === id ) { - return [ elem ]; - } - - // Fall back on getElementsByName - elems = context.getElementsByName( id ); - i = 0; - while ( ( elem = elems[ i++ ] ) ) { - node = elem.getAttributeNode( "id" ); - if ( node && node.value === id ) { - return [ elem ]; - } - } - } - - return []; - } - }; - } - - // Tag - Expr.find[ "TAG" ] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( tag ); - - // DocumentFragment nodes don't have gEBTN - } else if ( support.qsa ) { - return context.querySelectorAll( tag ); - } - } : - - function( tag, context ) { - var elem, - tmp = [], - i = 0, - - // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( ( elem = results[ i++ ] ) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See https://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) { - - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert( function( el ) { - - var input; - - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // https://bugs.jquery.com/ticket/12359 - docElem.appendChild( el ).innerHTML = "" + - ""; - - // Support: IE8, Opera 11-12.16 - // Nothing should be selected when empty strings follow ^= or $= or *= - // The test attribute must be unknown in Opera but "safe" for WinRT - // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !el.querySelectorAll( "[selected]" ).length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ - if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { - rbuggyQSA.push( "~=" ); - } - - // Support: IE 11+, Edge 15 - 18+ - // IE 11/Edge don't find elements on a `[name='']` query in some cases. - // Adding a temporary attribute to the document before the selection works - // around the issue. - // Interestingly, IE 10 & older don't seem to have the issue. - input = document.createElement( "input" ); - input.setAttribute( "name", "" ); - el.appendChild( input ); - if ( !el.querySelectorAll( "[name='']" ).length ) { - rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" + - whitespace + "*(?:''|\"\")" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !el.querySelectorAll( ":checked" ).length ) { - rbuggyQSA.push( ":checked" ); - } - - // Support: Safari 8+, iOS 8+ - // https://bugs.webkit.org/show_bug.cgi?id=136851 - // In-page `selector#id sibling-combinator selector` fails - if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { - rbuggyQSA.push( ".#.+[+~]" ); - } - - // Support: Firefox <=3.6 - 5 only - // Old Firefox doesn't throw on a badly-escaped identifier. - el.querySelectorAll( "\\\f" ); - rbuggyQSA.push( "[\\r\\n\\f]" ); - } ); - - assert( function( el ) { - el.innerHTML = "" + - ""; - - // Support: Windows 8 Native Apps - // The type and name attributes are restricted during .innerHTML assignment - var input = document.createElement( "input" ); - input.setAttribute( "type", "hidden" ); - el.appendChild( input ).setAttribute( "name", "D" ); - - // Support: IE8 - // Enforce case-sensitivity of name attribute - if ( el.querySelectorAll( "[name=d]" ).length ) { - rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( el.querySelectorAll( ":enabled" ).length !== 2 ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Support: IE9-11+ - // IE's :disabled selector does not pick up the children of disabled fieldsets - docElem.appendChild( el ).disabled = true; - if ( el.querySelectorAll( ":disabled" ).length !== 2 ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Support: Opera 10 - 11 only - // Opera 10-11 does not throw on post-comma invalid pseudos - el.querySelectorAll( "*,:x" ); - rbuggyQSA.push( ",.*:" ); - } ); - } - - if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches || - docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector ) ) ) ) { - - assert( function( el ) { - - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( el, "*" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( el, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - } ); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) ); - - /* Contains - ---------------------------------------------------------------------- */ - hasCompare = rnative.test( docElem.compareDocumentPosition ); - - // Element contains another - // Purposefully self-exclusive - // As in, an element does not contain itself - contains = hasCompare || rnative.test( docElem.contains ) ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - ) ); - } : - function( a, b ) { - if ( b ) { - while ( ( b = b.parentNode ) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = hasCompare ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - // Sort on method existence if only one input has compareDocumentPosition - var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; - if ( compare ) { - return compare; - } - - // Calculate position if both inputs belong to the same document - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ? - a.compareDocumentPosition( b ) : - - // Otherwise we know they are disconnected - 1; - - // Disconnected nodes - if ( compare & 1 || - ( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) { - - // Choose the first element that is related to our preferred document - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( a == document || a.ownerDocument == preferredDoc && - contains( preferredDoc, a ) ) { - return -1; - } - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( b == document || b.ownerDocument == preferredDoc && - contains( preferredDoc, b ) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } : - function( a, b ) { - - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Parentless nodes are either documents or disconnected - if ( !aup || !bup ) { - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - /* eslint-disable eqeqeq */ - return a == document ? -1 : - b == document ? 1 : - /* eslint-enable eqeqeq */ - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( ( cur = cur.parentNode ) ) { - ap.unshift( cur ); - } - cur = b; - while ( ( cur = cur.parentNode ) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[ i ] === bp[ i ] ) { - i++; - } - - return i ? - - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[ i ], bp[ i ] ) : - - // Otherwise nodes in our document sort first - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - /* eslint-disable eqeqeq */ - ap[ i ] == preferredDoc ? -1 : - bp[ i ] == preferredDoc ? 1 : - /* eslint-enable eqeqeq */ - 0; - }; - - return document; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - setDocument( elem ); - - if ( support.matchesSelector && documentIsHTML && - !nonnativeSelectorCache[ expr + " " ] && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch ( e ) { - nonnativeSelectorCache( expr, true ); - } - } - - return Sizzle( expr, document, null, [ elem ] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - - // Set document vars if needed - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( ( context.ownerDocument || context ) != document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - - // Set document vars if needed - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( ( elem.ownerDocument || elem ) != document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val !== undefined ? - val : - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - ( val = elem.getAttributeNode( name ) ) && val.specified ? - val.value : - null; -}; - -Sizzle.escape = function( sel ) { - return ( sel + "" ).replace( rcssescape, fcssescape ); -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( ( elem = results[ i++ ] ) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - // Clear input after sorting to release objects - // See https://github.com/jquery/sizzle/pull/225 - sortInput = null; - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - - // If no nodeType, this is expected to be an array - while ( ( node = elem[ i++ ] ) ) { - - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - - // Use textContent for elements - // innerText usage removed for consistency of new lines (jQuery #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[ 1 ] = match[ 1 ].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[ 3 ] = ( match[ 3 ] || match[ 4 ] || - match[ 5 ] || "" ).replace( runescape, funescape ); - - if ( match[ 2 ] === "~=" ) { - match[ 3 ] = " " + match[ 3 ] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[ 1 ] = match[ 1 ].toLowerCase(); - - if ( match[ 1 ].slice( 0, 3 ) === "nth" ) { - - // nth-* requires argument - if ( !match[ 3 ] ) { - Sizzle.error( match[ 0 ] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[ 4 ] = +( match[ 4 ] ? - match[ 5 ] + ( match[ 6 ] || 1 ) : - 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) ); - match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" ); - - // other types prohibit arguments - } else if ( match[ 3 ] ) { - Sizzle.error( match[ 0 ] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[ 6 ] && match[ 2 ]; - - if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[ 3 ] ) { - match[ 2 ] = match[ 4 ] || match[ 5 ] || ""; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - - // Get excess from tokenize (recursively) - ( excess = tokenize( unquoted, true ) ) && - - // advance to the next closing parenthesis - ( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) { - - // excess is a negative index - match[ 0 ] = match[ 0 ].slice( 0, excess ); - match[ 2 ] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { - return true; - } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - ( pattern = new RegExp( "(^|" + whitespace + - ")" + className + "(" + whitespace + "|$)" ) ) && classCache( - className, function( elem ) { - return pattern.test( - typeof elem.className === "string" && elem.className || - typeof elem.getAttribute !== "undefined" && - elem.getAttribute( "class" ) || - "" - ); - } ); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - /* eslint-disable max-len */ - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - /* eslint-enable max-len */ - - }; - }, - - "CHILD": function( type, what, _argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, _context, xml ) { - var cache, uniqueCache, outerCache, node, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType, - diff = false; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( ( node = node[ dir ] ) ) { - if ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) { - - return false; - } - } - - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - - // Seek `elem` from a previously-cached index - - // ...in a gzip-friendly way - node = parent; - outerCache = node[ expando ] || ( node[ expando ] = {} ); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - ( outerCache[ node.uniqueID ] = {} ); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex && cache[ 2 ]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( ( node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - ( diff = nodeIndex = 0 ) || start.pop() ) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - } else { - - // Use previously-cached element index if available - if ( useCache ) { - - // ...in a gzip-friendly way - node = elem; - outerCache = node[ expando ] || ( node[ expando ] = {} ); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - ( outerCache[ node.uniqueID ] = {} ); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex; - } - - // xml :nth-child(...) - // or :nth-last-child(...) or :nth(-last)?-of-type(...) - if ( diff === false ) { - - // Use the same loop as above to seek `elem` from the start - while ( ( node = ++nodeIndex && node && node[ dir ] || - ( diff = nodeIndex = 0 ) || start.pop() ) ) { - - if ( ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) && - ++diff ) { - - // Cache the index of each encountered element - if ( useCache ) { - outerCache = node[ expando ] || - ( node[ expando ] = {} ); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - ( outerCache[ node.uniqueID ] = {} ); - - uniqueCache[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction( function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf( seed, matched[ i ] ); - seed[ idx ] = !( matches[ idx ] = matched[ i ] ); - } - } ) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - - // Potentially complex pseudos - "not": markFunction( function( selector ) { - - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction( function( seed, matches, _context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( ( elem = unmatched[ i ] ) ) { - seed[ i ] = !( matches[ i ] = elem ); - } - } - } ) : - function( elem, _context, xml ) { - input[ 0 ] = elem; - matcher( input, null, xml, results ); - - // Don't keep the element (issue #299) - input[ 0 ] = null; - return !results.pop(); - }; - } ), - - "has": markFunction( function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - } ), - - "contains": markFunction( function( text ) { - text = text.replace( runescape, funescape ); - return function( elem ) { - return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1; - }; - } ), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - - // lang value must be a valid identifier - if ( !ridentifier.test( lang || "" ) ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( ( elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( ( elem = elem.parentNode ) && elem.nodeType === 1 ); - return false; - }; - } ), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && - ( !document.hasFocus || document.hasFocus() ) && - !!( elem.type || elem.href || ~elem.tabIndex ); - }, - - // Boolean properties - "enabled": createDisabledPseudo( false ), - "disabled": createDisabledPseudo( true ), - - "checked": function( elem ) { - - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return ( nodeName === "input" && !!elem.checked ) || - ( nodeName === "option" && !!elem.selected ); - }, - - "selected": function( elem ) { - - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - // eslint-disable-next-line no-unused-expressions - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), - // but not by others (comment: 8; processing instruction: 7; etc.) - // nodeType < 6 works because attributes (2) do not appear as children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeType < 6 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos[ "empty" ]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - - // Support: IE<8 - // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" - ( ( attr = elem.getAttribute( "type" ) ) == null || - attr.toLowerCase() === "text" ); - }, - - // Position-in-collection - "first": createPositionalPseudo( function() { - return [ 0 ]; - } ), - - "last": createPositionalPseudo( function( _matchIndexes, length ) { - return [ length - 1 ]; - } ), - - "eq": createPositionalPseudo( function( _matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - } ), - - "even": createPositionalPseudo( function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - } ), - - "odd": createPositionalPseudo( function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - } ), - - "lt": createPositionalPseudo( function( matchIndexes, length, argument ) { - var i = argument < 0 ? - argument + length : - argument > length ? - length : - argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - } ), - - "gt": createPositionalPseudo( function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - } ) - } -}; - -Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -tokenize = Sizzle.tokenize = function( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || ( match = rcomma.exec( soFar ) ) ) { - if ( match ) { - - // Don't consume trailing commas as valid - soFar = soFar.slice( match[ 0 ].length ) || soFar; - } - groups.push( ( tokens = [] ) ); - } - - matched = false; - - // Combinators - if ( ( match = rcombinators.exec( soFar ) ) ) { - matched = match.shift(); - tokens.push( { - value: matched, - - // Cast descendant combinators to space - type: match[ 0 ].replace( rtrim, " " ) - } ); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] || - ( match = preFilters[ type ]( match ) ) ) ) { - matched = match.shift(); - tokens.push( { - value: matched, - type: type, - matches: match - } ); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -}; - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[ i ].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - skip = combinator.next, - key = skip || dir, - checkNonElements = base && key === "parentNode", - doneName = done++; - - return combinator.first ? - - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( ( elem = elem[ dir ] ) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - return false; - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var oldCache, uniqueCache, outerCache, - newCache = [ dirruns, doneName ]; - - // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching - if ( xml ) { - while ( ( elem = elem[ dir ] ) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( ( elem = elem[ dir ] ) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || ( elem[ expando ] = {} ); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ elem.uniqueID ] || - ( outerCache[ elem.uniqueID ] = {} ); - - if ( skip && skip === elem.nodeName.toLowerCase() ) { - elem = elem[ dir ] || elem; - } else if ( ( oldCache = uniqueCache[ key ] ) && - oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { - - // Assign to newCache so results back-propagate to previous elements - return ( newCache[ 2 ] = oldCache[ 2 ] ); - } else { - - // Reuse newcache so results back-propagate to previous elements - uniqueCache[ key ] = newCache; - - // A match means we're done; a fail means we have to keep checking - if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) { - return true; - } - } - } - } - } - return false; - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[ i ]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[ 0 ]; -} - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[ i ], results ); - } - return results; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( ( elem = unmatched[ i ] ) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction( function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( - selector || "*", - context.nodeType ? [ context ] : context, - [] - ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( ( elem = temp[ i ] ) ) { - matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem ); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( ( elem = matcherOut[ i ] ) ) { - - // Restore matcherIn since elem is not yet a final match - temp.push( ( matcherIn[ i ] = elem ) ); - } - } - postFinder( null, ( matcherOut = [] ), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( ( elem = matcherOut[ i ] ) && - ( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) { - - seed[ temp ] = !( results[ temp ] = elem ); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - } ); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[ 0 ].type ], - implicitRelative = leadingRelative || Expr.relative[ " " ], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - ( checkContext = context ).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - - // Avoid hanging onto element (issue #299) - checkContext = null; - return ret; - } ]; - - for ( ; i < len; i++ ) { - if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) { - matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ]; - } else { - matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[ j ].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens - .slice( 0, i - 1 ) - .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } ) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - var bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, outermost ) { - var elem, j, matcher, - matchedCount = 0, - i = "0", - unmatched = seed && [], - setMatched = [], - contextBackup = outermostContext, - - // We must always have either seed elements or outermost context - elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ), - - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ), - len = elems.length; - - if ( outermost ) { - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - outermostContext = context == document || context || outermost; - } - - // Add elements passing elementMatchers directly to results - // Support: IE<9, Safari - // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id - for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( !context && elem.ownerDocument != document ) { - setDocument( elem ); - xml = !documentIsHTML; - } - while ( ( matcher = elementMatchers[ j++ ] ) ) { - if ( matcher( elem, context || document, xml ) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - - // They will have gone through all possible matchers - if ( ( elem = !matcher && elem ) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // `i` is now the count of elements visited above, and adding it to `matchedCount` - // makes the latter nonnegative. - matchedCount += i; - - // Apply set filters to unmatched elements - // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` - // equals `i`), unless we didn't visit _any_ elements in the above loop because we have - // no element matchers and no seed. - // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that - // case, which will result in a "00" `matchedCount` that differs from `i` but is also - // numerically zero. - if ( bySet && i !== matchedCount ) { - j = 0; - while ( ( matcher = setMatchers[ j++ ] ) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !( unmatched[ i ] || setMatched[ i ] ) ) { - setMatched[ i ] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - - // Generate a function of recursive functions that can be used to check each element - if ( !match ) { - match = tokenize( selector ); - } - i = match.length; - while ( i-- ) { - cached = matcherFromTokens( match[ i ] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( - selector, - matcherFromGroupMatchers( elementMatchers, setMatchers ) - ); - - // Save selector and tokenization - cached.selector = selector; - } - return cached; -}; - -/** - * A low-level selection function that works with Sizzle's compiled - * selector functions - * @param {String|Function} selector A selector or a pre-compiled - * selector function built with Sizzle.compile - * @param {Element} context - * @param {Array} [results] - * @param {Array} [seed] A set of elements to match against - */ -select = Sizzle.select = function( selector, context, results, seed ) { - var i, tokens, token, type, find, - compiled = typeof selector === "function" && selector, - match = !seed && tokenize( ( selector = compiled.selector || selector ) ); - - results = results || []; - - // Try to minimize operations if there is only one selector in the list and no seed - // (the latter of which guarantees us context) - if ( match.length === 1 ) { - - // Reduce context if the leading compound selector is an ID - tokens = match[ 0 ] = match[ 0 ].slice( 0 ); - if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" && - context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) { - - context = ( Expr.find[ "ID" ]( token.matches[ 0 ] - .replace( runescape, funescape ), context ) || [] )[ 0 ]; - if ( !context ) { - return results; - - // Precompiled matchers will still verify ancestry, so step up a level - } else if ( compiled ) { - context = context.parentNode; - } - - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[ i ]; - - // Abort if we hit a combinator - if ( Expr.relative[ ( type = token.type ) ] ) { - break; - } - if ( ( find = Expr.find[ type ] ) ) { - - // Search, expanding context for leading sibling combinators - if ( ( seed = find( - token.matches[ 0 ].replace( runescape, funescape ), - rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) || - context - ) ) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, seed ); - return results; - } - - break; - } - } - } - } - - // Compile and execute a filtering function if one is not provided - // Provide `match` to avoid retokenization if we modified the selector above - ( compiled || compile( selector, match ) )( - seed, - context, - !documentIsHTML, - results, - !context || rsibling.test( selector ) && testContext( context.parentNode ) || context - ); - return results; -}; - -// One-time assignments - -// Sort stability -support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando; - -// Support: Chrome 14-35+ -// Always assume duplicates if they aren't passed to the comparison function -support.detectDuplicates = !!hasDuplicate; - -// Initialize against the default document -setDocument(); - -// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) -// Detached nodes confoundingly follow *each other* -support.sortDetached = assert( function( el ) { - - // Should return 1, but returns 4 (following) - return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1; -} ); - -// Support: IE<8 -// Prevent attribute/property "interpolation" -// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert( function( el ) { - el.innerHTML = ""; - return el.firstChild.getAttribute( "href" ) === "#"; -} ) ) { - addHandle( "type|href|height|width", function( elem, name, isXML ) { - if ( !isXML ) { - return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); - } - } ); -} - -// Support: IE<9 -// Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert( function( el ) { - el.innerHTML = ""; - el.firstChild.setAttribute( "value", "" ); - return el.firstChild.getAttribute( "value" ) === ""; -} ) ) { - addHandle( "value", function( elem, _name, isXML ) { - if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { - return elem.defaultValue; - } - } ); -} - -// Support: IE<9 -// Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert( function( el ) { - return el.getAttribute( "disabled" ) == null; -} ) ) { - addHandle( booleans, function( elem, name, isXML ) { - var val; - if ( !isXML ) { - return elem[ name ] === true ? name.toLowerCase() : - ( val = elem.getAttributeNode( name ) ) && val.specified ? - val.value : - null; - } - } ); -} - -return Sizzle; - -} )( window ); - - - -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; - -// Deprecated -jQuery.expr[ ":" ] = jQuery.expr.pseudos; -jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; -jQuery.escapeSelector = Sizzle.escape; - - - - -var dir = function( elem, dir, until ) { - var matched = [], - truncate = until !== undefined; - - while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { - if ( elem.nodeType === 1 ) { - if ( truncate && jQuery( elem ).is( until ) ) { - break; - } - matched.push( elem ); - } - } - return matched; -}; - - -var siblings = function( n, elem ) { - var matched = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - matched.push( n ); - } - } - - return matched; -}; - - -var rneedsContext = jQuery.expr.match.needsContext; - - - -function nodeName( elem, name ) { - - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - -}; -var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); - - - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, not ) { - if ( isFunction( qualifier ) ) { - return jQuery.grep( elements, function( elem, i ) { - return !!qualifier.call( elem, i, elem ) !== not; - } ); - } - - // Single element - if ( qualifier.nodeType ) { - return jQuery.grep( elements, function( elem ) { - return ( elem === qualifier ) !== not; - } ); - } - - // Arraylike of elements (jQuery, arguments, Array) - if ( typeof qualifier !== "string" ) { - return jQuery.grep( elements, function( elem ) { - return ( indexOf.call( qualifier, elem ) > -1 ) !== not; - } ); - } - - // Filtered directly for both simple and complex selectors - return jQuery.filter( qualifier, elements, not ); -} - -jQuery.filter = function( expr, elems, not ) { - var elem = elems[ 0 ]; - - if ( not ) { - expr = ":not(" + expr + ")"; - } - - if ( elems.length === 1 && elem.nodeType === 1 ) { - return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; - } - - return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - } ) ); -}; - -jQuery.fn.extend( { - find: function( selector ) { - var i, ret, - len = this.length, - self = this; - - if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter( function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - } ) ); - } - - ret = this.pushStack( [] ); - - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, self[ i ], ret ); - } - - return len > 1 ? jQuery.uniqueSort( ret ) : ret; - }, - filter: function( selector ) { - return this.pushStack( winnow( this, selector || [], false ) ); - }, - not: function( selector ) { - return this.pushStack( winnow( this, selector || [], true ) ); - }, - is: function( selector ) { - return !!winnow( - this, - - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test( selector ) ? - jQuery( selector ) : - selector || [], - false - ).length; - } -} ); - - -// Initialize a jQuery object - - -// A central reference to the root jQuery(document) -var rootjQuery, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - // Shortcut simple #id case for speed - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, - - init = jQuery.fn.init = function( selector, context, root ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Method init() accepts an alternate rootjQuery - // so migrate can support jQuery.sub (gh-2101) - root = root || rootjQuery; - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector[ 0 ] === "<" && - selector[ selector.length - 1 ] === ">" && - selector.length >= 3 ) { - - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && ( match[ 1 ] || !context ) ) { - - // HANDLE: $(html) -> $(array) - if ( match[ 1 ] ) { - context = context instanceof jQuery ? context[ 0 ] : context; - - // Option to run scripts is true for back-compat - // Intentionally let the error be thrown if parseHTML is not present - jQuery.merge( this, jQuery.parseHTML( - match[ 1 ], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - - // Properties of context are called as methods if possible - if ( isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[ 2 ] ); - - if ( elem ) { - - // Inject the element directly into the jQuery object - this[ 0 ] = elem; - this.length = 1; - } - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || root ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this[ 0 ] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( isFunction( selector ) ) { - return root.ready !== undefined ? - root.ready( selector ) : - - // Execute immediately if ready is not present - selector( jQuery ); - } - - return jQuery.makeArray( selector, this ); - }; - -// Give the init function the jQuery prototype for later instantiation -init.prototype = jQuery.fn; - -// Initialize central reference -rootjQuery = jQuery( document ); - - -var rparentsprev = /^(?:parents|prev(?:Until|All))/, - - // Methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend( { - has: function( target ) { - var targets = jQuery( target, this ), - l = targets.length; - - return this.filter( function() { - var i = 0; - for ( ; i < l; i++ ) { - if ( jQuery.contains( this, targets[ i ] ) ) { - return true; - } - } - } ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - matched = [], - targets = typeof selectors !== "string" && jQuery( selectors ); - - // Positional selectors never match, since there's no _selection_ context - if ( !rneedsContext.test( selectors ) ) { - for ( ; i < l; i++ ) { - for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { - - // Always skip document fragments - if ( cur.nodeType < 11 && ( targets ? - targets.index( cur ) > -1 : - - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector( cur, selectors ) ) ) { - - matched.push( cur ); - break; - } - } - } - } - - return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); - }, - - // Determine the position of an element within the set - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; - } - - // Index in selector - if ( typeof elem === "string" ) { - return indexOf.call( jQuery( elem ), this[ 0 ] ); - } - - // Locate the position of the desired element - return indexOf.call( this, - - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[ 0 ] : elem - ); - }, - - add: function( selector, context ) { - return this.pushStack( - jQuery.uniqueSort( - jQuery.merge( this.get(), jQuery( selector, context ) ) - ) - ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - } -} ); - -function sibling( cur, dir ) { - while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} - return cur; -} - -jQuery.each( { - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, _i, until ) { - return dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, _i, until ) { - return dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, _i, until ) { - return dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return siblings( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return siblings( elem.firstChild ); - }, - contents: function( elem ) { - if ( elem.contentDocument != null && - - // Support: IE 11+ - // elements with no `data` attribute has an object - // `contentDocument` with a `null` prototype. - getProto( elem.contentDocument ) ) { - - return elem.contentDocument; - } - - // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only - // Treat the template element as a regular one in browsers that - // don't support it. - if ( nodeName( elem, "template" ) ) { - elem = elem.content || elem; - } - - return jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var matched = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - matched = jQuery.filter( selector, matched ); - } - - if ( this.length > 1 ) { - - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - jQuery.uniqueSort( matched ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - matched.reverse(); - } - } - - return this.pushStack( matched ); - }; -} ); -var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); - - - -// Convert String-formatted options into Object-formatted ones -function createOptions( options ) { - var object = {}; - jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { - object[ flag ] = true; - } ); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - createOptions( options ) : - jQuery.extend( {}, options ); - - var // Flag to know if list is currently firing - firing, - - // Last fire value for non-forgettable lists - memory, - - // Flag to know if list was already fired - fired, - - // Flag to prevent firing - locked, - - // Actual callback list - list = [], - - // Queue of execution data for repeatable lists - queue = [], - - // Index of currently firing callback (modified by add/remove as needed) - firingIndex = -1, - - // Fire callbacks - fire = function() { - - // Enforce single-firing - locked = locked || options.once; - - // Execute callbacks for all pending executions, - // respecting firingIndex overrides and runtime changes - fired = firing = true; - for ( ; queue.length; firingIndex = -1 ) { - memory = queue.shift(); - while ( ++firingIndex < list.length ) { - - // Run callback and check for early termination - if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && - options.stopOnFalse ) { - - // Jump to end and forget the data so .add doesn't re-fire - firingIndex = list.length; - memory = false; - } - } - } - - // Forget the data if we're done with it - if ( !options.memory ) { - memory = false; - } - - firing = false; - - // Clean up if we're done firing for good - if ( locked ) { - - // Keep an empty list if we have data for future add calls - if ( memory ) { - list = []; - - // Otherwise, this object is spent - } else { - list = ""; - } - } - }, - - // Actual Callbacks object - self = { - - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - - // If we have memory from a past run, we should fire after adding - if ( memory && !firing ) { - firingIndex = list.length - 1; - queue.push( memory ); - } - - ( function add( args ) { - jQuery.each( args, function( _, arg ) { - if ( isFunction( arg ) ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && toType( arg ) !== "string" ) { - - // Inspect recursively - add( arg ); - } - } ); - } )( arguments ); - - if ( memory && !firing ) { - fire(); - } - } - return this; - }, - - // Remove a callback from the list - remove: function() { - jQuery.each( arguments, function( _, arg ) { - var index; - while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - - // Handle firing indexes - if ( index <= firingIndex ) { - firingIndex--; - } - } - } ); - return this; - }, - - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? - jQuery.inArray( fn, list ) > -1 : - list.length > 0; - }, - - // Remove all callbacks from the list - empty: function() { - if ( list ) { - list = []; - } - return this; - }, - - // Disable .fire and .add - // Abort any current/pending executions - // Clear all callbacks and values - disable: function() { - locked = queue = []; - list = memory = ""; - return this; - }, - disabled: function() { - return !list; - }, - - // Disable .fire - // Also disable .add unless we have memory (since it would have no effect) - // Abort any pending executions - lock: function() { - locked = queue = []; - if ( !memory && !firing ) { - list = memory = ""; - } - return this; - }, - locked: function() { - return !!locked; - }, - - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( !locked ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - queue.push( args ); - if ( !firing ) { - fire(); - } - } - return this; - }, - - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; - - -function Identity( v ) { - return v; -} -function Thrower( ex ) { - throw ex; -} - -function adoptValue( value, resolve, reject, noValue ) { - var method; - - try { - - // Check for promise aspect first to privilege synchronous behavior - if ( value && isFunction( ( method = value.promise ) ) ) { - method.call( value ).done( resolve ).fail( reject ); - - // Other thenables - } else if ( value && isFunction( ( method = value.then ) ) ) { - method.call( value, resolve, reject ); - - // Other non-thenables - } else { - - // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: - // * false: [ value ].slice( 0 ) => resolve( value ) - // * true: [ value ].slice( 1 ) => resolve() - resolve.apply( undefined, [ value ].slice( noValue ) ); - } - - // For Promises/A+, convert exceptions into rejections - // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in - // Deferred#then to conditionally suppress rejection. - } catch ( value ) { - - // Support: Android 4.0 only - // Strict mode functions invoked without .call/.apply get global-object context - reject.apply( undefined, [ value ] ); - } -} - -jQuery.extend( { - - Deferred: function( func ) { - var tuples = [ - - // action, add listener, callbacks, - // ... .then handlers, argument index, [final state] - [ "notify", "progress", jQuery.Callbacks( "memory" ), - jQuery.Callbacks( "memory" ), 2 ], - [ "resolve", "done", jQuery.Callbacks( "once memory" ), - jQuery.Callbacks( "once memory" ), 0, "resolved" ], - [ "reject", "fail", jQuery.Callbacks( "once memory" ), - jQuery.Callbacks( "once memory" ), 1, "rejected" ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - "catch": function( fn ) { - return promise.then( null, fn ); - }, - - // Keep pipe for back-compat - pipe: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - - return jQuery.Deferred( function( newDefer ) { - jQuery.each( tuples, function( _i, tuple ) { - - // Map tuples (progress, done, fail) to arguments (done, fail, progress) - var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; - - // deferred.progress(function() { bind to newDefer or newDefer.notify }) - // deferred.done(function() { bind to newDefer or newDefer.resolve }) - // deferred.fail(function() { bind to newDefer or newDefer.reject }) - deferred[ tuple[ 1 ] ]( function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && isFunction( returned.promise ) ) { - returned.promise() - .progress( newDefer.notify ) - .done( newDefer.resolve ) - .fail( newDefer.reject ); - } else { - newDefer[ tuple[ 0 ] + "With" ]( - this, - fn ? [ returned ] : arguments - ); - } - } ); - } ); - fns = null; - } ).promise(); - }, - then: function( onFulfilled, onRejected, onProgress ) { - var maxDepth = 0; - function resolve( depth, deferred, handler, special ) { - return function() { - var that = this, - args = arguments, - mightThrow = function() { - var returned, then; - - // Support: Promises/A+ section 2.3.3.3.3 - // https://promisesaplus.com/#point-59 - // Ignore double-resolution attempts - if ( depth < maxDepth ) { - return; - } - - returned = handler.apply( that, args ); - - // Support: Promises/A+ section 2.3.1 - // https://promisesaplus.com/#point-48 - if ( returned === deferred.promise() ) { - throw new TypeError( "Thenable self-resolution" ); - } - - // Support: Promises/A+ sections 2.3.3.1, 3.5 - // https://promisesaplus.com/#point-54 - // https://promisesaplus.com/#point-75 - // Retrieve `then` only once - then = returned && - - // Support: Promises/A+ section 2.3.4 - // https://promisesaplus.com/#point-64 - // Only check objects and functions for thenability - ( typeof returned === "object" || - typeof returned === "function" ) && - returned.then; - - // Handle a returned thenable - if ( isFunction( then ) ) { - - // Special processors (notify) just wait for resolution - if ( special ) { - then.call( - returned, - resolve( maxDepth, deferred, Identity, special ), - resolve( maxDepth, deferred, Thrower, special ) - ); - - // Normal processors (resolve) also hook into progress - } else { - - // ...and disregard older resolution values - maxDepth++; - - then.call( - returned, - resolve( maxDepth, deferred, Identity, special ), - resolve( maxDepth, deferred, Thrower, special ), - resolve( maxDepth, deferred, Identity, - deferred.notifyWith ) - ); - } - - // Handle all other returned values - } else { - - // Only substitute handlers pass on context - // and multiple values (non-spec behavior) - if ( handler !== Identity ) { - that = undefined; - args = [ returned ]; - } - - // Process the value(s) - // Default process is resolve - ( special || deferred.resolveWith )( that, args ); - } - }, - - // Only normal processors (resolve) catch and reject exceptions - process = special ? - mightThrow : - function() { - try { - mightThrow(); - } catch ( e ) { - - if ( jQuery.Deferred.exceptionHook ) { - jQuery.Deferred.exceptionHook( e, - process.stackTrace ); - } - - // Support: Promises/A+ section 2.3.3.3.4.1 - // https://promisesaplus.com/#point-61 - // Ignore post-resolution exceptions - if ( depth + 1 >= maxDepth ) { - - // Only substitute handlers pass on context - // and multiple values (non-spec behavior) - if ( handler !== Thrower ) { - that = undefined; - args = [ e ]; - } - - deferred.rejectWith( that, args ); - } - } - }; - - // Support: Promises/A+ section 2.3.3.3.1 - // https://promisesaplus.com/#point-57 - // Re-resolve promises immediately to dodge false rejection from - // subsequent errors - if ( depth ) { - process(); - } else { - - // Call an optional hook to record the stack, in case of exception - // since it's otherwise lost when execution goes async - if ( jQuery.Deferred.getStackHook ) { - process.stackTrace = jQuery.Deferred.getStackHook(); - } - window.setTimeout( process ); - } - }; - } - - return jQuery.Deferred( function( newDefer ) { - - // progress_handlers.add( ... ) - tuples[ 0 ][ 3 ].add( - resolve( - 0, - newDefer, - isFunction( onProgress ) ? - onProgress : - Identity, - newDefer.notifyWith - ) - ); - - // fulfilled_handlers.add( ... ) - tuples[ 1 ][ 3 ].add( - resolve( - 0, - newDefer, - isFunction( onFulfilled ) ? - onFulfilled : - Identity - ) - ); - - // rejected_handlers.add( ... ) - tuples[ 2 ][ 3 ].add( - resolve( - 0, - newDefer, - isFunction( onRejected ) ? - onRejected : - Thrower - ) - ); - } ).promise(); - }, - - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 5 ]; - - // promise.progress = list.add - // promise.done = list.add - // promise.fail = list.add - promise[ tuple[ 1 ] ] = list.add; - - // Handle state - if ( stateString ) { - list.add( - function() { - - // state = "resolved" (i.e., fulfilled) - // state = "rejected" - state = stateString; - }, - - // rejected_callbacks.disable - // fulfilled_callbacks.disable - tuples[ 3 - i ][ 2 ].disable, - - // rejected_handlers.disable - // fulfilled_handlers.disable - tuples[ 3 - i ][ 3 ].disable, - - // progress_callbacks.lock - tuples[ 0 ][ 2 ].lock, - - // progress_handlers.lock - tuples[ 0 ][ 3 ].lock - ); - } - - // progress_handlers.fire - // fulfilled_handlers.fire - // rejected_handlers.fire - list.add( tuple[ 3 ].fire ); - - // deferred.notify = function() { deferred.notifyWith(...) } - // deferred.resolve = function() { deferred.resolveWith(...) } - // deferred.reject = function() { deferred.rejectWith(...) } - deferred[ tuple[ 0 ] ] = function() { - deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); - return this; - }; - - // deferred.notifyWith = list.fireWith - // deferred.resolveWith = list.fireWith - // deferred.rejectWith = list.fireWith - deferred[ tuple[ 0 ] + "With" ] = list.fireWith; - } ); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( singleValue ) { - var - - // count of uncompleted subordinates - remaining = arguments.length, - - // count of unprocessed arguments - i = remaining, - - // subordinate fulfillment data - resolveContexts = Array( i ), - resolveValues = slice.call( arguments ), - - // the master Deferred - master = jQuery.Deferred(), - - // subordinate callback factory - updateFunc = function( i ) { - return function( value ) { - resolveContexts[ i ] = this; - resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; - if ( !( --remaining ) ) { - master.resolveWith( resolveContexts, resolveValues ); - } - }; - }; - - // Single- and empty arguments are adopted like Promise.resolve - if ( remaining <= 1 ) { - adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject, - !remaining ); - - // Use .then() to unwrap secondary thenables (cf. gh-3000) - if ( master.state() === "pending" || - isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { - - return master.then(); - } - } - - // Multiple arguments are aggregated like Promise.all array elements - while ( i-- ) { - adoptValue( resolveValues[ i ], updateFunc( i ), master.reject ); - } - - return master.promise(); - } -} ); - - -// These usually indicate a programmer mistake during development, -// warn about them ASAP rather than swallowing them by default. -var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; - -jQuery.Deferred.exceptionHook = function( error, stack ) { - - // Support: IE 8 - 9 only - // Console exists when dev tools are open, which can happen at any time - if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { - window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); - } -}; - - - - -jQuery.readyException = function( error ) { - window.setTimeout( function() { - throw error; - } ); -}; - - - - -// The deferred used on DOM ready -var readyList = jQuery.Deferred(); - -jQuery.fn.ready = function( fn ) { - - readyList - .then( fn ) - - // Wrap jQuery.readyException in a function so that the lookup - // happens at the time of error handling instead of callback - // registration. - .catch( function( error ) { - jQuery.readyException( error ); - } ); - - return this; -}; - -jQuery.extend( { - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - } -} ); - -jQuery.ready.then = readyList.then; - -// The ready event handler and self cleanup method -function completed() { - document.removeEventListener( "DOMContentLoaded", completed ); - window.removeEventListener( "load", completed ); - jQuery.ready(); -} - -// Catch cases where $(document).ready() is called -// after the browser event has already occurred. -// Support: IE <=9 - 10 only -// Older IE sometimes signals "interactive" too soon -if ( document.readyState === "complete" || - ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { - - // Handle it asynchronously to allow scripts the opportunity to delay ready - window.setTimeout( jQuery.ready ); - -} else { - - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed ); -} - - - - -// Multifunctional method to get and set values of a collection -// The value/s can optionally be executed if it's a function -var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - len = elems.length, - bulk = key == null; - - // Sets many values - if ( toType( key ) === "object" ) { - chainable = true; - for ( i in key ) { - access( elems, fn, i, key[ i ], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, _key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < len; i++ ) { - fn( - elems[ i ], key, raw ? - value : - value.call( elems[ i ], i, fn( elems[ i ], key ) ) - ); - } - } - } - - if ( chainable ) { - return elems; - } - - // Gets - if ( bulk ) { - return fn.call( elems ); - } - - return len ? fn( elems[ 0 ], key ) : emptyGet; -}; - - -// Matches dashed string for camelizing -var rmsPrefix = /^-ms-/, - rdashAlpha = /-([a-z])/g; - -// Used by camelCase as callback to replace() -function fcamelCase( _all, letter ) { - return letter.toUpperCase(); -} - -// Convert dashed to camelCase; used by the css and data modules -// Support: IE <=9 - 11, Edge 12 - 15 -// Microsoft forgot to hump their vendor prefix (#9572) -function camelCase( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); -} -var acceptData = function( owner ) { - - // Accepts only: - // - Node - // - Node.ELEMENT_NODE - // - Node.DOCUMENT_NODE - // - Object - // - Any - return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); -}; - - - - -function Data() { - this.expando = jQuery.expando + Data.uid++; -} - -Data.uid = 1; - -Data.prototype = { - - cache: function( owner ) { - - // Check if the owner object already has a cache - var value = owner[ this.expando ]; - - // If not, create one - if ( !value ) { - value = {}; - - // We can accept data for non-element nodes in modern browsers, - // but we should not, see #8335. - // Always return an empty object. - if ( acceptData( owner ) ) { - - // If it is a node unlikely to be stringify-ed or looped over - // use plain assignment - if ( owner.nodeType ) { - owner[ this.expando ] = value; - - // Otherwise secure it in a non-enumerable property - // configurable must be true to allow the property to be - // deleted when data is removed - } else { - Object.defineProperty( owner, this.expando, { - value: value, - configurable: true - } ); - } - } - } - - return value; - }, - set: function( owner, data, value ) { - var prop, - cache = this.cache( owner ); - - // Handle: [ owner, key, value ] args - // Always use camelCase key (gh-2257) - if ( typeof data === "string" ) { - cache[ camelCase( data ) ] = value; - - // Handle: [ owner, { properties } ] args - } else { - - // Copy the properties one-by-one to the cache object - for ( prop in data ) { - cache[ camelCase( prop ) ] = data[ prop ]; - } - } - return cache; - }, - get: function( owner, key ) { - return key === undefined ? - this.cache( owner ) : - - // Always use camelCase key (gh-2257) - owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; - }, - access: function( owner, key, value ) { - - // In cases where either: - // - // 1. No key was specified - // 2. A string key was specified, but no value provided - // - // Take the "read" path and allow the get method to determine - // which value to return, respectively either: - // - // 1. The entire cache object - // 2. The data stored at the key - // - if ( key === undefined || - ( ( key && typeof key === "string" ) && value === undefined ) ) { - - return this.get( owner, key ); - } - - // When the key is not a string, or both a key and value - // are specified, set or extend (existing objects) with either: - // - // 1. An object of properties - // 2. A key and value - // - this.set( owner, key, value ); - - // Since the "set" path can have two possible entry points - // return the expected data based on which path was taken[*] - return value !== undefined ? value : key; - }, - remove: function( owner, key ) { - var i, - cache = owner[ this.expando ]; - - if ( cache === undefined ) { - return; - } - - if ( key !== undefined ) { - - // Support array or space separated string of keys - if ( Array.isArray( key ) ) { - - // If key is an array of keys... - // We always set camelCase keys, so remove that. - key = key.map( camelCase ); - } else { - key = camelCase( key ); - - // If a key with the spaces exists, use it. - // Otherwise, create an array by matching non-whitespace - key = key in cache ? - [ key ] : - ( key.match( rnothtmlwhite ) || [] ); - } - - i = key.length; - - while ( i-- ) { - delete cache[ key[ i ] ]; - } - } - - // Remove the expando if there's no more data - if ( key === undefined || jQuery.isEmptyObject( cache ) ) { - - // Support: Chrome <=35 - 45 - // Webkit & Blink performance suffers when deleting properties - // from DOM nodes, so set to undefined instead - // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) - if ( owner.nodeType ) { - owner[ this.expando ] = undefined; - } else { - delete owner[ this.expando ]; - } - } - }, - hasData: function( owner ) { - var cache = owner[ this.expando ]; - return cache !== undefined && !jQuery.isEmptyObject( cache ); - } -}; -var dataPriv = new Data(); - -var dataUser = new Data(); - - - -// Implementation Summary -// -// 1. Enforce API surface and semantic compatibility with 1.9.x branch -// 2. Improve the module's maintainability by reducing the storage -// paths to a single mechanism. -// 3. Use the same single mechanism to support "private" and "user" data. -// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) -// 5. Avoid exposing implementation details on user objects (eg. expando properties) -// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 - -var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, - rmultiDash = /[A-Z]/g; - -function getData( data ) { - if ( data === "true" ) { - return true; - } - - if ( data === "false" ) { - return false; - } - - if ( data === "null" ) { - return null; - } - - // Only convert to a number if it doesn't change the string - if ( data === +data + "" ) { - return +data; - } - - if ( rbrace.test( data ) ) { - return JSON.parse( data ); - } - - return data; -} - -function dataAttr( elem, key, data ) { - var name; - - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = getData( data ); - } catch ( e ) {} - - // Make sure we set the data so it isn't changed later - dataUser.set( elem, key, data ); - } else { - data = undefined; - } - } - return data; -} - -jQuery.extend( { - hasData: function( elem ) { - return dataUser.hasData( elem ) || dataPriv.hasData( elem ); - }, - - data: function( elem, name, data ) { - return dataUser.access( elem, name, data ); - }, - - removeData: function( elem, name ) { - dataUser.remove( elem, name ); - }, - - // TODO: Now that all calls to _data and _removeData have been replaced - // with direct calls to dataPriv methods, these can be deprecated. - _data: function( elem, name, data ) { - return dataPriv.access( elem, name, data ); - }, - - _removeData: function( elem, name ) { - dataPriv.remove( elem, name ); - } -} ); - -jQuery.fn.extend( { - data: function( key, value ) { - var i, name, data, - elem = this[ 0 ], - attrs = elem && elem.attributes; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = dataUser.get( elem ); - - if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { - i = attrs.length; - while ( i-- ) { - - // Support: IE 11 only - // The attrs elements can be null (#14894) - if ( attrs[ i ] ) { - name = attrs[ i ].name; - if ( name.indexOf( "data-" ) === 0 ) { - name = camelCase( name.slice( 5 ) ); - dataAttr( elem, name, data[ name ] ); - } - } - } - dataPriv.set( elem, "hasDataAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each( function() { - dataUser.set( this, key ); - } ); - } - - return access( this, function( value ) { - var data; - - // The calling jQuery object (element matches) is not empty - // (and therefore has an element appears at this[ 0 ]) and the - // `value` parameter was not undefined. An empty jQuery object - // will result in `undefined` for elem = this[ 0 ] which will - // throw an exception if an attempt to read a data cache is made. - if ( elem && value === undefined ) { - - // Attempt to get data from the cache - // The key will always be camelCased in Data - data = dataUser.get( elem, key ); - if ( data !== undefined ) { - return data; - } - - // Attempt to "discover" the data in - // HTML5 custom data-* attrs - data = dataAttr( elem, key ); - if ( data !== undefined ) { - return data; - } - - // We tried really hard, but the data doesn't exist. - return; - } - - // Set the data... - this.each( function() { - - // We always store the camelCased key - dataUser.set( this, key, value ); - } ); - }, null, value, arguments.length > 1, null, true ); - }, - - removeData: function( key ) { - return this.each( function() { - dataUser.remove( this, key ); - } ); - } -} ); - - -jQuery.extend( { - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = dataPriv.get( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || Array.isArray( data ) ) { - queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // Clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // Not public - generate a queueHooks object, or return the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { - empty: jQuery.Callbacks( "once memory" ).add( function() { - dataPriv.remove( elem, [ type + "queue", key ] ); - } ) - } ); - } -} ); - -jQuery.fn.extend( { - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[ 0 ], type ); - } - - return data === undefined ? - this : - this.each( function() { - var queue = jQuery.queue( this, type, data ); - - // Ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - } ); - }, - dequeue: function( type ) { - return this.each( function() { - jQuery.dequeue( this, type ); - } ); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while ( i-- ) { - tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -} ); -var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; - -var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); - - -var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; - -var documentElement = document.documentElement; - - - - var isAttached = function( elem ) { - return jQuery.contains( elem.ownerDocument, elem ); - }, - composed = { composed: true }; - - // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only - // Check attachment across shadow DOM boundaries when possible (gh-3504) - // Support: iOS 10.0-10.2 only - // Early iOS 10 versions support `attachShadow` but not `getRootNode`, - // leading to errors. We need to check for `getRootNode`. - if ( documentElement.getRootNode ) { - isAttached = function( elem ) { - return jQuery.contains( elem.ownerDocument, elem ) || - elem.getRootNode( composed ) === elem.ownerDocument; - }; - } -var isHiddenWithinTree = function( elem, el ) { - - // isHiddenWithinTree might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - - // Inline style trumps all - return elem.style.display === "none" || - elem.style.display === "" && - - // Otherwise, check computed style - // Support: Firefox <=43 - 45 - // Disconnected elements can have computed display: none, so first confirm that elem is - // in the document. - isAttached( elem ) && - - jQuery.css( elem, "display" ) === "none"; - }; - - - -function adjustCSS( elem, prop, valueParts, tween ) { - var adjusted, scale, - maxIterations = 20, - currentValue = tween ? - function() { - return tween.cur(); - } : - function() { - return jQuery.css( elem, prop, "" ); - }, - initial = currentValue(), - unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), - - // Starting value computation is required for potential unit mismatches - initialInUnit = elem.nodeType && - ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && - rcssNum.exec( jQuery.css( elem, prop ) ); - - if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { - - // Support: Firefox <=54 - // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) - initial = initial / 2; - - // Trust units reported by jQuery.css - unit = unit || initialInUnit[ 3 ]; - - // Iteratively approximate from a nonzero starting point - initialInUnit = +initial || 1; - - while ( maxIterations-- ) { - - // Evaluate and update our best guess (doubling guesses that zero out). - // Finish if the scale equals or crosses 1 (making the old*new product non-positive). - jQuery.style( elem, prop, initialInUnit + unit ); - if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { - maxIterations = 0; - } - initialInUnit = initialInUnit / scale; - - } - - initialInUnit = initialInUnit * 2; - jQuery.style( elem, prop, initialInUnit + unit ); - - // Make sure we update the tween properties later on - valueParts = valueParts || []; - } - - if ( valueParts ) { - initialInUnit = +initialInUnit || +initial || 0; - - // Apply relative offset (+=/-=) if specified - adjusted = valueParts[ 1 ] ? - initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : - +valueParts[ 2 ]; - if ( tween ) { - tween.unit = unit; - tween.start = initialInUnit; - tween.end = adjusted; - } - } - return adjusted; -} - - -var defaultDisplayMap = {}; - -function getDefaultDisplay( elem ) { - var temp, - doc = elem.ownerDocument, - nodeName = elem.nodeName, - display = defaultDisplayMap[ nodeName ]; - - if ( display ) { - return display; - } - - temp = doc.body.appendChild( doc.createElement( nodeName ) ); - display = jQuery.css( temp, "display" ); - - temp.parentNode.removeChild( temp ); - - if ( display === "none" ) { - display = "block"; - } - defaultDisplayMap[ nodeName ] = display; - - return display; -} - -function showHide( elements, show ) { - var display, elem, - values = [], - index = 0, - length = elements.length; - - // Determine new display value for elements that need to change - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - - display = elem.style.display; - if ( show ) { - - // Since we force visibility upon cascade-hidden elements, an immediate (and slow) - // check is required in this first loop unless we have a nonempty display value (either - // inline or about-to-be-restored) - if ( display === "none" ) { - values[ index ] = dataPriv.get( elem, "display" ) || null; - if ( !values[ index ] ) { - elem.style.display = ""; - } - } - if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { - values[ index ] = getDefaultDisplay( elem ); - } - } else { - if ( display !== "none" ) { - values[ index ] = "none"; - - // Remember what we're overwriting - dataPriv.set( elem, "display", display ); - } - } - } - - // Set the display of the elements in a second loop to avoid constant reflow - for ( index = 0; index < length; index++ ) { - if ( values[ index ] != null ) { - elements[ index ].style.display = values[ index ]; - } - } - - return elements; -} - -jQuery.fn.extend( { - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state ) { - if ( typeof state === "boolean" ) { - return state ? this.show() : this.hide(); - } - - return this.each( function() { - if ( isHiddenWithinTree( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - } ); - } -} ); -var rcheckableType = ( /^(?:checkbox|radio)$/i ); - -var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); - -var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); - - - -( function() { - var fragment = document.createDocumentFragment(), - div = fragment.appendChild( document.createElement( "div" ) ), - input = document.createElement( "input" ); - - // Support: Android 4.0 - 4.3 only - // Check state lost if the name is set (#11217) - // Support: Windows Web Apps (WWA) - // `name` and `type` must use .setAttribute for WWA (#14901) - input.setAttribute( "type", "radio" ); - input.setAttribute( "checked", "checked" ); - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - - // Support: Android <=4.1 only - // Older WebKit doesn't clone checked state correctly in fragments - support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE <=11 only - // Make sure textarea (and checkbox) defaultValue is properly cloned - div.innerHTML = ""; - support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; - - // Support: IE <=9 only - // IE <=9 replaces "; - support.option = !!div.lastChild; -} )(); - - -// We have to close these tags to support XHTML (#13200) -var wrapMap = { - - // XHTML parsers do not magically insert elements in the - // same way that tag soup parsers do. So we cannot shorten - // this by omitting or other required elements. - thead: [ 1, "", "
" ], - col: [ 2, "", "
" ], - tr: [ 2, "", "
" ], - td: [ 3, "", "
" ], - - _default: [ 0, "", "" ] -}; - -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// Support: IE <=9 only -if ( !support.option ) { - wrapMap.optgroup = wrapMap.option = [ 1, "" ]; -} - - -function getAll( context, tag ) { - - // Support: IE <=9 - 11 only - // Use typeof to avoid zero-argument method invocation on host objects (#15151) - var ret; - - if ( typeof context.getElementsByTagName !== "undefined" ) { - ret = context.getElementsByTagName( tag || "*" ); - - } else if ( typeof context.querySelectorAll !== "undefined" ) { - ret = context.querySelectorAll( tag || "*" ); - - } else { - ret = []; - } - - if ( tag === undefined || tag && nodeName( context, tag ) ) { - return jQuery.merge( [ context ], ret ); - } - - return ret; -} - - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - dataPriv.set( - elems[ i ], - "globalEval", - !refElements || dataPriv.get( refElements[ i ], "globalEval" ) - ); - } -} - - -var rhtml = /<|&#?\w+;/; - -function buildFragment( elems, context, scripts, selection, ignored ) { - var elem, tmp, tag, wrap, attached, j, - fragment = context.createDocumentFragment(), - nodes = [], - i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( toType( elem ) === "object" ) { - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; - - // Descend through wrappers to the right content - j = wrap[ 0 ]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, tmp.childNodes ); - - // Remember the top-level container - tmp = fragment.firstChild; - - // Ensure the created nodes are orphaned (#12392) - tmp.textContent = ""; - } - } - } - - // Remove wrapper from fragment - fragment.textContent = ""; - - i = 0; - while ( ( elem = nodes[ i++ ] ) ) { - - // Skip elements already in the context collection (trac-4087) - if ( selection && jQuery.inArray( elem, selection ) > -1 ) { - if ( ignored ) { - ignored.push( elem ); - } - continue; - } - - attached = isAttached( elem ); - - // Append to fragment - tmp = getAll( fragment.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( attached ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( ( elem = tmp[ j++ ] ) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - return fragment; -} - - -var - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -// Support: IE <=9 - 11+ -// focus() and blur() are asynchronous, except when they are no-op. -// So expect focus to be synchronous when the element is already active, -// and blur to be synchronous when the element is not already active. -// (focus and blur are always synchronous in other supported browsers, -// this just defines when we can count on it). -function expectSync( elem, type ) { - return ( elem === safeActiveElement() ) === ( type === "focus" ); -} - -// Support: IE <=9 only -// Accessing document.activeElement can throw unexpectedly -// https://bugs.jquery.com/ticket/13393 -function safeActiveElement() { - try { - return document.activeElement; - } catch ( err ) { } -} - -function on( elem, types, selector, data, fn, one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - on( elem, type, selector, data, types[ type ], one ); - } - return elem; - } - - if ( data == null && fn == null ) { - - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return elem; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return elem.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - } ); -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - - var handleObjIn, eventHandle, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.get( elem ); - - // Only attach events to objects that accept data - if ( !acceptData( elem ) ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Ensure that invalid selectors throw exceptions at attach time - // Evaluate against documentElement in case elem is a non-element node (e.g., document) - if ( selector ) { - jQuery.find.matchesSelector( documentElement, selector ); - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !( events = elemData.events ) ) { - events = elemData.events = Object.create( null ); - } - if ( !( eventHandle = elemData.handle ) ) { - eventHandle = elemData.handle = function( e ) { - - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? - jQuery.event.dispatch.apply( elem, arguments ) : undefined; - }; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // There *must* be a type, no attaching namespace-only handlers - if ( !type ) { - continue; - } - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend( { - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join( "." ) - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !( handlers = events[ type ] ) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener if the special events handler returns false - if ( !special.setup || - special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var j, origCount, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); - - if ( !elemData || !( events = elemData.events ) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[ 2 ] && - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || - selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || - special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove data and the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - dataPriv.remove( elem, "handle events" ); - } - }, - - dispatch: function( nativeEvent ) { - - var i, j, ret, matched, handleObj, handlerQueue, - args = new Array( arguments.length ), - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( nativeEvent ), - - handlers = ( - dataPriv.get( this, "events" ) || Object.create( null ) - )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[ 0 ] = event; - - for ( i = 1; i < arguments.length; i++ ) { - args[ i ] = arguments[ i ]; - } - - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( ( handleObj = matched.handlers[ j++ ] ) && - !event.isImmediatePropagationStopped() ) { - - // If the event is namespaced, then each handler is only invoked if it is - // specially universal or its namespaces are a superset of the event's. - if ( !event.rnamespace || handleObj.namespace === false || - event.rnamespace.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || - handleObj.handler ).apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( ( event.result = ret ) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var i, handleObj, sel, matchedHandlers, matchedSelectors, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - if ( delegateCount && - - // Support: IE <=9 - // Black-hole SVG instance trees (trac-13180) - cur.nodeType && - - // Support: Firefox <=42 - // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) - // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click - // Support: IE 11 only - // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) - !( event.type === "click" && event.button >= 1 ) ) { - - for ( ; cur !== this; cur = cur.parentNode || this ) { - - // Don't check non-elements (#13208) - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { - matchedHandlers = []; - matchedSelectors = {}; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matchedSelectors[ sel ] === undefined ) { - matchedSelectors[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) > -1 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matchedSelectors[ sel ] ) { - matchedHandlers.push( handleObj ); - } - } - if ( matchedHandlers.length ) { - handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); - } - } - } - } - - // Add the remaining (directly-bound) handlers - cur = this; - if ( delegateCount < handlers.length ) { - handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); - } - - return handlerQueue; - }, - - addProp: function( name, hook ) { - Object.defineProperty( jQuery.Event.prototype, name, { - enumerable: true, - configurable: true, - - get: isFunction( hook ) ? - function() { - if ( this.originalEvent ) { - return hook( this.originalEvent ); - } - } : - function() { - if ( this.originalEvent ) { - return this.originalEvent[ name ]; - } - }, - - set: function( value ) { - Object.defineProperty( this, name, { - enumerable: true, - configurable: true, - writable: true, - value: value - } ); - } - } ); - }, - - fix: function( originalEvent ) { - return originalEvent[ jQuery.expando ] ? - originalEvent : - new jQuery.Event( originalEvent ); - }, - - special: { - load: { - - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - click: { - - // Utilize native event to ensure correct state for checkable inputs - setup: function( data ) { - - // For mutual compressibility with _default, replace `this` access with a local var. - // `|| data` is dead code meant only to preserve the variable through minification. - var el = this || data; - - // Claim the first handler - if ( rcheckableType.test( el.type ) && - el.click && nodeName( el, "input" ) ) { - - // dataPriv.set( el, "click", ... ) - leverageNative( el, "click", returnTrue ); - } - - // Return false to allow normal processing in the caller - return false; - }, - trigger: function( data ) { - - // For mutual compressibility with _default, replace `this` access with a local var. - // `|| data` is dead code meant only to preserve the variable through minification. - var el = this || data; - - // Force setup before triggering a click - if ( rcheckableType.test( el.type ) && - el.click && nodeName( el, "input" ) ) { - - leverageNative( el, "click" ); - } - - // Return non-false to allow normal event-path propagation - return true; - }, - - // For cross-browser consistency, suppress native .click() on links - // Also prevent it if we're currently inside a leveraged native-event stack - _default: function( event ) { - var target = event.target; - return rcheckableType.test( target.type ) && - target.click && nodeName( target, "input" ) && - dataPriv.get( target, "click" ) || - nodeName( target, "a" ); - } - }, - - beforeunload: { - postDispatch: function( event ) { - - // Support: Firefox 20+ - // Firefox doesn't alert if the returnValue field is not set. - if ( event.result !== undefined && event.originalEvent ) { - event.originalEvent.returnValue = event.result; - } - } - } - } -}; - -// Ensure the presence of an event listener that handles manually-triggered -// synthetic events by interrupting progress until reinvoked in response to -// *native* events that it fires directly, ensuring that state changes have -// already occurred before other listeners are invoked. -function leverageNative( el, type, expectSync ) { - - // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add - if ( !expectSync ) { - if ( dataPriv.get( el, type ) === undefined ) { - jQuery.event.add( el, type, returnTrue ); - } - return; - } - - // Register the controller as a special universal handler for all event namespaces - dataPriv.set( el, type, false ); - jQuery.event.add( el, type, { - namespace: false, - handler: function( event ) { - var notAsync, result, - saved = dataPriv.get( this, type ); - - if ( ( event.isTrigger & 1 ) && this[ type ] ) { - - // Interrupt processing of the outer synthetic .trigger()ed event - // Saved data should be false in such cases, but might be a leftover capture object - // from an async native handler (gh-4350) - if ( !saved.length ) { - - // Store arguments for use when handling the inner native event - // There will always be at least one argument (an event object), so this array - // will not be confused with a leftover capture object. - saved = slice.call( arguments ); - dataPriv.set( this, type, saved ); - - // Trigger the native event and capture its result - // Support: IE <=9 - 11+ - // focus() and blur() are asynchronous - notAsync = expectSync( this, type ); - this[ type ](); - result = dataPriv.get( this, type ); - if ( saved !== result || notAsync ) { - dataPriv.set( this, type, false ); - } else { - result = {}; - } - if ( saved !== result ) { - - // Cancel the outer synthetic event - event.stopImmediatePropagation(); - event.preventDefault(); - return result.value; - } - - // If this is an inner synthetic event for an event with a bubbling surrogate - // (focus or blur), assume that the surrogate already propagated from triggering the - // native event and prevent that from happening again here. - // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the - // bubbling surrogate propagates *after* the non-bubbling base), but that seems - // less bad than duplication. - } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { - event.stopPropagation(); - } - - // If this is a native event triggered above, everything is now in order - // Fire an inner synthetic event with the original arguments - } else if ( saved.length ) { - - // ...and capture the result - dataPriv.set( this, type, { - value: jQuery.event.trigger( - - // Support: IE <=9 - 11+ - // Extend with the prototype to reset the above stopImmediatePropagation() - jQuery.extend( saved[ 0 ], jQuery.Event.prototype ), - saved.slice( 1 ), - this - ) - } ); - - // Abort handling of the native event - event.stopImmediatePropagation(); - } - } - } ); -} - -jQuery.removeEvent = function( elem, type, handle ) { - - // This "if" is needed for plain objects - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle ); - } -}; - -jQuery.Event = function( src, props ) { - - // Allow instantiation without the 'new' keyword - if ( !( this instanceof jQuery.Event ) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = src.defaultPrevented || - src.defaultPrevented === undefined && - - // Support: Android <=2.3 only - src.returnValue === false ? - returnTrue : - returnFalse; - - // Create target properties - // Support: Safari <=6 - 7 only - // Target should not be a text node (#504, #13143) - this.target = ( src.target && src.target.nodeType === 3 ) ? - src.target.parentNode : - src.target; - - this.currentTarget = src.currentTarget; - this.relatedTarget = src.relatedTarget; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || Date.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - constructor: jQuery.Event, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - isSimulated: false, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - - if ( e && !this.isSimulated ) { - e.preventDefault(); - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - - if ( e && !this.isSimulated ) { - e.stopPropagation(); - } - }, - stopImmediatePropagation: function() { - var e = this.originalEvent; - - this.isImmediatePropagationStopped = returnTrue; - - if ( e && !this.isSimulated ) { - e.stopImmediatePropagation(); - } - - this.stopPropagation(); - } -}; - -// Includes all common event props including KeyEvent and MouseEvent specific props -jQuery.each( { - altKey: true, - bubbles: true, - cancelable: true, - changedTouches: true, - ctrlKey: true, - detail: true, - eventPhase: true, - metaKey: true, - pageX: true, - pageY: true, - shiftKey: true, - view: true, - "char": true, - code: true, - charCode: true, - key: true, - keyCode: true, - button: true, - buttons: true, - clientX: true, - clientY: true, - offsetX: true, - offsetY: true, - pointerId: true, - pointerType: true, - screenX: true, - screenY: true, - targetTouches: true, - toElement: true, - touches: true, - - which: function( event ) { - var button = event.button; - - // Add which for key events - if ( event.which == null && rkeyEvent.test( event.type ) ) { - return event.charCode != null ? event.charCode : event.keyCode; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) { - if ( button & 1 ) { - return 1; - } - - if ( button & 2 ) { - return 3; - } - - if ( button & 4 ) { - return 2; - } - - return 0; - } - - return event.which; - } -}, jQuery.event.addProp ); - -jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { - jQuery.event.special[ type ] = { - - // Utilize native event if possible so blur/focus sequence is correct - setup: function() { - - // Claim the first handler - // dataPriv.set( this, "focus", ... ) - // dataPriv.set( this, "blur", ... ) - leverageNative( this, type, expectSync ); - - // Return false to allow normal processing in the caller - return false; - }, - trigger: function() { - - // Force setup before trigger - leverageNative( this, type ); - - // Return non-false to allow normal event-path propagation - return true; - }, - - delegateType: delegateType - }; -} ); - -// Create mouseenter/leave events using mouseover/out and event-time checks -// so that event delegation works in jQuery. -// Do the same for pointerenter/pointerleave and pointerover/pointerout -// -// Support: Safari 7 only -// Safari sends mouseenter too often; see: -// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 -// for the description of the bug (it existed in older Chrome versions as well). -jQuery.each( { - mouseenter: "mouseover", - mouseleave: "mouseout", - pointerenter: "pointerover", - pointerleave: "pointerout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mouseenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -} ); - -jQuery.fn.extend( { - - on: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn ); - }, - one: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? - handleObj.origType + "." + handleObj.namespace : - handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each( function() { - jQuery.event.remove( this, types, fn, selector ); - } ); - } -} ); - - -var - - // Support: IE <=10 - 11, Edge 12 - 13 only - // In IE/Edge using regex groups here causes severe slowdowns. - // See https://connect.microsoft.com/IE/feedback/details/1736512/ - rnoInnerhtml = /\s*$/g; - -// Prefer a tbody over its parent table for containing new rows -function manipulationTarget( elem, content ) { - if ( nodeName( elem, "table" ) && - nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { - - return jQuery( elem ).children( "tbody" )[ 0 ] || elem; - } - - return elem; -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { - elem.type = elem.type.slice( 5 ); - } else { - elem.removeAttribute( "type" ); - } - - return elem; -} - -function cloneCopyEvent( src, dest ) { - var i, l, type, pdataOld, udataOld, udataCur, events; - - if ( dest.nodeType !== 1 ) { - return; - } - - // 1. Copy private data: events, handlers, etc. - if ( dataPriv.hasData( src ) ) { - pdataOld = dataPriv.get( src ); - events = pdataOld.events; - - if ( events ) { - dataPriv.remove( dest, "handle events" ); - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - } - - // 2. Copy user data - if ( dataUser.hasData( src ) ) { - udataOld = dataUser.access( src ); - udataCur = jQuery.extend( {}, udataOld ); - - dataUser.set( dest, udataCur ); - } -} - -// Fix IE bugs, see support tests -function fixInput( src, dest ) { - var nodeName = dest.nodeName.toLowerCase(); - - // Fails to persist the checked state of a cloned checkbox or radio button. - if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - dest.checked = src.checked; - - // Fails to return the selected option to the default selected state when cloning options - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -function domManip( collection, args, callback, ignored ) { - - // Flatten any nested arrays - args = flat( args ); - - var fragment, first, scripts, hasScripts, node, doc, - i = 0, - l = collection.length, - iNoClone = l - 1, - value = args[ 0 ], - valueIsFunction = isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( valueIsFunction || - ( l > 1 && typeof value === "string" && - !support.checkClone && rchecked.test( value ) ) ) { - return collection.each( function( index ) { - var self = collection.eq( index ); - if ( valueIsFunction ) { - args[ 0 ] = value.call( this, index, self.html() ); - } - domManip( self, args, callback, ignored ); - } ); - } - - if ( l ) { - fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - // Require either new content or an interest in ignored elements to invoke the callback - if ( first || ignored ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item - // instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( collection[ i ], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !dataPriv.access( node, "globalEval" ) && - jQuery.contains( doc, node ) ) { - - if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { - - // Optional AJAX dependency, but won't run scripts if not present - if ( jQuery._evalUrl && !node.noModule ) { - jQuery._evalUrl( node.src, { - nonce: node.nonce || node.getAttribute( "nonce" ) - }, doc ); - } - } else { - DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); - } - } - } - } - } - } - - return collection; -} - -function remove( elem, selector, keepData ) { - var node, - nodes = selector ? jQuery.filter( selector, elem ) : elem, - i = 0; - - for ( ; ( node = nodes[ i ] ) != null; i++ ) { - if ( !keepData && node.nodeType === 1 ) { - jQuery.cleanData( getAll( node ) ); - } - - if ( node.parentNode ) { - if ( keepData && isAttached( node ) ) { - setGlobalEval( getAll( node, "script" ) ); - } - node.parentNode.removeChild( node ); - } - } - - return elem; -} - -jQuery.extend( { - htmlPrefilter: function( html ) { - return html; - }, - - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var i, l, srcElements, destElements, - clone = elem.cloneNode( true ), - inPage = isAttached( elem ); - - // Fix IE cloning issues - if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && - !jQuery.isXMLDoc( elem ) ) { - - // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - fixInput( srcElements[ i ], destElements[ i ] ); - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - cloneCopyEvent( srcElements[ i ], destElements[ i ] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - // Return the cloned set - return clone; - }, - - cleanData: function( elems ) { - var data, elem, type, - special = jQuery.event.special, - i = 0; - - for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { - if ( acceptData( elem ) ) { - if ( ( data = elem[ dataPriv.expando ] ) ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Support: Chrome <=35 - 45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataPriv.expando ] = undefined; - } - if ( elem[ dataUser.expando ] ) { - - // Support: Chrome <=35 - 45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataUser.expando ] = undefined; - } - } - } - } -} ); - -jQuery.fn.extend( { - detach: function( selector ) { - return remove( this, selector, true ); - }, - - remove: function( selector ) { - return remove( this, selector ); - }, - - text: function( value ) { - return access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().each( function() { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.textContent = value; - } - } ); - }, null, value, arguments.length ); - }, - - append: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.appendChild( elem ); - } - } ); - }, - - prepend: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.insertBefore( elem, target.firstChild ); - } - } ); - }, - - before: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - } ); - }, - - after: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - } ); - }, - - empty: function() { - var elem, - i = 0; - - for ( ; ( elem = this[ i ] ) != null; i++ ) { - if ( elem.nodeType === 1 ) { - - // Prevent memory leaks - jQuery.cleanData( getAll( elem, false ) ); - - // Remove any remaining nodes - elem.textContent = ""; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function() { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - } ); - }, - - html: function( value ) { - return access( this, function( value ) { - var elem = this[ 0 ] || {}, - i = 0, - l = this.length; - - if ( value === undefined && elem.nodeType === 1 ) { - return elem.innerHTML; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { - - value = jQuery.htmlPrefilter( value ); - - try { - for ( ; i < l; i++ ) { - elem = this[ i ] || {}; - - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch ( e ) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function() { - var ignored = []; - - // Make the changes, replacing each non-ignored context element with the new content - return domManip( this, arguments, function( elem ) { - var parent = this.parentNode; - - if ( jQuery.inArray( this, ignored ) < 0 ) { - jQuery.cleanData( getAll( this ) ); - if ( parent ) { - parent.replaceChild( elem, this ); - } - } - - // Force callback invocation - }, ignored ); - } -} ); - -jQuery.each( { - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1, - i = 0; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone( true ); - jQuery( insert[ i ] )[ original ]( elems ); - - // Support: Android <=4.0 only, PhantomJS 1 only - // .get() because push.apply(_, arraylike) throws on ancient WebKit - push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -} ); -var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); - -var getStyles = function( elem ) { - - // Support: IE <=11 only, Firefox <=30 (#15098, #14150) - // IE throws on elements created in popups - // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" - var view = elem.ownerDocument.defaultView; - - if ( !view || !view.opener ) { - view = window; - } - - return view.getComputedStyle( elem ); - }; - -var swap = function( elem, options, callback ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.call( elem ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; -}; - - -var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); - - - -( function() { - - // Executing both pixelPosition & boxSizingReliable tests require only one layout - // so they're executed at the same time to save the second computation. - function computeStyleTests() { - - // This is a singleton, we need to execute it only once - if ( !div ) { - return; - } - - container.style.cssText = "position:absolute;left:-11111px;width:60px;" + - "margin-top:1px;padding:0;border:0"; - div.style.cssText = - "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + - "margin:auto;border:1px;padding:1px;" + - "width:60%;top:1%"; - documentElement.appendChild( container ).appendChild( div ); - - var divStyle = window.getComputedStyle( div ); - pixelPositionVal = divStyle.top !== "1%"; - - // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 - reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; - - // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 - // Some styles come back with percentage values, even though they shouldn't - div.style.right = "60%"; - pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; - - // Support: IE 9 - 11 only - // Detect misreporting of content dimensions for box-sizing:border-box elements - boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; - - // Support: IE 9 only - // Detect overflow:scroll screwiness (gh-3699) - // Support: Chrome <=64 - // Don't get tricked when zoom affects offsetWidth (gh-4029) - div.style.position = "absolute"; - scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; - - documentElement.removeChild( container ); - - // Nullify the div so it wouldn't be stored in the memory and - // it will also be a sign that checks already performed - div = null; - } - - function roundPixelMeasures( measure ) { - return Math.round( parseFloat( measure ) ); - } - - var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, - reliableTrDimensionsVal, reliableMarginLeftVal, - container = document.createElement( "div" ), - div = document.createElement( "div" ); - - // Finish early in limited (non-browser) environments - if ( !div.style ) { - return; - } - - // Support: IE <=9 - 11 only - // Style of cloned element affects source element cloned (#8908) - div.style.backgroundClip = "content-box"; - div.cloneNode( true ).style.backgroundClip = ""; - support.clearCloneStyle = div.style.backgroundClip === "content-box"; - - jQuery.extend( support, { - boxSizingReliable: function() { - computeStyleTests(); - return boxSizingReliableVal; - }, - pixelBoxStyles: function() { - computeStyleTests(); - return pixelBoxStylesVal; - }, - pixelPosition: function() { - computeStyleTests(); - return pixelPositionVal; - }, - reliableMarginLeft: function() { - computeStyleTests(); - return reliableMarginLeftVal; - }, - scrollboxSize: function() { - computeStyleTests(); - return scrollboxSizeVal; - }, - - // Support: IE 9 - 11+, Edge 15 - 18+ - // IE/Edge misreport `getComputedStyle` of table rows with width/height - // set in CSS while `offset*` properties report correct values. - // Behavior in IE 9 is more subtle than in newer versions & it passes - // some versions of this test; make sure not to make it pass there! - reliableTrDimensions: function() { - var table, tr, trChild, trStyle; - if ( reliableTrDimensionsVal == null ) { - table = document.createElement( "table" ); - tr = document.createElement( "tr" ); - trChild = document.createElement( "div" ); - - table.style.cssText = "position:absolute;left:-11111px"; - tr.style.height = "1px"; - trChild.style.height = "9px"; - - documentElement - .appendChild( table ) - .appendChild( tr ) - .appendChild( trChild ); - - trStyle = window.getComputedStyle( tr ); - reliableTrDimensionsVal = parseInt( trStyle.height ) > 3; - - documentElement.removeChild( table ); - } - return reliableTrDimensionsVal; - } - } ); -} )(); - - -function curCSS( elem, name, computed ) { - var width, minWidth, maxWidth, ret, - - // Support: Firefox 51+ - // Retrieving style before computed somehow - // fixes an issue with getting wrong values - // on detached elements - style = elem.style; - - computed = computed || getStyles( elem ); - - // getPropertyValue is needed for: - // .css('filter') (IE 9 only, #12537) - // .css('--customProperty) (#3144) - if ( computed ) { - ret = computed.getPropertyValue( name ) || computed[ name ]; - - if ( ret === "" && !isAttached( elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Android Browser returns percentage for some values, - // but width seems to be reliably pixels. - // This is against the CSSOM draft spec: - // https://drafts.csswg.org/cssom/#resolved-values - if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { - - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret !== undefined ? - - // Support: IE <=9 - 11 only - // IE returns zIndex value as an integer. - ret + "" : - ret; -} - - -function addGetHookIf( conditionFn, hookFn ) { - - // Define the hook, we'll check on the first run if it's really needed. - return { - get: function() { - if ( conditionFn() ) { - - // Hook not needed (or it's not possible to use it due - // to missing dependency), remove it. - delete this.get; - return; - } - - // Hook needed; redefine it so that the support test is not executed again. - return ( this.get = hookFn ).apply( this, arguments ); - } - }; -} - - -var cssPrefixes = [ "Webkit", "Moz", "ms" ], - emptyStyle = document.createElement( "div" ).style, - vendorProps = {}; - -// Return a vendor-prefixed property or undefined -function vendorPropName( name ) { - - // Check for vendor prefixed names - var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in emptyStyle ) { - return name; - } - } -} - -// Return a potentially-mapped jQuery.cssProps or vendor prefixed property -function finalPropName( name ) { - var final = jQuery.cssProps[ name ] || vendorProps[ name ]; - - if ( final ) { - return final; - } - if ( name in emptyStyle ) { - return name; - } - return vendorProps[ name ] = vendorPropName( name ) || name; -} - - -var - - // Swappable if display is none or starts with table - // except "table", "table-cell", or "table-caption" - // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display - rdisplayswap = /^(none|table(?!-c[ea]).+)/, - rcustomProp = /^--/, - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: "0", - fontWeight: "400" - }; - -function setPositiveNumber( _elem, value, subtract ) { - - // Any relative (+/-) values have already been - // normalized at this point - var matches = rcssNum.exec( value ); - return matches ? - - // Guard against undefined "subtract", e.g., when used as in cssHooks - Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : - value; -} - -function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { - var i = dimension === "width" ? 1 : 0, - extra = 0, - delta = 0; - - // Adjustment may not be necessary - if ( box === ( isBorderBox ? "border" : "content" ) ) { - return 0; - } - - for ( ; i < 4; i += 2 ) { - - // Both box models exclude margin - if ( box === "margin" ) { - delta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); - } - - // If we get here with a content-box, we're seeking "padding" or "border" or "margin" - if ( !isBorderBox ) { - - // Add padding - delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - - // For "border" or "margin", add border - if ( box !== "padding" ) { - delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - - // But still keep track of it otherwise - } else { - extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - - // If we get here with a border-box (content + padding + border), we're seeking "content" or - // "padding" or "margin" - } else { - - // For "content", subtract padding - if ( box === "content" ) { - delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - } - - // For "content" or "padding", subtract border - if ( box !== "margin" ) { - delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } - } - - // Account for positive content-box scroll gutter when requested by providing computedVal - if ( !isBorderBox && computedVal >= 0 ) { - - // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border - // Assuming integer scroll gutter, subtract the rest and round down - delta += Math.max( 0, Math.ceil( - elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - - computedVal - - delta - - extra - - 0.5 - - // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter - // Use an explicit zero to avoid NaN (gh-3964) - ) ) || 0; - } - - return delta; -} - -function getWidthOrHeight( elem, dimension, extra ) { - - // Start with computed style - var styles = getStyles( elem ), - - // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). - // Fake content-box until we know it's needed to know the true value. - boxSizingNeeded = !support.boxSizingReliable() || extra, - isBorderBox = boxSizingNeeded && - jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - valueIsBorderBox = isBorderBox, - - val = curCSS( elem, dimension, styles ), - offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ); - - // Support: Firefox <=54 - // Return a confounding non-pixel value or feign ignorance, as appropriate. - if ( rnumnonpx.test( val ) ) { - if ( !extra ) { - return val; - } - val = "auto"; - } - - - // Support: IE 9 - 11 only - // Use offsetWidth/offsetHeight for when box sizing is unreliable. - // In those cases, the computed value can be trusted to be border-box. - if ( ( !support.boxSizingReliable() && isBorderBox || - - // Support: IE 10 - 11+, Edge 15 - 18+ - // IE/Edge misreport `getComputedStyle` of table rows with width/height - // set in CSS while `offset*` properties report correct values. - // Interestingly, in some cases IE 9 doesn't suffer from this issue. - !support.reliableTrDimensions() && nodeName( elem, "tr" ) || - - // Fall back to offsetWidth/offsetHeight when value is "auto" - // This happens for inline elements with no explicit setting (gh-3571) - val === "auto" || - - // Support: Android <=4.1 - 4.3 only - // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) - !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && - - // Make sure the element is visible & connected - elem.getClientRects().length ) { - - isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; - - // Where available, offsetWidth/offsetHeight approximate border box dimensions. - // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the - // retrieved value as a content box dimension. - valueIsBorderBox = offsetProp in elem; - if ( valueIsBorderBox ) { - val = elem[ offsetProp ]; - } - } - - // Normalize "" and auto - val = parseFloat( val ) || 0; - - // Adjust for the element's box model - return ( val + - boxModelAdjustment( - elem, - dimension, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox, - styles, - - // Provide the current computed size to request scroll gutter calculation (gh-3589) - val - ) - ) + "px"; -} - -jQuery.extend( { - - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - } - } - } - }, - - // Don't automatically add "px" to these possibly-unitless properties - cssNumber: { - "animationIterationCount": true, - "columnCount": true, - "fillOpacity": true, - "flexGrow": true, - "flexShrink": true, - "fontWeight": true, - "gridArea": true, - "gridColumn": true, - "gridColumnEnd": true, - "gridColumnStart": true, - "gridRow": true, - "gridRowEnd": true, - "gridRowStart": true, - "lineHeight": true, - "opacity": true, - "order": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: {}, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = camelCase( name ), - isCustomProp = rcustomProp.test( name ), - style = elem.style; - - // Make sure that we're working with the right name. We don't - // want to query the value if it is a CSS custom property - // since they are user-defined. - if ( !isCustomProp ) { - name = finalPropName( origName ); - } - - // Gets hook for the prefixed version, then unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // Convert "+=" or "-=" to relative numbers (#7345) - if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { - value = adjustCSS( elem, name, ret ); - - // Fixes bug #9237 - type = "number"; - } - - // Make sure that null and NaN values aren't set (#7116) - if ( value == null || value !== value ) { - return; - } - - // If a number was passed in, add the unit (except for certain CSS properties) - // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append - // "px" to a few hardcoded values. - if ( type === "number" && !isCustomProp ) { - value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); - } - - // background-* props affect original clone's values - if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { - style[ name ] = "inherit"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !( "set" in hooks ) || - ( value = hooks.set( elem, value, extra ) ) !== undefined ) { - - if ( isCustomProp ) { - style.setProperty( name, value ); - } else { - style[ name ] = value; - } - } - - } else { - - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && - ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { - - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, extra, styles ) { - var val, num, hooks, - origName = camelCase( name ), - isCustomProp = rcustomProp.test( name ); - - // Make sure that we're working with the right name. We don't - // want to modify the value if it is a CSS custom property - // since they are user-defined. - if ( !isCustomProp ) { - name = finalPropName( origName ); - } - - // Try prefixed name followed by the unprefixed name - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name, styles ); - } - - // Convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Make numeric if forced or a qualifier was provided and val looks numeric - if ( extra === "" || extra ) { - num = parseFloat( val ); - return extra === true || isFinite( num ) ? num || 0 : val; - } - - return val; - } -} ); - -jQuery.each( [ "height", "width" ], function( _i, dimension ) { - jQuery.cssHooks[ dimension ] = { - get: function( elem, computed, extra ) { - if ( computed ) { - - // Certain elements can have dimension info if we invisibly show them - // but it must have a current display style that would benefit - return rdisplayswap.test( jQuery.css( elem, "display" ) ) && - - // Support: Safari 8+ - // Table columns in Safari have non-zero offsetWidth & zero - // getBoundingClientRect().width unless display is changed. - // Support: IE <=11 only - // Running getBoundingClientRect on a disconnected node - // in IE throws an error. - ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? - swap( elem, cssShow, function() { - return getWidthOrHeight( elem, dimension, extra ); - } ) : - getWidthOrHeight( elem, dimension, extra ); - } - }, - - set: function( elem, value, extra ) { - var matches, - styles = getStyles( elem ), - - // Only read styles.position if the test has a chance to fail - // to avoid forcing a reflow. - scrollboxSizeBuggy = !support.scrollboxSize() && - styles.position === "absolute", - - // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) - boxSizingNeeded = scrollboxSizeBuggy || extra, - isBorderBox = boxSizingNeeded && - jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - subtract = extra ? - boxModelAdjustment( - elem, - dimension, - extra, - isBorderBox, - styles - ) : - 0; - - // Account for unreliable border-box dimensions by comparing offset* to computed and - // faking a content-box to get border and padding (gh-3699) - if ( isBorderBox && scrollboxSizeBuggy ) { - subtract -= Math.ceil( - elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - - parseFloat( styles[ dimension ] ) - - boxModelAdjustment( elem, dimension, "border", false, styles ) - - 0.5 - ); - } - - // Convert to pixels if value adjustment is needed - if ( subtract && ( matches = rcssNum.exec( value ) ) && - ( matches[ 3 ] || "px" ) !== "px" ) { - - elem.style[ dimension ] = value; - value = jQuery.css( elem, dimension ); - } - - return setPositiveNumber( elem, value, subtract ); - } - }; -} ); - -jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, - function( elem, computed ) { - if ( computed ) { - return ( parseFloat( curCSS( elem, "marginLeft" ) ) || - elem.getBoundingClientRect().left - - swap( elem, { marginLeft: 0 }, function() { - return elem.getBoundingClientRect().left; - } ) - ) + "px"; - } - } -); - -// These hooks are used by animate to expand properties -jQuery.each( { - margin: "", - padding: "", - border: "Width" -}, function( prefix, suffix ) { - jQuery.cssHooks[ prefix + suffix ] = { - expand: function( value ) { - var i = 0, - expanded = {}, - - // Assumes a single number if not a string - parts = typeof value === "string" ? value.split( " " ) : [ value ]; - - for ( ; i < 4; i++ ) { - expanded[ prefix + cssExpand[ i ] + suffix ] = - parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; - } - - return expanded; - } - }; - - if ( prefix !== "margin" ) { - jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; - } -} ); - -jQuery.fn.extend( { - css: function( name, value ) { - return access( this, function( elem, name, value ) { - var styles, len, - map = {}, - i = 0; - - if ( Array.isArray( name ) ) { - styles = getStyles( elem ); - len = name.length; - - for ( ; i < len; i++ ) { - map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); - } - - return map; - } - - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - } -} ); - - -function Tween( elem, options, prop, end, easing ) { - return new Tween.prototype.init( elem, options, prop, end, easing ); -} -jQuery.Tween = Tween; - -Tween.prototype = { - constructor: Tween, - init: function( elem, options, prop, end, easing, unit ) { - this.elem = elem; - this.prop = prop; - this.easing = easing || jQuery.easing._default; - this.options = options; - this.start = this.now = this.cur(); - this.end = end; - this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - }, - cur: function() { - var hooks = Tween.propHooks[ this.prop ]; - - return hooks && hooks.get ? - hooks.get( this ) : - Tween.propHooks._default.get( this ); - }, - run: function( percent ) { - var eased, - hooks = Tween.propHooks[ this.prop ]; - - if ( this.options.duration ) { - this.pos = eased = jQuery.easing[ this.easing ]( - percent, this.options.duration * percent, 0, 1, this.options.duration - ); - } else { - this.pos = eased = percent; - } - this.now = ( this.end - this.start ) * eased + this.start; - - if ( this.options.step ) { - this.options.step.call( this.elem, this.now, this ); - } - - if ( hooks && hooks.set ) { - hooks.set( this ); - } else { - Tween.propHooks._default.set( this ); - } - return this; - } -}; - -Tween.prototype.init.prototype = Tween.prototype; - -Tween.propHooks = { - _default: { - get: function( tween ) { - var result; - - // Use a property on the element directly when it is not a DOM element, - // or when there is no matching style property that exists. - if ( tween.elem.nodeType !== 1 || - tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { - return tween.elem[ tween.prop ]; - } - - // Passing an empty string as a 3rd parameter to .css will automatically - // attempt a parseFloat and fallback to a string if the parse fails. - // Simple values such as "10px" are parsed to Float; - // complex values such as "rotate(1rad)" are returned as-is. - result = jQuery.css( tween.elem, tween.prop, "" ); - - // Empty strings, null, undefined and "auto" are converted to 0. - return !result || result === "auto" ? 0 : result; - }, - set: function( tween ) { - - // Use step hook for back compat. - // Use cssHook if its there. - // Use .style if available and use plain properties where available. - if ( jQuery.fx.step[ tween.prop ] ) { - jQuery.fx.step[ tween.prop ]( tween ); - } else if ( tween.elem.nodeType === 1 && ( - jQuery.cssHooks[ tween.prop ] || - tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { - jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); - } else { - tween.elem[ tween.prop ] = tween.now; - } - } - } -}; - -// Support: IE <=9 only -// Panic based approach to setting things on disconnected nodes -Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { - set: function( tween ) { - if ( tween.elem.nodeType && tween.elem.parentNode ) { - tween.elem[ tween.prop ] = tween.now; - } - } -}; - -jQuery.easing = { - linear: function( p ) { - return p; - }, - swing: function( p ) { - return 0.5 - Math.cos( p * Math.PI ) / 2; - }, - _default: "swing" -}; - -jQuery.fx = Tween.prototype.init; - -// Back compat <1.8 extension point -jQuery.fx.step = {}; - - - - -var - fxNow, inProgress, - rfxtypes = /^(?:toggle|show|hide)$/, - rrun = /queueHooks$/; - -function schedule() { - if ( inProgress ) { - if ( document.hidden === false && window.requestAnimationFrame ) { - window.requestAnimationFrame( schedule ); - } else { - window.setTimeout( schedule, jQuery.fx.interval ); - } - - jQuery.fx.tick(); - } -} - -// Animations created synchronously will run synchronously -function createFxNow() { - window.setTimeout( function() { - fxNow = undefined; - } ); - return ( fxNow = Date.now() ); -} - -// Generate parameters to create a standard animation -function genFx( type, includeWidth ) { - var which, - i = 0, - attrs = { height: type }; - - // If we include width, step value is 1 to do all cssExpand values, - // otherwise step value is 2 to skip over Left and Right - includeWidth = includeWidth ? 1 : 0; - for ( ; i < 4; i += 2 - includeWidth ) { - which = cssExpand[ i ]; - attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; - } - - if ( includeWidth ) { - attrs.opacity = attrs.width = type; - } - - return attrs; -} - -function createTween( value, prop, animation ) { - var tween, - collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), - index = 0, - length = collection.length; - for ( ; index < length; index++ ) { - if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { - - // We're done with this property - return tween; - } - } -} - -function defaultPrefilter( elem, props, opts ) { - var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, - isBox = "width" in props || "height" in props, - anim = this, - orig = {}, - style = elem.style, - hidden = elem.nodeType && isHiddenWithinTree( elem ), - dataShow = dataPriv.get( elem, "fxshow" ); - - // Queue-skipping animations hijack the fx hooks - if ( !opts.queue ) { - hooks = jQuery._queueHooks( elem, "fx" ); - if ( hooks.unqueued == null ) { - hooks.unqueued = 0; - oldfire = hooks.empty.fire; - hooks.empty.fire = function() { - if ( !hooks.unqueued ) { - oldfire(); - } - }; - } - hooks.unqueued++; - - anim.always( function() { - - // Ensure the complete handler is called before this completes - anim.always( function() { - hooks.unqueued--; - if ( !jQuery.queue( elem, "fx" ).length ) { - hooks.empty.fire(); - } - } ); - } ); - } - - // Detect show/hide animations - for ( prop in props ) { - value = props[ prop ]; - if ( rfxtypes.test( value ) ) { - delete props[ prop ]; - toggle = toggle || value === "toggle"; - if ( value === ( hidden ? "hide" : "show" ) ) { - - // Pretend to be hidden if this is a "show" and - // there is still data from a stopped show/hide - if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { - hidden = true; - - // Ignore all other no-op show/hide data - } else { - continue; - } - } - orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); - } - } - - // Bail out if this is a no-op like .hide().hide() - propTween = !jQuery.isEmptyObject( props ); - if ( !propTween && jQuery.isEmptyObject( orig ) ) { - return; - } - - // Restrict "overflow" and "display" styles during box animations - if ( isBox && elem.nodeType === 1 ) { - - // Support: IE <=9 - 11, Edge 12 - 15 - // Record all 3 overflow attributes because IE does not infer the shorthand - // from identically-valued overflowX and overflowY and Edge just mirrors - // the overflowX value there. - opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; - - // Identify a display type, preferring old show/hide data over the CSS cascade - restoreDisplay = dataShow && dataShow.display; - if ( restoreDisplay == null ) { - restoreDisplay = dataPriv.get( elem, "display" ); - } - display = jQuery.css( elem, "display" ); - if ( display === "none" ) { - if ( restoreDisplay ) { - display = restoreDisplay; - } else { - - // Get nonempty value(s) by temporarily forcing visibility - showHide( [ elem ], true ); - restoreDisplay = elem.style.display || restoreDisplay; - display = jQuery.css( elem, "display" ); - showHide( [ elem ] ); - } - } - - // Animate inline elements as inline-block - if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { - if ( jQuery.css( elem, "float" ) === "none" ) { - - // Restore the original display value at the end of pure show/hide animations - if ( !propTween ) { - anim.done( function() { - style.display = restoreDisplay; - } ); - if ( restoreDisplay == null ) { - display = style.display; - restoreDisplay = display === "none" ? "" : display; - } - } - style.display = "inline-block"; - } - } - } - - if ( opts.overflow ) { - style.overflow = "hidden"; - anim.always( function() { - style.overflow = opts.overflow[ 0 ]; - style.overflowX = opts.overflow[ 1 ]; - style.overflowY = opts.overflow[ 2 ]; - } ); - } - - // Implement show/hide animations - propTween = false; - for ( prop in orig ) { - - // General show/hide setup for this element animation - if ( !propTween ) { - if ( dataShow ) { - if ( "hidden" in dataShow ) { - hidden = dataShow.hidden; - } - } else { - dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); - } - - // Store hidden/visible for toggle so `.stop().toggle()` "reverses" - if ( toggle ) { - dataShow.hidden = !hidden; - } - - // Show elements before animating them - if ( hidden ) { - showHide( [ elem ], true ); - } - - /* eslint-disable no-loop-func */ - - anim.done( function() { - - /* eslint-enable no-loop-func */ - - // The final step of a "hide" animation is actually hiding the element - if ( !hidden ) { - showHide( [ elem ] ); - } - dataPriv.remove( elem, "fxshow" ); - for ( prop in orig ) { - jQuery.style( elem, prop, orig[ prop ] ); - } - } ); - } - - // Per-property setup - propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); - if ( !( prop in dataShow ) ) { - dataShow[ prop ] = propTween.start; - if ( hidden ) { - propTween.end = propTween.start; - propTween.start = 0; - } - } - } -} - -function propFilter( props, specialEasing ) { - var index, name, easing, value, hooks; - - // camelCase, specialEasing and expand cssHook pass - for ( index in props ) { - name = camelCase( index ); - easing = specialEasing[ name ]; - value = props[ index ]; - if ( Array.isArray( value ) ) { - easing = value[ 1 ]; - value = props[ index ] = value[ 0 ]; - } - - if ( index !== name ) { - props[ name ] = value; - delete props[ index ]; - } - - hooks = jQuery.cssHooks[ name ]; - if ( hooks && "expand" in hooks ) { - value = hooks.expand( value ); - delete props[ name ]; - - // Not quite $.extend, this won't overwrite existing keys. - // Reusing 'index' because we have the correct "name" - for ( index in value ) { - if ( !( index in props ) ) { - props[ index ] = value[ index ]; - specialEasing[ index ] = easing; - } - } - } else { - specialEasing[ name ] = easing; - } - } -} - -function Animation( elem, properties, options ) { - var result, - stopped, - index = 0, - length = Animation.prefilters.length, - deferred = jQuery.Deferred().always( function() { - - // Don't match elem in the :animated selector - delete tick.elem; - } ), - tick = function() { - if ( stopped ) { - return false; - } - var currentTime = fxNow || createFxNow(), - remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), - - // Support: Android 2.3 only - // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) - temp = remaining / animation.duration || 0, - percent = 1 - temp, - index = 0, - length = animation.tweens.length; - - for ( ; index < length; index++ ) { - animation.tweens[ index ].run( percent ); - } - - deferred.notifyWith( elem, [ animation, percent, remaining ] ); - - // If there's more to do, yield - if ( percent < 1 && length ) { - return remaining; - } - - // If this was an empty animation, synthesize a final progress notification - if ( !length ) { - deferred.notifyWith( elem, [ animation, 1, 0 ] ); - } - - // Resolve the animation and report its conclusion - deferred.resolveWith( elem, [ animation ] ); - return false; - }, - animation = deferred.promise( { - elem: elem, - props: jQuery.extend( {}, properties ), - opts: jQuery.extend( true, { - specialEasing: {}, - easing: jQuery.easing._default - }, options ), - originalProperties: properties, - originalOptions: options, - startTime: fxNow || createFxNow(), - duration: options.duration, - tweens: [], - createTween: function( prop, end ) { - var tween = jQuery.Tween( elem, animation.opts, prop, end, - animation.opts.specialEasing[ prop ] || animation.opts.easing ); - animation.tweens.push( tween ); - return tween; - }, - stop: function( gotoEnd ) { - var index = 0, - - // If we are going to the end, we want to run all the tweens - // otherwise we skip this part - length = gotoEnd ? animation.tweens.length : 0; - if ( stopped ) { - return this; - } - stopped = true; - for ( ; index < length; index++ ) { - animation.tweens[ index ].run( 1 ); - } - - // Resolve when we played the last frame; otherwise, reject - if ( gotoEnd ) { - deferred.notifyWith( elem, [ animation, 1, 0 ] ); - deferred.resolveWith( elem, [ animation, gotoEnd ] ); - } else { - deferred.rejectWith( elem, [ animation, gotoEnd ] ); - } - return this; - } - } ), - props = animation.props; - - propFilter( props, animation.opts.specialEasing ); - - for ( ; index < length; index++ ) { - result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); - if ( result ) { - if ( isFunction( result.stop ) ) { - jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = - result.stop.bind( result ); - } - return result; - } - } - - jQuery.map( props, createTween, animation ); - - if ( isFunction( animation.opts.start ) ) { - animation.opts.start.call( elem, animation ); - } - - // Attach callbacks from options - animation - .progress( animation.opts.progress ) - .done( animation.opts.done, animation.opts.complete ) - .fail( animation.opts.fail ) - .always( animation.opts.always ); - - jQuery.fx.timer( - jQuery.extend( tick, { - elem: elem, - anim: animation, - queue: animation.opts.queue - } ) - ); - - return animation; -} - -jQuery.Animation = jQuery.extend( Animation, { - - tweeners: { - "*": [ function( prop, value ) { - var tween = this.createTween( prop, value ); - adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); - return tween; - } ] - }, - - tweener: function( props, callback ) { - if ( isFunction( props ) ) { - callback = props; - props = [ "*" ]; - } else { - props = props.match( rnothtmlwhite ); - } - - var prop, - index = 0, - length = props.length; - - for ( ; index < length; index++ ) { - prop = props[ index ]; - Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; - Animation.tweeners[ prop ].unshift( callback ); - } - }, - - prefilters: [ defaultPrefilter ], - - prefilter: function( callback, prepend ) { - if ( prepend ) { - Animation.prefilters.unshift( callback ); - } else { - Animation.prefilters.push( callback ); - } - } -} ); - -jQuery.speed = function( speed, easing, fn ) { - var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { - complete: fn || !fn && easing || - isFunction( speed ) && speed, - duration: speed, - easing: fn && easing || easing && !isFunction( easing ) && easing - }; - - // Go to the end state if fx are off - if ( jQuery.fx.off ) { - opt.duration = 0; - - } else { - if ( typeof opt.duration !== "number" ) { - if ( opt.duration in jQuery.fx.speeds ) { - opt.duration = jQuery.fx.speeds[ opt.duration ]; - - } else { - opt.duration = jQuery.fx.speeds._default; - } - } - } - - // Normalize opt.queue - true/undefined/null -> "fx" - if ( opt.queue == null || opt.queue === true ) { - opt.queue = "fx"; - } - - // Queueing - opt.old = opt.complete; - - opt.complete = function() { - if ( isFunction( opt.old ) ) { - opt.old.call( this ); - } - - if ( opt.queue ) { - jQuery.dequeue( this, opt.queue ); - } - }; - - return opt; -}; - -jQuery.fn.extend( { - fadeTo: function( speed, to, easing, callback ) { - - // Show any hidden elements after setting opacity to 0 - return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() - - // Animate to the value specified - .end().animate( { opacity: to }, speed, easing, callback ); - }, - animate: function( prop, speed, easing, callback ) { - var empty = jQuery.isEmptyObject( prop ), - optall = jQuery.speed( speed, easing, callback ), - doAnimation = function() { - - // Operate on a copy of prop so per-property easing won't be lost - var anim = Animation( this, jQuery.extend( {}, prop ), optall ); - - // Empty animations, or finishing resolves immediately - if ( empty || dataPriv.get( this, "finish" ) ) { - anim.stop( true ); - } - }; - doAnimation.finish = doAnimation; - - return empty || optall.queue === false ? - this.each( doAnimation ) : - this.queue( optall.queue, doAnimation ); - }, - stop: function( type, clearQueue, gotoEnd ) { - var stopQueue = function( hooks ) { - var stop = hooks.stop; - delete hooks.stop; - stop( gotoEnd ); - }; - - if ( typeof type !== "string" ) { - gotoEnd = clearQueue; - clearQueue = type; - type = undefined; - } - if ( clearQueue ) { - this.queue( type || "fx", [] ); - } - - return this.each( function() { - var dequeue = true, - index = type != null && type + "queueHooks", - timers = jQuery.timers, - data = dataPriv.get( this ); - - if ( index ) { - if ( data[ index ] && data[ index ].stop ) { - stopQueue( data[ index ] ); - } - } else { - for ( index in data ) { - if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { - stopQueue( data[ index ] ); - } - } - } - - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && - ( type == null || timers[ index ].queue === type ) ) { - - timers[ index ].anim.stop( gotoEnd ); - dequeue = false; - timers.splice( index, 1 ); - } - } - - // Start the next in the queue if the last step wasn't forced. - // Timers currently will call their complete callbacks, which - // will dequeue but only if they were gotoEnd. - if ( dequeue || !gotoEnd ) { - jQuery.dequeue( this, type ); - } - } ); - }, - finish: function( type ) { - if ( type !== false ) { - type = type || "fx"; - } - return this.each( function() { - var index, - data = dataPriv.get( this ), - queue = data[ type + "queue" ], - hooks = data[ type + "queueHooks" ], - timers = jQuery.timers, - length = queue ? queue.length : 0; - - // Enable finishing flag on private data - data.finish = true; - - // Empty the queue first - jQuery.queue( this, type, [] ); - - if ( hooks && hooks.stop ) { - hooks.stop.call( this, true ); - } - - // Look for any active animations, and finish them - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && timers[ index ].queue === type ) { - timers[ index ].anim.stop( true ); - timers.splice( index, 1 ); - } - } - - // Look for any animations in the old queue and finish them - for ( index = 0; index < length; index++ ) { - if ( queue[ index ] && queue[ index ].finish ) { - queue[ index ].finish.call( this ); - } - } - - // Turn off finishing flag - delete data.finish; - } ); - } -} ); - -jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) { - var cssFn = jQuery.fn[ name ]; - jQuery.fn[ name ] = function( speed, easing, callback ) { - return speed == null || typeof speed === "boolean" ? - cssFn.apply( this, arguments ) : - this.animate( genFx( name, true ), speed, easing, callback ); - }; -} ); - -// Generate shortcuts for custom animations -jQuery.each( { - slideDown: genFx( "show" ), - slideUp: genFx( "hide" ), - slideToggle: genFx( "toggle" ), - fadeIn: { opacity: "show" }, - fadeOut: { opacity: "hide" }, - fadeToggle: { opacity: "toggle" } -}, function( name, props ) { - jQuery.fn[ name ] = function( speed, easing, callback ) { - return this.animate( props, speed, easing, callback ); - }; -} ); - -jQuery.timers = []; -jQuery.fx.tick = function() { - var timer, - i = 0, - timers = jQuery.timers; - - fxNow = Date.now(); - - for ( ; i < timers.length; i++ ) { - timer = timers[ i ]; - - // Run the timer and safely remove it when done (allowing for external removal) - if ( !timer() && timers[ i ] === timer ) { - timers.splice( i--, 1 ); - } - } - - if ( !timers.length ) { - jQuery.fx.stop(); - } - fxNow = undefined; -}; - -jQuery.fx.timer = function( timer ) { - jQuery.timers.push( timer ); - jQuery.fx.start(); -}; - -jQuery.fx.interval = 13; -jQuery.fx.start = function() { - if ( inProgress ) { - return; - } - - inProgress = true; - schedule(); -}; - -jQuery.fx.stop = function() { - inProgress = null; -}; - -jQuery.fx.speeds = { - slow: 600, - fast: 200, - - // Default speed - _default: 400 -}; - - -// Based off of the plugin by Clint Helfers, with permission. -// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ -jQuery.fn.delay = function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = window.setTimeout( next, time ); - hooks.stop = function() { - window.clearTimeout( timeout ); - }; - } ); -}; - - -( function() { - var input = document.createElement( "input" ), - select = document.createElement( "select" ), - opt = select.appendChild( document.createElement( "option" ) ); - - input.type = "checkbox"; - - // Support: Android <=4.3 only - // Default value for a checkbox should be "on" - support.checkOn = input.value !== ""; - - // Support: IE <=11 only - // Must access selectedIndex to make default options select - support.optSelected = opt.selected; - - // Support: IE <=11 only - // An input loses its value after becoming a radio - input = document.createElement( "input" ); - input.value = "t"; - input.type = "radio"; - support.radioValue = input.value === "t"; -} )(); - - -var boolHook, - attrHandle = jQuery.expr.attrHandle; - -jQuery.fn.extend( { - attr: function( name, value ) { - return access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each( function() { - jQuery.removeAttr( this, name ); - } ); - } -} ); - -jQuery.extend( { - attr: function( elem, name, value ) { - var ret, hooks, - nType = elem.nodeType; - - // Don't get/set attributes on text, comment and attribute nodes - if ( nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === "undefined" ) { - return jQuery.prop( elem, name, value ); - } - - // Attribute hooks are determined by the lowercase version - // Grab necessary hook if one is defined - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - hooks = jQuery.attrHooks[ name.toLowerCase() ] || - ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); - } - - if ( value !== undefined ) { - if ( value === null ) { - jQuery.removeAttr( elem, name ); - return; - } - - if ( hooks && "set" in hooks && - ( ret = hooks.set( elem, value, name ) ) !== undefined ) { - return ret; - } - - elem.setAttribute( name, value + "" ); - return value; - } - - if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { - return ret; - } - - ret = jQuery.find.attr( elem, name ); - - // Non-existent attributes return null, we normalize to undefined - return ret == null ? undefined : ret; - }, - - attrHooks: { - type: { - set: function( elem, value ) { - if ( !support.radioValue && value === "radio" && - nodeName( elem, "input" ) ) { - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - } - }, - - removeAttr: function( elem, value ) { - var name, - i = 0, - - // Attribute names can contain non-HTML whitespace characters - // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 - attrNames = value && value.match( rnothtmlwhite ); - - if ( attrNames && elem.nodeType === 1 ) { - while ( ( name = attrNames[ i++ ] ) ) { - elem.removeAttribute( name ); - } - } - } -} ); - -// Hooks for boolean attributes -boolHook = { - set: function( elem, value, name ) { - if ( value === false ) { - - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - elem.setAttribute( name, name ); - } - return name; - } -}; - -jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) { - var getter = attrHandle[ name ] || jQuery.find.attr; - - attrHandle[ name ] = function( elem, name, isXML ) { - var ret, handle, - lowercaseName = name.toLowerCase(); - - if ( !isXML ) { - - // Avoid an infinite loop by temporarily removing this function from the getter - handle = attrHandle[ lowercaseName ]; - attrHandle[ lowercaseName ] = ret; - ret = getter( elem, name, isXML ) != null ? - lowercaseName : - null; - attrHandle[ lowercaseName ] = handle; - } - return ret; - }; -} ); - - - - -var rfocusable = /^(?:input|select|textarea|button)$/i, - rclickable = /^(?:a|area)$/i; - -jQuery.fn.extend( { - prop: function( name, value ) { - return access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - return this.each( function() { - delete this[ jQuery.propFix[ name ] || name ]; - } ); - } -} ); - -jQuery.extend( { - prop: function( elem, name, value ) { - var ret, hooks, - nType = elem.nodeType; - - // Don't get/set properties on text, comment and attribute nodes - if ( nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && - ( ret = hooks.set( elem, value, name ) ) !== undefined ) { - return ret; - } - - return ( elem[ name ] = value ); - } - - if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { - return ret; - } - - return elem[ name ]; - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - - // Support: IE <=9 - 11 only - // elem.tabIndex doesn't always return the - // correct value when it hasn't been explicitly set - // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - // Use proper attribute retrieval(#12072) - var tabindex = jQuery.find.attr( elem, "tabindex" ); - - if ( tabindex ) { - return parseInt( tabindex, 10 ); - } - - if ( - rfocusable.test( elem.nodeName ) || - rclickable.test( elem.nodeName ) && - elem.href - ) { - return 0; - } - - return -1; - } - } - }, - - propFix: { - "for": "htmlFor", - "class": "className" - } -} ); - -// Support: IE <=11 only -// Accessing the selectedIndex property -// forces the browser to respect setting selected -// on the option -// The getter ensures a default option is selected -// when in an optgroup -// eslint rule "no-unused-expressions" is disabled for this code -// since it considers such accessions noop -if ( !support.optSelected ) { - jQuery.propHooks.selected = { - get: function( elem ) { - - /* eslint no-unused-expressions: "off" */ - - var parent = elem.parentNode; - if ( parent && parent.parentNode ) { - parent.parentNode.selectedIndex; - } - return null; - }, - set: function( elem ) { - - /* eslint no-unused-expressions: "off" */ - - var parent = elem.parentNode; - if ( parent ) { - parent.selectedIndex; - - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - } - }; -} - -jQuery.each( [ - "tabIndex", - "readOnly", - "maxLength", - "cellSpacing", - "cellPadding", - "rowSpan", - "colSpan", - "useMap", - "frameBorder", - "contentEditable" -], function() { - jQuery.propFix[ this.toLowerCase() ] = this; -} ); - - - - - // Strip and collapse whitespace according to HTML spec - // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace - function stripAndCollapse( value ) { - var tokens = value.match( rnothtmlwhite ) || []; - return tokens.join( " " ); - } - - -function getClass( elem ) { - return elem.getAttribute && elem.getAttribute( "class" ) || ""; -} - -function classesToArray( value ) { - if ( Array.isArray( value ) ) { - return value; - } - if ( typeof value === "string" ) { - return value.match( rnothtmlwhite ) || []; - } - return []; -} - -jQuery.fn.extend( { - addClass: function( value ) { - var classes, elem, cur, curValue, clazz, j, finalValue, - i = 0; - - if ( isFunction( value ) ) { - return this.each( function( j ) { - jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); - } ); - } - - classes = classesToArray( value ); - - if ( classes.length ) { - while ( ( elem = this[ i++ ] ) ) { - curValue = getClass( elem ); - cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); - - if ( cur ) { - j = 0; - while ( ( clazz = classes[ j++ ] ) ) { - if ( cur.indexOf( " " + clazz + " " ) < 0 ) { - cur += clazz + " "; - } - } - - // Only assign if different to avoid unneeded rendering. - finalValue = stripAndCollapse( cur ); - if ( curValue !== finalValue ) { - elem.setAttribute( "class", finalValue ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classes, elem, cur, curValue, clazz, j, finalValue, - i = 0; - - if ( isFunction( value ) ) { - return this.each( function( j ) { - jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); - } ); - } - - if ( !arguments.length ) { - return this.attr( "class", "" ); - } - - classes = classesToArray( value ); - - if ( classes.length ) { - while ( ( elem = this[ i++ ] ) ) { - curValue = getClass( elem ); - - // This expression is here for better compressibility (see addClass) - cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); - - if ( cur ) { - j = 0; - while ( ( clazz = classes[ j++ ] ) ) { - - // Remove *all* instances - while ( cur.indexOf( " " + clazz + " " ) > -1 ) { - cur = cur.replace( " " + clazz + " ", " " ); - } - } - - // Only assign if different to avoid unneeded rendering. - finalValue = stripAndCollapse( cur ); - if ( curValue !== finalValue ) { - elem.setAttribute( "class", finalValue ); - } - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isValidValue = type === "string" || Array.isArray( value ); - - if ( typeof stateVal === "boolean" && isValidValue ) { - return stateVal ? this.addClass( value ) : this.removeClass( value ); - } - - if ( isFunction( value ) ) { - return this.each( function( i ) { - jQuery( this ).toggleClass( - value.call( this, i, getClass( this ), stateVal ), - stateVal - ); - } ); - } - - return this.each( function() { - var className, i, self, classNames; - - if ( isValidValue ) { - - // Toggle individual class names - i = 0; - self = jQuery( this ); - classNames = classesToArray( value ); - - while ( ( className = classNames[ i++ ] ) ) { - - // Check each className given, space separated list - if ( self.hasClass( className ) ) { - self.removeClass( className ); - } else { - self.addClass( className ); - } - } - - // Toggle whole class name - } else if ( value === undefined || type === "boolean" ) { - className = getClass( this ); - if ( className ) { - - // Store className if set - dataPriv.set( this, "__className__", className ); - } - - // If the element has a class name or if we're passed `false`, - // then remove the whole classname (if there was one, the above saved it). - // Otherwise bring back whatever was previously saved (if anything), - // falling back to the empty string if nothing was stored. - if ( this.setAttribute ) { - this.setAttribute( "class", - className || value === false ? - "" : - dataPriv.get( this, "__className__" ) || "" - ); - } - } - } ); - }, - - hasClass: function( selector ) { - var className, elem, - i = 0; - - className = " " + selector + " "; - while ( ( elem = this[ i++ ] ) ) { - if ( elem.nodeType === 1 && - ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { - return true; - } - } - - return false; - } -} ); - - - - -var rreturn = /\r/g; - -jQuery.fn.extend( { - val: function( value ) { - var hooks, ret, valueIsFunction, - elem = this[ 0 ]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || - jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && - "get" in hooks && - ( ret = hooks.get( elem, "value" ) ) !== undefined - ) { - return ret; - } - - ret = elem.value; - - // Handle most common string cases - if ( typeof ret === "string" ) { - return ret.replace( rreturn, "" ); - } - - // Handle cases where value is null/undef or number - return ret == null ? "" : ret; - } - - return; - } - - valueIsFunction = isFunction( value ); - - return this.each( function( i ) { - var val; - - if ( this.nodeType !== 1 ) { - return; - } - - if ( valueIsFunction ) { - val = value.call( this, i, jQuery( this ).val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - - } else if ( typeof val === "number" ) { - val += ""; - - } else if ( Array.isArray( val ) ) { - val = jQuery.map( val, function( value ) { - return value == null ? "" : value + ""; - } ); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - } ); - } -} ); - -jQuery.extend( { - valHooks: { - option: { - get: function( elem ) { - - var val = jQuery.find.attr( elem, "value" ); - return val != null ? - val : - - // Support: IE <=10 - 11 only - // option.text throws exceptions (#14686, #14858) - // Strip and collapse whitespace - // https://html.spec.whatwg.org/#strip-and-collapse-whitespace - stripAndCollapse( jQuery.text( elem ) ); - } - }, - select: { - get: function( elem ) { - var value, option, i, - options = elem.options, - index = elem.selectedIndex, - one = elem.type === "select-one", - values = one ? null : [], - max = one ? index + 1 : options.length; - - if ( index < 0 ) { - i = max; - - } else { - i = one ? index : 0; - } - - // Loop through all the selected options - for ( ; i < max; i++ ) { - option = options[ i ]; - - // Support: IE <=9 only - // IE8-9 doesn't update selected after form reset (#2551) - if ( ( option.selected || i === index ) && - - // Don't return options that are disabled or in a disabled optgroup - !option.disabled && - ( !option.parentNode.disabled || - !nodeName( option.parentNode, "optgroup" ) ) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - }, - - set: function( elem, value ) { - var optionSet, option, - options = elem.options, - values = jQuery.makeArray( value ), - i = options.length; - - while ( i-- ) { - option = options[ i ]; - - /* eslint-disable no-cond-assign */ - - if ( option.selected = - jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 - ) { - optionSet = true; - } - - /* eslint-enable no-cond-assign */ - } - - // Force browsers to behave consistently when non-matching value is set - if ( !optionSet ) { - elem.selectedIndex = -1; - } - return values; - } - } - } -} ); - -// Radios and checkboxes getter/setter -jQuery.each( [ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - set: function( elem, value ) { - if ( Array.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); - } - } - }; - if ( !support.checkOn ) { - jQuery.valHooks[ this ].get = function( elem ) { - return elem.getAttribute( "value" ) === null ? "on" : elem.value; - }; - } -} ); - - - - -// Return jQuery for attributes-only inclusion - - -support.focusin = "onfocusin" in window; - - -var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - stopPropagationCallback = function( e ) { - e.stopPropagation(); - }; - -jQuery.extend( jQuery.event, { - - trigger: function( event, data, elem, onlyHandlers ) { - - var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, - eventPath = [ elem || document ], - type = hasOwn.call( event, "type" ) ? event.type : event, - namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; - - cur = lastElement = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf( "." ) > -1 ) { - - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split( "." ); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf( ":" ) < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) - event.isTrigger = onlyHandlers ? 2 : 3; - event.namespace = namespaces.join( "." ); - event.rnamespace = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === ( elem.ownerDocument || document ) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { - lastElement = cur; - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( - dataPriv.get( cur, "events" ) || Object.create( null ) - )[ event.type ] && - dataPriv.get( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && handle.apply && acceptData( cur ) ) { - event.result = handle.apply( cur, data ); - if ( event.result === false ) { - event.preventDefault(); - } - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( ( !special._default || - special._default.apply( eventPath.pop(), data ) === false ) && - acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name as the event. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - - if ( event.isPropagationStopped() ) { - lastElement.addEventListener( type, stopPropagationCallback ); - } - - elem[ type ](); - - if ( event.isPropagationStopped() ) { - lastElement.removeEventListener( type, stopPropagationCallback ); - } - - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - // Piggyback on a donor event to simulate a different one - // Used only for `focus(in | out)` events - simulate: function( type, elem, event ) { - var e = jQuery.extend( - new jQuery.Event(), - event, - { - type: type, - isSimulated: true - } - ); - - jQuery.event.trigger( e, null, elem ); - } - -} ); - -jQuery.fn.extend( { - - trigger: function( type, data ) { - return this.each( function() { - jQuery.event.trigger( type, data, this ); - } ); - }, - triggerHandler: function( type, data ) { - var elem = this[ 0 ]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - } -} ); - - -// Support: Firefox <=44 -// Firefox doesn't have focus(in | out) events -// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 -// -// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 -// focus(in | out) events fire after focus & blur events, -// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order -// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 -if ( !support.focusin ) { - jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler on the document while someone wants focusin/focusout - var handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - - // Handle: regular nodes (via `this.ownerDocument`), window - // (via `this.document`) & document (via `this`). - var doc = this.ownerDocument || this.document || this, - attaches = dataPriv.access( doc, fix ); - - if ( !attaches ) { - doc.addEventListener( orig, handler, true ); - } - dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); - }, - teardown: function() { - var doc = this.ownerDocument || this.document || this, - attaches = dataPriv.access( doc, fix ) - 1; - - if ( !attaches ) { - doc.removeEventListener( orig, handler, true ); - dataPriv.remove( doc, fix ); - - } else { - dataPriv.access( doc, fix, attaches ); - } - } - }; - } ); -} -var location = window.location; - -var nonce = { guid: Date.now() }; - -var rquery = ( /\?/ ); - - - -// Cross-browser xml parsing -jQuery.parseXML = function( data ) { - var xml; - if ( !data || typeof data !== "string" ) { - return null; - } - - // Support: IE 9 - 11 only - // IE throws on parseFromString with invalid input. - try { - xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); - } catch ( e ) { - xml = undefined; - } - - if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; -}; - - -var - rbracket = /\[\]$/, - rCRLF = /\r?\n/g, - rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, - rsubmittable = /^(?:input|select|textarea|keygen)/i; - -function buildParams( prefix, obj, traditional, add ) { - var name; - - if ( Array.isArray( obj ) ) { - - // Serialize array item. - jQuery.each( obj, function( i, v ) { - if ( traditional || rbracket.test( prefix ) ) { - - // Treat each array item as a scalar. - add( prefix, v ); - - } else { - - // Item is non-scalar (array or object), encode its numeric index. - buildParams( - prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", - v, - traditional, - add - ); - } - } ); - - } else if ( !traditional && toType( obj ) === "object" ) { - - // Serialize object item. - for ( name in obj ) { - buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); - } - - } else { - - // Serialize scalar item. - add( prefix, obj ); - } -} - -// Serialize an array of form elements or a set of -// key/values into a query string -jQuery.param = function( a, traditional ) { - var prefix, - s = [], - add = function( key, valueOrFunction ) { - - // If value is a function, invoke it and use its return value - var value = isFunction( valueOrFunction ) ? - valueOrFunction() : - valueOrFunction; - - s[ s.length ] = encodeURIComponent( key ) + "=" + - encodeURIComponent( value == null ? "" : value ); - }; - - if ( a == null ) { - return ""; - } - - // If an array was passed in, assume that it is an array of form elements. - if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { - - // Serialize the form elements - jQuery.each( a, function() { - add( this.name, this.value ); - } ); - - } else { - - // If traditional, encode the "old" way (the way 1.3.2 or older - // did it), otherwise encode params recursively. - for ( prefix in a ) { - buildParams( prefix, a[ prefix ], traditional, add ); - } - } - - // Return the resulting serialization - return s.join( "&" ); -}; - -jQuery.fn.extend( { - serialize: function() { - return jQuery.param( this.serializeArray() ); - }, - serializeArray: function() { - return this.map( function() { - - // Can add propHook for "elements" to filter or add form elements - var elements = jQuery.prop( this, "elements" ); - return elements ? jQuery.makeArray( elements ) : this; - } ) - .filter( function() { - var type = this.type; - - // Use .is( ":disabled" ) so that fieldset[disabled] works - return this.name && !jQuery( this ).is( ":disabled" ) && - rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && - ( this.checked || !rcheckableType.test( type ) ); - } ) - .map( function( _i, elem ) { - var val = jQuery( this ).val(); - - if ( val == null ) { - return null; - } - - if ( Array.isArray( val ) ) { - return jQuery.map( val, function( val ) { - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - } ); - } - - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - } ).get(); - } -} ); - - -var - r20 = /%20/g, - rhash = /#.*$/, - rantiCache = /([?&])_=[^&]*/, - rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, - - // #7653, #8125, #8152: local protocol detection - rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, - rnoContent = /^(?:GET|HEAD)$/, - rprotocol = /^\/\//, - - /* Prefilters - * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) - * 2) These are called: - * - BEFORE asking for a transport - * - AFTER param serialization (s.data is a string if s.processData is true) - * 3) key is the dataType - * 4) the catchall symbol "*" can be used - * 5) execution will start with transport dataType and THEN continue down to "*" if needed - */ - prefilters = {}, - - /* Transports bindings - * 1) key is the dataType - * 2) the catchall symbol "*" can be used - * 3) selection will start with transport dataType and THEN go to "*" if needed - */ - transports = {}, - - // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression - allTypes = "*/".concat( "*" ), - - // Anchor tag for parsing the document origin - originAnchor = document.createElement( "a" ); - originAnchor.href = location.href; - -// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport -function addToPrefiltersOrTransports( structure ) { - - // dataTypeExpression is optional and defaults to "*" - return function( dataTypeExpression, func ) { - - if ( typeof dataTypeExpression !== "string" ) { - func = dataTypeExpression; - dataTypeExpression = "*"; - } - - var dataType, - i = 0, - dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; - - if ( isFunction( func ) ) { - - // For each dataType in the dataTypeExpression - while ( ( dataType = dataTypes[ i++ ] ) ) { - - // Prepend if requested - if ( dataType[ 0 ] === "+" ) { - dataType = dataType.slice( 1 ) || "*"; - ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); - - // Otherwise append - } else { - ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); - } - } - } - }; -} - -// Base inspection function for prefilters and transports -function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { - - var inspected = {}, - seekingTransport = ( structure === transports ); - - function inspect( dataType ) { - var selected; - inspected[ dataType ] = true; - jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { - var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); - if ( typeof dataTypeOrTransport === "string" && - !seekingTransport && !inspected[ dataTypeOrTransport ] ) { - - options.dataTypes.unshift( dataTypeOrTransport ); - inspect( dataTypeOrTransport ); - return false; - } else if ( seekingTransport ) { - return !( selected = dataTypeOrTransport ); - } - } ); - return selected; - } - - return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); -} - -// A special extend for ajax options -// that takes "flat" options (not to be deep extended) -// Fixes #9887 -function ajaxExtend( target, src ) { - var key, deep, - flatOptions = jQuery.ajaxSettings.flatOptions || {}; - - for ( key in src ) { - if ( src[ key ] !== undefined ) { - ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; - } - } - if ( deep ) { - jQuery.extend( true, target, deep ); - } - - return target; -} - -/* Handles responses to an ajax request: - * - finds the right dataType (mediates between content-type and expected dataType) - * - returns the corresponding response - */ -function ajaxHandleResponses( s, jqXHR, responses ) { - - var ct, type, finalDataType, firstDataType, - contents = s.contents, - dataTypes = s.dataTypes; - - // Remove auto dataType and get content-type in the process - while ( dataTypes[ 0 ] === "*" ) { - dataTypes.shift(); - if ( ct === undefined ) { - ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); - } - } - - // Check if we're dealing with a known content-type - if ( ct ) { - for ( type in contents ) { - if ( contents[ type ] && contents[ type ].test( ct ) ) { - dataTypes.unshift( type ); - break; - } - } - } - - // Check to see if we have a response for the expected dataType - if ( dataTypes[ 0 ] in responses ) { - finalDataType = dataTypes[ 0 ]; - } else { - - // Try convertible dataTypes - for ( type in responses ) { - if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { - finalDataType = type; - break; - } - if ( !firstDataType ) { - firstDataType = type; - } - } - - // Or just use first one - finalDataType = finalDataType || firstDataType; - } - - // If we found a dataType - // We add the dataType to the list if needed - // and return the corresponding response - if ( finalDataType ) { - if ( finalDataType !== dataTypes[ 0 ] ) { - dataTypes.unshift( finalDataType ); - } - return responses[ finalDataType ]; - } -} - -/* Chain conversions given the request and the original response - * Also sets the responseXXX fields on the jqXHR instance - */ -function ajaxConvert( s, response, jqXHR, isSuccess ) { - var conv2, current, conv, tmp, prev, - converters = {}, - - // Work with a copy of dataTypes in case we need to modify it for conversion - dataTypes = s.dataTypes.slice(); - - // Create converters map with lowercased keys - if ( dataTypes[ 1 ] ) { - for ( conv in s.converters ) { - converters[ conv.toLowerCase() ] = s.converters[ conv ]; - } - } - - current = dataTypes.shift(); - - // Convert to each sequential dataType - while ( current ) { - - if ( s.responseFields[ current ] ) { - jqXHR[ s.responseFields[ current ] ] = response; - } - - // Apply the dataFilter if provided - if ( !prev && isSuccess && s.dataFilter ) { - response = s.dataFilter( response, s.dataType ); - } - - prev = current; - current = dataTypes.shift(); - - if ( current ) { - - // There's only work to do if current dataType is non-auto - if ( current === "*" ) { - - current = prev; - - // Convert response if prev dataType is non-auto and differs from current - } else if ( prev !== "*" && prev !== current ) { - - // Seek a direct converter - conv = converters[ prev + " " + current ] || converters[ "* " + current ]; - - // If none found, seek a pair - if ( !conv ) { - for ( conv2 in converters ) { - - // If conv2 outputs current - tmp = conv2.split( " " ); - if ( tmp[ 1 ] === current ) { - - // If prev can be converted to accepted input - conv = converters[ prev + " " + tmp[ 0 ] ] || - converters[ "* " + tmp[ 0 ] ]; - if ( conv ) { - - // Condense equivalence converters - if ( conv === true ) { - conv = converters[ conv2 ]; - - // Otherwise, insert the intermediate dataType - } else if ( converters[ conv2 ] !== true ) { - current = tmp[ 0 ]; - dataTypes.unshift( tmp[ 1 ] ); - } - break; - } - } - } - } - - // Apply converter (if not an equivalence) - if ( conv !== true ) { - - // Unless errors are allowed to bubble, catch and return them - if ( conv && s.throws ) { - response = conv( response ); - } else { - try { - response = conv( response ); - } catch ( e ) { - return { - state: "parsererror", - error: conv ? e : "No conversion from " + prev + " to " + current - }; - } - } - } - } - } - } - - return { state: "success", data: response }; -} - -jQuery.extend( { - - // Counter for holding the number of active queries - active: 0, - - // Last-Modified header cache for next request - lastModified: {}, - etag: {}, - - ajaxSettings: { - url: location.href, - type: "GET", - isLocal: rlocalProtocol.test( location.protocol ), - global: true, - processData: true, - async: true, - contentType: "application/x-www-form-urlencoded; charset=UTF-8", - - /* - timeout: 0, - data: null, - dataType: null, - username: null, - password: null, - cache: null, - throws: false, - traditional: false, - headers: {}, - */ - - accepts: { - "*": allTypes, - text: "text/plain", - html: "text/html", - xml: "application/xml, text/xml", - json: "application/json, text/javascript" - }, - - contents: { - xml: /\bxml\b/, - html: /\bhtml/, - json: /\bjson\b/ - }, - - responseFields: { - xml: "responseXML", - text: "responseText", - json: "responseJSON" - }, - - // Data converters - // Keys separate source (or catchall "*") and destination types with a single space - converters: { - - // Convert anything to text - "* text": String, - - // Text to html (true = no transformation) - "text html": true, - - // Evaluate text as a json expression - "text json": JSON.parse, - - // Parse text as xml - "text xml": jQuery.parseXML - }, - - // For options that shouldn't be deep extended: - // you can add your own custom options here if - // and when you create one that shouldn't be - // deep extended (see ajaxExtend) - flatOptions: { - url: true, - context: true - } - }, - - // Creates a full fledged settings object into target - // with both ajaxSettings and settings fields. - // If target is omitted, writes into ajaxSettings. - ajaxSetup: function( target, settings ) { - return settings ? - - // Building a settings object - ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : - - // Extending ajaxSettings - ajaxExtend( jQuery.ajaxSettings, target ); - }, - - ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), - ajaxTransport: addToPrefiltersOrTransports( transports ), - - // Main method - ajax: function( url, options ) { - - // If url is an object, simulate pre-1.5 signature - if ( typeof url === "object" ) { - options = url; - url = undefined; - } - - // Force options to be an object - options = options || {}; - - var transport, - - // URL without anti-cache param - cacheURL, - - // Response headers - responseHeadersString, - responseHeaders, - - // timeout handle - timeoutTimer, - - // Url cleanup var - urlAnchor, - - // Request state (becomes false upon send and true upon completion) - completed, - - // To know if global events are to be dispatched - fireGlobals, - - // Loop variable - i, - - // uncached part of the url - uncached, - - // Create the final options object - s = jQuery.ajaxSetup( {}, options ), - - // Callbacks context - callbackContext = s.context || s, - - // Context for global events is callbackContext if it is a DOM node or jQuery collection - globalEventContext = s.context && - ( callbackContext.nodeType || callbackContext.jquery ) ? - jQuery( callbackContext ) : - jQuery.event, - - // Deferreds - deferred = jQuery.Deferred(), - completeDeferred = jQuery.Callbacks( "once memory" ), - - // Status-dependent callbacks - statusCode = s.statusCode || {}, - - // Headers (they are sent all at once) - requestHeaders = {}, - requestHeadersNames = {}, - - // Default abort message - strAbort = "canceled", - - // Fake xhr - jqXHR = { - readyState: 0, - - // Builds headers hashtable if needed - getResponseHeader: function( key ) { - var match; - if ( completed ) { - if ( !responseHeaders ) { - responseHeaders = {}; - while ( ( match = rheaders.exec( responseHeadersString ) ) ) { - responseHeaders[ match[ 1 ].toLowerCase() + " " ] = - ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] ) - .concat( match[ 2 ] ); - } - } - match = responseHeaders[ key.toLowerCase() + " " ]; - } - return match == null ? null : match.join( ", " ); - }, - - // Raw string - getAllResponseHeaders: function() { - return completed ? responseHeadersString : null; - }, - - // Caches the header - setRequestHeader: function( name, value ) { - if ( completed == null ) { - name = requestHeadersNames[ name.toLowerCase() ] = - requestHeadersNames[ name.toLowerCase() ] || name; - requestHeaders[ name ] = value; - } - return this; - }, - - // Overrides response content-type header - overrideMimeType: function( type ) { - if ( completed == null ) { - s.mimeType = type; - } - return this; - }, - - // Status-dependent callbacks - statusCode: function( map ) { - var code; - if ( map ) { - if ( completed ) { - - // Execute the appropriate callbacks - jqXHR.always( map[ jqXHR.status ] ); - } else { - - // Lazy-add the new callbacks in a way that preserves old ones - for ( code in map ) { - statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; - } - } - } - return this; - }, - - // Cancel the request - abort: function( statusText ) { - var finalText = statusText || strAbort; - if ( transport ) { - transport.abort( finalText ); - } - done( 0, finalText ); - return this; - } - }; - - // Attach deferreds - deferred.promise( jqXHR ); - - // Add protocol if not provided (prefilters might expect it) - // Handle falsy url in the settings object (#10093: consistency with old signature) - // We also use the url parameter if available - s.url = ( ( url || s.url || location.href ) + "" ) - .replace( rprotocol, location.protocol + "//" ); - - // Alias method option to type as per ticket #12004 - s.type = options.method || options.type || s.method || s.type; - - // Extract dataTypes list - s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; - - // A cross-domain request is in order when the origin doesn't match the current origin. - if ( s.crossDomain == null ) { - urlAnchor = document.createElement( "a" ); - - // Support: IE <=8 - 11, Edge 12 - 15 - // IE throws exception on accessing the href property if url is malformed, - // e.g. http://example.com:80x/ - try { - urlAnchor.href = s.url; - - // Support: IE <=8 - 11 only - // Anchor's host property isn't correctly set when s.url is relative - urlAnchor.href = urlAnchor.href; - s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== - urlAnchor.protocol + "//" + urlAnchor.host; - } catch ( e ) { - - // If there is an error parsing the URL, assume it is crossDomain, - // it can be rejected by the transport if it is invalid - s.crossDomain = true; - } - } - - // Convert data if not already a string - if ( s.data && s.processData && typeof s.data !== "string" ) { - s.data = jQuery.param( s.data, s.traditional ); - } - - // Apply prefilters - inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); - - // If request was aborted inside a prefilter, stop there - if ( completed ) { - return jqXHR; - } - - // We can fire global events as of now if asked to - // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) - fireGlobals = jQuery.event && s.global; - - // Watch for a new set of requests - if ( fireGlobals && jQuery.active++ === 0 ) { - jQuery.event.trigger( "ajaxStart" ); - } - - // Uppercase the type - s.type = s.type.toUpperCase(); - - // Determine if request has content - s.hasContent = !rnoContent.test( s.type ); - - // Save the URL in case we're toying with the If-Modified-Since - // and/or If-None-Match header later on - // Remove hash to simplify url manipulation - cacheURL = s.url.replace( rhash, "" ); - - // More options handling for requests with no content - if ( !s.hasContent ) { - - // Remember the hash so we can put it back - uncached = s.url.slice( cacheURL.length ); - - // If data is available and should be processed, append data to url - if ( s.data && ( s.processData || typeof s.data === "string" ) ) { - cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; - - // #9682: remove data so that it's not used in an eventual retry - delete s.data; - } - - // Add or update anti-cache param if needed - if ( s.cache === false ) { - cacheURL = cacheURL.replace( rantiCache, "$1" ); - uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) + - uncached; - } - - // Put hash and anti-cache on the URL that will be requested (gh-1732) - s.url = cacheURL + uncached; - - // Change '%20' to '+' if this is encoded form body content (gh-2658) - } else if ( s.data && s.processData && - ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { - s.data = s.data.replace( r20, "+" ); - } - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - if ( jQuery.lastModified[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); - } - if ( jQuery.etag[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); - } - } - - // Set the correct header, if data is being sent - if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { - jqXHR.setRequestHeader( "Content-Type", s.contentType ); - } - - // Set the Accepts header for the server, depending on the dataType - jqXHR.setRequestHeader( - "Accept", - s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? - s.accepts[ s.dataTypes[ 0 ] ] + - ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : - s.accepts[ "*" ] - ); - - // Check for headers option - for ( i in s.headers ) { - jqXHR.setRequestHeader( i, s.headers[ i ] ); - } - - // Allow custom headers/mimetypes and early abort - if ( s.beforeSend && - ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { - - // Abort if not done already and return - return jqXHR.abort(); - } - - // Aborting is no longer a cancellation - strAbort = "abort"; - - // Install callbacks on deferreds - completeDeferred.add( s.complete ); - jqXHR.done( s.success ); - jqXHR.fail( s.error ); - - // Get transport - transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); - - // If no transport, we auto-abort - if ( !transport ) { - done( -1, "No Transport" ); - } else { - jqXHR.readyState = 1; - - // Send global event - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); - } - - // If request was aborted inside ajaxSend, stop there - if ( completed ) { - return jqXHR; - } - - // Timeout - if ( s.async && s.timeout > 0 ) { - timeoutTimer = window.setTimeout( function() { - jqXHR.abort( "timeout" ); - }, s.timeout ); - } - - try { - completed = false; - transport.send( requestHeaders, done ); - } catch ( e ) { - - // Rethrow post-completion exceptions - if ( completed ) { - throw e; - } - - // Propagate others as results - done( -1, e ); - } - } - - // Callback for when everything is done - function done( status, nativeStatusText, responses, headers ) { - var isSuccess, success, error, response, modified, - statusText = nativeStatusText; - - // Ignore repeat invocations - if ( completed ) { - return; - } - - completed = true; - - // Clear timeout if it exists - if ( timeoutTimer ) { - window.clearTimeout( timeoutTimer ); - } - - // Dereference transport for early garbage collection - // (no matter how long the jqXHR object will be used) - transport = undefined; - - // Cache response headers - responseHeadersString = headers || ""; - - // Set readyState - jqXHR.readyState = status > 0 ? 4 : 0; - - // Determine if successful - isSuccess = status >= 200 && status < 300 || status === 304; - - // Get response data - if ( responses ) { - response = ajaxHandleResponses( s, jqXHR, responses ); - } - - // Use a noop converter for missing script - if ( !isSuccess && jQuery.inArray( "script", s.dataTypes ) > -1 ) { - s.converters[ "text script" ] = function() {}; - } - - // Convert no matter what (that way responseXXX fields are always set) - response = ajaxConvert( s, response, jqXHR, isSuccess ); - - // If successful, handle type chaining - if ( isSuccess ) { - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - modified = jqXHR.getResponseHeader( "Last-Modified" ); - if ( modified ) { - jQuery.lastModified[ cacheURL ] = modified; - } - modified = jqXHR.getResponseHeader( "etag" ); - if ( modified ) { - jQuery.etag[ cacheURL ] = modified; - } - } - - // if no content - if ( status === 204 || s.type === "HEAD" ) { - statusText = "nocontent"; - - // if not modified - } else if ( status === 304 ) { - statusText = "notmodified"; - - // If we have data, let's convert it - } else { - statusText = response.state; - success = response.data; - error = response.error; - isSuccess = !error; - } - } else { - - // Extract error from statusText and normalize for non-aborts - error = statusText; - if ( status || !statusText ) { - statusText = "error"; - if ( status < 0 ) { - status = 0; - } - } - } - - // Set data for the fake xhr object - jqXHR.status = status; - jqXHR.statusText = ( nativeStatusText || statusText ) + ""; - - // Success/Error - if ( isSuccess ) { - deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); - } else { - deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); - } - - // Status-dependent callbacks - jqXHR.statusCode( statusCode ); - statusCode = undefined; - - if ( fireGlobals ) { - globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", - [ jqXHR, s, isSuccess ? success : error ] ); - } - - // Complete - completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); - - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); - - // Handle the global AJAX counter - if ( !( --jQuery.active ) ) { - jQuery.event.trigger( "ajaxStop" ); - } - } - } - - return jqXHR; - }, - - getJSON: function( url, data, callback ) { - return jQuery.get( url, data, callback, "json" ); - }, - - getScript: function( url, callback ) { - return jQuery.get( url, undefined, callback, "script" ); - } -} ); - -jQuery.each( [ "get", "post" ], function( _i, method ) { - jQuery[ method ] = function( url, data, callback, type ) { - - // Shift arguments if data argument was omitted - if ( isFunction( data ) ) { - type = type || callback; - callback = data; - data = undefined; - } - - // The url can be an options object (which then must have .url) - return jQuery.ajax( jQuery.extend( { - url: url, - type: method, - dataType: type, - data: data, - success: callback - }, jQuery.isPlainObject( url ) && url ) ); - }; -} ); - -jQuery.ajaxPrefilter( function( s ) { - var i; - for ( i in s.headers ) { - if ( i.toLowerCase() === "content-type" ) { - s.contentType = s.headers[ i ] || ""; - } - } -} ); - - -jQuery._evalUrl = function( url, options, doc ) { - return jQuery.ajax( { - url: url, - - // Make this explicit, since user can override this through ajaxSetup (#11264) - type: "GET", - dataType: "script", - cache: true, - async: false, - global: false, - - // Only evaluate the response if it is successful (gh-4126) - // dataFilter is not invoked for failure responses, so using it instead - // of the default converter is kludgy but it works. - converters: { - "text script": function() {} - }, - dataFilter: function( response ) { - jQuery.globalEval( response, options, doc ); - } - } ); -}; - - -jQuery.fn.extend( { - wrapAll: function( html ) { - var wrap; - - if ( this[ 0 ] ) { - if ( isFunction( html ) ) { - html = html.call( this[ 0 ] ); - } - - // The elements to wrap the target around - wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); - - if ( this[ 0 ].parentNode ) { - wrap.insertBefore( this[ 0 ] ); - } - - wrap.map( function() { - var elem = this; - - while ( elem.firstElementChild ) { - elem = elem.firstElementChild; - } - - return elem; - } ).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( isFunction( html ) ) { - return this.each( function( i ) { - jQuery( this ).wrapInner( html.call( this, i ) ); - } ); - } - - return this.each( function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - } ); - }, - - wrap: function( html ) { - var htmlIsFunction = isFunction( html ); - - return this.each( function( i ) { - jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); - } ); - }, - - unwrap: function( selector ) { - this.parent( selector ).not( "body" ).each( function() { - jQuery( this ).replaceWith( this.childNodes ); - } ); - return this; - } -} ); - - -jQuery.expr.pseudos.hidden = function( elem ) { - return !jQuery.expr.pseudos.visible( elem ); -}; -jQuery.expr.pseudos.visible = function( elem ) { - return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); -}; - - - - -jQuery.ajaxSettings.xhr = function() { - try { - return new window.XMLHttpRequest(); - } catch ( e ) {} -}; - -var xhrSuccessStatus = { - - // File protocol always yields status code 0, assume 200 - 0: 200, - - // Support: IE <=9 only - // #1450: sometimes IE returns 1223 when it should be 204 - 1223: 204 - }, - xhrSupported = jQuery.ajaxSettings.xhr(); - -support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); -support.ajax = xhrSupported = !!xhrSupported; - -jQuery.ajaxTransport( function( options ) { - var callback, errorCallback; - - // Cross domain only allowed if supported through XMLHttpRequest - if ( support.cors || xhrSupported && !options.crossDomain ) { - return { - send: function( headers, complete ) { - var i, - xhr = options.xhr(); - - xhr.open( - options.type, - options.url, - options.async, - options.username, - options.password - ); - - // Apply custom fields if provided - if ( options.xhrFields ) { - for ( i in options.xhrFields ) { - xhr[ i ] = options.xhrFields[ i ]; - } - } - - // Override mime type if needed - if ( options.mimeType && xhr.overrideMimeType ) { - xhr.overrideMimeType( options.mimeType ); - } - - // X-Requested-With header - // For cross-domain requests, seeing as conditions for a preflight are - // akin to a jigsaw puzzle, we simply never set it to be sure. - // (it can always be set on a per-request basis or even using ajaxSetup) - // For same-domain requests, won't change header if already provided. - if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { - headers[ "X-Requested-With" ] = "XMLHttpRequest"; - } - - // Set headers - for ( i in headers ) { - xhr.setRequestHeader( i, headers[ i ] ); - } - - // Callback - callback = function( type ) { - return function() { - if ( callback ) { - callback = errorCallback = xhr.onload = - xhr.onerror = xhr.onabort = xhr.ontimeout = - xhr.onreadystatechange = null; - - if ( type === "abort" ) { - xhr.abort(); - } else if ( type === "error" ) { - - // Support: IE <=9 only - // On a manual native abort, IE9 throws - // errors on any property access that is not readyState - if ( typeof xhr.status !== "number" ) { - complete( 0, "error" ); - } else { - complete( - - // File: protocol always yields status 0; see #8605, #14207 - xhr.status, - xhr.statusText - ); - } - } else { - complete( - xhrSuccessStatus[ xhr.status ] || xhr.status, - xhr.statusText, - - // Support: IE <=9 only - // IE9 has no XHR2 but throws on binary (trac-11426) - // For XHR2 non-text, let the caller handle it (gh-2498) - ( xhr.responseType || "text" ) !== "text" || - typeof xhr.responseText !== "string" ? - { binary: xhr.response } : - { text: xhr.responseText }, - xhr.getAllResponseHeaders() - ); - } - } - }; - }; - - // Listen to events - xhr.onload = callback(); - errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); - - // Support: IE 9 only - // Use onreadystatechange to replace onabort - // to handle uncaught aborts - if ( xhr.onabort !== undefined ) { - xhr.onabort = errorCallback; - } else { - xhr.onreadystatechange = function() { - - // Check readyState before timeout as it changes - if ( xhr.readyState === 4 ) { - - // Allow onerror to be called first, - // but that will not handle a native abort - // Also, save errorCallback to a variable - // as xhr.onerror cannot be accessed - window.setTimeout( function() { - if ( callback ) { - errorCallback(); - } - } ); - } - }; - } - - // Create the abort callback - callback = callback( "abort" ); - - try { - - // Do send the request (this may raise an exception) - xhr.send( options.hasContent && options.data || null ); - } catch ( e ) { - - // #14683: Only rethrow if this hasn't been notified as an error yet - if ( callback ) { - throw e; - } - } - }, - - abort: function() { - if ( callback ) { - callback(); - } - } - }; - } -} ); - - - - -// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) -jQuery.ajaxPrefilter( function( s ) { - if ( s.crossDomain ) { - s.contents.script = false; - } -} ); - -// Install script dataType -jQuery.ajaxSetup( { - accepts: { - script: "text/javascript, application/javascript, " + - "application/ecmascript, application/x-ecmascript" - }, - contents: { - script: /\b(?:java|ecma)script\b/ - }, - converters: { - "text script": function( text ) { - jQuery.globalEval( text ); - return text; - } - } -} ); - -// Handle cache's special case and crossDomain -jQuery.ajaxPrefilter( "script", function( s ) { - if ( s.cache === undefined ) { - s.cache = false; - } - if ( s.crossDomain ) { - s.type = "GET"; - } -} ); - -// Bind script tag hack transport -jQuery.ajaxTransport( "script", function( s ) { - - // This transport only deals with cross domain or forced-by-attrs requests - if ( s.crossDomain || s.scriptAttrs ) { - var script, callback; - return { - send: function( _, complete ) { - script = jQuery( " -{% endmacro %} \ No newline at end of file diff --git a/docs/_build/html/genindex.html b/docs/_build/html/genindex.html deleted file mode 100644 index 5c054ac..0000000 --- a/docs/_build/html/genindex.html +++ /dev/null @@ -1,1324 +0,0 @@ - - - - - - - - Index — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- - -

Index

- -
- _ - | A - | B - | C - | D - | F - | G - | I - | L - | M - | O - | P - | R - | S - | T - | U - -
-

_

- - -
- -

A

- - - -
- -

B

- - -
- -

C

- - - -
- -

D

- - - -
- -

F

- - -
- -

G

- - - -
- -

I

- - - -
- -

L

- - - -
- -

M

- - - -
    -
  • main() (in module mdp_playground.scripts.run_experiments) -
  • -
  • - mdp_playground - -
  • -
  • - mdp_playground.analysis - -
  • -
  • - mdp_playground.analysis.analysis - -
  • -
  • - mdp_playground.analysis.radar_chart - -
  • -
  • - mdp_playground.config_processor - -
  • -
  • - mdp_playground.config_processor.config_processor - -
  • -
  • - mdp_playground.envs - -
  • -
  • - mdp_playground.envs.gym_env_wrapper - -
  • -
  • - mdp_playground.envs.mujoco_env_wrapper - -
  • -
  • - mdp_playground.envs.rl_toy_env - -
  • -
  • - mdp_playground.scripts - -
  • -
  • - mdp_playground.scripts.run_experiments - -
  • -
  • - mdp_playground.spaces - -
  • -
  • - mdp_playground.spaces.box_extended - -
  • -
  • - mdp_playground.spaces.discrete_extended - -
  • -
  • - mdp_playground.spaces.image_continuous - -
  • -
- -

O

- - -
- -

P

- - - -
- -

R

- - - -
- -

S

- - - -
- -

T

- - - -
- -

U

- - -
- - - -
- - -
- - -
- -
-
-
-
-

- - By MDP Playground developers
- - © Copyright 2021, MDP Playground developers.
-

-
-
-
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/index.html b/docs/_build/html/index.html deleted file mode 100644 index 4cf54f2..0000000 --- a/docs/_build/html/index.html +++ /dev/null @@ -1,506 +0,0 @@ - - - - - - - - Welcome to MDPP’s documentation! — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -
-

Welcome to MDPP’s documentation!

-

For now, this only contains docs automatically generated from the code’s docblocks.

- ---- - - - - - -

mdp_playground

-
- - -
- - -
- - mdp_playground - -
- -
-
-
-
-

- - By MDP Playground developers
- - © Copyright 2021, MDP Playground developers.
-

-
-
-
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/objects.inv b/docs/_build/html/objects.inv deleted file mode 100644 index 9683bad..0000000 Binary files a/docs/_build/html/objects.inv and /dev/null differ diff --git a/docs/_build/html/py-modindex.html b/docs/_build/html/py-modindex.html deleted file mode 100644 index 754ffa5..0000000 --- a/docs/_build/html/py-modindex.html +++ /dev/null @@ -1,593 +0,0 @@ - - - - - - - - Python Module Index — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - -
- - -
- -
-
-
-
- -
-
-
-

- - By MDP Playground developers
- - © Copyright 2021, MDP Playground developers.
-

-
-
-
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/search.html b/docs/_build/html/search.html deleted file mode 100644 index 0bfc7fe..0000000 --- a/docs/_build/html/search.html +++ /dev/null @@ -1,498 +0,0 @@ - - - - - - - - Search — MDP Playground 0.0.1 documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - -
- - -
- -
-
-
-
-
- -
- -

Search

-
- -

- Please activate JavaScript to enable the search - functionality. -

-
-

- Searching for multiple words only shows matches that contain - all words. -

-
- - - -
- -
- -
- -
- - -
- - -
- -
-
-
-
-

- - By MDP Playground developers
- - © Copyright 2021, MDP Playground developers.
-

-
-
-
- - -
-
- - - - - - \ No newline at end of file diff --git a/docs/_build/html/searchindex.js b/docs/_build/html/searchindex.js deleted file mode 100644 index 1587dca..0000000 --- a/docs/_build/html/searchindex.js +++ /dev/null @@ -1 +0,0 @@ -Search.setIndex({docnames:["_autosummary/mdp_playground","_autosummary/mdp_playground.analysis","_autosummary/mdp_playground.analysis.analysis","_autosummary/mdp_playground.analysis.analysis.MDPP_Analysis","_autosummary/mdp_playground.analysis.radar_chart","_autosummary/mdp_playground.analysis.radar_chart.radar_factory","_autosummary/mdp_playground.config_processor","_autosummary/mdp_playground.config_processor.config_processor","_autosummary/mdp_playground.config_processor.config_processor.combined_processing","_autosummary/mdp_playground.config_processor.config_processor.create_config_space_from_config_dict","_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_atari","_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_frame_stack_atari","_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_mujoco_wrapper","_autosummary/mdp_playground.config_processor.config_processor.deepmerge","_autosummary/mdp_playground.config_processor.config_processor.deepmerge_multiple_dicts","_autosummary/mdp_playground.config_processor.config_processor.get_grid_of_configs","_autosummary/mdp_playground.config_processor.config_processor.get_list_of_varying_configs","_autosummary/mdp_playground.config_processor.config_processor.get_random_configs","_autosummary/mdp_playground.config_processor.config_processor.init_ray","_autosummary/mdp_playground.config_processor.config_processor.init_stats_file","_autosummary/mdp_playground.config_processor.config_processor.post_processing","_autosummary/mdp_playground.config_processor.config_processor.process_configs","_autosummary/mdp_playground.config_processor.config_processor.setup_ray","_autosummary/mdp_playground.config_processor.config_processor.setup_ray_callbacks","_autosummary/mdp_playground.config_processor.config_processor.sobol_configs_from_config_dict","_autosummary/mdp_playground.envs","_autosummary/mdp_playground.envs.gym_env_wrapper","_autosummary/mdp_playground.envs.gym_env_wrapper.GymEnvWrapper","_autosummary/mdp_playground.envs.mujoco_env_wrapper","_autosummary/mdp_playground.envs.mujoco_env_wrapper.get_mujoco_wrapper","_autosummary/mdp_playground.envs.rl_toy_env","_autosummary/mdp_playground.envs.rl_toy_env.RLToyEnv","_autosummary/mdp_playground.envs.rl_toy_env.dist_of_pt_from_line","_autosummary/mdp_playground.envs.rl_toy_env.list_to_float_np_array","_autosummary/mdp_playground.scripts","_autosummary/mdp_playground.scripts.run_experiments","_autosummary/mdp_playground.scripts.run_experiments.cli","_autosummary/mdp_playground.scripts.run_experiments.main","_autosummary/mdp_playground.spaces","_autosummary/mdp_playground.spaces.box_extended","_autosummary/mdp_playground.spaces.box_extended.BoxExtended","_autosummary/mdp_playground.spaces.discrete_extended","_autosummary/mdp_playground.spaces.discrete_extended.DiscreteExtended","_autosummary/mdp_playground.spaces.image_continuous","_autosummary/mdp_playground.spaces.image_continuous.ImageContinuous","_autosummary/mdp_playground.spaces.image_multi_discrete","_autosummary/mdp_playground.spaces.image_multi_discrete.ImageMultiDiscrete","_autosummary/mdp_playground.spaces.multi_discrete_extended","_autosummary/mdp_playground.spaces.multi_discrete_extended.MultiDiscreteExtended","_autosummary/mdp_playground.spaces.test_image_continuous","_autosummary/mdp_playground.spaces.test_image_continuous.TestImageContinuous","_autosummary/mdp_playground.spaces.test_image_multi_discrete","_autosummary/mdp_playground.spaces.test_image_multi_discrete.TestImageMultiDiscrete","_autosummary/mdp_playground.spaces.tuple_extended","_autosummary/mdp_playground.spaces.tuple_extended.TupleExtended","index"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.viewcode":1,sphinx:56},filenames:["_autosummary/mdp_playground.rst","_autosummary/mdp_playground.analysis.rst","_autosummary/mdp_playground.analysis.analysis.rst","_autosummary/mdp_playground.analysis.analysis.MDPP_Analysis.rst","_autosummary/mdp_playground.analysis.radar_chart.rst","_autosummary/mdp_playground.analysis.radar_chart.radar_factory.rst","_autosummary/mdp_playground.config_processor.rst","_autosummary/mdp_playground.config_processor.config_processor.rst","_autosummary/mdp_playground.config_processor.config_processor.combined_processing.rst","_autosummary/mdp_playground.config_processor.config_processor.create_config_space_from_config_dict.rst","_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_atari.rst","_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_frame_stack_atari.rst","_autosummary/mdp_playground.config_processor.config_processor.create_gym_env_wrapper_mujoco_wrapper.rst","_autosummary/mdp_playground.config_processor.config_processor.deepmerge.rst","_autosummary/mdp_playground.config_processor.config_processor.deepmerge_multiple_dicts.rst","_autosummary/mdp_playground.config_processor.config_processor.get_grid_of_configs.rst","_autosummary/mdp_playground.config_processor.config_processor.get_list_of_varying_configs.rst","_autosummary/mdp_playground.config_processor.config_processor.get_random_configs.rst","_autosummary/mdp_playground.config_processor.config_processor.init_ray.rst","_autosummary/mdp_playground.config_processor.config_processor.init_stats_file.rst","_autosummary/mdp_playground.config_processor.config_processor.post_processing.rst","_autosummary/mdp_playground.config_processor.config_processor.process_configs.rst","_autosummary/mdp_playground.config_processor.config_processor.setup_ray.rst","_autosummary/mdp_playground.config_processor.config_processor.setup_ray_callbacks.rst","_autosummary/mdp_playground.config_processor.config_processor.sobol_configs_from_config_dict.rst","_autosummary/mdp_playground.envs.rst","_autosummary/mdp_playground.envs.gym_env_wrapper.rst","_autosummary/mdp_playground.envs.gym_env_wrapper.GymEnvWrapper.rst","_autosummary/mdp_playground.envs.mujoco_env_wrapper.rst","_autosummary/mdp_playground.envs.mujoco_env_wrapper.get_mujoco_wrapper.rst","_autosummary/mdp_playground.envs.rl_toy_env.rst","_autosummary/mdp_playground.envs.rl_toy_env.RLToyEnv.rst","_autosummary/mdp_playground.envs.rl_toy_env.dist_of_pt_from_line.rst","_autosummary/mdp_playground.envs.rl_toy_env.list_to_float_np_array.rst","_autosummary/mdp_playground.scripts.rst","_autosummary/mdp_playground.scripts.run_experiments.rst","_autosummary/mdp_playground.scripts.run_experiments.cli.rst","_autosummary/mdp_playground.scripts.run_experiments.main.rst","_autosummary/mdp_playground.spaces.rst","_autosummary/mdp_playground.spaces.box_extended.rst","_autosummary/mdp_playground.spaces.box_extended.BoxExtended.rst","_autosummary/mdp_playground.spaces.discrete_extended.rst","_autosummary/mdp_playground.spaces.discrete_extended.DiscreteExtended.rst","_autosummary/mdp_playground.spaces.image_continuous.rst","_autosummary/mdp_playground.spaces.image_continuous.ImageContinuous.rst","_autosummary/mdp_playground.spaces.image_multi_discrete.rst","_autosummary/mdp_playground.spaces.image_multi_discrete.ImageMultiDiscrete.rst","_autosummary/mdp_playground.spaces.multi_discrete_extended.rst","_autosummary/mdp_playground.spaces.multi_discrete_extended.MultiDiscreteExtended.rst","_autosummary/mdp_playground.spaces.test_image_continuous.rst","_autosummary/mdp_playground.spaces.test_image_continuous.TestImageContinuous.rst","_autosummary/mdp_playground.spaces.test_image_multi_discrete.rst","_autosummary/mdp_playground.spaces.test_image_multi_discrete.TestImageMultiDiscrete.rst","_autosummary/mdp_playground.spaces.tuple_extended.rst","_autosummary/mdp_playground.spaces.tuple_extended.TupleExtended.rst","index.rst"],objects:{"":{mdp_playground:[0,0,0,"-"]},"mdp_playground.analysis":{analysis:[2,0,0,"-"],radar_chart:[4,0,0,"-"]},"mdp_playground.analysis.analysis":{MDPP_Analysis:[3,1,1,""]},"mdp_playground.analysis.analysis.MDPP_Analysis":{__init__:[3,2,1,""],get_exp_data:[3,2,1,""],load_data:[3,2,1,""],plot_1d_dimensions:[3,2,1,""],plot_2d_heatmap:[3,2,1,""],plot_bar:[3,2,1,""],plot_learning_curves:[3,2,1,""],plot_radar:[3,2,1,""]},"mdp_playground.analysis.radar_chart":{radar_factory:[5,3,1,""]},"mdp_playground.config_processor":{config_processor:[7,0,0,"-"]},"mdp_playground.config_processor.config_processor":{combined_processing:[8,3,1,""],create_config_space_from_config_dict:[9,3,1,""],create_gym_env_wrapper_atari:[10,3,1,""],create_gym_env_wrapper_frame_stack_atari:[11,3,1,""],create_gym_env_wrapper_mujoco_wrapper:[12,3,1,""],deepmerge:[13,3,1,""],deepmerge_multiple_dicts:[14,3,1,""],get_grid_of_configs:[15,3,1,""],get_list_of_varying_configs:[16,3,1,""],get_random_configs:[17,3,1,""],init_ray:[18,3,1,""],init_stats_file:[19,3,1,""],post_processing:[20,3,1,""],process_configs:[21,3,1,""],setup_ray:[22,3,1,""],setup_ray_callbacks:[23,3,1,""],sobol_configs_from_config_dict:[24,3,1,""]},"mdp_playground.envs":{gym_env_wrapper:[26,0,0,"-"],mujoco_env_wrapper:[28,0,0,"-"],rl_toy_env:[30,0,0,"-"]},"mdp_playground.envs.gym_env_wrapper":{GymEnvWrapper:[27,1,1,""]},"mdp_playground.envs.gym_env_wrapper.GymEnvWrapper":{__init__:[27,2,1,""],close:[27,2,1,""],render:[27,2,1,""],reset:[27,2,1,""],seed:[27,2,1,""],step:[27,2,1,""],unwrapped:[27,2,1,""]},"mdp_playground.envs.mujoco_env_wrapper":{get_mujoco_wrapper:[29,3,1,""]},"mdp_playground.envs.rl_toy_env":{RLToyEnv:[31,1,1,""],dist_of_pt_from_line:[32,3,1,""],list_to_float_np_array:[33,3,1,""]},"mdp_playground.envs.rl_toy_env.RLToyEnv":{P:[31,2,1,""],R:[31,2,1,""],__init__:[31,2,1,""],action_space:[31,4,1,""],close:[31,2,1,""],config:[31,4,1,""],get_augmented_state:[31,2,1,"id1"],init_init_state_dist:[31,2,1,"id2"],init_reward_function:[31,2,1,"id3"],init_terminal_states:[31,2,1,"id4"],init_transition_function:[31,2,1,"id5"],observation_space:[31,4,1,""],render:[31,2,1,""],reset:[31,2,1,"id6"],reward_function:[31,2,1,"id7"],rewardable_sequences:[31,4,1,""],seed:[31,2,1,"id8"],step:[31,2,1,"id9"],transition_function:[31,2,1,"id10"],unwrapped:[31,2,1,""]},"mdp_playground.scripts":{run_experiments:[35,0,0,"-"]},"mdp_playground.scripts.run_experiments":{cli:[36,3,1,""],main:[37,3,1,""]},"mdp_playground.spaces":{box_extended:[39,0,0,"-"],discrete_extended:[41,0,0,"-"],image_continuous:[43,0,0,"-"],image_multi_discrete:[45,0,0,"-"],multi_discrete_extended:[47,0,0,"-"],test_image_continuous:[49,0,0,"-"],test_image_multi_discrete:[51,0,0,"-"],tuple_extended:[53,0,0,"-"]},"mdp_playground.spaces.box_extended":{BoxExtended:[40,1,1,""]},"mdp_playground.spaces.box_extended.BoxExtended":{__init__:[40,2,1,""],contains:[40,2,1,""],from_jsonable:[40,2,1,""],sample:[40,2,1,""],seed:[40,2,1,""],to_jsonable:[40,2,1,""]},"mdp_playground.spaces.discrete_extended":{DiscreteExtended:[42,1,1,""]},"mdp_playground.spaces.discrete_extended.DiscreteExtended":{__init__:[42,2,1,""],contains:[42,2,1,""],from_jsonable:[42,2,1,""],sample:[42,2,1,""],seed:[42,2,1,""],to_jsonable:[42,2,1,""]},"mdp_playground.spaces.image_continuous":{ImageContinuous:[44,1,1,""]},"mdp_playground.spaces.image_continuous.ImageContinuous":{__init__:[44,2,1,""],contains:[44,2,1,""],convert_to_pixel:[44,2,1,""],from_jsonable:[44,2,1,""],generate_image:[44,2,1,""],get_concatenated_image:[44,2,1,"id0"],sample:[44,2,1,""],seed:[44,2,1,""],to_jsonable:[44,2,1,""]},"mdp_playground.spaces.image_multi_discrete":{ImageMultiDiscrete:[46,1,1,""]},"mdp_playground.spaces.image_multi_discrete.ImageMultiDiscrete":{__init__:[46,2,1,""],contains:[46,2,1,""],from_jsonable:[46,2,1,""],get_concatenated_image:[46,2,1,"id0"],sample:[46,2,1,""],seed:[46,2,1,""],to_jsonable:[46,2,1,""]},"mdp_playground.spaces.multi_discrete_extended":{MultiDiscreteExtended:[48,1,1,""]},"mdp_playground.spaces.multi_discrete_extended.MultiDiscreteExtended":{__init__:[48,2,1,""],contains:[48,2,1,""],from_jsonable:[48,2,1,""],sample:[48,2,1,""],seed:[48,2,1,""],to_jsonable:[48,2,1,""]},"mdp_playground.spaces.test_image_continuous":{TestImageContinuous:[50,1,1,""]},"mdp_playground.spaces.test_image_continuous.TestImageContinuous":{__init__:[50,2,1,""],addCleanup:[50,2,1,""],addTypeEqualityFunc:[50,2,1,""],assertAlmostEqual:[50,2,1,""],assertCountEqual:[50,2,1,""],assertDictContainsSubset:[50,2,1,""],assertEqual:[50,2,1,""],assertFalse:[50,2,1,""],assertGreater:[50,2,1,""],assertGreaterEqual:[50,2,1,""],assertIn:[50,2,1,""],assertIs:[50,2,1,""],assertIsInstance:[50,2,1,""],assertIsNone:[50,2,1,""],assertIsNot:[50,2,1,""],assertIsNotNone:[50,2,1,""],assertLess:[50,2,1,""],assertLessEqual:[50,2,1,""],assertListEqual:[50,2,1,""],assertLogs:[50,2,1,""],assertMultiLineEqual:[50,2,1,""],assertNotAlmostEqual:[50,2,1,""],assertNotEqual:[50,2,1,""],assertNotIn:[50,2,1,""],assertNotIsInstance:[50,2,1,""],assertNotRegex:[50,2,1,""],assertRaises:[50,2,1,""],assertRaisesRegex:[50,2,1,""],assertRegex:[50,2,1,""],assertSequenceEqual:[50,2,1,""],assertSetEqual:[50,2,1,""],assertTrue:[50,2,1,""],assertTupleEqual:[50,2,1,""],assertWarns:[50,2,1,""],assertWarnsRegex:[50,2,1,""],debug:[50,2,1,""],doCleanups:[50,2,1,""],fail:[50,2,1,""],failureException:[50,4,1,""],setUp:[50,2,1,""],setUpClass:[50,2,1,""],shortDescription:[50,2,1,""],skipTest:[50,2,1,""],subTest:[50,2,1,""],tearDown:[50,2,1,""],tearDownClass:[50,2,1,""]},"mdp_playground.spaces.test_image_multi_discrete":{TestImageMultiDiscrete:[52,1,1,""]},"mdp_playground.spaces.test_image_multi_discrete.TestImageMultiDiscrete":{__init__:[52,2,1,""],addCleanup:[52,2,1,""],addTypeEqualityFunc:[52,2,1,""],assertAlmostEqual:[52,2,1,""],assertCountEqual:[52,2,1,""],assertDictContainsSubset:[52,2,1,""],assertEqual:[52,2,1,""],assertFalse:[52,2,1,""],assertGreater:[52,2,1,""],assertGreaterEqual:[52,2,1,""],assertIn:[52,2,1,""],assertIs:[52,2,1,""],assertIsInstance:[52,2,1,""],assertIsNone:[52,2,1,""],assertIsNot:[52,2,1,""],assertIsNotNone:[52,2,1,""],assertLess:[52,2,1,""],assertLessEqual:[52,2,1,""],assertListEqual:[52,2,1,""],assertLogs:[52,2,1,""],assertMultiLineEqual:[52,2,1,""],assertNotAlmostEqual:[52,2,1,""],assertNotEqual:[52,2,1,""],assertNotIn:[52,2,1,""],assertNotIsInstance:[52,2,1,""],assertNotRegex:[52,2,1,""],assertRaises:[52,2,1,""],assertRaisesRegex:[52,2,1,""],assertRegex:[52,2,1,""],assertSequenceEqual:[52,2,1,""],assertSetEqual:[52,2,1,""],assertTrue:[52,2,1,""],assertTupleEqual:[52,2,1,""],assertWarns:[52,2,1,""],assertWarnsRegex:[52,2,1,""],debug:[52,2,1,""],doCleanups:[52,2,1,""],fail:[52,2,1,""],failureException:[52,4,1,""],setUp:[52,2,1,""],setUpClass:[52,2,1,""],shortDescription:[52,2,1,""],skipTest:[52,2,1,""],subTest:[52,2,1,""],tearDown:[52,2,1,""],tearDownClass:[52,2,1,""]},"mdp_playground.spaces.tuple_extended":{TupleExtended:[54,1,1,""]},"mdp_playground.spaces.tuple_extended.TupleExtended":{__init__:[54,2,1,""],contains:[54,2,1,""],from_jsonable:[54,2,1,""],sample:[54,2,1,""],seed:[54,2,1,""],to_jsonable:[54,2,1,""]},mdp_playground:{analysis:[1,0,0,"-"],config_processor:[6,0,0,"-"],envs:[25,0,0,"-"],scripts:[34,0,0,"-"],spaces:[38,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","function","Python function"],"4":["py","attribute","Python attribute"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method","3":"py:function","4":"py:attribute"},terms:{"07750":31,"100":[44,46],"147":[50,52],"168572":32,"1909":31,"1st":[3,31],"2nd":31,"5th":3,"7204805":13,"7205107":13,"7th":3,"8th":3,"boolean":[31,40,42,44,46,48,54],"case":[27,31,50,52],"class":[2,3,26,27,30,31,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54],"default":[3,31,46,50,52],"final":31,"float":[3,27,31,33,46],"function":[4,5,7,11,27,28,30,31,35,50,52],"import":31,"int":[3,5,27,31,44,46],"long":31,"new":31,"return":[3,27,31,32,40,42,44,46,48,50,52,54],"super":[27,31],"switch":11,"true":[3,11,13,14,31,42,44,50,52],"while":3,And:[27,31],For:[29,31,46,50,52,55],NOT:[29,31,46],One:3,The:[3,27,29,31,44,46,50,52],__init__:[3,27,31,40,42,44,46,48,50,52,54],_actions_:31,_auc:3,_eval:3,_is_:31,_sequences_:31,_states_:31,_train:3,abl:[27,29,31],about:[50,52],abov:11,abs:31,absolut:31,accept:[27,31],access:31,accompani:31,accord:[31,40,44,46],accur:[3,27,40,42,54],achiev:[29,31],across:[3,31],action:[27,31],action_loss_weight:31,action_sequ:31,action_spac:31,action_space_dim:31,action_space_max:[29,31],action_space_s:31,actual:46,add:[31,50,52],addcleanup:[50,52],added:[31,50,52],addit:[31,50,52],addition:31,additon:31,addtypeequalityfunc:[50,52],after:[27,31,50,52],agent:[3,8,17,27,31,44],algorithm:[3,8,31],alia:[50,52],all:[27,31,46,50,52],allow:[3,16,31,48,50,52,54],almost:[50,52],along:[31,44,46],alphabet:46,alreadi:31,also:[27,31,50,52],alwai:31,amount:27,ani:[27,31,46],ansi:[27,31],anyth:[48,54],appli:[31,46],arg:[27,31,37,50,52],argument:[31,35,50,52],around:[12,31],arrai:[27,31,33,44],arxiv:31,assert:[50,52],assertalmostequ:[50,52],assertcountequ:[50,52],assertdictcontainssubset:[50,52],assertequ:[50,52],assertfals:[50,52],assertgreat:[50,52],assertgreaterequ:[50,52],asserti:[50,52],assertin:[50,52],assertionerror:[50,52],assertisinst:[50,52],assertisnon:[50,52],assertisnot:[50,52],assertisnotnon:[50,52],assertless:[50,52],assertlessequ:[50,52],assertlistequ:[50,52],assertlog:[50,52],assertmultilineequ:[50,52],assertnotalmostequ:[50,52],assertnotequ:[50,52],assertnotin:[50,52],assertnotisinst:[50,52],assertnotregex:[50,52],assertrais:[50,52],assertraisesregex:[50,52],assertregex:[50,52],assertsequenceequ:[50,52],assertsetequ:[50,52],asserttru:[50,52],asserttupleequ:[50,52],assertwarn:[50,52],assertwarnsregex:[50,52],associ:[3,31,44,46],assum:[3,31],atarienv:11,ataripreprocess:27,attribut:[27,29,31,50,52],augment:31,automat:[27,31,50,52,55],auxiliari:27,avail:31,axes:[3,5],axi:[44,46],bar:[3,50,52],bar_color:3,base:[3,13,27,29,31,32,40,42,44,46,48,50,52,54],base_class:29,basi:[50,52],basic:[31,50,52],batch:[40,42,44,46,48,54],becaus:[27,29,31],been:[46,50,52],befor:[31,50,52],begin:31,being:31,below:[27,31],between:[11,50,52],block:[50,52],blue:3,bodi:31,bool:[3,13,27],both:[29,31,50,52],bounded:[42,48,54],box:[31,40,44,46],calcul:31,call:[27,31,50,52],callabl:[50,52],can:[27,31,42,46,48,50,52,54],cannot:[27,31],captur:31,care:31,categor:[31,46,48],caught:[50,52],centr:[31,46],chang:[29,31],chart:[3,5],check:[46,50,52],children:[50,52],choos:31,circl:[5,44,46],circle_radiu:[44,46],classmethod:[50,52],cleanup:[27,31,50,52],close:[27,31],cls:[50,52],code:[31,50,52,55],coeffici:31,collect:[27,31,50,52],color:[3,27,31],colour:3,column:3,columns_to_writ:19,com:[13,32],comma:46,common:31,compar:[50,52],comparison:[50,52],complet:[27,31,50,52],compon:31,concaten:[44,46],config:[10,11,12,14,22,27,29,31,35],config_algorithm:23,config_dict:9,config_fil:21,config_num:[21,22],config_typ:17,configspac:17,configur:[3,16,31,35],consecut:31,consid:[31,50,52],consumpt:[27,31],contain:[27,31,40,42,44,46,48,50,52,54,55],context:[50,52],continu:[31,44],continuous_ob:44,control:31,convent:[27,31],convert:[33,40,42,44,46,48,54],convert_to_pixel:44,coordin:[40,44,46],core:[27,31],correctli:31,correspond:[27,31,44,46,50,52],count:48,counter:[50,52],creat:[5,12,31,40,44,46,50,52],create_gym_env_wrapper_atari:11,criterion:31,csv:3,current:[17,27,29,31,48,54],curv:3,cust_path:46,custom:[31,46],data:[3,40,42,44,46,48,50,52,54],datatyp:[50,52],debug:[27,50,52],decid:31,decim:[50,52],deconstruct:[50,52],deem:[50,52],def:[27,31],defin:[31,32],delai:[27,31],delta:[50,52],dens:31,denser:31,depend:[31,50,52],deriv:31,describ:3,descript:[31,50,52],desir:31,detail:[3,31],determin:[31,50,52],determinist:31,dev:3,deviat:[3,31],diagnost:27,diamet:31,dict:[3,8,13,16,17,27,29,31],dictionari:[3,13,50,52],differ:[3,31,50,52],difficulti:31,digit:[50,52],dim:3,dimens:[3,27,29,31,46],dimension:[31,32],dir_nam:3,direct:31,directli:31,directori:46,discret:[27,31,42,46],discretis:31,displai:[3,27,31],distanc:[31,32],distrbut:31,distribut:[31,40,44,46],do_someth:[50,52],doc:55,docblock:55,docleanup:[50,52],docstr:[50,52],document:[27,31],doe:[50,52],doesn:[27,31,48,54],don:31,done:[27,29,31],doubl:31,drawn:46,dtype:[40,44,46],ducktyp:[50,52],durat:31,dynam:[27,31],each:[8,16,17,31,40,44,46,48],edg:31,effect:[31,50,52],either:[3,31],element:[8,42,48,50,52,54],elif:[27,31],els:[13,27,31],emit:[50,52],emul:31,enclos:[50,52],encod:17,end:[3,27,31,50,52],enforc:[50,52],enough:31,ensur:31,env:[8,17],env_rng:31,enviro:31,environ:[3,27,29,31,44],episod:[3,27,31],episode_len_mean:3,episode_reward_mean:3,equal:[31,50,52],equival:31,error:[11,50,52],error_cod:[50,52],escap:[27,31],etc:31,eval_curv:3,eval_stat:3,evalu:[3,31],even:[50,52],everi:[3,31],exactli:[50,52],exampl:[27,31,50,52],except:[13,27,31,48,50,52,54],execut:[31,50,52],exercis:[50,52],exit:[27,31],exp_nam:3,exp_typ:3,expect:[50,52],expected_except:[50,52],expected_regex:[50,52],expected_warn:[50,52],experi:[3,35],explanatori:31,explicitli:31,exponenti:[40,44,46],expr1:[50,52],expr2:[50,52],expr:[50,52],express:[50,52],extend:31,extern:[31,44,46],extra:[50,52],fail:[50,52],failur:[50,52],failureexcept:[50,52],fals:[3,31,50,52],fault:3,featur:[3,44],feature_spac:44,file:[3,31,35],filenam:[3,50,52],filter:[50,52],fine:31,first:[50,52],fix:[17,31],fixtur:[50,52],flag:3,flexibl:31,flip:[31,46],float32:40,focu:31,follow:[3,31],foo:[50,52],form:[3,40,44,46],format:[50,52],found:[27,31,50,52],fraction:31,frame:[5,27,31],frame_skip:[11,29],framestack:11,framework:[8,20,21],framework_dir:[21,22],frequenc:3,from:[3,27,29,31,32,40,42,44,46,48,50,52,54,55],from_json:[40,42,44,46,48,54],full:31,further:[27,31,50,52],galleri:5,garbag:[27,31],gener:[31,40,44,46,55],generate_imag:44,generate_random_mdp:31,get:[3,31,44,46],get_augmented_st:31,get_concatenated_imag:[44,46],get_exp_data:3,get_sobol_config:17,getlogg:[50,52],give:[50,52],given:[3,31,44,46,50,52],grain:31,graph:31,grid:[3,16,31],grid_shap:[31,44],group:3,gym:[27,29,31,40,42,44,46,48,54],gymenvwrapp:[11,12],hacky_timesteps_tot:23,hand:31,handl:[31,50,52],has:[27,31,50,52],have:[31,46,50,52],heatmap:3,height:[44,46],held:[27,31],help:[3,27,40,42,54],here:31,high:40,higher:[50,52],hold:31,hook:[50,52],how:[3,13,31],howev:31,hrl:31,html:5,http:[5,13,31,32],human:[27,31],hypercub:31,identifi:[50,52],imag:[27,31,44,46],image_represent:31,image_transform:31,imagecontinu:31,imagemultidiscret:31,imaginari:31,imaginary_rollout:31,immedi:[31,50,52],implement:[27,31,50,52],impli:31,includ:[27,31,50,52],independ:31,index:[50,52],individu:31,inertia:31,info:[27,31,50,52],inform:[27,31,50,52],init_init_state_dist:31,init_reward_funct:31,init_state_dist:31,init_terminal_st:31,init_transition_funct:31,initi:[3,27,31,40,42,54],initialis:[27,31],inject:29,inscrib:46,insert:[3,31],insid:[11,31,40,44,46],inspect:[50,52],instanc:[3,27,31,50,52],instanti:31,instead:[31,50,52],int64:[27,31],integ:29,integr:[29,31],intend:31,intent:31,interpret:31,interv:[31,40,44,46],intrins:31,invok:[50,52],irrelev:31,irrelevant_featur:31,isinst:[50,52],item:[50,52],its:[27,29,31,50,52],jsonabl:[40,42,44,46,48,54],just:[27,31,50,52],keep:[11,50,52],kei:[3,27,31],keyword:[50,52],kwarg:[18,50,52],lambda:31,last:[3,31],lead:31,leaf:[16,17],learn:[3,27],len:31,length:[3,31,44,46,50,52],less:[50,52],level:[31,50,52],lifo:[50,52],like:[50,52],line:[3,32,50,52],lineno:[50,52],lis:33,list1:[50,52],list2:[50,52],list:[3,8,16,27,31,33,44,46,50,52],list_exp_data:3,load:[3,46],load_data:3,load_ev:3,locat:[3,31],log:[31,50,52],log_filenam:31,log_level:[21,22,31],logger:[50,52],logger_nam:[50,52],logrecord:[50,52],look:[3,31],low:40,made:[44,46],magnitud:31,mai:[31,44,46],maintain:31,make:[27,31],make_dens:31,manag:[50,52],manhattan:31,mani:31,manner:3,manual:11,map:[31,44,46],mark:[50,52],markovian:31,match:[50,52],matplotlib:[3,5],matrix:31,max:[31,42],max_scal:[31,46],maximally_connect:31,mdp:[3,27,29,31,35],mean:3,measur:[50,52],member:[31,40,42,44,46,48,50,52,54],merg:13,messag:[50,52],meta:3,metadata:[27,31],method:[3,27,31,40,42,44,46,48,50,52,54],methodnam:[50,52],metric:3,metric_num:3,might:[50,52],min_scal:[31,46],mode:[16,27,31],model:[8,17,31],modifi:[27,29],modul:[0,1,6,25,34,38],more:[3,31,50,52],most:[50,52],mostli:31,move:31,move_along_a_lin:31,move_to_a_point:31,msg:[50,52],mujoco:29,mujocoenvwrapp:12,multi:[46,50,52],multi_discret:48,multi_discrete_st:46,multidiscret:[46,48],multipl:[3,16,31,46],multipli:[29,31],must:[31,50,52],myenv:[27,31],name:[3,31,35,50,52],ndarrai:[3,27,31],necessari:[27,31],need:[29,31,46,50,52],neg:[40,44,46],newlin:[27,31],next:31,nicer:[50,52],nois:[27,31],noisi:31,non:[27,31,42,48,54],none:[13,16,27,31,40,42,44,46,48,50,52,54],norm:31,normal:[31,40,44,46,50,52],note:[27,31,50,52],noth:[27,31],now:[31,55],np_random:[27,31],nth:31,num_config:[16,17,24],num_metr:3,num_var:5,number:[3,5,31,35,46,50,52],numer:[29,31,46],numpi:[27,31,33,40,44,46],nvec:48,obj:[50,52],object:[3,27,31,46,50,52],obs:44,observ:[27,31,44,46],observation_spac:31,obtain:31,occur:[50,52],omit:[50,52],onc:[50,52],one:[27,31,50,52],onli:[31,46,50,52,55],openai:[27,31],oper:[50,52],optim:[50,52],option:[3,16,31,35,50,52],order:[31,46,50,52],org:[5,31],other:[31,50,52],otherwis:3,out:[31,50,52],output:[50,52],over:31,overlap:31,overrid:[27,31],overwrit:[13,14],own:[31,50,52],pair:3,paper:31,param:[50,52],paramet:[3,5,27,31,44,46,50,52],parameteris:31,part:31,partial:31,partit:31,pass:[29,31],past:31,path:13,pattern:[50,52],pdf:3,penalis:31,per:[3,27,31],perform:[27,31],pixel:[27,31],place:[3,46,50,52],plai:31,plan:31,playground:[3,27,29,31,35],pleas:31,plot:3,plot_1d_dimens:3,plot_2d_heatmap:3,plot_bar:3,plot_learning_curv:3,plot_radar:3,plot_typ:3,point:[31,32,44],polygon:[5,31,46],pop:[27,31],posit:[44,50,52],possibl:[16,31],predefin:31,presenc:46,present:[31,46],previou:27,print:[50,52],prng:[40,42,44,46,48,54],prob:42,probabl:31,process:31,program:[27,31],project:5,properti:[27,31],provid:[27,31,50,52],pta:32,ptb:32,purpos:[50,52],python:[31,50,52],quantis:[31,46],question:[13,32],radar:[3,5],radarax:5,radiu:[44,46],rai:[8,20,21,27],rais:[13,27,31,50,52],random:[3,31,40,44,46],randomli:[31,42,46,48,54],randomst:31,rang:31,reach:[27,31],readabl:46,real:[31,46],reason:[50,52],recommend:[27,31,46],record:[3,31,50,52],reduc:11,refer:[3,5,50,52],regardless:[31,50,52],regex:[50,52],regexp:[50,52],region:31,regist:[5,50,52],regular:[50,52],relat:3,relev:[31,44],relevant_indic:[31,44],remain:31,render:[27,31],repeat:31,repeats_in_sequ:31,replac:42,replic:31,repres:[3,27,31,44,46],represent:[27,31,44,46],reproduc:31,requir:31,resampl:31,research:31,reset:[27,31],respons:[27,31],result:27,resum:[50,52],reward:[3,27,31],reward_dens:31,reward_dist:31,reward_every_n_step:31,reward_funct:31,reward_nois:[3,31],reward_scal:31,reward_sequence_dict:31,reward_shift:31,rewardable_sequ:31,rgb:[27,31],rgb_arrai:[27,31],rho_0:31,rigid:31,rl_toy_env:27,rllib:27,rltoyenv:29,rng:[27,31],ro_quant:[31,46],role:31,rollout:31,root:[50,52],rotat:[31,46],round:[50,52],row:3,rule:[50,52],run:[3,27,35,50,52],runtest:[50,52],sai:[3,31],same:[11,31,46,50,52],sampl:[31,40,42,44,46,48,54],sample_freq:3,sample_n:[40,42,44,46,48,54],save:3,save_fig:3,scalar:29,scale:[31,46],scale_rang:[31,46],second:[31,50,52],see:[3,27,31,40,42,54],seed:[3,27,31,40,42,44,46,48,54],select:[3,31],self:[3,27,31,40,42,50,52,54],separ:46,seq1:[50,52],seq2:[50,52],seq_typ:[50,52],sequenc:[27,31,50,52],sequence_length:31,set1:[50,52],set2:[50,52],set:[3,11,27,31,46,50,52],setup:[50,52],setupclass:[50,52],sh_quant:[31,46],shape:[5,27,31,40],shift:[31,40,44,46],shortdescript:[50,52],shortest:32,should:[11,31,50,52],show:3,side:[31,46],signatur:[3,27,40,42,54],signific:[50,52],silenc:[50,52],similar:[27,31,50,52],similarli:[50,52],simpler:31,simul:31,sinc:[31,46],singl:[3,31,40,44,46],size:[31,42,46],skip:[50,52],skiptest:[50,52],softwareengin:32,some:[27,31],some_attribut:[50,52],someexcept:[50,52],sometim:27,somewarn:[50,52],sourc:[3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,27,29,31,32,33,36,37,40,42,44,46,48,50,52,54],space:31,spars:31,special:[48,54],specialty_plot:5,specif:[3,31,50,52],specifi:[31,40,42,44,46,48,50,52,54],specifii:46,spider:3,sqrt:46,squar:46,stackexchang:32,stackoverflow:13,standard:31,start:31,stat:3,state:[27,31,46],state_sequ:31,state_space_dim:31,state_space_max:31,state_space_s:[31,46],state_space_typ:31,static_config:8,stats_data:3,stats_file_nam:19,stats_file_prefix:[21,23],std:3,step:[27,31],stitch:[44,46],str:[3,27,31,46],string:[3,17,27,31,46,50,52],stringio:[27,31],structur:8,style:[27,31,50,52],sub:[3,31,44,46],subclass:[27,31,50,52],subsampl:3,subset:[50,52],subtest:[50,52],subtract:31,success:[50,52],suffer:[50,52],suitabl:[27,31],superset:[50,52],support:[27,29,31,50,52],sure:[27,31],surround:5,symmetri:[50,52],system:31,take:[3,16,31,35,50,52],taken:31,target:[31,44],target_point:[31,44],target_radiu:31,teardown:[50,52],teardownclass:[50,52],tensor:3,term_spac:44,term_state_edg:31,term_state_reward:31,termin:[27,31,44],terminal_st:31,terminal_state_dens:31,test:[50,52],testcas:[50,52],testresult:[50,52],text:[27,31,50,52],textur:46,than:[3,50,52],the_except:[50,52],the_warn:[50,52],thei:[31,46,50,52],them:[31,46],themselv:[27,31],therefor:11,thi:[3,5,11,17,27,31,40,42,44,46,48,50,52,54,55],threshold:3,thu:[29,31],time:[31,50,52],time_unit:[29,31],timestep:[27,29,31],timesteps_tot:3,tmp:21,to_json:[40,42,44,46,48,54],todo:[17,31],togeth:[44,46],toi:31,toler:3,too:31,toward:31,train:3,train_curv:3,train_stat:3,transform:[31,46],transit:[27,31],transition_dynamics_ord:31,transition_funct:31,transition_nois:31,tri:3,trigger:[50,52],tupl:[17,27,31,44,46,50,52,54],tuple1:[50,52],tuple2:[50,52],turn:[27,31],two:[50,52],type:[3,27,31,40,42,44,46,48,50,52,54],typeobj:[50,52],uint8:[44,46],undefin:27,under:31,underli:[31,46],unequ:[50,52],unexpect:[50,52],unexpected_regex:[50,52],uniform:[31,40,42,44,46,48,54],uniformli:31,uniqu:3,unittest:[50,52],unless:[50,52],unlik:[50,52],unord:[50,52],until:31,unwrap:[27,31],use:[27,31,50,52],use_auc:3,use_custom_imag:46,use_custom_mdp:31,used:[3,29,31,44,46,50,52],useful:[50,52],user:31,uses:[31,50,52],using:[3,11,31],usual:[27,31,50,52],util:[3,27,31],valid:[40,42,44,46,48,50,52,54],valu:[3,13,16,17,27,29,31,46,50,52],valueerror:[50,52],var_config:[15,16,17,24],vari:[27,31],variabl:[5,31,48],variable_configs_deepcopi:23,variou:[3,31],varying_config:8,vector:48,verifi:[50,52],version:31,video:[27,31],visibl:31,want:31,warn:[3,13,31,50,52],warnclass:[50,52],weight:3,well:31,were:3,what:31,when:[3,11,27,31,46,50,52],whenev:[31,46],where:[3,31],whether:[3,27,31,50,52],which:[17,27,31,44,46,50,52],whose:[50,52],width:[44,46],window:[27,31],within:[44,46],without:[50,52],word:31,would:[29,31,46],wrap:[11,27,29,31],wrap_deepmind:27,wrap_deepmind_rai:11,wrapped_mujoco_env:12,written:[3,31],wrt:31,xml:29,yield:[50,52],you:[27,31,50,52],your:[27,31],zero:[50,52]},titles:["mdp_playground","mdp_playground.analysis","mdp_playground.analysis.analysis","mdp_playground.analysis.analysis.MDPP_Analysis","mdp_playground.analysis.radar_chart","mdp_playground.analysis.radar_chart.radar_factory","mdp_playground.config_processor","mdp_playground.config_processor.config_processor","mdp_playground.config_processor.config_processor.combined_processing","mdp_playground.config_processor.config_processor.create_config_space_from_config_dict","mdp_playground.config_processor.config_processor.create_gym_env_wrapper_atari","mdp_playground.config_processor.config_processor.create_gym_env_wrapper_frame_stack_atari","mdp_playground.config_processor.config_processor.create_gym_env_wrapper_mujoco_wrapper","mdp_playground.config_processor.config_processor.deepmerge","mdp_playground.config_processor.config_processor.deepmerge_multiple_dicts","mdp_playground.config_processor.config_processor.get_grid_of_configs","mdp_playground.config_processor.config_processor.get_list_of_varying_configs","mdp_playground.config_processor.config_processor.get_random_configs","mdp_playground.config_processor.config_processor.init_ray","mdp_playground.config_processor.config_processor.init_stats_file","mdp_playground.config_processor.config_processor.post_processing","mdp_playground.config_processor.config_processor.process_configs","mdp_playground.config_processor.config_processor.setup_ray","mdp_playground.config_processor.config_processor.setup_ray_callbacks","mdp_playground.config_processor.config_processor.sobol_configs_from_config_dict","mdp_playground.envs","mdp_playground.envs.gym_env_wrapper","mdp_playground.envs.gym_env_wrapper.GymEnvWrapper","mdp_playground.envs.mujoco_env_wrapper","mdp_playground.envs.mujoco_env_wrapper.get_mujoco_wrapper","mdp_playground.envs.rl_toy_env","mdp_playground.envs.rl_toy_env.RLToyEnv","mdp_playground.envs.rl_toy_env.dist_of_pt_from_line","mdp_playground.envs.rl_toy_env.list_to_float_np_array","mdp_playground.scripts","mdp_playground.scripts.run_experiments","mdp_playground.scripts.run_experiments.cli","mdp_playground.scripts.run_experiments.main","mdp_playground.spaces","mdp_playground.spaces.box_extended","mdp_playground.spaces.box_extended.BoxExtended","mdp_playground.spaces.discrete_extended","mdp_playground.spaces.discrete_extended.DiscreteExtended","mdp_playground.spaces.image_continuous","mdp_playground.spaces.image_continuous.ImageContinuous","mdp_playground.spaces.image_multi_discrete","mdp_playground.spaces.image_multi_discrete.ImageMultiDiscrete","mdp_playground.spaces.multi_discrete_extended","mdp_playground.spaces.multi_discrete_extended.MultiDiscreteExtended","mdp_playground.spaces.test_image_continuous","mdp_playground.spaces.test_image_continuous.TestImageContinuous","mdp_playground.spaces.test_image_multi_discrete","mdp_playground.spaces.test_image_multi_discrete.TestImageMultiDiscrete","mdp_playground.spaces.tuple_extended","mdp_playground.spaces.tuple_extended.TupleExtended","Welcome to MDPP\u2019s documentation!"],titleterms:{analysi:[1,2,3,4,5],box_extend:[39,40],boxextend:40,cli:36,combined_process:8,config_processor:[6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24],create_config_space_from_config_dict:9,create_gym_env_wrapper_atari:10,create_gym_env_wrapper_frame_stack_atari:11,create_gym_env_wrapper_mujoco_wrapp:12,deepmerg:13,deepmerge_multiple_dict:14,discrete_extend:[41,42],discreteextend:42,dist_of_pt_from_lin:32,document:55,env:[25,26,27,28,29,30,31,32,33],get_grid_of_config:15,get_list_of_varying_config:16,get_mujoco_wrapp:29,get_random_config:17,gym_env_wrapp:[26,27],gymenvwrapp:27,image_continu:[43,44],image_multi_discret:[45,46],imagecontinu:44,imagemultidiscret:46,init_rai:18,init_stats_fil:19,list_to_float_np_arrai:33,main:37,mdp_playground:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54],mdpp:55,mdpp_analysi:3,mujoco_env_wrapp:[28,29],multi_discrete_extend:[47,48],multidiscreteextend:48,post_process:20,process_config:21,radar_chart:[4,5],radar_factori:5,rl_toy_env:[30,31,32,33],rltoyenv:31,run_experi:[35,36,37],script:[34,35,36,37],setup_rai:22,setup_ray_callback:23,sobol_configs_from_config_dict:24,space:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54],test_image_continu:[49,50],test_image_multi_discret:[51,52],testimagecontinu:50,testimagemultidiscret:52,tuple_extend:[53,54],tupleextend:54,welcom:55}}) \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 4a9511c..9ec877e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -38,7 +38,8 @@ "sphinx.ext.coverage", "sphinx.ext.viewcode", "sphinx.ext.autosummary", -] + "sphinxarg.ext", + ] napoleon_google_docstring = False napoleon_numpy_docstring = True diff --git a/docs/index.rst b/docs/index.rst index 3286cdd..4bf8088 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,7 +1,7 @@ Welcome to MDPP's documentation! ================================== -For now, this only contains docs automatically generated from the code's docblocks. +You can click through the tree on the left for MDPP's API reference. See below for how to call MDPP from the command line. .. autosummary:: :toctree: _autosummary @@ -9,3 +9,11 @@ For now, this only contains docs automatically generated from the code's docbloc :recursive: mdp_playground + +CLI Reference +*********************** + +.. argparse:: + :module: mdp_playground.scripts.run_experiments + :func: generate_parser + :prog: run-mdpp-experiments diff --git a/mdp_playground/analysis/analysis.py b/mdp_playground/analysis/analysis.py index 902bfaf..f2453b0 100644 --- a/mdp_playground/analysis/analysis.py +++ b/mdp_playground/analysis/analysis.py @@ -148,9 +148,9 @@ def join_files(file_prefix, file_suffix): # print("Unique line count values:", np.unique(num_diff_lines)) if i == 0: raise FileNotFoundError( - "No files to combine were present. Please check your location and/or filenames that they are correct. Filename passed: " + - file_prefix + - file_suffix) + "No files to combine were present. Please check your location and/or filenames that they are correct. Filename passed: " + + file_prefix + + file_suffix) join_files(stats_file, ".csv") join_files(stats_file, "_eval.csv") @@ -163,14 +163,16 @@ def join_files(file_prefix, file_suffix): if line_count < train_mean_cnt * (1 - threshold): warnings.warn( "Expected a minimum of {0} rows in each stats file. Got only: {1} in file: {2}".format( - train_mean_cnt * (1 - threshold), line_count, file_name + train_mean_cnt + * (1 - threshold), line_count, file_name ) ) for file_name, line_count in eval_data.items(): if line_count < eval_mean_cnt * (1 - threshold): warnings.warn( "Expected a minimum of {0} rows in each stats file. Got only: {1} in file: {2}".format( - eval_mean_cnt * (1 - threshold), line_count, file_name + eval_mean_cnt + * (1 - threshold), line_count, file_name ) ) @@ -250,7 +252,8 @@ def join_files(file_prefix, file_suffix): ] # last vals are timesteps_total, episode_reward_mean, episode_len_mean train_stats = np.reshape(np.array(train_stats), config_counts) elif exp_type == "random": - train_stats = stats_end_of_training # Includes config values within dataframe as opposed to only perf. metrics for the grid case above + # Includes config values within dataframe as opposed to only perf. metrics for the grid case above + train_stats = stats_end_of_training # train_stats = stats_end_of_training.iloc[:, -num_metrics:] # Saves space # by not including config values. # last vals are timesteps_total, # episode_reward_mean, episode_len_mean ### TODO remove @@ -328,7 +331,8 @@ def join_files(file_prefix, file_suffix): # eval episodes is less than 10. final_10_evals = [] for i in range(len(hack_indices)): - final_10_evals.append(eval_stats[hack_indices_10[i]: hack_indices[i]]) + final_10_evals.append( + eval_stats[hack_indices_10[i]: hack_indices[i]]) # print(final_10_evals[-1]) if ray_0_9_0: # hack final_10_evals.append( @@ -348,7 +352,8 @@ def join_files(file_prefix, file_suffix): ) # this is mean over last 10 eval episodes # subsampling code - eval_stats_indices = np.arange(0, mean_data_eval.shape[0], step=sample_freq) + eval_stats_indices = np.arange( + 0, mean_data_eval.shape[0], step=sample_freq) mean_data_eval = mean_data_eval[eval_stats_indices] # Adds timesteps_total column to the eval stats which did not have them: @@ -373,13 +378,15 @@ def join_files(file_prefix, file_suffix): eval_stats = final_eval_metrics_ eval_stats = np.concatenate( ( - np.atleast_2d(np.array(train_stats.iloc[:, :-num_metrics])), + np.atleast_2d( + np.array(train_stats.iloc[:, :-num_metrics])), eval_stats, ), axis=1, ) # Includes config values within dataframe as opposed to only perf. metrics for the grid case above - eval_stats = pd.DataFrame(eval_stats, columns=train_stats.columns) + eval_stats = pd.DataFrame( + eval_stats, columns=train_stats.columns) print("eval stats shape:", eval_stats.shape) @@ -572,7 +579,8 @@ def gather_stats(self, list_exp_data, train, metric_num, plot_type, use_aucs): # the slice sub-selects the metric written in position metric_num from the # "last axis of diff. metrics that were written" and then the axis of # #seeds becomes axis=-1 ( before slice it was -2). - mean_data_ = np.mean(stats[..., metric_num], axis=exp_data["seed_idx"]) + mean_data_ = np.mean( + stats[..., metric_num], axis=exp_data["seed_idx"]) to_plot_ = np.squeeze(mean_data_) # #hack transpose the array and choose first column elements always @@ -582,17 +590,20 @@ def gather_stats(self, list_exp_data, train, metric_num, plot_type, use_aucs): new_axes = [ axes[(i - (idx + idx_2)) % len(axes)] for i, x in enumerate(axes) ] # ##TODO this will cause a bug for >2 dims used. - to_plot_ = np.transpose(to_plot_, tuple(new_axes))[:, 0] + to_plot_ = np.transpose( + to_plot_, tuple(new_axes))[:, 0] stats_data[group_key][sub_group_key]["to_plot_"] = to_plot_ std_dev_ = np.std( - np.array(stats)[..., metric_num], axis=exp_data["seed_idx"] + np.array( + stats)[..., metric_num], axis=exp_data["seed_idx"] ) # seed to_plot_std_ = np.squeeze(std_dev_) # HACK traspose the array and choose first column elements always if len(to_plot_std_.shape) > 1: - to_plot_std_ = np.transpose(to_plot_std_, tuple(new_axes))[:, 0] + to_plot_std_ = np.transpose( + to_plot_std_, tuple(new_axes))[:, 0] stats_data[group_key][sub_group_key]["to_plot_std_"] = to_plot_std_ stats_data[group_key][sub_group_key]["labels"] = sub_group_key @@ -604,7 +615,7 @@ def gather_stats(self, list_exp_data, train, metric_num, plot_type, use_aucs): # print(exp_data["axis_labels"]) stats_data[group_key][sub_group_key]["axis_labels"] = exp_data[ "axis_labels" - ][idx + idx_2] # sub_group_keys + ][idx + idx_2] # sub_group_keys # print(stats_data[group_key][sub_group_key]["tick_labels"], stats_data[group_key][sub_group_key]["axis_labels"]) stats_data[group_key][sub_group_key]["metric_names"] = exp_data[ "metric_names" @@ -655,7 +666,8 @@ def plot_1d_dimensions( (len(stats_data[group_key].keys()) / cols) ) # dynamically compute - plt.rcParams.update({"font.size": 18}) # #default 12, for poster: 30 + # #default 12, for poster: 30 + plt.rcParams.update({"font.size": 18}) plt.rcParams["figure.figsize"] = [7 * cols, 5 * rows] figure, axes = plt.subplots(nrows=rows, ncols=cols) @@ -723,12 +735,14 @@ def plot_1d_dimensions( figure.tight_layout(pad=1.0) # #title - figure.suptitle(group_key, x=0.1, y=1.1, fontsize=36, fontweight="bold") + figure.suptitle(group_key, x=0.1, y=1.1, + fontsize=36, fontweight="bold") # save figure if save_fig: fig_name = (( - stats_data[group_key][sub_group_key]["stats_file"].split("/")[-1] + stats_data[group_key][sub_group_key]["stats_file"].split( + "/")[-1] + ("_train" if train else "_eval") + ("_aucs" if use_aucs else "") + "_final_reward_" @@ -926,7 +940,8 @@ def plot_learning_curves( exp_data = list_exp_data[ 0 ] # TODO make changes to handle multiple experiments plot - warnings.warn("We currently plot only 1st expt.'s data for the following learning curve plots") + warnings.warn( + "We currently plot only 1st expt.'s data for the following learning curve plots") else: return @@ -953,7 +968,8 @@ def plot_learning_curves( # print(ax, type(ax), type(ax[0])) # color_cycle = plt.rcParams['axes.prop_cycle'].by_key()['color'] # print("color_cycle", color_cycle) - plt.rcParams.update({"font.size": 25}) # 25 for 36x21 fig, 16 for 24x14 fig. + # 25 for 36x21 fig, 16 for 24x14 fig. + plt.rcParams.update({"font.size": 25}) # 36x21 for better resolution but about 900kb file size, 24x14 for okay resolution and 550kb file size fig, ax = plt.subplots( nrows=nrows_, ncols=ncols_, figsize=(7 * ncols_, 5 * nrows_) @@ -1004,7 +1020,8 @@ def plot_learning_curves( + " " + str(dims_values[dims_varied[1]][j_index]) ) - ax[i_index][j_index].set_title(title_1st_dim + ", " + title_2nd_dim) + ax[i_index][j_index].set_title( + title_1st_dim + ", " + title_2nd_dim) else: title_1st_dim = ( config_names[dims_varied[0]] @@ -1093,7 +1110,8 @@ def plot_radar( for sub_group_key in stats_data[group_key].keys(): data = stats_data[group_key][sub_group_key]["to_plot_"] if sub_group_key in weights: - d.append(np.average(data, axis=0, weights=weights[sub_group_key])) + d.append(np.average(data, axis=0, + weights=weights[sub_group_key])) else: d.append(np.average(data)) @@ -1107,18 +1125,21 @@ def plot_radar( plt.yticks(color="black", fontsize=10) labels = stats_data.keys() - legend = ax.legend(labels, loc=(0.9, 0.95), labelspacing=0.1, fontsize=12) + legend = ax.legend(labels, loc=(0.9, 0.95), + labelspacing=0.1, fontsize=12) # save figure if save_fig: fig_name = (( - stats_data[group_key][sub_group_key]["stats_file"].split("/")[-1] + stats_data[group_key][sub_group_key]["stats_file"].split( + "/")[-1] + ("_train" if train else "_eval") + ("_aucs" if use_aucs else "") + "_final_reward_" + stats_data[group_key][sub_group_key]["axis_labels"]).replace(" ", "_") + "_" - + str(stats_data[group_key][sub_group_key]["metric_names"][metric_num]) + + str(stats_data[group_key][sub_group_key] + ["metric_names"][metric_num]) + "_spider.pdf" ) plt.savefig(fig_name, dpi=300, bbox_inches="tight") diff --git a/mdp_playground/config_processor/config_processor.py b/mdp_playground/config_processor/config_processor.py index 0f7eb41..848596f 100644 --- a/mdp_playground/config_processor/config_processor.py +++ b/mdp_playground/config_processor/config_processor.py @@ -1,6 +1,7 @@ from functools import reduce from ray.rllib.models import ModelCatalog from ray.rllib.models.preprocessors import OneHotPreprocessor +import logging import warnings import numpy as np from mdp_playground.envs import RLToyEnv @@ -15,6 +16,8 @@ "HopperWrapper-v3", "PusherWrapper-v2", "ReacherWrapper-v2", + "Walker2dWrapper-v3", + "HumanoidWrapper-v3" ] @@ -25,6 +28,21 @@ # object_store_memory=int(2e9), # redis_max_memory=int(1e9), local_mode=False): def init_ray(**kwargs): + """ + Initialize Ray with the given kwargs and returns session info. + As Ray's API has changed for versions >= 1.0, rename some kwargs to their + new name. + + Parameters + ---------- + **kwargs : + Kwargs passed to ray.init. + + Returns + ------- + dict + Session info returned by ray.init. + """ import ray if ray.__version__[0] == "1": # new version 1.0 API @@ -48,7 +66,21 @@ def init_ray(**kwargs): del kwargs["log_level"] kwargs["logging_level"] = value - ray.init(**kwargs) + # kwargs = {**kwargs, + # "_memory": 2e8, + # "include_dashboard": True, + # "dashboard_host": "0.0.0.0"} + + logging.info("Init ray with args {}".format(str(kwargs))) + + session_info = ray.init(**kwargs) + + # resources = ray.cluster_resources() + # print(resources) + # ava_reso = ray.available_resources() + # print(ava_reso) + + return session_info def process_configs( @@ -58,6 +90,7 @@ def process_configs( log_level, framework="ray", framework_dir="/tmp/ray", + init_ray=True, ): config_file_path = os.path.abspath("/".join(config_file.split("/")[:-1])) @@ -111,7 +144,8 @@ def process_configs( # print("VARYING_CONFIGS:", varying_configs) num_configs_ = max( - [len(separate_var_configs[i]) for i in range(len(separate_var_configs))] + [len(separate_var_configs[i]) + for i in range(len(separate_var_configs))] ) for i in range(num_configs_): to_combine = [ @@ -119,7 +153,8 @@ def process_configs( ] # overwrite = False because the keys in different modes of # config generation need to be disjoint - varying_configs.append(deepmerge_multiple_dicts(*to_combine, overwrite=False)) + varying_configs.append(deepmerge_multiple_dicts( + *to_combine, overwrite=False)) # #hack ####TODO Remove extra pre-processing done here and again below: pre_final_configs = combined_processing( @@ -132,7 +167,6 @@ def process_configs( algorithm=config.algorithm, ) - if "timesteps_total" in dir(config): hacky_timesteps_total = config.timesteps_total # hack else: @@ -154,7 +188,9 @@ def process_configs( if framework.lower() == "ray": from ray import tune - setup_ray(config, config_num, log_level, framework_dir) + if init_ray: + setup_ray(config, config_num, log_level, + framework_dir) on_train_result, on_episode_end = setup_ray_callbacks( stats_file_prefix, variable_configs_deepcopy, @@ -186,7 +222,6 @@ def process_configs( + ". Available options are: ray and stable_baselines." ) - # varying_configs is a list of dict of dicts with a specific structure. final_configs = combined_processing( default_config, @@ -202,42 +237,34 @@ def process_configs( return config, final_configs -def setup_ray(config, config_num, log_level, framework_dir): - tmp_dir = framework_dir + "/tmp_" + str(config_num) - # import ray - if config.algorithm == "DQN": # hack - init_ray(log_level=log_level, tmp_dir=tmp_dir) - # ray.init(object_store_memory=int(2e9), redis_max_memory=int(1e9), - # temp_dir=tmp_dir, - # logging_level=log_level, - # # local_mode=True, - # # webui_host='0.0.0.0'); logging_level=logging.INFO, - # ) - # ray.init(object_store_memory=int(2e9), redis_max_memory=int(1e9), - # local_mode=True, plasma_directory='/tmp') #, memory=int(8e9), - # local_mode=True # local_mode (bool): If true, the code will be executed - # serially. This is useful for debugging. # when true on_train_result and - # on_episode_end operate in the same current directory as the script. A3C - # is crashing in local mode, so didn't use it and had to work around by - # giving full path + filename in stats_file_name.; also has argument - # driver_object_store_memory=, plasma_directory='/tmp' - elif config.algorithm == "A3C": # hack - init_ray(log_level=log_level, tmp_dir=tmp_dir) - # ray.init(object_store_memory=int(2e9), redis_max_memory=int(1e9), - # temp_dir=tmp_dir, - # logging_level=log_level, - # # local_mode=True, - # # webui_host='0.0.0.0'); logging_level=logging.INFO, - # ) # ray.init(object_store_memory=int(2e9), redis_max_memory=int(1e9), local_mode=True, plasma_directory='/tmp') - else: - init_ray(log_level=log_level, tmp_dir=tmp_dir, local_mode=True) +def setup_ray(config, config_num, log_level, framework_dir, **ray_kwargs): + """ + Initialize Ray with the proper tmp_dir and log the returned session info. + + Accepts additional kwargs that are passed to ray.init. If you want to + externally initalize ray to change ray's configuration, import and use this + function. + + Parameters + ---------- + config : module + The MDPP config of the experiment. + config_num : int or None + Number of configurations to run. Used to suffix the tmp_dir. + See run_experiments.py for details. + log_level : int + Logging level. Eg. 30 = logging.WARNING + framework_dir : str + Prefix for the tmp dir. + **ray_kwargs : + Additional kwargs passed to ray.init. - # ray.init(object_store_memory=int(2e9), redis_max_memory=int(1e9), - # temp_dir=tmp_dir, - # logging_level=log_level, - # local_mode=True, - # # webui_host='0.0.0.0'); logging_level=logging.INFO, - # ) + """ + # TODO: config is not used anymore. Remove? + tmp_dir = framework_dir + "/tmp_" + str(config_num) + session_info = init_ray(log_level=log_level, + tmp_dir=tmp_dir, **ray_kwargs) + logging.info("Ray session info: {}".format(str(session_info))) def init_stats_file(stats_file_name, columns_to_write): @@ -292,7 +319,8 @@ def on_train_result(info): for elem in field_val: # print(key) str_to_write += ( - "%.2e" % elem if isinstance(elem, float) else str(elem) + "%.2e" % elem if isinstance( + elem, float) else str(elem) ) str_to_write += "," str_to_write += "]" @@ -346,7 +374,8 @@ def on_train_result(info): elif config_type == "model": # if key == 'conv_filters': fout.write( - str(info["result"]["config"]["model"][key]).replace(" ", "") + str(info["result"]["config"] + ["model"][key]).replace(" ", "") + " " ) @@ -404,7 +433,8 @@ def on_episode_end(info): stats_file_eval = stats_file_prefix + "_eval.csv" fout = open(stats_file_eval, "a") # hardcoded fout.write( - "%.2e" % reward_this_episode + " " + str(length_this_episode) + "\n" + "%.2e" % reward_this_episode + " " + + str(length_this_episode) + "\n" ) fout.close() @@ -417,7 +447,8 @@ def on_episode_step(info): step_reward = episode.total_reward - np.sum( episode.custom_metrics["step_reward"] ) - episode.custom_metrics["step_reward"].append(step_reward) # This line + episode.custom_metrics["step_reward"].append( + step_reward) # This line # should not be executed the 1st time this function is called because # no step has actually taken place then (Ray 0.9.0)!! # episode.custom_metrics = {} @@ -444,7 +475,8 @@ def get_list_of_varying_configs(var_configs, mode="grid", num_configs=None): varying_configs = get_grid_of_configs(var_configs) elif mode == "random": - varying_configs = get_random_configs(var_configs, num_configs=num_configs) + varying_configs = get_random_configs( + var_configs, num_configs=num_configs) elif mode == "sobol": varying_configs = sobol_configs_from_config_dict( var_configs, num_configs=num_configs @@ -473,7 +505,8 @@ def get_list_of_varying_configs(var_configs, mode="grid", num_configs=None): ): # hack All these are hacks to get around different limitations num_configs_done = len(list(var_configs["env"])) agent_config["agent"][key] = current_config[ - num_configs_done + list(var_configs[config_type]).index(key) + num_configs_done + + list(var_configs[config_type]).index(key) ] elif config_type == "model": @@ -481,7 +514,8 @@ def get_list_of_varying_configs(var_configs, mode="grid", num_configs=None): list(var_configs["agent"]) ) model_config["model"][key] = current_config[ - num_configs_done + list(var_configs[config_type]).index(key) + num_configs_done + + list(var_configs[config_type]).index(key) ] combined_config = {**agent_config, **model_config, **env_config} @@ -661,7 +695,8 @@ def sobol_configs_from_config_dict(var_configs, num_configs): elif "cat" in val: # Seems faster than ast.literal_eval (See # https://stackoverflow.com/questions/1894269/how-to-convert-string-representation-of-list-to-a-list) - choices = json.loads("[" + val.split("[")[1].split("]")[0] + "]") + choices = json.loads( + "[" + val.split("[")[1].split("]")[0] + "]") len_c = len(choices) if ( sample[j] == 1.0 @@ -728,7 +763,8 @@ def combined_processing(*static_configs, varying_configs, framework="ray", algor final_configs = [] for i in range(len(varying_configs)): static_configs_copy = copy.deepcopy(static_configs) - merged_conf = deepmerge_multiple_dicts(*static_configs_copy, varying_configs[i]) + merged_conf = deepmerge_multiple_dicts( + *static_configs_copy, varying_configs[i]) final_configs.append(merged_conf) # Post-processing common to frameworks: @@ -846,6 +882,30 @@ def combined_processing(*static_configs, varying_configs, framework="ray", algor ), ) + elif final_configs[i]["env"] in ["Walker2dWrapper-v3", + "HumanoidWrapper-v3"]: + + from mdp_playground.envs.mujoco_env_wrapper import ( + get_mujoco_wrapper, + ) # hack + from gym.envs.mujoco.walker2d import Walker2dEnv + from gym.envs.mujoco.humanoid import HumanoidEnv + + env_assoc = { + "Walker2dWrapper-v3": Walker2dEnv, + "HumanoidWrapper-v3": HumanoidEnv + } + + GymEnv = env_assoc[final_configs[i]["env"]] + + wrapped_mujoco_env = get_mujoco_wrapper(GymEnv) + register_env( + final_configs[i]["env"], + lambda config: create_gym_env_wrapper_mujoco_wrapper( + config, wrapped_mujoco_env + ), + ) + elif final_configs[i]["env"] in ["GymEnvWrapper-Atari"]: # hack if "AtariEnv" in final_configs[i]["env_config"]: timesteps_total = 10_000_000 @@ -910,14 +970,23 @@ def combined_processing(*static_configs, varying_configs, framework="ray", algor "target_noise_clip_relative" ] # hack have to delete it otherwise Ray will crash for unknown config param. - if key == "model": - for key_2 in final_configs[i][key]: - if key_2 == "use_lstm" and final_configs[i][key][key_2]: - final_configs[i][key]["max_seq_len"] = ( - final_configs[i]["env_config"]["delay"] - + final_configs[i]["env_config"]["sequence_length"] - + 1 - ) + if "model" in final_configs[i]: + # patch for potentially missing sequence_length key in conf + # would be supplied by RLLIB's MODEL_DEFAULTS later on, but already + # needed as this point for setting MDPP's sequence_length. + # Patching it here as it might be also be provided in the var confs. + if ("use_lstm" in final_configs[i]["model"] + and "sequence_length" not in final_configs[i]["env_config"]): + # HACK: use default value of 1 if sequence length not given + # TODO: have a unified storage and use of default values + final_configs[i]["env_config"]["sequence_length"] = 1 + # setting of sequence length + if "use_lstm" in final_configs[i]["model"] and final_configs[i]["model"]["use_lstm"]: + final_configs[i]["model"]["max_seq_len"] = ( + final_configs[i]["env_config"]["delay"] + + final_configs[i]["env_config"]["sequence_length"] + + 1 + ) # Post-processing for Stable Baselines: elif framework.lower() == "stable_baselines": @@ -943,7 +1012,8 @@ def deepmerge_multiple_dicts(*configs, overwrite=True): merged_configs = {} for i in range(len(configs)): # print(i) - merged_configs = deepmerge(merged_configs, configs[i], overwrite=overwrite) + merged_configs = deepmerge( + merged_configs, configs[i], overwrite=overwrite) return merged_configs @@ -1024,9 +1094,33 @@ def create_gym_env_wrapper_frame_stack_atari(config): # hack ###TODO remove? return gew +def create_gym_env_wrapper_generic(config): + import gym + try: + import minatar + except gym.error.DependencyNotInstalled as e: + print("Exception:", type(e), e, "caught. To use MinAtar, please " + "install.") + try: + minatar.register_envs() + except gym.error.Error: + print("Already registered MinAtar, skipping.") + + from mdp_playground.envs.gym_env_wrapper import GymEnvWrapper + + # HACK(Jan): key should logically be env, not game. for now calling it game + # for unified naming with AtariWrapper. + ge = gym.make(config["GymEnv"]["game"]) + gew = GymEnvWrapper(ge, **config) + return gew + + register_env("RLToy-v0", lambda config: RLToyEnv(**config)) -register_env("GymEnvWrapper-Atari", lambda config: create_gym_env_wrapper_atari(config)) +register_env("GymEnvWrapper-Atari", + lambda config: create_gym_env_wrapper_atari(config)) register_env( "GymEnvWrapperFrameStack-Atari", lambda config: create_gym_env_wrapper_frame_stack_atari(config), ) +register_env("GymEnvWrapper", + lambda config: create_gym_env_wrapper_generic(config)) diff --git a/mdp_playground/scripts/run_experiments.py b/mdp_playground/scripts/run_experiments.py index 5e672cb..ae32076 100644 --- a/mdp_playground/scripts/run_experiments.py +++ b/mdp_playground/scripts/run_experiments.py @@ -2,6 +2,14 @@ Takes a configuration file, experiment name and config number to run as optional arguments. + +If save_model is passed, the script also pickles the tune analysis file of +each run (ie. each ran configuration). This can be used to extract the model +checkpoint and additional information. + +To change the configuration of Ray, you can also intialize it externally and +pass the '-r' flag. In that case it is recommended to import the setup_ray +function from mdp_playground.config_processor and use it to init ray. """ from __future__ import absolute_import @@ -10,10 +18,12 @@ import argparse import mdp_playground.config_processor as config_processor + import os import logging -import dill as pickle +import cloudpickle +import ray from ray import tune # import configparser @@ -21,10 +31,17 @@ pp = pprint.PrettyPrinter(indent=4) +WANDB_API_KEY_FILE = os.path.expanduser("~/wandb_api_key.txt") -def main(args): - # #TODO Different seeds for Ray Trainer (TF, numpy, Python; Torch, Env), - # Environment (it has multiple sources of randomness too), Ray Evaluator + +def generate_parser(): + """ + Helper function generating the argparser for the main function. + + Returns + ------- + argparse.ArgumentParser + """ # docstring at beginning of the file is stored in __doc__ parser = argparse.ArgumentParser(description=__doc__) parser.add_argument( @@ -55,7 +72,7 @@ def main(args): "var_agent_configs and var_model_configs currently. " "Please see sample experiment config files in the " "experiments directory to see how to set the values for a " - "given algorithm. \n STATIC CONFIGS: env_config, " + "given algorithm. STATIC CONFIGS: env_config, " "agent_config and model_config are dicts which hold the " "static configuration for the current experiment as a " "normal Python dict.", @@ -148,8 +165,42 @@ def main(args): # 'and this number corresponds to the configuration number' # ' in this list.' # ' Please look in to the code for details.') - parser.add_argument("-l", "--log-level", default="WARNING", help="Set log level.") + parser.add_argument("-l", "--log-level", + default="WARNING", help="Set log level.") + parser.add_argument("-w", "--wandb", default=None, + help="Use Tune's wandb callback for tracking the exp." + "Passed arg is the wand project name. No syncing if " + "none provided. Only works for Ray >= 1.0.") + parser.add_argument("-r", "--ray_init", action='store_false', + default=True, + help="Flag to DEACTIVATE Ray initialization in case of" + " initialization of Ray outside MDPP.") + + return parser + +def main(args): + """ + Main function for running an experiment. + Besides writing MDPP's stats files, a Tune analysis file can be pickled for + each run (ie. each ran configuration) for further analysis and extraction + of model checkpoints; just pass the --save-model flag. + + Parameters + ---------- + args : list[str] + Command line arguments. + + Returns + ------- + list[str], str + The list of names of the pickled Tune analysis files (one per config) + and the name of the stats file generated by MDPP (to be used with MDPP + analysis). + """ + # #TODO Different seeds for Ray Trainer (TF, numpy, Python; Torch, Env), + # Environment (it has multiple sources of randomness too), Ray Evaluator + parser = generate_parser() args = parser.parse_args(args) print("Parsed arguments:", args) @@ -194,6 +245,7 @@ def main(args): config_num=args.config_num, log_level=log_level_, framework_dir=args.framework_dir, + init_ray=args.ray_init, ) print( @@ -216,8 +268,11 @@ def main(args): else: final_configs = [final_configs[args.config_num]] + analysis_files = [] + for enum_conf_1, current_config_ in enumerate(final_configs): - print("current_config of agent to be run:", current_config_, enum_conf_1) + print("current_config of agent to be run:", + current_config_, enum_conf_1) algorithm = config.algorithm @@ -232,7 +287,8 @@ def main(args): else: timesteps_total = tune_config["timesteps_total"] - del tune_config["timesteps_total"] # hack Ray doesn't allow unknown configs + # hack Ray doesn't allow unknown configs + del tune_config["timesteps_total"] print( "\n\033[1;32m======== Running on environment: " @@ -245,34 +301,73 @@ def main(args): + " steps =========\033[0;0m\n" ) - analysis = tune.run( - algorithm, - name=algorithm - + "_" - + str(stats_file_name.split("/")[-1]) - + "_", # IMP "name" has to be specified, otherwise, - # it may lead to clashing for temp file in ~/ray_results/... directory. - stop={ - "timesteps_total": timesteps_total, - }, - config=tune_config, - checkpoint_at_end=args.save_model, - local_dir=args.framework_dir + "/_ray_results_" + str(args.config_num), - # return_trials=True # add trials = tune.run( above - ) + res_dir = args.framework_dir + "/_ray_results_" + str(args.config_num) + print("## Results dir: {}".format(res_dir)) + + if args.wandb is not None: + from ray.tune.integration.wandb import WandbLoggerCallback + if not os.path.isfile(WANDB_API_KEY_FILE): + raise FileNotFoundError( + "WANDB API KEY NOT FOUND: You passed a wandb project name " + "but MDPP could not find you wandb api key. MDPP expects " + "your key to be located at {}".format(WANDB_API_KEY_FILE)) + callbacks = [WandbLoggerCallback( + project=args.wandb, + api_key_file=WANDB_API_KEY_FILE, + log_config=True)] + else: + callbacks = [] + + # IMP "name" has to be specified, otherwise, + # it may lead to clashing for temp file in ~/ray_results/... directory. + run_name = algorithm + "_" + str(stats_file_name.split("/")[-1]) + "_" + + if ray.__version__[0] == "0": + analysis = tune.run( + algorithm, + name=run_name, + stop={ + "timesteps_total": timesteps_total, + }, + config=tune_config, + checkpoint_at_end=args.save_model, + local_dir=res_dir, + ) + else: + analysis = tune.run( + algorithm, + name=run_name, + stop={ + "timesteps_total": timesteps_total, + }, + config=tune_config, + callbacks=callbacks, + checkpoint_at_end=args.save_model, + local_dir=res_dir, + ) if args.save_model: - pickle.dump( - analysis, open("{}_analysis.pickle".format(args.exp_name), "wb") + analysis_file_name = "{}_{}_analysis.pickle".format( + args.exp_name, enum_conf_1) + cloudpickle.dump( + analysis, open( + analysis_file_name, + "wb") ) + analysis_files.append(analysis_file_name) config_processor.post_processing(framework=args.framework) end = time.time() print("No. of seconds to run:", end - start) + return analysis_files, stats_file_name + def cli(): + """ + Helper function to call main from CLI. + """ import sys main(sys.argv[1:]) diff --git a/poetry.lock b/poetry.lock index 4df160f..fbba424 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,6 +1,6 @@ [[package]] name = "absl-py" -version = "0.12.0" +version = "0.13.0" description = "Abseil Python Common Libraries, see https://github.com/abseil/abseil-py." category = "main" optional = true @@ -168,7 +168,7 @@ python-versions = "*" [[package]] name = "cffi" -version = "1.14.5" +version = "1.14.6" description = "Foreign Function Interface for Python calling C code." category = "main" optional = true @@ -199,11 +199,11 @@ importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} [[package]] name = "cloudpickle" -version = "1.2.2" +version = "1.6.0" description = "Extended pickling support for Python objects" category = "main" optional = false -python-versions = "*" +python-versions = ">=3.5" [[package]] name = "colorama" @@ -262,7 +262,7 @@ six = "*" [[package]] name = "cython" -version = "0.29.23" +version = "0.29.24" description = "The Cython compiler for writing C extensions for the Python language." category = "main" optional = true @@ -286,11 +286,11 @@ python-versions = ">=3.5" [[package]] name = "dill" -version = "0.3.3" +version = "0.3.4" description = "serialize all of python" category = "main" optional = false -python-versions = ">=2.6, !=3.0.*" +python-versions = ">=2.7, !=3.0.*" [package.extras] graph = ["objgraph (>=1.7.2)"] @@ -316,11 +316,14 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "fasteners" -version = "0.16.1" +version = "0.16.3" description = "A python package that provides useful locks." category = "main" optional = true -python-versions = ">=3.6" +python-versions = "*" + +[package.dependencies] +six = "*" [[package]] name = "filelock" @@ -330,14 +333,6 @@ category = "main" optional = true python-versions = "*" -[[package]] -name = "future" -version = "0.18.2" -description = "Clean single-source support for Python 3 and 2" -category = "main" -optional = false -python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" - [[package]] name = "gast" version = "0.3.3" @@ -356,7 +351,7 @@ python-versions = "*" [[package]] name = "google-api-core" -version = "1.29.0" +version = "1.31.1" description = "Google API client core library" category = "main" optional = true @@ -378,7 +373,7 @@ grpcio-gcp = ["grpcio-gcp (>=0.2.2)"] [[package]] name = "google-auth" -version = "1.30.1" +version = "1.34.0" description = "Google Authentication Library" category = "main" optional = true @@ -391,7 +386,7 @@ rsa = {version = ">=3.1.4,<5", markers = "python_version >= \"3.6\""} six = ">=1.9.0" [package.extras] -aiohttp = ["aiohttp (>=3.6.2,<4.0.0dev)"] +aiohttp = ["requests (>=2.20.0,<3.0.0dev)", "aiohttp (>=3.6.2,<4.0.0dev)"] pyopenssl = ["pyopenssl (>=20.0.0)"] reauth = ["pyu2f (>=0.1.5)"] @@ -454,7 +449,7 @@ test = ["mock (>=2.0.0)", "pytest (<5.0)"] [[package]] name = "grpcio" -version = "1.38.0" +version = "1.39.0" description = "HTTP/2-based RPC framework" category = "main" optional = true @@ -464,32 +459,32 @@ python-versions = "*" six = ">=1.5.2" [package.extras] -protobuf = ["grpcio-tools (>=1.38.0)"] +protobuf = ["grpcio-tools (>=1.39.0)"] [[package]] name = "gym" -version = "0.14.0" +version = "0.18.3" description = "The OpenAI Gym: A toolkit for developing and comparing your reinforcement learning agents." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.6" [package.dependencies] atari_py = {version = ">=0.2.0,<0.3.0", optional = true, markers = "extra == \"atari\""} -cloudpickle = ">=1.2.0,<1.3.0" +cloudpickle = ">=1.2.0,<1.7.0" numpy = ">=1.10.4" -opencv-python = {version = "*", optional = true, markers = "extra == \"atari\""} -Pillow = {version = "*", optional = true, markers = "extra == \"atari\""} -pyglet = ">=1.2.0,<=1.3.2" +opencv-python = {version = ">=3", optional = true, markers = "extra == \"atari\""} +Pillow = "<=8.2.0" +pyglet = ">=1.4.0,<=1.5.15" scipy = "*" -six = "*" [package.extras] -all = ["atari_py (>=0.2.0,<0.3.0)", "pillow", "opencv-python", "box2d-py (>=2.3.5,<2.4.0)", "mujoco_py (>=1.50,<2.1)", "imageio", "mujoco_py (>=1.50,<2.1)", "imageio"] -atari = ["atari_py (>=0.2.0,<0.3.0)", "pillow", "opencv-python"] +all = ["box2d-py (>=2.3.5,<2.4.0)", "opencv-python (>=3)", "imageio", "atari_py (>=0.2.0,<0.3.0)", "mujoco_py (>=1.50,<2.0)"] +atari = ["atari_py (>=0.2.0,<0.3.0)", "opencv-python (>=3)"] box2d = ["box2d-py (>=2.3.5,<2.4.0)"] -mujoco = ["mujoco_py (>=1.50,<2.1)", "imageio"] -robotics = ["mujoco_py (>=1.50,<2.1)", "imageio"] +mujoco = ["mujoco_py (>=1.50,<2.0)", "imageio"] +nomujoco = ["box2d-py (>=2.3.5,<2.4.0)", "opencv-python (>=3)", "atari_py (>=0.2.0,<0.3.0)"] +robotics = ["mujoco_py (>=1.50,<2.0)", "imageio"] [[package]] name = "h5py" @@ -570,7 +565,7 @@ test = ["flake8 (>=3.8.4,<3.9.0)", "pycodestyle (>=2.6.0,<2.7.0)"] [[package]] name = "importlib-metadata" -version = "4.5.0" +version = "4.6.1" description = "Read metadata from Python packages" category = "main" optional = false @@ -582,7 +577,8 @@ zipp = ">=0.5" [package.extras] docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] +perf = ["ipython"] +testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] [[package]] name = "importlib-resources" @@ -837,11 +833,11 @@ tests = ["pytest", "pytest-cov", "pytest-pep8"] [[package]] name = "packaging" -version = "20.9" +version = "21.0" description = "Core utilities for Python packages" category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.6" [package.dependencies] pyparsing = ">=2.0.2" @@ -897,7 +893,7 @@ twisted = ["twisted"] [[package]] name = "protobuf" -version = "3.17.2" +version = "3.17.3" description = "Protocol Buffers" category = "main" optional = true @@ -979,15 +975,12 @@ test = ["sphinx", "numpydoc", "recommonmark", "pandas", "pytest", "pytest-regres [[package]] name = "pyglet" -version = "1.3.2" +version = "1.5.15" description = "Cross-platform windowing and multimedia library" category = "main" optional = false python-versions = "*" -[package.dependencies] -future = "*" - [[package]] name = "pygments" version = "2.9.0" @@ -1006,11 +999,11 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "pyrsistent" -version = "0.17.3" +version = "0.18.0" description = "Persistent/Functional/Immutable data structures" category = "main" optional = true -python-versions = ">=3.5" +python-versions = ">=3.6" [[package]] name = "pytest" @@ -1037,7 +1030,7 @@ testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xm [[package]] name = "python-dateutil" -version = "2.8.1" +version = "2.8.2" description = "Extensions to the standard Python datetime module" category = "main" optional = false @@ -1232,7 +1225,7 @@ test = ["pytest", "pytest-cov", "html5lib", "cython", "typed-ast"] [[package]] name = "sphinx-book-theme" -version = "0.1.0" +version = "0.1.1" description = "Jupyter Book: Create an online book with Jupyter Notebooks" category = "dev" optional = false @@ -1366,7 +1359,7 @@ python-versions = "*" [[package]] name = "tensorboardx" -version = "2.2" +version = "2.4" description = "TensorBoardX lets you watch Tensors Flow without Tensorflow" category = "main" optional = true @@ -1510,7 +1503,7 @@ typing-extensions = {version = ">=3.7.4", markers = "python_version < \"3.8\""} [[package]] name = "zipp" -version = "3.4.1" +version = "3.5.0" description = "Backport of pathlib-compatible object wrapper for zip files" category = "main" optional = false @@ -1518,7 +1511,7 @@ python-versions = ">=3.6" [package.extras] docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] +testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] [extras] extras = ["pandas", "requests", "configspace", "scipy", "pillow", "tensorflow", "ray"] @@ -1529,12 +1522,12 @@ extras_test = ["pandas", "requests", "configspace", "scipy", "tensorflow-probabi [metadata] lock-version = "1.1" python-versions = "^3.6" -content-hash = "f5be164860dcd7fc3785dc6179709d0a132912f045e20797c30f7b0db6b2b9a2" +content-hash = "90fe038cec78e8cdf7de6655eca55d0496a4fa3d50db9de07e6c49db39757cf6" [metadata.files] absl-py = [ - {file = "absl-py-0.12.0.tar.gz", hash = "sha256:b44f68984a5ceb2607d135a615999b93924c771238a63920d17d3387b0d229d5"}, - {file = "absl_py-0.12.0-py3-none-any.whl", hash = "sha256:afe94e3c751ff81aad55d33ab6e630390da32780110b5af72ae81ecff8418d9e"}, + {file = "absl-py-0.13.0.tar.gz", hash = "sha256:6953272383486044699fd0e9f00aad167a27e08ce19aae66c6c4b10e7e767793"}, + {file = "absl_py-0.13.0-py3-none-any.whl", hash = "sha256:62bd4e248ddb19d81aec8f9446b407ff37c8175c2ba88266a7afa9b4ce4a333b"}, ] aiohttp = [ {file = "aiohttp-3.7.4.post0-cp36-cp36m-macosx_10_14_x86_64.whl", hash = "sha256:3cf75f7cdc2397ed4442594b935a11ed5569961333d49b7539ea741be2cc79d5"}, @@ -1637,55 +1630,51 @@ certifi = [ {file = "certifi-2021.5.30.tar.gz", hash = "sha256:2bbf76fd432960138b3ef6dda3dde0544f27cbf8546c458e60baf371917ba9ee"}, ] cffi = [ - {file = "cffi-1.14.5-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:bb89f306e5da99f4d922728ddcd6f7fcebb3241fc40edebcb7284d7514741991"}, - {file = "cffi-1.14.5-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:34eff4b97f3d982fb93e2831e6750127d1355a923ebaeeb565407b3d2f8d41a1"}, - {file = "cffi-1.14.5-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:99cd03ae7988a93dd00bcd9d0b75e1f6c426063d6f03d2f90b89e29b25b82dfa"}, - {file = "cffi-1.14.5-cp27-cp27m-win32.whl", hash = "sha256:65fa59693c62cf06e45ddbb822165394a288edce9e276647f0046e1ec26920f3"}, - {file = "cffi-1.14.5-cp27-cp27m-win_amd64.whl", hash = "sha256:51182f8927c5af975fece87b1b369f722c570fe169f9880764b1ee3bca8347b5"}, - {file = "cffi-1.14.5-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:43e0b9d9e2c9e5d152946b9c5fe062c151614b262fda2e7b201204de0b99e482"}, - {file = "cffi-1.14.5-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:cbde590d4faaa07c72bf979734738f328d239913ba3e043b1e98fe9a39f8b2b6"}, - {file = "cffi-1.14.5-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:5de7970188bb46b7bf9858eb6890aad302577a5f6f75091fd7cdd3ef13ef3045"}, - {file = "cffi-1.14.5-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:a465da611f6fa124963b91bf432d960a555563efe4ed1cc403ba5077b15370aa"}, - {file = "cffi-1.14.5-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:d42b11d692e11b6634f7613ad8df5d6d5f8875f5d48939520d351007b3c13406"}, - {file = "cffi-1.14.5-cp35-cp35m-win32.whl", hash = "sha256:72d8d3ef52c208ee1c7b2e341f7d71c6fd3157138abf1a95166e6165dd5d4369"}, - {file = "cffi-1.14.5-cp35-cp35m-win_amd64.whl", hash = "sha256:29314480e958fd8aab22e4a58b355b629c59bf5f2ac2492b61e3dc06d8c7a315"}, - {file = "cffi-1.14.5-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:3d3dd4c9e559eb172ecf00a2a7517e97d1e96de2a5e610bd9b68cea3925b4892"}, - {file = "cffi-1.14.5-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:48e1c69bbacfc3d932221851b39d49e81567a4d4aac3b21258d9c24578280058"}, - {file = "cffi-1.14.5-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:69e395c24fc60aad6bb4fa7e583698ea6cc684648e1ffb7fe85e3c1ca131a7d5"}, - {file = "cffi-1.14.5-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:9e93e79c2551ff263400e1e4be085a1210e12073a31c2011dbbda14bda0c6132"}, - {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:24ec4ff2c5c0c8f9c6b87d5bb53555bf267e1e6f70e52e5a9740d32861d36b6f"}, - {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3c3f39fa737542161d8b0d680df2ec249334cd70a8f420f71c9304bd83c3cbed"}, - {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:681d07b0d1e3c462dd15585ef5e33cb021321588bebd910124ef4f4fb71aef55"}, - {file = "cffi-1.14.5-cp36-cp36m-win32.whl", hash = "sha256:58e3f59d583d413809d60779492342801d6e82fefb89c86a38e040c16883be53"}, - {file = "cffi-1.14.5-cp36-cp36m-win_amd64.whl", hash = "sha256:005a36f41773e148deac64b08f233873a4d0c18b053d37da83f6af4d9087b813"}, - {file = "cffi-1.14.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2894f2df484ff56d717bead0a5c2abb6b9d2bf26d6960c4604d5c48bbc30ee73"}, - {file = "cffi-1.14.5-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:0857f0ae312d855239a55c81ef453ee8fd24136eaba8e87a2eceba644c0d4c06"}, - {file = "cffi-1.14.5-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:cd2868886d547469123fadc46eac7ea5253ea7fcb139f12e1dfc2bbd406427d1"}, - {file = "cffi-1.14.5-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:35f27e6eb43380fa080dccf676dece30bef72e4a67617ffda586641cd4508d49"}, - {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:06d7cd1abac2ffd92e65c0609661866709b4b2d82dd15f611e602b9b188b0b69"}, - {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0f861a89e0043afec2a51fd177a567005847973be86f709bbb044d7f42fc4e05"}, - {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cc5a8e069b9ebfa22e26d0e6b97d6f9781302fe7f4f2b8776c3e1daea35f1adc"}, - {file = "cffi-1.14.5-cp37-cp37m-win32.whl", hash = "sha256:9ff227395193126d82e60319a673a037d5de84633f11279e336f9c0f189ecc62"}, - {file = "cffi-1.14.5-cp37-cp37m-win_amd64.whl", hash = "sha256:9cf8022fb8d07a97c178b02327b284521c7708d7c71a9c9c355c178ac4bbd3d4"}, - {file = "cffi-1.14.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8b198cec6c72df5289c05b05b8b0969819783f9418e0409865dac47288d2a053"}, - {file = "cffi-1.14.5-cp38-cp38-manylinux1_i686.whl", hash = "sha256:ad17025d226ee5beec591b52800c11680fca3df50b8b29fe51d882576e039ee0"}, - {file = "cffi-1.14.5-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:6c97d7350133666fbb5cf4abdc1178c812cb205dc6f41d174a7b0f18fb93337e"}, - {file = "cffi-1.14.5-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:8ae6299f6c68de06f136f1f9e69458eae58f1dacf10af5c17353eae03aa0d827"}, - {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:04c468b622ed31d408fea2346bec5bbffba2cc44226302a0de1ade9f5ea3d373"}, - {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:06db6321b7a68b2bd6df96d08a5adadc1fa0e8f419226e25b2a5fbf6ccc7350f"}, - {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:293e7ea41280cb28c6fcaaa0b1aa1f533b8ce060b9e701d78511e1e6c4a1de76"}, - {file = "cffi-1.14.5-cp38-cp38-win32.whl", hash = "sha256:b85eb46a81787c50650f2392b9b4ef23e1f126313b9e0e9013b35c15e4288e2e"}, - {file = "cffi-1.14.5-cp38-cp38-win_amd64.whl", hash = "sha256:1f436816fc868b098b0d63b8920de7d208c90a67212546d02f84fe78a9c26396"}, - {file = "cffi-1.14.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1071534bbbf8cbb31b498d5d9db0f274f2f7a865adca4ae429e147ba40f73dea"}, - {file = "cffi-1.14.5-cp39-cp39-manylinux1_i686.whl", hash = "sha256:9de2e279153a443c656f2defd67769e6d1e4163952b3c622dcea5b08a6405322"}, - {file = "cffi-1.14.5-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:6e4714cc64f474e4d6e37cfff31a814b509a35cb17de4fb1999907575684479c"}, - {file = "cffi-1.14.5-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:158d0d15119b4b7ff6b926536763dc0714313aa59e320ddf787502c70c4d4bee"}, - {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1bf1ac1984eaa7675ca8d5745a8cb87ef7abecb5592178406e55858d411eadc0"}, - {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:df5052c5d867c1ea0b311fb7c3cd28b19df469c056f7fdcfe88c7473aa63e333"}, - {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:24a570cd11895b60829e941f2613a4f79df1a27344cbbb82164ef2e0116f09c7"}, - {file = "cffi-1.14.5-cp39-cp39-win32.whl", hash = "sha256:afb29c1ba2e5a3736f1c301d9d0abe3ec8b86957d04ddfa9d7a6a42b9367e396"}, - {file = "cffi-1.14.5-cp39-cp39-win_amd64.whl", hash = "sha256:f2d45f97ab6bb54753eab54fffe75aaf3de4ff2341c9daee1987ee1837636f1d"}, - {file = "cffi-1.14.5.tar.gz", hash = "sha256:fd78e5fee591709f32ef6edb9a015b4aa1a5022598e36227500c8f4e02328d9c"}, + {file = "cffi-1.14.6-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:22b9c3c320171c108e903d61a3723b51e37aaa8c81255b5e7ce102775bd01e2c"}, + {file = "cffi-1.14.6-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:f0c5d1acbfca6ebdd6b1e3eded8d261affb6ddcf2186205518f1428b8569bb99"}, + {file = "cffi-1.14.6-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:99f27fefe34c37ba9875f224a8f36e31d744d8083e00f520f133cab79ad5e819"}, + {file = "cffi-1.14.6-cp27-cp27m-win32.whl", hash = "sha256:55af55e32ae468e9946f741a5d51f9896da6b9bf0bbdd326843fec05c730eb20"}, + {file = "cffi-1.14.6-cp27-cp27m-win_amd64.whl", hash = "sha256:7bcac9a2b4fdbed2c16fa5681356d7121ecabf041f18d97ed5b8e0dd38a80224"}, + {file = "cffi-1.14.6-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:ed38b924ce794e505647f7c331b22a693bee1538fdf46b0222c4717b42f744e7"}, + {file = "cffi-1.14.6-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:e22dcb48709fc51a7b58a927391b23ab37eb3737a98ac4338e2448bef8559b33"}, + {file = "cffi-1.14.6-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:aedb15f0a5a5949ecb129a82b72b19df97bbbca024081ed2ef88bd5c0a610534"}, + {file = "cffi-1.14.6-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:48916e459c54c4a70e52745639f1db524542140433599e13911b2f329834276a"}, + {file = "cffi-1.14.6-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:f627688813d0a4140153ff532537fbe4afea5a3dffce1f9deb7f91f848a832b5"}, + {file = "cffi-1.14.6-cp35-cp35m-win32.whl", hash = "sha256:f0010c6f9d1a4011e429109fda55a225921e3206e7f62a0c22a35344bfd13cca"}, + {file = "cffi-1.14.6-cp35-cp35m-win_amd64.whl", hash = "sha256:57e555a9feb4a8460415f1aac331a2dc833b1115284f7ded7278b54afc5bd218"}, + {file = "cffi-1.14.6-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e8c6a99be100371dbb046880e7a282152aa5d6127ae01783e37662ef73850d8f"}, + {file = "cffi-1.14.6-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:19ca0dbdeda3b2615421d54bef8985f72af6e0c47082a8d26122adac81a95872"}, + {file = "cffi-1.14.6-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:d950695ae4381ecd856bcaf2b1e866720e4ab9a1498cba61c602e56630ca7195"}, + {file = "cffi-1.14.6-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e9dc245e3ac69c92ee4c167fbdd7428ec1956d4e754223124991ef29eb57a09d"}, + {file = "cffi-1.14.6-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a8661b2ce9694ca01c529bfa204dbb144b275a31685a075ce123f12331be790b"}, + {file = "cffi-1.14.6-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b315d709717a99f4b27b59b021e6207c64620790ca3e0bde636a6c7f14618abb"}, + {file = "cffi-1.14.6-cp36-cp36m-win32.whl", hash = "sha256:80b06212075346b5546b0417b9f2bf467fea3bfe7352f781ffc05a8ab24ba14a"}, + {file = "cffi-1.14.6-cp36-cp36m-win_amd64.whl", hash = "sha256:a9da7010cec5a12193d1af9872a00888f396aba3dc79186604a09ea3ee7c029e"}, + {file = "cffi-1.14.6-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:4373612d59c404baeb7cbd788a18b2b2a8331abcc84c3ba40051fcd18b17a4d5"}, + {file = "cffi-1.14.6-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:f10afb1004f102c7868ebfe91c28f4a712227fe4cb24974350ace1f90e1febbf"}, + {file = "cffi-1.14.6-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:fd4305f86f53dfd8cd3522269ed7fc34856a8ee3709a5e28b2836b2db9d4cd69"}, + {file = "cffi-1.14.6-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6d6169cb3c6c2ad50db5b868db6491a790300ade1ed5d1da29289d73bbe40b56"}, + {file = "cffi-1.14.6-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5d4b68e216fc65e9fe4f524c177b54964af043dde734807586cf5435af84045c"}, + {file = "cffi-1.14.6-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33791e8a2dc2953f28b8d8d300dde42dd929ac28f974c4b4c6272cb2955cb762"}, + {file = "cffi-1.14.6-cp37-cp37m-win32.whl", hash = "sha256:0c0591bee64e438883b0c92a7bed78f6290d40bf02e54c5bf0978eaf36061771"}, + {file = "cffi-1.14.6-cp37-cp37m-win_amd64.whl", hash = "sha256:8eb687582ed7cd8c4bdbff3df6c0da443eb89c3c72e6e5dcdd9c81729712791a"}, + {file = "cffi-1.14.6-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ba6f2b3f452e150945d58f4badd92310449876c4c954836cfb1803bdd7b422f0"}, + {file = "cffi-1.14.6-cp38-cp38-manylinux1_i686.whl", hash = "sha256:64fda793737bc4037521d4899be780534b9aea552eb673b9833b01f945904c2e"}, + {file = "cffi-1.14.6-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:9f3e33c28cd39d1b655ed1ba7247133b6f7fc16fa16887b120c0c670e35ce346"}, + {file = "cffi-1.14.6-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:26bb2549b72708c833f5abe62b756176022a7b9a7f689b571e74c8478ead51dc"}, + {file = "cffi-1.14.6-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:eb687a11f0a7a1839719edd80f41e459cc5366857ecbed383ff376c4e3cc6afd"}, + {file = "cffi-1.14.6-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d2ad4d668a5c0645d281dcd17aff2be3212bc109b33814bbb15c4939f44181cc"}, + {file = "cffi-1.14.6-cp38-cp38-win32.whl", hash = "sha256:487d63e1454627c8e47dd230025780e91869cfba4c753a74fda196a1f6ad6548"}, + {file = "cffi-1.14.6-cp38-cp38-win_amd64.whl", hash = "sha256:c33d18eb6e6bc36f09d793c0dc58b0211fccc6ae5149b808da4a62660678b156"}, + {file = "cffi-1.14.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:06c54a68935738d206570b20da5ef2b6b6d92b38ef3ec45c5422c0ebaf338d4d"}, + {file = "cffi-1.14.6-cp39-cp39-manylinux1_i686.whl", hash = "sha256:f174135f5609428cc6e1b9090f9268f5c8935fddb1b25ccb8255a2d50de6789e"}, + {file = "cffi-1.14.6-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:f3ebe6e73c319340830a9b2825d32eb6d8475c1dac020b4f0aa774ee3b898d1c"}, + {file = "cffi-1.14.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c8d896becff2fa653dc4438b54a5a25a971d1f4110b32bd3068db3722c80202"}, + {file = "cffi-1.14.6-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4922cd707b25e623b902c86188aca466d3620892db76c0bdd7b99a3d5e61d35f"}, + {file = "cffi-1.14.6-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c9e005e9bd57bc987764c32a1bee4364c44fdc11a3cc20a40b93b444984f2b87"}, + {file = "cffi-1.14.6-cp39-cp39-win32.whl", hash = "sha256:eb9e2a346c5238a30a746893f23a9535e700f8192a68c07c0258e7ece6ff3728"}, + {file = "cffi-1.14.6-cp39-cp39-win_amd64.whl", hash = "sha256:818014c754cd3dba7229c0f5884396264d51ffb87ec86e927ef0be140bfdb0d2"}, + {file = "cffi-1.14.6.tar.gz", hash = "sha256:c9a875ce9d7fe32887784274dd533c57909b7b1dcadcc128a2ac21331a9765dd"}, ] chardet = [ {file = "chardet-3.0.4-py2.py3-none-any.whl", hash = "sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"}, @@ -1696,8 +1685,8 @@ click = [ {file = "click-8.0.1.tar.gz", hash = "sha256:8c04c11192119b1ef78ea049e0a6f0463e4c48ef00a30160c704337586f3ad7a"}, ] cloudpickle = [ - {file = "cloudpickle-1.2.2-py2.py3-none-any.whl", hash = "sha256:f3ef2c9d438f1553ce7795afb18c1f190d8146132496169ef6aa9b7b65caa4c3"}, - {file = "cloudpickle-1.2.2.tar.gz", hash = "sha256:922401d7140e133253ff5fab4faa4a1166416066453a783b00b507dca93f8859"}, + {file = "cloudpickle-1.6.0-py3-none-any.whl", hash = "sha256:3a32d0eb0bc6f4d0c57fbc4f3e3780f7a81e6fee0fa935072884d58ae8e1cc7c"}, + {file = "cloudpickle-1.6.0.tar.gz", hash = "sha256:9bc994f9e9447593bd0a45371f0e7ac7333710fcf64a4eb9834bf149f4ef2f32"}, ] colorama = [ {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, @@ -1718,41 +1707,45 @@ cycler = [ {file = "cycler-0.10.0.tar.gz", hash = "sha256:cd7b2d1018258d7247a71425e9f26463dfb444d411c39569972f4ce586b0c9d8"}, ] cython = [ - {file = "Cython-0.29.23-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:ff885f18d169759b57f116d3956e45cd2b9cba989fde348bba091544c668dc11"}, - {file = "Cython-0.29.23-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:3b29224eb62309a10819d923dc6262f769e4f3facfee3cd06372c355e5b38b33"}, - {file = "Cython-0.29.23-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:355a6e768d91e21fbf477b61881bab64b7a2da386a166898997bccefd532cf5d"}, - {file = "Cython-0.29.23-cp27-cp27m-win32.whl", hash = "sha256:2af52d312e96b38ded38b34d06e22685c226b1b0e58278bd27209f5d2385d115"}, - {file = "Cython-0.29.23-cp27-cp27m-win_amd64.whl", hash = "sha256:519fccf526d26b377e1db22f22aa44889b28bc5833ec106588cb13557e8ba2da"}, - {file = "Cython-0.29.23-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:625a16103770fd92b487b701fb0c07e5790b080f40fa11ce572a2d56d9e9fcca"}, - {file = "Cython-0.29.23-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:7b7a766726d207d7cd57aff0fcb4b35ce042d3cc88a421fcdb45eeb61a5b9d12"}, - {file = "Cython-0.29.23-cp34-cp34m-win32.whl", hash = "sha256:474c1a29ab43e29d990df279e2cf6aa96baa9208f5cd4bc76ac87ffcdf1e2945"}, - {file = "Cython-0.29.23-cp34-cp34m-win_amd64.whl", hash = "sha256:f4aca6bffb1c1c3c4ada3347d0b162a699c18a66e097ee08b63b3a35118fdfcc"}, - {file = "Cython-0.29.23-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:58dc06871bfdb0592542d779714fe9f918e11ba20ac07757dd63b198bdc704fe"}, - {file = "Cython-0.29.23-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:2a3bbce689a2fddb85aa66712d93875c99bf7f64ac82b1d149ecce522a7a4e0c"}, - {file = "Cython-0.29.23-cp35-cp35m-win32.whl", hash = "sha256:3ef530f975e3a760e7282fce2a25f900fa63f96d17321b4aa5f5542eb9859cdf"}, - {file = "Cython-0.29.23-cp35-cp35m-win_amd64.whl", hash = "sha256:ef21c51350462160456eb71df31b0869e5141e940f22c61c358bdb6e3ebc3388"}, - {file = "Cython-0.29.23-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:20402ef316393168909926ab21848aa6e08e39bed5003b657139774e66166cd0"}, - {file = "Cython-0.29.23-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:4858043ac5f96a8f0277cf63760bb39b9521c1f897678cf1d22423f3e758f4ed"}, - {file = "Cython-0.29.23-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4d7c3b0882d8757c601eaf288fc0d321d5c7ac6c3afb8c42eddf9325a3419cf5"}, - {file = "Cython-0.29.23-cp36-cp36m-win32.whl", hash = "sha256:37ff66039e3d138ec968ee1d1e12441fa5fb4e6a9c5458bc3c3a232f01be4a7d"}, - {file = "Cython-0.29.23-cp36-cp36m-win_amd64.whl", hash = "sha256:5be3ae3189cf7d0e9bbeafb854496dc7030c6f6a5602d809435fab8223543a41"}, - {file = "Cython-0.29.23-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b0699f0dc90181f2458fdb8170455e7798a309e18f41379eda7a2dc8c7aadee0"}, - {file = "Cython-0.29.23-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:41cd0dd2ff5d78466e73409db509887a84449b400074d4f217980cedbb18e4be"}, - {file = "Cython-0.29.23-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:aa3bb0928fb2aa3a8828801eb8b29af2261c199f805ae835467489e2bdd00372"}, - {file = "Cython-0.29.23-cp37-cp37m-win32.whl", hash = "sha256:20cb50d9fede8029bdb50875458f07a27f909289aeed4cdb9c19544dd9a9bc45"}, - {file = "Cython-0.29.23-cp37-cp37m-win_amd64.whl", hash = "sha256:c4b82461edbbcf90f19b319006345b77474a2d7514e1476d49a14bbd55d6b797"}, - {file = "Cython-0.29.23-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:794e3df0b57e16bce7583ac909126f4cb381fe566adadb20484d89095855eedb"}, - {file = "Cython-0.29.23-cp38-cp38-manylinux1_i686.whl", hash = "sha256:0c4b9f7e3aa004cf3f364e3e772f55fec5740485bafea99d1f13bdc9bbd8a545"}, - {file = "Cython-0.29.23-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:ceccc03b633113ede1f14ad914a6db5c278ce108c8ddb308a5c01c1567d8a02a"}, - {file = "Cython-0.29.23-cp38-cp38-win32.whl", hash = "sha256:4b0bcf2e06a9063fc78c3243ed4003228375d532ef13b9e5d7183be8f0a52cf5"}, - {file = "Cython-0.29.23-cp38-cp38-win_amd64.whl", hash = "sha256:5a6792153b728a0240e55bbb5b643f4f7e45c76319e03abf15bf367471ea1d1a"}, - {file = "Cython-0.29.23-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a8eed9c82e8fe07b8a8ffbd36018871a17458903fc25c9d015f37b54513a3efd"}, - {file = "Cython-0.29.23-cp39-cp39-manylinux1_i686.whl", hash = "sha256:266459c7e48fe3c6c492b297e4033e42d4c6863cc1a1ff7cc4034949fc574fa6"}, - {file = "Cython-0.29.23-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:4b6824b58d4373224fc76ee8bee6b35c2d17c91a1ed0fa67b88440f63daebe50"}, - {file = "Cython-0.29.23-cp39-cp39-win32.whl", hash = "sha256:7d6a33c8a11f05f698e215bfdb837f32c27f63c20f3af863557ed91c748dc2be"}, - {file = "Cython-0.29.23-cp39-cp39-win_amd64.whl", hash = "sha256:2365f3b5e6451b6bc6dcd262230656f4ade1d862ec2f6c22154deebef37c08b6"}, - {file = "Cython-0.29.23-py2.py3-none-any.whl", hash = "sha256:282263628c5d601b313d5920f7b6d7e08c7fedbddacd080c4858aa04d86b6b4b"}, - {file = "Cython-0.29.23.tar.gz", hash = "sha256:6a0d31452f0245daacb14c979c77e093eb1a546c760816b5eed0047686baad8e"}, + {file = "Cython-0.29.24-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:6a2cf2ccccc25413864928dfd730c29db6f63eaf98206c1e600003a445ca7f58"}, + {file = "Cython-0.29.24-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:b28f92e617f540d3f21f8fd479a9c6491be920ffff672a4c61b7fc4d7f749f39"}, + {file = "Cython-0.29.24-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:37bcfa5df2a3009f49624695d917c3804fccbdfcdc5eda6378754a879711a4d5"}, + {file = "Cython-0.29.24-cp27-cp27m-win32.whl", hash = "sha256:9164aeef1af6f837e4fc20402a31d256188ba4d535e262c6cb78caf57ad744f8"}, + {file = "Cython-0.29.24-cp27-cp27m-win_amd64.whl", hash = "sha256:73ac33a4379056a02031baa4def255717fadb9181b5ac2b244792d53eae1c925"}, + {file = "Cython-0.29.24-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:09ac3087ac7a3d489ebcb3fb8402e00c13d1a3a1c6bc73fd3b0d756a3e341e79"}, + {file = "Cython-0.29.24-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:774cb8fd931ee1ba52c472bc1c19077cd6895c1b24014ae07bb27df59aed5ebe"}, + {file = "Cython-0.29.24-cp34-cp34m-win32.whl", hash = "sha256:5dd56d0be50073f0e54825a8bc3393852de0eed126339ecbca0ae149dba55cfc"}, + {file = "Cython-0.29.24-cp34-cp34m-win_amd64.whl", hash = "sha256:88dc3c250dec280b0489a83950b15809762e27232f4799b1b8d0bad503f5ab84"}, + {file = "Cython-0.29.24-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:5fa12ebafc2f688ea6d26ab6d1d2e634a9872509ba7135b902bb0d8b368fb04b"}, + {file = "Cython-0.29.24-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:60c958bcab0ff315b4036a949bed1c65334e1f6a69e17e9966d742febb59043a"}, + {file = "Cython-0.29.24-cp35-cp35m-win32.whl", hash = "sha256:166f9f29cd0058ce1a14a7b3a2458b849ed34b1ec5fd4108af3fdd2c24afcbb0"}, + {file = "Cython-0.29.24-cp35-cp35m-win_amd64.whl", hash = "sha256:76cbca0188d278e93d12ebdaf5990678e6e436485fdfad49dbe9b07717d41a3c"}, + {file = "Cython-0.29.24-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f2e9381497b12e8f622af620bde0d1d094035d79b899abb2ddd3a7891f535083"}, + {file = "Cython-0.29.24-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:d8d1a087f35e39384303f5e6b75d465d6f29d746d7138eae9d3b6e8e6f769eae"}, + {file = "Cython-0.29.24-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:112efa54a58293a4fb0acf0dd8e5b3736e95b595eee24dd88615648e445abe41"}, + {file = "Cython-0.29.24-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4cf4452f0e4d50e11701bca38f3857fe6fa16593e7fd6a4d5f7be66f611b7da2"}, + {file = "Cython-0.29.24-cp36-cp36m-win32.whl", hash = "sha256:854fe2193d3ad4c8b61932ff54d6dbe10c5fa8749eb8958d72cc0ab28243f833"}, + {file = "Cython-0.29.24-cp36-cp36m-win_amd64.whl", hash = "sha256:84826ec1c11cda56261a252ddecac0c7d6b02e47e81b94f40b27b4c23c29c17c"}, + {file = "Cython-0.29.24-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:6ade74eece909fd3a437d9a5084829180751d7ade118e281e9824dd75eafaff2"}, + {file = "Cython-0.29.24-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:0a142c6b862e6ed6b02209d543062c038c110585b5e32d1ad7c9717af4f07e41"}, + {file = "Cython-0.29.24-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:10cb3def9774fa99e4583617a5616874aed3255dc241fd1f4a3c2978c78e1c53"}, + {file = "Cython-0.29.24-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2f41ef7edd76dd23315925e003f0c58c8585f3ab24be6885c4b3f60e77c82746"}, + {file = "Cython-0.29.24-cp37-cp37m-win32.whl", hash = "sha256:821c2d416ad7d006b069657ee1034c0e0cb45bdbe9ab6ab631e8c495dfcfa4ac"}, + {file = "Cython-0.29.24-cp37-cp37m-win_amd64.whl", hash = "sha256:2d9e61ed1056a3b6a4b9156b62297ad18b357a7948e57a2f49b061217696567e"}, + {file = "Cython-0.29.24-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:55b0ee28c2c8118bfb3ad9b25cf7a6cbd724e442ea96956e32ccd908d5e3e043"}, + {file = "Cython-0.29.24-cp38-cp38-manylinux1_i686.whl", hash = "sha256:eb2843f8cc01c645725e6fc690a84e99cdb266ce8ebe427cf3a680ff09f876aa"}, + {file = "Cython-0.29.24-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:661dbdea519d9cfb288867252b75fef73ffa8e8bb674cec27acf70646afb369b"}, + {file = "Cython-0.29.24-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bc05de569f811be1fcfde6756c9048ae518f0c4b6d9f8f024752c5365d934cac"}, + {file = "Cython-0.29.24-cp38-cp38-win32.whl", hash = "sha256:a102cfa795c6b3b81a29bdb9dbec545367cd7f353c03e6f30a056fdfefd92854"}, + {file = "Cython-0.29.24-cp38-cp38-win_amd64.whl", hash = "sha256:416046a98255eff97ec02077d20ebeaae52682dfca1c35aadf31260442b92514"}, + {file = "Cython-0.29.24-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ad43e684ade673565f6f9d6638015112f6c7f11aa2a632167b79014f613f0f5f"}, + {file = "Cython-0.29.24-cp39-cp39-manylinux1_i686.whl", hash = "sha256:afb521523cb46ddaa8d269b421f88ea2731fee05e65b952b96d4db760f5a2a1c"}, + {file = "Cython-0.29.24-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:0d414458cb22f8a90d64260da6dace5d5fcebde43f31be52ca51f818c46db8cb"}, + {file = "Cython-0.29.24-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8cb87777e82d1996aef6c146560a19270684271c9c669ba62ac6803b3cd2ff82"}, + {file = "Cython-0.29.24-cp39-cp39-win32.whl", hash = "sha256:91339ee4b465924a3ea4b2a9cec7f7227bc4cadf673ce859d24c2b9ef60b1214"}, + {file = "Cython-0.29.24-cp39-cp39-win_amd64.whl", hash = "sha256:5fb977945a2111f6b64501fdf7ed0ec162cc502b84457fd648d6a558ea8de0d6"}, + {file = "Cython-0.29.24-py2.py3-none-any.whl", hash = "sha256:f96411f0120b5cae483923aaacd2872af8709be4b46522daedc32f051d778385"}, + {file = "Cython-0.29.24.tar.gz", hash = "sha256:cdf04d07c3600860e8c2ebaad4e8f52ac3feb212453c1764a49ac08c827e8443"}, ] dataclasses = [ {file = "dataclasses-0.8-py3-none-any.whl", hash = "sha256:0201d89fa866f68c8ebd9d08ee6ff50c0b255f8ec63a71c16fda7af82bb887bf"}, @@ -1763,8 +1756,8 @@ decorator = [ {file = "decorator-5.0.9.tar.gz", hash = "sha256:72ecfba4320a893c53f9706bebb2d55c270c1e51a28789361aa93e4a21319ed5"}, ] dill = [ - {file = "dill-0.3.3-py2.py3-none-any.whl", hash = "sha256:78370261be6ea49037ace8c17e0b7dd06d0393af6513cc23f9b222d9367ce389"}, - {file = "dill-0.3.3.zip", hash = "sha256:efb7f6cb65dba7087c1e111bb5390291ba3616741f96840bfc75792a1a9b5ded"}, + {file = "dill-0.3.4-py2.py3-none-any.whl", hash = "sha256:7e40e4a70304fd9ceab3535d36e58791d9c4a776b38ec7f7ec9afc8d3dca4d4f"}, + {file = "dill-0.3.4.zip", hash = "sha256:9f9734205146b2b353ab3fec9af0070237b6ddae78452af83d2fca84d739e675"}, ] dm-tree = [ {file = "dm-tree-0.1.6.tar.gz", hash = "sha256:6776404b23b4522c01012ffb314632aba092c9541577004ab153321e87da439a"}, @@ -1790,16 +1783,13 @@ docutils = [ {file = "docutils-0.16.tar.gz", hash = "sha256:c2de3a60e9e7d07be26b7f2b00ca0309c207e06c100f9cc2a94931fc75a478fc"}, ] fasteners = [ - {file = "fasteners-0.16.1-py2.py3-none-any.whl", hash = "sha256:ea0570c5c932acb675ec63c7332ec0ad40ad99c765968319670f740f8c5a0462"}, - {file = "fasteners-0.16.1.tar.gz", hash = "sha256:b6f488d0fc9a3591a32d779400a00c3ebfadd41f45eb024d66f15a6c4e1c4a72"}, + {file = "fasteners-0.16.3-py2.py3-none-any.whl", hash = "sha256:8408e52656455977053871990bd25824d85803b9417aa348f10ba29ef0c751f7"}, + {file = "fasteners-0.16.3.tar.gz", hash = "sha256:b1ab4e5adfbc28681ce44b3024421c4f567e705cc3963c732bf1cba3348307de"}, ] filelock = [ {file = "filelock-3.0.12-py3-none-any.whl", hash = "sha256:929b7d63ec5b7d6b71b0fa5ac14e030b3f70b75747cef1b10da9b879fef15836"}, {file = "filelock-3.0.12.tar.gz", hash = "sha256:18d82244ee114f543149c66a6e0c14e9c4f8a1044b5cdaadd0f82159d6a6ff59"}, ] -future = [ - {file = "future-0.18.2.tar.gz", hash = "sha256:b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d"}, -] gast = [ {file = "gast-0.3.3-py2.py3-none-any.whl", hash = "sha256:8f46f5be57ae6889a4e16e2ca113b1703ef17f2b0abceb83793eaba9e1351a45"}, {file = "gast-0.3.3.tar.gz", hash = "sha256:b881ef288a49aa81440d2c5eb8aeefd4c2bb8993d5f50edae7413a85bfdb3b57"}, @@ -1814,12 +1804,12 @@ glfw = [ {file = "glfw-2.1.0.tar.gz", hash = "sha256:464156ef108801b03f152553622f46b4b2acb080bdab91398dd22a84dfd379b3"}, ] google-api-core = [ - {file = "google-api-core-1.29.0.tar.gz", hash = "sha256:dbe885011111a9afd9ea9a347db6a9c608e82e5c7648c1f7fabf2b4079a579b5"}, - {file = "google_api_core-1.29.0-py2.py3-none-any.whl", hash = "sha256:f83118319d2a28806ec3399671cbe4af5351bd0dac54c40a0395da6162ebe324"}, + {file = "google-api-core-1.31.1.tar.gz", hash = "sha256:108cf94336aed7e614eafc53933ef02adf63b9f0fd87e8f8212acaa09eaca456"}, + {file = "google_api_core-1.31.1-py2.py3-none-any.whl", hash = "sha256:1d63e2b28057d79d64795c9a70abcecb5b7e96da732d011abf09606a39b48701"}, ] google-auth = [ - {file = "google-auth-1.30.1.tar.gz", hash = "sha256:044d81b1e58012f8ebc71cc134e191c1fa312f543f1fbc99973afe28c25e3228"}, - {file = "google_auth-1.30.1-py2.py3-none-any.whl", hash = "sha256:b3ca7a8ff9ab3bdefee3ad5aefb11fc6485423767eee016f5942d8e606ca23fb"}, + {file = "google-auth-1.34.0.tar.gz", hash = "sha256:f1094088bae046fb06f3d1a3d7df14717e8d959e9105b79c57725bd4e17597a2"}, + {file = "google_auth-1.34.0-py2.py3-none-any.whl", hash = "sha256:bd6aa5916970a823e76ffb3d5c3ad3f0bedafca0a7fa53bc15149ab21cb71e05"}, ] google-auth-oauthlib = [ {file = "google-auth-oauthlib-0.4.4.tar.gz", hash = "sha256:09832c6e75032f93818edf1affe4746121d640c625a5bef9b5c96af676e98eee"}, @@ -1838,60 +1828,60 @@ gpustat = [ {file = "gpustat-0.6.0.tar.gz", hash = "sha256:f69135080b2668b662822633312c2180002c10111597af9631bb02e042755b6c"}, ] grpcio = [ - {file = "grpcio-1.38.0-cp27-cp27m-macosx_10_10_x86_64.whl", hash = "sha256:db01eaea57e7a1898c69271e35a84341cf8150cfdec5f0411eddcfb65b5f590e"}, - {file = "grpcio-1.38.0-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:f6f6d51c9efbfe56af9eb9eeb4881cad1b869e4c0e2a32c1d345897fd0979ee3"}, - {file = "grpcio-1.38.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:7466eef3b57b5ac8c7585251b26b917b093ab015750bf98aab4e0836c39e2a2b"}, - {file = "grpcio-1.38.0-cp27-cp27m-win32.whl", hash = "sha256:604da72df5bece8844a15990ce0b3f2f8c5243a1333d3dcc02371048bf6f9269"}, - {file = "grpcio-1.38.0-cp27-cp27m-win_amd64.whl", hash = "sha256:924552099365ea1dd32237dc161849452cd567d931efc57e8427260d8f0eacdb"}, - {file = "grpcio-1.38.0-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:f19bd4b5bcf88ee059f478c4ab46a1607f09835587750294038fbd0120f1a9dc"}, - {file = "grpcio-1.38.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:c47e85eae34af5d17d1c2007a1f0b13a0293d4b7a6d8c8ae23761d718293803e"}, - {file = "grpcio-1.38.0-cp35-cp35m-macosx_10_10_intel.whl", hash = "sha256:d631304e66c908d5d2d1a3cc9c02d372d2f8bed8c3632902d6f3f77d7ca34ac2"}, - {file = "grpcio-1.38.0-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:4a1dd16ccf76ddc18c1cde900049c04ed996e6c02e0588d88d06396c398e6023"}, - {file = "grpcio-1.38.0-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:32067791bd56a13614399f1994454afea9e2475019fcabc4abd3112f09892005"}, - {file = "grpcio-1.38.0-cp35-cp35m-manylinux2014_i686.whl", hash = "sha256:0247b045feb7b138754c91efcca9ea7f7d2cc9f0bd2cc73f6588c523f38873c3"}, - {file = "grpcio-1.38.0-cp35-cp35m-manylinux2014_x86_64.whl", hash = "sha256:07abf6b36c138bf247cef7ac0bad9f8ab1c8242f7c1302af23bb8e6877d08163"}, - {file = "grpcio-1.38.0-cp35-cp35m-win32.whl", hash = "sha256:2c26cb7566e8942542ff1aee71f10ed35e2f9ee95c2f27179b198af0727fbebb"}, - {file = "grpcio-1.38.0-cp35-cp35m-win_amd64.whl", hash = "sha256:e72dd202c982a5922c3b846976cae3b699e3fa8d2355d9d5bad119d066cf23ee"}, - {file = "grpcio-1.38.0-cp36-cp36m-linux_armv7l.whl", hash = "sha256:34fb08d46a70750bef6566c9556a16b98e08af6345a3bad6574477eb0b08c3dd"}, - {file = "grpcio-1.38.0-cp36-cp36m-macosx_10_10_x86_64.whl", hash = "sha256:1d157a2ac6632d31a3ff21f56bbe73420e1d7a21e4fe89d8c7ac792b79c1a589"}, - {file = "grpcio-1.38.0-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:3cacfee78310b5a89769b2fac20b8cd723470130f5b1ba0c960da8db39e74a97"}, - {file = "grpcio-1.38.0-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:e83ab148911e6c8ae4ec5e1334e6d800c6b84c432b92eb0ebf0808087117cb39"}, - {file = "grpcio-1.38.0-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:a836f21a1d08d28c8344e149b28729649ff4732c318a59a3628451bbd6c3c9ac"}, - {file = "grpcio-1.38.0-cp36-cp36m-manylinux2014_i686.whl", hash = "sha256:b4cd8fb4e3725e8852b1da734904edb3579c76660ae26a72283ac580779e5bf0"}, - {file = "grpcio-1.38.0-cp36-cp36m-manylinux2014_x86_64.whl", hash = "sha256:d3566acd87a65a0bc93875125a7064293ab2b6ffb9327333030939681d269f4f"}, - {file = "grpcio-1.38.0-cp36-cp36m-win32.whl", hash = "sha256:f2c4ff0e8c98418c5d55c28ba4ff954e3a5d3c723af5008e8d3ddeae8f0ecb41"}, - {file = "grpcio-1.38.0-cp36-cp36m-win_amd64.whl", hash = "sha256:9a2216df1be9fdbc3c1ebd3c5184d1ef4afb387c29224fce00346b9ddec7c7e3"}, - {file = "grpcio-1.38.0-cp37-cp37m-linux_armv7l.whl", hash = "sha256:9f1747b81d44daed0649ff10395b58c4f29b03139a628afeb058f3e942ba6893"}, - {file = "grpcio-1.38.0-cp37-cp37m-macosx_10_10_x86_64.whl", hash = "sha256:ac05434a7a7f444b2ddd109d72f87f4704364be159aea42a04bd6ea2ba6e10e4"}, - {file = "grpcio-1.38.0-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:a4789014f9d9e9ff29551314a004266b1ac90225c8a009dc87947aaf823fd83c"}, - {file = "grpcio-1.38.0-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:e3072b9ebb573fe1f6757a55b610e4975979d2d58247cbe18ff4385f5aaa81a5"}, - {file = "grpcio-1.38.0-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:7b74c48b2e41dd506f889a4a9974d40b3eead965b0fd2e0b1d55a9b3c0e3bc6e"}, - {file = "grpcio-1.38.0-cp37-cp37m-manylinux2014_i686.whl", hash = "sha256:291dcde4139bc25629de6a743cfcc0ca861e289e3547421ecd2273b51d95b8e1"}, - {file = "grpcio-1.38.0-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:0ab78d4c16d7f3924718711689f5e301aec52cfcf38eb4143bed0f74b7c4fd10"}, - {file = "grpcio-1.38.0-cp37-cp37m-win32.whl", hash = "sha256:10a6c62e0cddd456db91f9f04b53a8cccf67d86d7ca814d989423939099c2723"}, - {file = "grpcio-1.38.0-cp37-cp37m-win_amd64.whl", hash = "sha256:be83ca2d24321c8bf6516b9cd1064da15ac3ff3978c6c502643be114e2a54af2"}, - {file = "grpcio-1.38.0-cp38-cp38-linux_armv7l.whl", hash = "sha256:897bcd54890e6ec6359063affb35e19a61a58ba37bc61c9e8ac6b464b854233e"}, - {file = "grpcio-1.38.0-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:f8dd51b05e7fde843d7a3140b058f02801fbec5784a036d5f6abb374450d4608"}, - {file = "grpcio-1.38.0-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:277faad1d8d462bd1b986f43a47a2c2fe795b2e0de72c9318e11826d921e665a"}, - {file = "grpcio-1.38.0-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:a0d7c88b4cf9748147cd6c16e14569a124b683a3eb5d7787f43eb9d48cf86755"}, - {file = "grpcio-1.38.0-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:2736b109ec5bd9fcf580bf871b5fd4f136c6ae9728407f344a3c64ad87bb6519"}, - {file = "grpcio-1.38.0-cp38-cp38-manylinux2014_i686.whl", hash = "sha256:cbd2754da81bf5f18454c7808b4afe5b57c6736955a742fb599b32b6353fe99f"}, - {file = "grpcio-1.38.0-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:a8f9fcf5623282e4804595166a4ee1401cf4ccfc16fe84bb69e1eb23ffd836ac"}, - {file = "grpcio-1.38.0-cp38-cp38-win32.whl", hash = "sha256:1c11041ecb69d962d49e8a38a35736cdc6fc74230867b5f0ac6138770387a950"}, - {file = "grpcio-1.38.0-cp38-cp38-win_amd64.whl", hash = "sha256:1d212af1008bdbfd4b8a287e17a8e63e14d72ac450475307452f20c1bbb6bae4"}, - {file = "grpcio-1.38.0-cp39-cp39-linux_armv7l.whl", hash = "sha256:8c4f39ad529fb4a33cd6e58d1d860c3b583902208547614b4b5b75fc306f13f6"}, - {file = "grpcio-1.38.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:f9b3678920017842a1b576de3524ecf8f6a2bf4b39f86fb25b870693141e0584"}, - {file = "grpcio-1.38.0-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:1e88a8d5d961df958362f61b1b79ad3981a8b051f99224717b09308546298902"}, - {file = "grpcio-1.38.0-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:6461d69a8ae20e7abce4c6d9cc2603e9f16f4d6b64865eddd0e664127349c04d"}, - {file = "grpcio-1.38.0-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:cd220606259f8aa2403bc0f4a4483bae5e36be879364ca3e256f0304ac44f575"}, - {file = "grpcio-1.38.0-cp39-cp39-manylinux2014_i686.whl", hash = "sha256:25028420d004fe33d64015f5d4d97207c53530acdb493310e217fac76dcd2513"}, - {file = "grpcio-1.38.0-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:b86a1b0654804b5f2248d9262c77a9d5f19882481fc21df53eb2823d0875b86d"}, - {file = "grpcio-1.38.0-cp39-cp39-win32.whl", hash = "sha256:752593a275e26ef250dc4d93a6f7917dd9986396b41eabcc114b0e0315ec1bf6"}, - {file = "grpcio-1.38.0-cp39-cp39-win_amd64.whl", hash = "sha256:6824567e2372dde1bd70214427d23b709d09f1a02a552133d1e0f504b616c84e"}, - {file = "grpcio-1.38.0.tar.gz", hash = "sha256:abbf9c8c3df4d5233d5888c6cfa85c1bb68a6923749bd4dd1abc6e1e93986f17"}, + {file = "grpcio-1.39.0-cp27-cp27m-macosx_10_10_x86_64.whl", hash = "sha256:4163e022f365406be2da78db890035463371effea172300ce5af8a768142baf3"}, + {file = "grpcio-1.39.0-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:02e8a8b41db8e13df53078355b439363e4ac46d0ac9a8a461a39e42829e2bcf8"}, + {file = "grpcio-1.39.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:050901a5baa6c4ca445e1781ef4c32d864f965ccec70c46cd5ad92d15e282c6a"}, + {file = "grpcio-1.39.0-cp27-cp27m-win32.whl", hash = "sha256:1ab44dde4e1b225d3fc873535ca6e642444433131dd2891a601b75fb46c87c11"}, + {file = "grpcio-1.39.0-cp27-cp27m-win_amd64.whl", hash = "sha256:25731b2c20a4ed51bea7e3952d5e83d408a5df32d03c7553457b2e6eb8bcb16c"}, + {file = "grpcio-1.39.0-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:a2733994b05ee5382da1d0378f6312b72c5cb202930c7fa20c794a24e96a1a34"}, + {file = "grpcio-1.39.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:4039645b8b5d19064766f3a6fa535f1db52a61c4d4de97a6a8945331a354d527"}, + {file = "grpcio-1.39.0-cp35-cp35m-macosx_10_10_intel.whl", hash = "sha256:7b95b3329446408e2fe6db9b310d263303fa1a94649d08ec1e1cc12506743d26"}, + {file = "grpcio-1.39.0-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:2a4308875b9b986000513c6b04c2e7424f436a127f15547036c42d3cf8289374"}, + {file = "grpcio-1.39.0-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:4b3fcc1878a1a5b71e1ecdfe82c74f7cd9eadaa43e25be0d67676dcec0c9d39f"}, + {file = "grpcio-1.39.0-cp35-cp35m-manylinux2014_i686.whl", hash = "sha256:6d51be522b573cec14798d4742efaa69d234bedabce122fec2d5489abb3724d4"}, + {file = "grpcio-1.39.0-cp35-cp35m-manylinux2014_x86_64.whl", hash = "sha256:43c57987e526d1b893b85099424387b22de6e3eee4ea7188443de8d657d11cc0"}, + {file = "grpcio-1.39.0-cp35-cp35m-win32.whl", hash = "sha256:cd2e39a199bcbefb3f4b9fa6677c72b0e67332915550fed3bd7c28b454bf917d"}, + {file = "grpcio-1.39.0-cp35-cp35m-win_amd64.whl", hash = "sha256:5628e7cc69079159f9465388ff21fde1e1a780139f76dd99d319119d45156f45"}, + {file = "grpcio-1.39.0-cp36-cp36m-linux_armv7l.whl", hash = "sha256:3c14e2087f809973d5ee8ca64f772a089ead0167286f3f21fdda8b6029b50abb"}, + {file = "grpcio-1.39.0-cp36-cp36m-macosx_10_10_x86_64.whl", hash = "sha256:d5a105f5a595b89a0e394e5b147430b115333d07c55efb0c0eddc96055f0d951"}, + {file = "grpcio-1.39.0-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:366b6b35b3719c5570588e21d866460c5666ae74e3509c2a5a73ca79997abdaf"}, + {file = "grpcio-1.39.0-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:544e1c1a133b43893e03e828c8325be5b82e20d3b0ef0ee3942d32553052a1b5"}, + {file = "grpcio-1.39.0-cp36-cp36m-manylinux2014_i686.whl", hash = "sha256:a659f7c634cacfcf14657687a9fa3265b0a1844b1c19d140f3b66aebfba1a66b"}, + {file = "grpcio-1.39.0-cp36-cp36m-manylinux2014_x86_64.whl", hash = "sha256:b0ff14dd872030e6b2fce8a6811642bd30d93833f794d3782c7e9eb2f01234cc"}, + {file = "grpcio-1.39.0-cp36-cp36m-manylinux_2_24_aarch64.whl", hash = "sha256:2a958ad794292e12d8738a06754ebaf71662e635a89098916c18715b27ca2b5b"}, + {file = "grpcio-1.39.0-cp36-cp36m-win32.whl", hash = "sha256:ed845ba6253c4032d5a01b7fb9db8fe80299e9a437e695a698751b0b191174be"}, + {file = "grpcio-1.39.0-cp36-cp36m-win_amd64.whl", hash = "sha256:b236eb4b50d83754184b248b8b1041bb1546287fff7618c4b7001b9f257bb903"}, + {file = "grpcio-1.39.0-cp37-cp37m-linux_armv7l.whl", hash = "sha256:27e2c6213fc04e71a862bacccb51f3c8e722255933f01736ace183e92d860ee6"}, + {file = "grpcio-1.39.0-cp37-cp37m-macosx_10_10_x86_64.whl", hash = "sha256:5127f4ba1f52fda28037ae465cf4b0e5fabe89d5ac1d64d15b073b46b7db5e16"}, + {file = "grpcio-1.39.0-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:a6211150765cc2343e69879dfb856718b0f7477a4618b5f9a8f6c3ee84c047c0"}, + {file = "grpcio-1.39.0-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:691f5b3a75f072dfb7b093f46303f493b885b7a42f25a831868ffaa22ee85f9d"}, + {file = "grpcio-1.39.0-cp37-cp37m-manylinux2014_i686.whl", hash = "sha256:c8fe430add656b92419f6cd0680b64fbe6347c831d89a7788324f5037dfb3359"}, + {file = "grpcio-1.39.0-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:3cccf470fcaab65a1b0a826ff34bd7c0861eb82ed957a83c6647a983459e4ecd"}, + {file = "grpcio-1.39.0-cp37-cp37m-manylinux_2_24_aarch64.whl", hash = "sha256:2bc7eebb405aac2d7eecfaa881fd73b489f99c01470d7193b4431a6ce199b9c3"}, + {file = "grpcio-1.39.0-cp37-cp37m-win32.whl", hash = "sha256:52100d800390d58492ed1093de6faccd957de6fc29b1a0e5948c84f275d9228f"}, + {file = "grpcio-1.39.0-cp37-cp37m-win_amd64.whl", hash = "sha256:20f57c5d09a36e0d0c8fe16ee1905f4307edb1d04f6034b56320f7fbc1a1071a"}, + {file = "grpcio-1.39.0-cp38-cp38-linux_armv7l.whl", hash = "sha256:6ba6ad60009da2258cf15a72c51b7e0c2f58c8da517e97550881e488839e56c6"}, + {file = "grpcio-1.39.0-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:a1fb9936b86b5efdea417fe159934bcad82a6f8c6ab7d1beec4bf3a78324d975"}, + {file = "grpcio-1.39.0-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:46cfb0f2b757673bfd36ab4b0e3d61988cc1a0d47e0597e91462dcbef7528f35"}, + {file = "grpcio-1.39.0-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:f2621c82fbbff1496993aa5fbf60e235583c7f970506e818671ad52000b6f310"}, + {file = "grpcio-1.39.0-cp38-cp38-manylinux2014_i686.whl", hash = "sha256:e98aca5cfe05ca29950b3d99006b9ddb54fde6451cd12cb2db1443ae3b9fa076"}, + {file = "grpcio-1.39.0-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:8ed1e52ad507a54d20e6aaedf4b3edcab18cc12031eafe6de898f97513d8997b"}, + {file = "grpcio-1.39.0-cp38-cp38-manylinux_2_24_aarch64.whl", hash = "sha256:3c57fa7fec932767bc553bfb956759f45026890255bd232b2f797c3bc4dfeba2"}, + {file = "grpcio-1.39.0-cp38-cp38-win32.whl", hash = "sha256:88dbef504b491b96e3238a6d5360b04508c34c62286080060c85fddd3caf7137"}, + {file = "grpcio-1.39.0-cp38-cp38-win_amd64.whl", hash = "sha256:cffdccc94e63710dd6ead01849443390632c8e0fec52dc26e4fddf9f28ac9280"}, + {file = "grpcio-1.39.0-cp39-cp39-linux_armv7l.whl", hash = "sha256:43e0f5c49f985c94332794aa6c4f15f3a1ced336f0c6a6c8946c67b5ab111ae9"}, + {file = "grpcio-1.39.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:dc3a24022a90c1754e54315009da6f949b48862c1d06daa54f9a28f89a5efacb"}, + {file = "grpcio-1.39.0-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:476fa94ba8efb09213baabd757f6f93e839794d8ae0eaa371347d6899e8f57a0"}, + {file = "grpcio-1.39.0-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:46d510a7af777d2f38ef4c1d25491add37cad24143012f3eebe72dc5c6d0fc4c"}, + {file = "grpcio-1.39.0-cp39-cp39-manylinux2014_i686.whl", hash = "sha256:5091b4a5ee8454a8f0c8ac45946ca25d6142c3be4b1fba141f1d62a6e0b5c696"}, + {file = "grpcio-1.39.0-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:de83a045005703e7b9e67b61c38bb72cd49f68d9d2780d2c675353a3a3f2816f"}, + {file = "grpcio-1.39.0-cp39-cp39-manylinux_2_24_aarch64.whl", hash = "sha256:4258b778ce09ffa3b7c9a26971c216a34369e786771afbf4f98afe223f27d248"}, + {file = "grpcio-1.39.0-cp39-cp39-win32.whl", hash = "sha256:c44958a24559f875d902d5c1acb0ae43faa5a84f6120d1d0d800acb52f96516e"}, + {file = "grpcio-1.39.0-cp39-cp39-win_amd64.whl", hash = "sha256:2068a2b896ac67103c4a5453d5435fafcbb1a2f41eaf25148d08780096935cee"}, + {file = "grpcio-1.39.0.tar.gz", hash = "sha256:57974361a459d6fe04c9ae0af1845974606612249f467bbd2062d963cb90f407"}, ] gym = [ - {file = "gym-0.14.0.tar.gz", hash = "sha256:30f7aaa3c7177da4c50b235fd967dd918f7fc37485c2e5667e7ab5a6e7483a98"}, + {file = "gym-0.18.3.tar.gz", hash = "sha256:81a3e3fbf7fcf57c8cf98f7e22d1bdd5815f3824d9c148a7eb42420d3d642967"}, ] h5py = [ {file = "h5py-2.10.0-cp27-cp27m-macosx_10_6_intel.whl", hash = "sha256:ecf4d0b56ee394a0984de15bceeb97cbe1fe485f1ac205121293fc44dcf3f31f"}, @@ -2000,8 +1990,8 @@ immutables = [ {file = "immutables-0.15.tar.gz", hash = "sha256:3713ab1ebbb6946b7ce1387bb9d1d7f5e09c45add58c2a2ee65f963c171e746b"}, ] importlib-metadata = [ - {file = "importlib_metadata-4.5.0-py3-none-any.whl", hash = "sha256:833b26fb89d5de469b24a390e9df088d4e52e4ba33b01dc5e0e4f41b81a16c00"}, - {file = "importlib_metadata-4.5.0.tar.gz", hash = "sha256:b142cc1dd1342f31ff04bb7d022492b09920cb64fed867cd3ea6f80fe3ebd139"}, + {file = "importlib_metadata-4.6.1-py3-none-any.whl", hash = "sha256:9f55f560e116f8643ecf2922d9cd3e1c7e8d52e683178fecd9d08f6aa357e11e"}, + {file = "importlib_metadata-4.6.1.tar.gz", hash = "sha256:079ada16b7fc30dfbb5d13399a5113110dab1aa7c2bc62f66af75f0b717c8cac"}, ] importlib-resources = [ {file = "importlib_resources-3.3.1-py2.py3-none-any.whl", hash = "sha256:42068585cc5e8c2bf0a17449817401102a5125cbfbb26bb0f43cde1568f6f2df"}, @@ -2324,8 +2314,8 @@ opt-einsum = [ {file = "opt_einsum-3.3.0.tar.gz", hash = "sha256:59f6475f77bbc37dcf7cd748519c0ec60722e91e63ca114e68821c0c54a46549"}, ] packaging = [ - {file = "packaging-20.9-py2.py3-none-any.whl", hash = "sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a"}, - {file = "packaging-20.9.tar.gz", hash = "sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5"}, + {file = "packaging-21.0-py3-none-any.whl", hash = "sha256:c86254f9220d55e31cc94d69bade760f0847da8000def4dfe1c6b872fd14ff14"}, + {file = "packaging-21.0.tar.gz", hash = "sha256:7dc96269f53a4ccec5c0670940a4281106dd0bb343f47b7471f779df49c2fbe7"}, ] pandas = [ {file = "pandas-0.25.0-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl", hash = "sha256:32c44e5b628c48ba17703f734d59f369d4cdcb4239ef26047d6c8a8bfda29a6b"}, @@ -2384,29 +2374,33 @@ prometheus-client = [ {file = "prometheus_client-0.11.0.tar.gz", hash = "sha256:3a8baade6cb80bcfe43297e33e7623f3118d660d41387593758e2fb1ea173a86"}, ] protobuf = [ - {file = "protobuf-3.17.2-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:c49e673436e24e925022c090a98905cfe88d056cb5dde67a8e20ae339acd8140"}, - {file = "protobuf-3.17.2-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:4e62be28dcaab52c7e8e8e3fb9a7005dec6374e698f3b22d79276d95c13151e5"}, - {file = "protobuf-3.17.2-cp35-cp35m-macosx_10_9_intel.whl", hash = "sha256:c2038dec269b65683f16057886c09ca7526471793029bdd43259282e1e0fb668"}, - {file = "protobuf-3.17.2-cp35-cp35m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:b667ddbb77ff619fdbd18be75445d4448ee68493c9bddd1b4d0b177025e2f6f6"}, - {file = "protobuf-3.17.2-cp35-cp35m-win32.whl", hash = "sha256:993814b0199f22523a227696a8e20d2cd4b9cda60c76d2fb3969ce0c77eb9e0f"}, - {file = "protobuf-3.17.2-cp35-cp35m-win_amd64.whl", hash = "sha256:38b2c6e2204731cfebdb2452ffb7addf0367172b35cff8ccda338ccea9e7c87a"}, - {file = "protobuf-3.17.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:42239d47f213f1ce12ddca62c0c70856efbac09797d715e5d606b3fbc3f16c44"}, - {file = "protobuf-3.17.2-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:4da073b6c1a83e4ff1294156844f21343c5094e295c194d8ecc94703c7a6f42a"}, - {file = "protobuf-3.17.2-cp36-cp36m-win32.whl", hash = "sha256:c303ce92c60d069237cfbd41790fde3d00066ca9500fac464454e20c2f12250c"}, - {file = "protobuf-3.17.2-cp36-cp36m-win_amd64.whl", hash = "sha256:751d71dc6559dd794d309811d8dcf179d6a128b38a1655ae7137530f33895cb4"}, - {file = "protobuf-3.17.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:f3f057ad59cd4d5ea2b1bb88d36c6f009b8043007cf03d96cbd3b9c06859d4fa"}, - {file = "protobuf-3.17.2-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:c5b512c1982f8b427a302db094cf79f8f235284014d01b23fba461aa2c1459a0"}, - {file = "protobuf-3.17.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:9dc01ddc3b195c4538942790c4b195cf17b52d3785a60c1f6f25b794f51e2071"}, - {file = "protobuf-3.17.2-cp37-cp37m-win32.whl", hash = "sha256:45cc0197e9f9192693c8a4dbcba8c9227a53a2720fc3826dfe791113d9ff5e5e"}, - {file = "protobuf-3.17.2-cp37-cp37m-win_amd64.whl", hash = "sha256:816fe5e8b73c29adb13a57e1653da15f24cbb90e86ea92e6f08abe6d8c0cbdb4"}, - {file = "protobuf-3.17.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:557e16884d7276caf92c1fb188fe6dfbec47891d3507d4982db1e3d89ffd22de"}, - {file = "protobuf-3.17.2-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:89613ec119fdcad992f65d7a5bfe3170c17edc839982d0089fc0c9242fb8e517"}, - {file = "protobuf-3.17.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:744f5c9a3b9e7538c4c70f2b0e46f86858b684f5d17bf78643a19a6c21c7936f"}, - {file = "protobuf-3.17.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1e08da38d56b74962d9cb05d86ca5f25d2e5b78f05fd00db7900cad3faa6de00"}, - {file = "protobuf-3.17.2-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:6388e7f300010ea7ac77113c7491c5622645d2447fdf701cbfe026b832d728cd"}, - {file = "protobuf-3.17.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:0b5a73fa43efda0df0191c162680ec40cef45463fa8ff69fbeaeeddda4c760f5"}, - {file = "protobuf-3.17.2-py2.py3-none-any.whl", hash = "sha256:50c657a54592c1bec7b24521fdbbbd2f7b51325ba23ab505ed03e8ebf3a5aeff"}, - {file = "protobuf-3.17.2.tar.gz", hash = "sha256:5a3450acf046716e4a4f02a3f7adfb7b86f1b5b3ae392cec759915e79538d40d"}, + {file = "protobuf-3.17.3-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:ab6bb0e270c6c58e7ff4345b3a803cc59dbee19ddf77a4719c5b635f1d547aa8"}, + {file = "protobuf-3.17.3-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:13ee7be3c2d9a5d2b42a1030976f760f28755fcf5863c55b1460fd205e6cd637"}, + {file = "protobuf-3.17.3-cp35-cp35m-macosx_10_9_intel.whl", hash = "sha256:1556a1049ccec58c7855a78d27e5c6e70e95103b32de9142bae0576e9200a1b0"}, + {file = "protobuf-3.17.3-cp35-cp35m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:f0e59430ee953184a703a324b8ec52f571c6c4259d496a19d1cabcdc19dabc62"}, + {file = "protobuf-3.17.3-cp35-cp35m-win32.whl", hash = "sha256:a981222367fb4210a10a929ad5983ae93bd5a050a0824fc35d6371c07b78caf6"}, + {file = "protobuf-3.17.3-cp35-cp35m-win_amd64.whl", hash = "sha256:6d847c59963c03fd7a0cd7c488cadfa10cda4fff34d8bc8cba92935a91b7a037"}, + {file = "protobuf-3.17.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:145ce0af55c4259ca74993ddab3479c78af064002ec8227beb3d944405123c71"}, + {file = "protobuf-3.17.3-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6ce4d8bf0321e7b2d4395e253f8002a1a5ffbcfd7bcc0a6ba46712c07d47d0b4"}, + {file = "protobuf-3.17.3-cp36-cp36m-win32.whl", hash = "sha256:7a4c97961e9e5b03a56f9a6c82742ed55375c4a25f2692b625d4087d02ed31b9"}, + {file = "protobuf-3.17.3-cp36-cp36m-win_amd64.whl", hash = "sha256:a22b3a0dbac6544dacbafd4c5f6a29e389a50e3b193e2c70dae6bbf7930f651d"}, + {file = "protobuf-3.17.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:ffea251f5cd3c0b9b43c7a7a912777e0bc86263436a87c2555242a348817221b"}, + {file = "protobuf-3.17.3-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:9b7a5c1022e0fa0dbde7fd03682d07d14624ad870ae52054849d8960f04bc764"}, + {file = "protobuf-3.17.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:8727ee027157516e2c311f218ebf2260a18088ffb2d29473e82add217d196b1c"}, + {file = "protobuf-3.17.3-cp37-cp37m-win32.whl", hash = "sha256:14c1c9377a7ffbeaccd4722ab0aa900091f52b516ad89c4b0c3bb0a4af903ba5"}, + {file = "protobuf-3.17.3-cp37-cp37m-win_amd64.whl", hash = "sha256:c56c050a947186ba51de4f94ab441d7f04fcd44c56df6e922369cc2e1a92d683"}, + {file = "protobuf-3.17.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2ae692bb6d1992afb6b74348e7bb648a75bb0d3565a3f5eea5bec8f62bd06d87"}, + {file = "protobuf-3.17.3-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:99938f2a2d7ca6563c0ade0c5ca8982264c484fdecf418bd68e880a7ab5730b1"}, + {file = "protobuf-3.17.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6902a1e4b7a319ec611a7345ff81b6b004b36b0d2196ce7a748b3493da3d226d"}, + {file = "protobuf-3.17.3-cp38-cp38-win32.whl", hash = "sha256:59e5cf6b737c3a376932fbfb869043415f7c16a0cf176ab30a5bbc419cd709c1"}, + {file = "protobuf-3.17.3-cp38-cp38-win_amd64.whl", hash = "sha256:ebcb546f10069b56dc2e3da35e003a02076aaa377caf8530fe9789570984a8d2"}, + {file = "protobuf-3.17.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4ffbd23640bb7403574f7aff8368e2aeb2ec9a5c6306580be48ac59a6bac8bde"}, + {file = "protobuf-3.17.3-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:26010f693b675ff5a1d0e1bdb17689b8b716a18709113288fead438703d45539"}, + {file = "protobuf-3.17.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:e76d9686e088fece2450dbc7ee905f9be904e427341d289acbe9ad00b78ebd47"}, + {file = "protobuf-3.17.3-cp39-cp39-win32.whl", hash = "sha256:a38bac25f51c93e4be4092c88b2568b9f407c27217d3dd23c7a57fa522a17554"}, + {file = "protobuf-3.17.3-cp39-cp39-win_amd64.whl", hash = "sha256:85d6303e4adade2827e43c2b54114d9a6ea547b671cb63fafd5011dc47d0e13d"}, + {file = "protobuf-3.17.3-py2.py3-none-any.whl", hash = "sha256:2bfb815216a9cd9faec52b16fd2bfa68437a44b67c56bee59bc3926522ecb04e"}, + {file = "protobuf-3.17.3.tar.gz", hash = "sha256:72804ea5eaa9c22a090d2803813e280fb273b62d5ae497aaf3553d141c4fdd7b"}, ] psutil = [ {file = "psutil-5.8.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:0066a82f7b1b37d334e68697faba68e5ad5e858279fd6351c8ca6024e8d6ba64"}, @@ -2489,8 +2483,8 @@ pydata-sphinx-theme = [ {file = "pydata_sphinx_theme-0.6.3-py3-none-any.whl", hash = "sha256:f0fee20dc33fa5efa6b9be57368be760d236d8b9c1486b14ad1d17b7e7e0db04"}, ] pyglet = [ - {file = "pyglet-1.3.2-py2.py3-none-any.whl", hash = "sha256:8b07aea16f34ac861cffd06a0c17723ca944d172e577b57b21859b7990709a66"}, - {file = "pyglet-1.3.2.tar.gz", hash = "sha256:b00570e7cdf6971af8953b6ece50d83d13272afa5d1f1197c58c0f478dd17743"}, + {file = "pyglet-1.5.15-py3-none-any.whl", hash = "sha256:4401cc176580e4e17e2df8bbf7536f27e691327dc3f38f209a12f1859c70aed2"}, + {file = "pyglet-1.5.15.zip", hash = "sha256:da9d8337388cedabf1f1c5dc21a45bb2b0e5327fba47f996c8573818c3dfa478"}, ] pygments = [ {file = "Pygments-2.9.0-py3-none-any.whl", hash = "sha256:d66e804411278594d764fc69ec36ec13d9ae9147193a1740cd34d272ca383b8e"}, @@ -2501,15 +2495,35 @@ pyparsing = [ {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, ] pyrsistent = [ - {file = "pyrsistent-0.17.3.tar.gz", hash = "sha256:2e636185d9eb976a18a8a8e96efce62f2905fea90041958d8cc2a189756ebf3e"}, + {file = "pyrsistent-0.18.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f4c8cabb46ff8e5d61f56a037974228e978f26bfefce4f61a4b1ac0ba7a2ab72"}, + {file = "pyrsistent-0.18.0-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:da6e5e818d18459fa46fac0a4a4e543507fe1110e808101277c5a2b5bab0cd2d"}, + {file = "pyrsistent-0.18.0-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:5e4395bbf841693eaebaa5bb5c8f5cdbb1d139e07c975c682ec4e4f8126e03d2"}, + {file = "pyrsistent-0.18.0-cp36-cp36m-win32.whl", hash = "sha256:527be2bfa8dc80f6f8ddd65242ba476a6c4fb4e3aedbf281dfbac1b1ed4165b1"}, + {file = "pyrsistent-0.18.0-cp36-cp36m-win_amd64.whl", hash = "sha256:2aaf19dc8ce517a8653746d98e962ef480ff34b6bc563fc067be6401ffb457c7"}, + {file = "pyrsistent-0.18.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:58a70d93fb79dc585b21f9d72487b929a6fe58da0754fa4cb9f279bb92369396"}, + {file = "pyrsistent-0.18.0-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:4916c10896721e472ee12c95cdc2891ce5890898d2f9907b1b4ae0f53588b710"}, + {file = "pyrsistent-0.18.0-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:73ff61b1411e3fb0ba144b8f08d6749749775fe89688093e1efef9839d2dcc35"}, + {file = "pyrsistent-0.18.0-cp37-cp37m-win32.whl", hash = "sha256:b29b869cf58412ca5738d23691e96d8aff535e17390128a1a52717c9a109da4f"}, + {file = "pyrsistent-0.18.0-cp37-cp37m-win_amd64.whl", hash = "sha256:097b96f129dd36a8c9e33594e7ebb151b1515eb52cceb08474c10a5479e799f2"}, + {file = "pyrsistent-0.18.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:772e94c2c6864f2cd2ffbe58bb3bdefbe2a32afa0acb1a77e472aac831f83427"}, + {file = "pyrsistent-0.18.0-cp38-cp38-manylinux1_i686.whl", hash = "sha256:c1a9ff320fa699337e05edcaae79ef8c2880b52720bc031b219e5b5008ebbdef"}, + {file = "pyrsistent-0.18.0-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:cd3caef37a415fd0dae6148a1b6957a8c5f275a62cca02e18474608cb263640c"}, + {file = "pyrsistent-0.18.0-cp38-cp38-win32.whl", hash = "sha256:e79d94ca58fcafef6395f6352383fa1a76922268fa02caa2272fff501c2fdc78"}, + {file = "pyrsistent-0.18.0-cp38-cp38-win_amd64.whl", hash = "sha256:a0c772d791c38bbc77be659af29bb14c38ced151433592e326361610250c605b"}, + {file = "pyrsistent-0.18.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d5ec194c9c573aafaceebf05fc400656722793dac57f254cd4741f3c27ae57b4"}, + {file = "pyrsistent-0.18.0-cp39-cp39-manylinux1_i686.whl", hash = "sha256:6b5eed00e597b5b5773b4ca30bd48a5774ef1e96f2a45d105db5b4ebb4bca680"}, + {file = "pyrsistent-0.18.0-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:48578680353f41dca1ca3dc48629fb77dfc745128b56fc01096b2530c13fd426"}, + {file = "pyrsistent-0.18.0-cp39-cp39-win32.whl", hash = "sha256:f3ef98d7b76da5eb19c37fda834d50262ff9167c65658d1d8f974d2e4d90676b"}, + {file = "pyrsistent-0.18.0-cp39-cp39-win_amd64.whl", hash = "sha256:404e1f1d254d314d55adb8d87f4f465c8693d6f902f67eb6ef5b4526dc58e6ea"}, + {file = "pyrsistent-0.18.0.tar.gz", hash = "sha256:773c781216f8c2900b42a7b638d5b517bb134ae1acbebe4d1e8f1f41ea60eb4b"}, ] pytest = [ {file = "pytest-5.4.3-py3-none-any.whl", hash = "sha256:5c0db86b698e8f170ba4582a492248919255fcd4c79b1ee64ace34301fb589a1"}, {file = "pytest-5.4.3.tar.gz", hash = "sha256:7979331bfcba207414f5e1263b5a0f8f521d0f457318836a7355531ed1a4c7d8"}, ] python-dateutil = [ - {file = "python-dateutil-2.8.1.tar.gz", hash = "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c"}, - {file = "python_dateutil-2.8.1-py2.py3-none-any.whl", hash = "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a"}, + {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, + {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, ] pytz = [ {file = "pytz-2021.1-py2.py3-none-any.whl", hash = "sha256:eb10ce3e7736052ed3623d49975ce333bcd712c7bb19a58b9e2089d4057d0798"}, @@ -2614,8 +2628,8 @@ sphinx = [ {file = "Sphinx-3.5.4.tar.gz", hash = "sha256:19010b7b9fa0dc7756a6e105b2aacd3a80f798af3c25c273be64d7beeb482cb1"}, ] sphinx-book-theme = [ - {file = "sphinx-book-theme-0.1.0.tar.gz", hash = "sha256:b2db884eb9a843f7864a5660322ac7b0b9cd762f31341dedb4530f1546675bbd"}, - {file = "sphinx_book_theme-0.1.0-py3-none-any.whl", hash = "sha256:182e57262e76c657a8f3082b0922f3617c8b0cb3e4c4079fa6b2ae9b2a5d3ae9"}, + {file = "sphinx-book-theme-0.1.1.tar.gz", hash = "sha256:0b182939df1711b5af74b26af74884a12f7de75a0dc6b24bdeb28d715c4935da"}, + {file = "sphinx_book_theme-0.1.1-py3-none-any.whl", hash = "sha256:4af4a37be7fe7d5f4d989416c0ea46476201aaaa513cd8faf341cb691eef0735"}, ] sphinxcontrib-applehelp = [ {file = "sphinxcontrib-applehelp-1.0.2.tar.gz", hash = "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"}, @@ -2652,8 +2666,8 @@ tensorboard-plugin-wit = [ {file = "tensorboard_plugin_wit-1.8.0-py3-none-any.whl", hash = "sha256:2a80d1c551d741e99b2f197bb915d8a133e24adb8da1732b840041860f91183a"}, ] tensorboardx = [ - {file = "tensorboardX-2.2-py2.py3-none-any.whl", hash = "sha256:236409a0144094b7ed1f7fc003d27c73a529b7fe326194a26b0f98d40c763779"}, - {file = "tensorboardX-2.2.tar.gz", hash = "sha256:b68e08adae2d0c6d09721a9b7a3e22000b7d2b57faec069b5491aeace689f76f"}, + {file = "tensorboardX-2.4-py2.py3-none-any.whl", hash = "sha256:2742b1ac3fdef2b938b1110b503c6986b7100a3250394a5a44ef12784b563b55"}, + {file = "tensorboardX-2.4.tar.gz", hash = "sha256:e56331ee79b7656c6f0974ab2e918045d5e9393701f83cac8884de4b5b360130"}, ] tensorflow = [ {file = "tensorflow-2.2.0-cp35-cp35m-macosx_10_11_x86_64.whl", hash = "sha256:7ed67b47cdf6598a79583de5b57c595493eac2b8b6b3a828f912354716cb8149"}, @@ -2742,6 +2756,6 @@ yarl = [ {file = "yarl-1.6.3.tar.gz", hash = "sha256:8a9066529240171b68893d60dca86a763eae2139dd42f42106b03cf4b426bf10"}, ] zipp = [ - {file = "zipp-3.4.1-py3-none-any.whl", hash = "sha256:51cb66cc54621609dd593d1787f286ee42a5c0adbb4b29abea5a63edc3e03098"}, - {file = "zipp-3.4.1.tar.gz", hash = "sha256:3607921face881ba3e026887d8150cca609d517579abe052ac81fc5aeffdbd76"}, + {file = "zipp-3.5.0-py3-none-any.whl", hash = "sha256:957cfda87797e389580cb8b9e3870841ca991e2125350677b2ca83a0e99390a3"}, + {file = "zipp-3.5.0.tar.gz", hash = "sha256:f5812b1e007e48cff63449a5e9f4e7ebea716b4111f9c4f9a645f91d579bf0c4"}, ] diff --git a/publish-docs.sh b/publish-docs.sh new file mode 100755 index 0000000..ecbd27d --- /dev/null +++ b/publish-docs.sh @@ -0,0 +1,16 @@ +# based on https://stackoverflow.com/a/40178818/11051330 + +STATUS="$(LC_ALL=C git status)" +DOCSDIR="docs/_build/" + +if [[ $STATUS == *"nothing to commit, working tree clean"* ]] +then + awk -vLine="$DOCSDIR" '!index($0,Line)' ./.gitignore + git add . + git commit -m "Edit .gitignore to publish docs" + git subtree push --prefix $DOCSDIR/html/ origin gh-pages + git reset HEAD~ + git checkout .gitignore +else + echo "Need clean working directory to publish" +fi diff --git a/setup.py b/setup.py index 299dd70..c435dc1 100644 --- a/setup.py +++ b/setup.py @@ -12,20 +12,20 @@ package_data = {"": ["*"]} extras_require = [ - "ray[default,rllib]==1.3.0", - "tensorflow==2.2.0", + "ray[default,rllib]==1.6.0", + "tensorflow==2.6.0", "pillow>=6.1.0", "requests==2.22.0", "configspace==0.4.10", - "scipy>=1.3.0", - "pandas==0.25.0", - "gym[atari]==0.18", + "scipy>=1.4.1", + "gym[atari]==0.19", + "pandas>=0.25.0", ] extras_require_disc = [ "ray[rllib,debug]==0.7.3", - "tensorflow==1.13.0rc1", - "pillow>=6.1.0", + "tensorflow==1.13.1", + "pillow==6.1.0", "requests==2.22.0", "configspace==0.4.10", "scipy==1.3.0", @@ -33,7 +33,6 @@ "gym[atari]==0.14", "atari-py==0.2.5", # https://github.com/openai/atari-py/issues/81 #TODO Remove "matplotlib==3.2.1", # #TODO Remove? - "pillow==6.1.0", ] extras_require_cont = [ @@ -86,6 +85,7 @@ long_description=long_description, long_description_content_type="text/markdown", license=LICENSE, + py_modules=[], url="https://github.com/automl/mdp-playground", project_urls={ "Bug Tracker": "https://github.com/automl/mdp-playground/issues",