diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index f92cc7d29..614a526e5 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -10,20 +10,21 @@ repos:
- id: check-docstring-first
- repo: https://github.com/psf/black
- rev: 22.3.0
+ rev: 23.1.0
hooks:
- id: black
- repo: https://github.com/asottile/blacken-docs
- rev: v1.12.0
+ rev: 1.13.0
hooks:
- id: blacken-docs
- additional_dependencies: [black==21.12b0]
+ additional_dependencies: [black==23.1.0]
-- repo: https://gitlab.com/pycqa/flake8
- rev: 4.0.1
+- repo: https://github.com/pycqa/flake8
+ rev: 6.0.0
hooks:
- id: flake8
additional_dependencies: [flake8-docstrings]
types: [file, python]
+ exclude: (.*/__init__.py|rlberry/check_packages.py)
args: ['--select=F401,F405,D410,D411,D412']
diff --git a/CITATION.cff b/CITATION.cff
index dc5d52858..7a01b4754 100644
--- a/CITATION.cff
+++ b/CITATION.cff
@@ -19,4 +19,4 @@ abbreviation: rlberry
version: 0.2.2-dev
doi: 10.5281/zenodo.5223307
date-released: 2021-10-01
-url: "https://github.com/rlberry-py/rlberry"
\ No newline at end of file
+url: "https://github.com/rlberry-py/rlberry"
diff --git a/README.md b/README.md
index 3fd606d6f..c3567ee55 100644
--- a/README.md
+++ b/README.md
@@ -9,6 +9,7 @@
A Reinforcement Learning Library for Research and Education
+
diff --git a/assets/logo_square.svg b/assets/logo_square.svg
index 7c6feb1a7..747f7aea7 100644
--- a/assets/logo_square.svg
+++ b/assets/logo_square.svg
@@ -49,4 +49,4 @@
-
\ No newline at end of file
+
diff --git a/assets/logo_wide.svg b/assets/logo_wide.svg
index 09d0e20ab..a510b73ad 100644
--- a/assets/logo_wide.svg
+++ b/assets/logo_wide.svg
@@ -49,4 +49,4 @@
-
\ No newline at end of file
+
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 916bee798..4cc1d072f 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -10,8 +10,6 @@ pr:
- rlberry/_version.py
- docs
-
-
jobs:
- job: 'checkPrLabel'
@@ -74,29 +72,6 @@ jobs:
./codecov
displayName: 'Upload to codecov.io'
-- job: 'Formatting'
- dependsOn: checkPrLabel
- condition: or(in(variables['Build.SourceBranch'], 'refs/heads/main'), eq(dependencies.checkPrLabel.outputs['checkPrLabel.prHasCILabel'], true))
-
- pool:
- vmImage: ubuntu-latest
- strategy:
- matrix:
- Python39:
- python.version: '3.9'
-
- steps:
- - script: |
- python -m pip install --upgrade pip
- pip install black flake8 flake8-docstrings
- black --check examples rlberry *py
- displayName: "black"
- - script: |
- # ensure there is no unused imports with
- flake8 --select F401,F405,D410,D411,D412 --exclude=rlberry/check_packages.py --per-file-ignores="__init__.py:F401"
- displayName: 'flake8'
-
-
- job: 'macOS'
dependsOn: checkPrLabel
diff --git a/docs/basics/DeepRLTutorial/TutorialDeepRL.rst b/docs/basics/DeepRLTutorial/TutorialDeepRL.rst
index 8a964730d..129c7c395 100644
--- a/docs/basics/DeepRLTutorial/TutorialDeepRL.rst
+++ b/docs/basics/DeepRLTutorial/TutorialDeepRL.rst
@@ -2,7 +2,7 @@ Quickstart for Deep Reinforcement Learning in rlberry
=====================================================
.. highlight:: none
-
+
..
Authors: Riccardo Della Vecchia, Hector Kohler, Alena Shilova.
diff --git a/docs/basics/compare_agents.rst b/docs/basics/compare_agents.rst
index c4002f755..8bcfbfe9c 100644
--- a/docs/basics/compare_agents.rst
+++ b/docs/basics/compare_agents.rst
@@ -7,7 +7,7 @@ Compare different agents
========================
-Two or more agents can be compared using the classes
+Two or more agents can be compared using the classes
:class:`~rlberry.manager.agent_manager.AgentManager` and
:class:`~rlberry.manager.multiple_managers.MultipleManagers`, as in the example below.
@@ -26,14 +26,14 @@ Two or more agents can be compared using the classes
# Parameters
params = {}
- params['reinforce'] = dict(
- gamma=0.99,
- horizon=160,
+ params["reinforce"] = dict(
+ gamma=0.99,
+ horizon=160,
)
- params['kernel'] = dict(
- gamma=0.99,
- horizon=160,
+ params["kernel"] = dict(
+ gamma=0.99,
+ horizon=160,
)
eval_kwargs = dict(eval_horizon=200)
@@ -41,29 +41,31 @@ Two or more agents can be compared using the classes
# Create AgentManager for REINFORCE and RSKernelUCBVI
multimanagers = MultipleManagers()
multimanagers.append(
- AgentManager(
+ AgentManager(
REINFORCEAgent,
env,
- init_kwargs=params['reinforce'],
+ init_kwargs=params["reinforce"],
fit_budget=100,
n_fit=4,
- parallelization='thread')
+ parallelization="thread",
+ )
)
multimanagers.append(
- AgentManager(
+ AgentManager(
RSKernelUCBVIAgent,
env,
- init_kwargs=params['kernel'],
+ init_kwargs=params["kernel"],
fit_budget=100,
n_fit=4,
- parallelization='thread')
+ parallelization="thread",
+ )
)
# Fit and plot
multimanagers.run()
plot_writer_data(
- multimanagers.managers,
- tag='episode_rewards',
- preprocess_func=np.cumsum,
- title="Cumulative Rewards")
-
+ multimanagers.managers,
+ tag="episode_rewards",
+ preprocess_func=np.cumsum,
+ title="Cumulative Rewards",
+ )
diff --git a/docs/basics/create_agent.rst b/docs/basics/create_agent.rst
index 47d1a89cd..86a899743 100644
--- a/docs/basics/create_agent.rst
+++ b/docs/basics/create_agent.rst
@@ -9,7 +9,7 @@ Create an agent
rlberry_ requires you to use a **very simple interface** to write agents, with basically
two methods to implement: :code:`fit()` and :code:`eval()`.
-The example below shows how to create an agent.
+The example below shows how to create an agent.
.. code-block:: python
@@ -17,27 +17,25 @@ The example below shows how to create an agent.
import numpy as np
from rlberry.agents import Agent
- class MyAgent(Agent):
+ class MyAgent(Agent):
name = "MyAgent"
- def __init__(self,
- env,
- param1=0.99,
- param2=1e-5,
- **kwargs): # it's important to put **kwargs to ensure compatibility with the base class
- # self.env is initialized in the base class
- # An evaluation environment is also initialized: self.eval_env
- Agent.__init__(self, env, **kwargs)
+ def __init__(
+ self, env, param1=0.99, param2=1e-5, **kwargs
+ ): # it's important to put **kwargs to ensure compatibility with the base class
+ # self.env is initialized in the base class
+ # An evaluation environment is also initialized: self.eval_env
+ Agent.__init__(self, env, **kwargs)
- self.param1 = param1
- self.param2 = param2
+ self.param1 = param1
+ self.param2 = param2
- def fit(self, budget, **kwargs):
+ def fit(self, budget, **kwargs):
"""
The parameter budget can represent the number of steps, the number of episodes etc,
depending on the agent.
- * Interact with the environment (self.env);
+ * Interact with the environment (self.env);
* Train the agent
* Return useful information
"""
@@ -48,16 +46,16 @@ The example below shows how to create an agent.
state = self.env.reset()
done = False
while not done:
- action = ...
- next_state, reward, done, _ = self.env.step(action)
- rewards[ep] += reward
+ action = ...
+ next_state, reward, done, _ = self.env.step(action)
+ rewards[ep] += reward
- info = {'episode_rewards': rewards}
+ info = {"episode_rewards": rewards}
return info
def eval(self, **kwargs):
"""
- Returns a value corresponding to the evaluation of the agent on the
+ Returns a value corresponding to the evaluation of the agent on the
evaluation environment.
For instance, it can be a Monte-Carlo evaluation of the policy learned in fit().
@@ -65,9 +63,9 @@ The example below shows how to create an agent.
return 0.0
-.. note:: It's important that your agent accepts optional `**kwargs` and pass it to the base class as :code:`Agent.__init__(self, env, **kwargs)`.
+.. note:: It's important that your agent accepts optional `**kwargs` and pass it to the base class as :code:`Agent.__init__(self, env, **kwargs)`.
.. seealso::
- Documentation of the classes :class:`~rlberry.agents.agent.Agent`
+ Documentation of the classes :class:`~rlberry.agents.agent.Agent`
and :class:`~rlberry.agents.agent.AgentWithSimplePolicy`.
diff --git a/docs/basics/evaluate_agent.rst b/docs/basics/evaluate_agent.rst
index 0d9921771..3bf117fa4 100644
--- a/docs/basics/evaluate_agent.rst
+++ b/docs/basics/evaluate_agent.rst
@@ -20,7 +20,7 @@ as shown in the examples below.
# Environment (constructor, kwargs)
- env = (gym_make, dict(id='CartPole-v1'))
+ env = (gym_make, dict(id="CartPole-v1"))
# Initial set of parameters
params = dict(
@@ -41,14 +41,15 @@ as shown in the examples below.
eval_kwargs=eval_kwargs,
fit_budget=fit_budget,
n_fit=4,
- parallelization='thread')
+ parallelization="thread",
+ )
# Fit the 4 instances
stats.fit()
# The fit() method of REINFORCEAgent logs data to a :class:`~rlberry.utils.writers.DefaultWriter`
# object. The method below can be used to plot those data!
- plot_writer_data(stats, tag='episode_rewards')
+ plot_writer_data(stats, tag="episode_rewards")
@@ -72,17 +73,17 @@ For :class:`~rlberry.agents.reinforce.reinforce.REINFORCEAgent`, this method loo
----------
trial: optuna.trial
"""
- batch_size = trial.suggest_categorical('batch_size', [1, 4, 8, 16, 32])
- gamma = trial.suggest_categorical('gamma', [0.9, 0.95, 0.99])
- learning_rate = trial.suggest_loguniform('learning_rate', 1e-5, 1)
- entr_coef = trial.suggest_loguniform('entr_coef', 1e-8, 0.1)
+ batch_size = trial.suggest_categorical("batch_size", [1, 4, 8, 16, 32])
+ gamma = trial.suggest_categorical("gamma", [0.9, 0.95, 0.99])
+ learning_rate = trial.suggest_loguniform("learning_rate", 1e-5, 1)
+ entr_coef = trial.suggest_loguniform("entr_coef", 1e-8, 0.1)
return {
- 'batch_size': batch_size,
- 'gamma': gamma,
- 'learning_rate': learning_rate,
- 'entr_coef': entr_coef,
- }
+ "batch_size": batch_size,
+ "gamma": gamma,
+ "learning_rate": learning_rate,
+ "entr_coef": entr_coef,
+ }
Now we can use the :meth:`optimize_hyperparams` method
@@ -93,13 +94,13 @@ of :class:`~rlberry.manager.agent_manager.AgentManager` to find good parameters
# Run optimization and print results
stats.optimize_hyperparams(
n_trials=100,
- timeout=10, # stop after 10 seconds
+ timeout=10, # stop after 10 seconds
n_fit=2,
- sampler_method='optuna_default'
+ sampler_method="optuna_default",
)
print(stats.best_hyperparams)
# Calling fit() again will train the agent with the optimized parameters
stats.fit()
- plot_writer_data(stats, tag='episode_rewards')
+ plot_writer_data(stats, tag="episode_rewards")
diff --git a/docs/basics/quick_start_rl/quickstart.rst b/docs/basics/quick_start_rl/quickstart.rst
index 9aaaf3489..e3c9ea604 100644
--- a/docs/basics/quick_start_rl/quickstart.rst
+++ b/docs/basics/quick_start_rl/quickstart.rst
@@ -1,7 +1,7 @@
.. _quick_start:
.. highlight:: none
-
+
Quick Start for Reinforcement Learning in rlberry
=================================================
@@ -60,7 +60,7 @@ Let us see a graphical representation
.. parsed-literal::
-
+
ffmpeg version n5.0 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 11.2.0 (GCC)
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-shared --enable-version3
diff --git a/docs/basics/rlberry how to.rst b/docs/basics/rlberry how to.rst
index 10489b7bd..e5a6bbca5 100644
--- a/docs/basics/rlberry how to.rst
+++ b/docs/basics/rlberry how to.rst
@@ -12,7 +12,7 @@ Libraries
.. parsed-literal::
- [INFO] No OpenGL_accelerate module loaded: No module named 'OpenGL_accelerate'
+ [INFO] No OpenGL_accelerate module loaded: No module named 'OpenGL_accelerate'
Environment definition
@@ -54,16 +54,16 @@ two algorithms.
name = 'RandomAgent'
def __init__(self, env, **kwargs):
AgentWithSimplePolicy.__init__(self, env, **kwargs)
-
+
def fit(self, budget=None, **kwargs):
pass
-
+
def policy(self, observation):
return self.env.action_space.sample()
-
+
# We will compare this agent to V
-
-
+
+
# Define parameters
vi_params = {'gamma':0.1, 'epsilon':1e-3}
@@ -95,7 +95,7 @@ our estimation.
init_kwargs=vi_params,
n_fit=1)
vi_stats.fit()
-
+
# Create AgentManager for baseline
baseline_stats = AgentManager(
RandomAgent,
@@ -108,10 +108,10 @@ our estimation.
.. parsed-literal::
- [INFO] Running AgentManager fit() for ValueIteration...
- [INFO] ... trained!
- [INFO] Running AgentManager fit() for RandomAgent...
- [INFO] ... trained!
+ [INFO] Running AgentManager fit() for ValueIteration...
+ [INFO] ... trained!
+ [INFO] Running AgentManager fit() for RandomAgent...
+ [INFO] ... trained!
.. code:: ipython3
@@ -121,28 +121,28 @@ our estimation.
.. parsed-literal::
- [INFO] Evaluating ValueIteration...
- [INFO] [eval]... simulation 1/10
- [INFO] [eval]... simulation 2/10
- [INFO] [eval]... simulation 3/10
- [INFO] [eval]... simulation 4/10
- [INFO] [eval]... simulation 5/10
- [INFO] [eval]... simulation 6/10
- [INFO] [eval]... simulation 7/10
- [INFO] [eval]... simulation 8/10
- [INFO] [eval]... simulation 9/10
- [INFO] [eval]... simulation 10/10
- [INFO] Evaluating RandomAgent...
- [INFO] [eval]... simulation 1/10
- [INFO] [eval]... simulation 2/10
- [INFO] [eval]... simulation 3/10
- [INFO] [eval]... simulation 4/10
- [INFO] [eval]... simulation 5/10
- [INFO] [eval]... simulation 6/10
- [INFO] [eval]... simulation 7/10
- [INFO] [eval]... simulation 8/10
- [INFO] [eval]... simulation 9/10
- [INFO] [eval]... simulation 10/10
+ [INFO] Evaluating ValueIteration...
+ [INFO] [eval]... simulation 1/10
+ [INFO] [eval]... simulation 2/10
+ [INFO] [eval]... simulation 3/10
+ [INFO] [eval]... simulation 4/10
+ [INFO] [eval]... simulation 5/10
+ [INFO] [eval]... simulation 6/10
+ [INFO] [eval]... simulation 7/10
+ [INFO] [eval]... simulation 8/10
+ [INFO] [eval]... simulation 9/10
+ [INFO] [eval]... simulation 10/10
+ [INFO] Evaluating RandomAgent...
+ [INFO] [eval]... simulation 1/10
+ [INFO] [eval]... simulation 2/10
+ [INFO] [eval]... simulation 3/10
+ [INFO] [eval]... simulation 4/10
+ [INFO] [eval]... simulation 5/10
+ [INFO] [eval]... simulation 6/10
+ [INFO] [eval]... simulation 7/10
+ [INFO] [eval]... simulation 8/10
+ [INFO] [eval]... simulation 9/10
+ [INFO] [eval]... simulation 10/10
@@ -163,7 +163,7 @@ array
name = 'RandomAgent2'
def __init__(self, env, **kwargs):
super().__init__(env, **kwargs)
-
+
def eval(self,
eval_horizon=10 ** 5,
**kwargs):
@@ -175,13 +175,13 @@ array
observation, reward, done, _ = self.eval_env.step(action)
episode_regret[tt] = 1-reward # Optimal reward is 1
return episode_regret
-
-
+
+
class ValueIterationAgent2(ValueIterationAgent):
name = 'ValueIterationAgent2'
def __init__(self, env, gamma=0.95, horizon=None, epsilon=1e-6, **kwargs):
super().__init__( env, gamma=0.95, horizon=None, epsilon=1e-6, **kwargs)
-
+
def eval(self,
eval_horizon=10 ** 5,
gamma=1,
@@ -193,7 +193,7 @@ array
action = self.policy(observation)
observation, reward, done, _ = self.eval_env.step(action)
episode_regret[tt] = 1-reward # Optimal reward is 1
-
+
return episode_regret
Then, we do the Monte-Carlo simulations. This time, we directly do 100
@@ -212,7 +212,7 @@ the variability of our estimation).
init_kwargs=vi_params,
n_fit=4)
vi_stats.fit()
-
+
# Create AgentManager for baseline
baseline_stats = AgentManager(
RandomAgent2,
@@ -225,10 +225,10 @@ the variability of our estimation).
.. parsed-literal::
- [INFO] Running AgentManager fit() for ValueIterationAgent2...
- [INFO] ... trained!
- [INFO] Running AgentManager fit() for RandomAgent2...
- [INFO] ... trained!
+ [INFO] Running AgentManager fit() for ValueIterationAgent2...
+ [INFO] ... trained!
+ [INFO] Running AgentManager fit() for RandomAgent2...
+ [INFO] ... trained!
.. code:: ipython3
@@ -238,208 +238,208 @@ the variability of our estimation).
.. parsed-literal::
- [INFO] Evaluating ValueIterationAgent2...
- [INFO] [eval]... simulation 1/100
- [INFO] [eval]... simulation 2/100
- [INFO] [eval]... simulation 3/100
- [INFO] [eval]... simulation 4/100
- [INFO] [eval]... simulation 5/100
- [INFO] [eval]... simulation 6/100
- [INFO] [eval]... simulation 7/100
- [INFO] [eval]... simulation 8/100
- [INFO] [eval]... simulation 9/100
- [INFO] [eval]... simulation 10/100
- [INFO] [eval]... simulation 11/100
- [INFO] [eval]... simulation 12/100
- [INFO] [eval]... simulation 13/100
- [INFO] [eval]... simulation 14/100
- [INFO] [eval]... simulation 15/100
- [INFO] [eval]... simulation 16/100
- [INFO] [eval]... simulation 17/100
- [INFO] [eval]... simulation 18/100
- [INFO] [eval]... simulation 19/100
- [INFO] [eval]... simulation 20/100
- [INFO] [eval]... simulation 21/100
- [INFO] [eval]... simulation 22/100
- [INFO] [eval]... simulation 23/100
- [INFO] [eval]... simulation 24/100
- [INFO] [eval]... simulation 25/100
- [INFO] [eval]... simulation 26/100
- [INFO] [eval]... simulation 27/100
- [INFO] [eval]... simulation 28/100
- [INFO] [eval]... simulation 29/100
- [INFO] [eval]... simulation 30/100
- [INFO] [eval]... simulation 31/100
- [INFO] [eval]... simulation 32/100
- [INFO] [eval]... simulation 33/100
- [INFO] [eval]... simulation 34/100
- [INFO] [eval]... simulation 35/100
- [INFO] [eval]... simulation 36/100
- [INFO] [eval]... simulation 37/100
- [INFO] [eval]... simulation 38/100
- [INFO] [eval]... simulation 39/100
- [INFO] [eval]... simulation 40/100
- [INFO] [eval]... simulation 41/100
- [INFO] [eval]... simulation 42/100
- [INFO] [eval]... simulation 43/100
- [INFO] [eval]... simulation 44/100
- [INFO] [eval]... simulation 45/100
- [INFO] [eval]... simulation 46/100
- [INFO] [eval]... simulation 47/100
- [INFO] [eval]... simulation 48/100
- [INFO] [eval]... simulation 49/100
- [INFO] [eval]... simulation 50/100
- [INFO] [eval]... simulation 51/100
- [INFO] [eval]... simulation 52/100
- [INFO] [eval]... simulation 53/100
- [INFO] [eval]... simulation 54/100
- [INFO] [eval]... simulation 55/100
- [INFO] [eval]... simulation 56/100
- [INFO] [eval]... simulation 57/100
- [INFO] [eval]... simulation 58/100
- [INFO] [eval]... simulation 59/100
- [INFO] [eval]... simulation 60/100
- [INFO] [eval]... simulation 61/100
- [INFO] [eval]... simulation 62/100
- [INFO] [eval]... simulation 63/100
- [INFO] [eval]... simulation 64/100
- [INFO] [eval]... simulation 65/100
- [INFO] [eval]... simulation 66/100
- [INFO] [eval]... simulation 67/100
- [INFO] [eval]... simulation 68/100
- [INFO] [eval]... simulation 69/100
- [INFO] [eval]... simulation 70/100
- [INFO] [eval]... simulation 71/100
- [INFO] [eval]... simulation 72/100
- [INFO] [eval]... simulation 73/100
- [INFO] [eval]... simulation 74/100
- [INFO] [eval]... simulation 75/100
- [INFO] [eval]... simulation 76/100
- [INFO] [eval]... simulation 77/100
- [INFO] [eval]... simulation 78/100
- [INFO] [eval]... simulation 79/100
- [INFO] [eval]... simulation 80/100
- [INFO] [eval]... simulation 81/100
- [INFO] [eval]... simulation 82/100
- [INFO] [eval]... simulation 83/100
- [INFO] [eval]... simulation 84/100
- [INFO] [eval]... simulation 85/100
- [INFO] [eval]... simulation 86/100
- [INFO] [eval]... simulation 87/100
- [INFO] [eval]... simulation 88/100
- [INFO] [eval]... simulation 89/100
- [INFO] [eval]... simulation 90/100
- [INFO] [eval]... simulation 91/100
- [INFO] [eval]... simulation 92/100
- [INFO] [eval]... simulation 93/100
- [INFO] [eval]... simulation 94/100
- [INFO] [eval]... simulation 95/100
- [INFO] [eval]... simulation 96/100
- [INFO] [eval]... simulation 97/100
- [INFO] [eval]... simulation 98/100
- [INFO] [eval]... simulation 99/100
- [INFO] [eval]... simulation 100/100
- [INFO] Evaluating RandomAgent2...
- [INFO] [eval]... simulation 1/100
- [INFO] [eval]... simulation 2/100
- [INFO] [eval]... simulation 3/100
- [INFO] [eval]... simulation 4/100
- [INFO] [eval]... simulation 5/100
- [INFO] [eval]... simulation 6/100
- [INFO] [eval]... simulation 7/100
- [INFO] [eval]... simulation 8/100
- [INFO] [eval]... simulation 9/100
- [INFO] [eval]... simulation 10/100
- [INFO] [eval]... simulation 11/100
- [INFO] [eval]... simulation 12/100
- [INFO] [eval]... simulation 13/100
- [INFO] [eval]... simulation 14/100
- [INFO] [eval]... simulation 15/100
- [INFO] [eval]... simulation 16/100
- [INFO] [eval]... simulation 17/100
- [INFO] [eval]... simulation 18/100
- [INFO] [eval]... simulation 19/100
- [INFO] [eval]... simulation 20/100
- [INFO] [eval]... simulation 21/100
- [INFO] [eval]... simulation 22/100
- [INFO] [eval]... simulation 23/100
- [INFO] [eval]... simulation 24/100
- [INFO] [eval]... simulation 25/100
- [INFO] [eval]... simulation 26/100
- [INFO] [eval]... simulation 27/100
- [INFO] [eval]... simulation 28/100
- [INFO] [eval]... simulation 29/100
- [INFO] [eval]... simulation 30/100
- [INFO] [eval]... simulation 31/100
- [INFO] [eval]... simulation 32/100
- [INFO] [eval]... simulation 33/100
- [INFO] [eval]... simulation 34/100
- [INFO] [eval]... simulation 35/100
- [INFO] [eval]... simulation 36/100
- [INFO] [eval]... simulation 37/100
- [INFO] [eval]... simulation 38/100
- [INFO] [eval]... simulation 39/100
- [INFO] [eval]... simulation 40/100
- [INFO] [eval]... simulation 41/100
- [INFO] [eval]... simulation 42/100
- [INFO] [eval]... simulation 43/100
- [INFO] [eval]... simulation 44/100
- [INFO] [eval]... simulation 45/100
- [INFO] [eval]... simulation 46/100
- [INFO] [eval]... simulation 47/100
- [INFO] [eval]... simulation 48/100
- [INFO] [eval]... simulation 49/100
- [INFO] [eval]... simulation 50/100
- [INFO] [eval]... simulation 51/100
- [INFO] [eval]... simulation 52/100
- [INFO] [eval]... simulation 53/100
- [INFO] [eval]... simulation 54/100
- [INFO] [eval]... simulation 55/100
- [INFO] [eval]... simulation 56/100
- [INFO] [eval]... simulation 57/100
- [INFO] [eval]... simulation 58/100
- [INFO] [eval]... simulation 59/100
- [INFO] [eval]... simulation 60/100
- [INFO] [eval]... simulation 61/100
- [INFO] [eval]... simulation 62/100
- [INFO] [eval]... simulation 63/100
- [INFO] [eval]... simulation 64/100
- [INFO] [eval]... simulation 65/100
- [INFO] [eval]... simulation 66/100
- [INFO] [eval]... simulation 67/100
- [INFO] [eval]... simulation 68/100
- [INFO] [eval]... simulation 69/100
- [INFO] [eval]... simulation 70/100
- [INFO] [eval]... simulation 71/100
- [INFO] [eval]... simulation 72/100
- [INFO] [eval]... simulation 73/100
- [INFO] [eval]... simulation 74/100
- [INFO] [eval]... simulation 75/100
- [INFO] [eval]... simulation 76/100
- [INFO] [eval]... simulation 77/100
- [INFO] [eval]... simulation 78/100
- [INFO] [eval]... simulation 79/100
- [INFO] [eval]... simulation 80/100
- [INFO] [eval]... simulation 81/100
- [INFO] [eval]... simulation 82/100
- [INFO] [eval]... simulation 83/100
- [INFO] [eval]... simulation 84/100
- [INFO] [eval]... simulation 85/100
- [INFO] [eval]... simulation 86/100
- [INFO] [eval]... simulation 87/100
- [INFO] [eval]... simulation 88/100
- [INFO] [eval]... simulation 89/100
- [INFO] [eval]... simulation 90/100
- [INFO] [eval]... simulation 91/100
- [INFO] [eval]... simulation 92/100
- [INFO] [eval]... simulation 93/100
- [INFO] [eval]... simulation 94/100
- [INFO] [eval]... simulation 95/100
- [INFO] [eval]... simulation 96/100
- [INFO] [eval]... simulation 97/100
- [INFO] [eval]... simulation 98/100
- [INFO] [eval]... simulation 99/100
- [INFO] [eval]... simulation 100/100
+ [INFO] Evaluating ValueIterationAgent2...
+ [INFO] [eval]... simulation 1/100
+ [INFO] [eval]... simulation 2/100
+ [INFO] [eval]... simulation 3/100
+ [INFO] [eval]... simulation 4/100
+ [INFO] [eval]... simulation 5/100
+ [INFO] [eval]... simulation 6/100
+ [INFO] [eval]... simulation 7/100
+ [INFO] [eval]... simulation 8/100
+ [INFO] [eval]... simulation 9/100
+ [INFO] [eval]... simulation 10/100
+ [INFO] [eval]... simulation 11/100
+ [INFO] [eval]... simulation 12/100
+ [INFO] [eval]... simulation 13/100
+ [INFO] [eval]... simulation 14/100
+ [INFO] [eval]... simulation 15/100
+ [INFO] [eval]... simulation 16/100
+ [INFO] [eval]... simulation 17/100
+ [INFO] [eval]... simulation 18/100
+ [INFO] [eval]... simulation 19/100
+ [INFO] [eval]... simulation 20/100
+ [INFO] [eval]... simulation 21/100
+ [INFO] [eval]... simulation 22/100
+ [INFO] [eval]... simulation 23/100
+ [INFO] [eval]... simulation 24/100
+ [INFO] [eval]... simulation 25/100
+ [INFO] [eval]... simulation 26/100
+ [INFO] [eval]... simulation 27/100
+ [INFO] [eval]... simulation 28/100
+ [INFO] [eval]... simulation 29/100
+ [INFO] [eval]... simulation 30/100
+ [INFO] [eval]... simulation 31/100
+ [INFO] [eval]... simulation 32/100
+ [INFO] [eval]... simulation 33/100
+ [INFO] [eval]... simulation 34/100
+ [INFO] [eval]... simulation 35/100
+ [INFO] [eval]... simulation 36/100
+ [INFO] [eval]... simulation 37/100
+ [INFO] [eval]... simulation 38/100
+ [INFO] [eval]... simulation 39/100
+ [INFO] [eval]... simulation 40/100
+ [INFO] [eval]... simulation 41/100
+ [INFO] [eval]... simulation 42/100
+ [INFO] [eval]... simulation 43/100
+ [INFO] [eval]... simulation 44/100
+ [INFO] [eval]... simulation 45/100
+ [INFO] [eval]... simulation 46/100
+ [INFO] [eval]... simulation 47/100
+ [INFO] [eval]... simulation 48/100
+ [INFO] [eval]... simulation 49/100
+ [INFO] [eval]... simulation 50/100
+ [INFO] [eval]... simulation 51/100
+ [INFO] [eval]... simulation 52/100
+ [INFO] [eval]... simulation 53/100
+ [INFO] [eval]... simulation 54/100
+ [INFO] [eval]... simulation 55/100
+ [INFO] [eval]... simulation 56/100
+ [INFO] [eval]... simulation 57/100
+ [INFO] [eval]... simulation 58/100
+ [INFO] [eval]... simulation 59/100
+ [INFO] [eval]... simulation 60/100
+ [INFO] [eval]... simulation 61/100
+ [INFO] [eval]... simulation 62/100
+ [INFO] [eval]... simulation 63/100
+ [INFO] [eval]... simulation 64/100
+ [INFO] [eval]... simulation 65/100
+ [INFO] [eval]... simulation 66/100
+ [INFO] [eval]... simulation 67/100
+ [INFO] [eval]... simulation 68/100
+ [INFO] [eval]... simulation 69/100
+ [INFO] [eval]... simulation 70/100
+ [INFO] [eval]... simulation 71/100
+ [INFO] [eval]... simulation 72/100
+ [INFO] [eval]... simulation 73/100
+ [INFO] [eval]... simulation 74/100
+ [INFO] [eval]... simulation 75/100
+ [INFO] [eval]... simulation 76/100
+ [INFO] [eval]... simulation 77/100
+ [INFO] [eval]... simulation 78/100
+ [INFO] [eval]... simulation 79/100
+ [INFO] [eval]... simulation 80/100
+ [INFO] [eval]... simulation 81/100
+ [INFO] [eval]... simulation 82/100
+ [INFO] [eval]... simulation 83/100
+ [INFO] [eval]... simulation 84/100
+ [INFO] [eval]... simulation 85/100
+ [INFO] [eval]... simulation 86/100
+ [INFO] [eval]... simulation 87/100
+ [INFO] [eval]... simulation 88/100
+ [INFO] [eval]... simulation 89/100
+ [INFO] [eval]... simulation 90/100
+ [INFO] [eval]... simulation 91/100
+ [INFO] [eval]... simulation 92/100
+ [INFO] [eval]... simulation 93/100
+ [INFO] [eval]... simulation 94/100
+ [INFO] [eval]... simulation 95/100
+ [INFO] [eval]... simulation 96/100
+ [INFO] [eval]... simulation 97/100
+ [INFO] [eval]... simulation 98/100
+ [INFO] [eval]... simulation 99/100
+ [INFO] [eval]... simulation 100/100
+ [INFO] Evaluating RandomAgent2...
+ [INFO] [eval]... simulation 1/100
+ [INFO] [eval]... simulation 2/100
+ [INFO] [eval]... simulation 3/100
+ [INFO] [eval]... simulation 4/100
+ [INFO] [eval]... simulation 5/100
+ [INFO] [eval]... simulation 6/100
+ [INFO] [eval]... simulation 7/100
+ [INFO] [eval]... simulation 8/100
+ [INFO] [eval]... simulation 9/100
+ [INFO] [eval]... simulation 10/100
+ [INFO] [eval]... simulation 11/100
+ [INFO] [eval]... simulation 12/100
+ [INFO] [eval]... simulation 13/100
+ [INFO] [eval]... simulation 14/100
+ [INFO] [eval]... simulation 15/100
+ [INFO] [eval]... simulation 16/100
+ [INFO] [eval]... simulation 17/100
+ [INFO] [eval]... simulation 18/100
+ [INFO] [eval]... simulation 19/100
+ [INFO] [eval]... simulation 20/100
+ [INFO] [eval]... simulation 21/100
+ [INFO] [eval]... simulation 22/100
+ [INFO] [eval]... simulation 23/100
+ [INFO] [eval]... simulation 24/100
+ [INFO] [eval]... simulation 25/100
+ [INFO] [eval]... simulation 26/100
+ [INFO] [eval]... simulation 27/100
+ [INFO] [eval]... simulation 28/100
+ [INFO] [eval]... simulation 29/100
+ [INFO] [eval]... simulation 30/100
+ [INFO] [eval]... simulation 31/100
+ [INFO] [eval]... simulation 32/100
+ [INFO] [eval]... simulation 33/100
+ [INFO] [eval]... simulation 34/100
+ [INFO] [eval]... simulation 35/100
+ [INFO] [eval]... simulation 36/100
+ [INFO] [eval]... simulation 37/100
+ [INFO] [eval]... simulation 38/100
+ [INFO] [eval]... simulation 39/100
+ [INFO] [eval]... simulation 40/100
+ [INFO] [eval]... simulation 41/100
+ [INFO] [eval]... simulation 42/100
+ [INFO] [eval]... simulation 43/100
+ [INFO] [eval]... simulation 44/100
+ [INFO] [eval]... simulation 45/100
+ [INFO] [eval]... simulation 46/100
+ [INFO] [eval]... simulation 47/100
+ [INFO] [eval]... simulation 48/100
+ [INFO] [eval]... simulation 49/100
+ [INFO] [eval]... simulation 50/100
+ [INFO] [eval]... simulation 51/100
+ [INFO] [eval]... simulation 52/100
+ [INFO] [eval]... simulation 53/100
+ [INFO] [eval]... simulation 54/100
+ [INFO] [eval]... simulation 55/100
+ [INFO] [eval]... simulation 56/100
+ [INFO] [eval]... simulation 57/100
+ [INFO] [eval]... simulation 58/100
+ [INFO] [eval]... simulation 59/100
+ [INFO] [eval]... simulation 60/100
+ [INFO] [eval]... simulation 61/100
+ [INFO] [eval]... simulation 62/100
+ [INFO] [eval]... simulation 63/100
+ [INFO] [eval]... simulation 64/100
+ [INFO] [eval]... simulation 65/100
+ [INFO] [eval]... simulation 66/100
+ [INFO] [eval]... simulation 67/100
+ [INFO] [eval]... simulation 68/100
+ [INFO] [eval]... simulation 69/100
+ [INFO] [eval]... simulation 70/100
+ [INFO] [eval]... simulation 71/100
+ [INFO] [eval]... simulation 72/100
+ [INFO] [eval]... simulation 73/100
+ [INFO] [eval]... simulation 74/100
+ [INFO] [eval]... simulation 75/100
+ [INFO] [eval]... simulation 76/100
+ [INFO] [eval]... simulation 77/100
+ [INFO] [eval]... simulation 78/100
+ [INFO] [eval]... simulation 79/100
+ [INFO] [eval]... simulation 80/100
+ [INFO] [eval]... simulation 81/100
+ [INFO] [eval]... simulation 82/100
+ [INFO] [eval]... simulation 83/100
+ [INFO] [eval]... simulation 84/100
+ [INFO] [eval]... simulation 85/100
+ [INFO] [eval]... simulation 86/100
+ [INFO] [eval]... simulation 87/100
+ [INFO] [eval]... simulation 88/100
+ [INFO] [eval]... simulation 89/100
+ [INFO] [eval]... simulation 90/100
+ [INFO] [eval]... simulation 91/100
+ [INFO] [eval]... simulation 92/100
+ [INFO] [eval]... simulation 93/100
+ [INFO] [eval]... simulation 94/100
+ [INFO] [eval]... simulation 95/100
+ [INFO] [eval]... simulation 96/100
+ [INFO] [eval]... simulation 97/100
+ [INFO] [eval]... simulation 98/100
+ [INFO] [eval]... simulation 99/100
+ [INFO] [eval]... simulation 100/100
.. code:: ipython3
diff --git a/docs/basics/seeding.rst b/docs/basics/seeding.rst
index b03f554b4..f22ded51d 100644
--- a/docs/basics/seeding.rst
+++ b/docs/basics/seeding.rst
@@ -28,7 +28,8 @@ It works as follows:
# to ensure that their random number generators are independent.
from rlberry.envs import gym_make
from rlberry.agents import RSUCBVIAgent
- env = gym_make('MountainCar-v0')
+
+ env = gym_make("MountainCar-v0")
env.reseed(seeder)
agent = RSUCBVIAgent(env)
@@ -55,6 +56,7 @@ It works as follows:
# You can also use a seeder to seed external libraries (such as torch)
# using the function set_external_seed
from rlberry.seeding import set_external_seed
+
set_external_seed(seeder)
diff --git a/docs/other/using_gym.rst b/docs/other/using_gym.rst
index b89b4ad6e..85e9741b6 100644
--- a/docs/other/using_gym.rst
+++ b/docs/other/using_gym.rst
@@ -14,7 +14,7 @@ If you want to use OpenAI Gym environments with rlberry_, simply do the followin
from rlberry.envs import gym_make # wraps gym.make
# for example, let's take CartPole
- env = gym_make('CartPole-v1')
+ env = gym_make("CartPole-v1")
This way, :code:`env` **behaves exactly the same as the gym environment**, we simply replace the seeding
function by :meth:`env.reseed`, which ensures unified seeding and reproducibility when using rlberry.
diff --git a/docs/other/using_stable_baselines.rst b/docs/other/using_stable_baselines.rst
index e19e45ee0..9e48767ed 100644
--- a/docs/other/using_stable_baselines.rst
+++ b/docs/other/using_stable_baselines.rst
@@ -43,7 +43,7 @@ agent. In order to use it with AgentManagers, it must be included in the
implementation of `Stable Baselines`_ and evaluate two hyperparameter configurations.
.. code-block:: python
-
+
class A2CAgent(StableBaselinesAgent):
"""A2C with hyperparameter optimization."""
diff --git a/docs/themes/scikit-learn-fork/static/css/theme.css b/docs/themes/scikit-learn-fork/static/css/theme.css
index 2c513a3dc..c1170f1cc 100644
--- a/docs/themes/scikit-learn-fork/static/css/theme.css
+++ b/docs/themes/scikit-learn-fork/static/css/theme.css
@@ -82,7 +82,7 @@ img {
span.highlighted {
background-color: #fbe54e;
}
-
+
div.highlight {
border: 1px solid #ddd;
margin-bottom: 1rem;
diff --git a/docs/themes/scikit-learn-fork/static/js/vendor/bootstrap.min.js b/docs/themes/scikit-learn-fork/static/js/vendor/bootstrap.min.js
index 4955aeec1..2b2432381 100644
--- a/docs/themes/scikit-learn-fork/static/js/vendor/bootstrap.min.js
+++ b/docs/themes/scikit-learn-fork/static/js/vendor/bootstrap.min.js
@@ -3,4 +3,4 @@
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e((t=t||self).bootstrap={},t.jQuery,t.Popper)}(this,function(t,g,u){"use strict";function i(t,e){for(var n=0;nthis._items.length-1||t<0))if(this._isSliding)g(this._element).one(Q.SLID,function(){return e.to(t)});else{if(n===t)return this.pause(),void this.cycle();var i=ndocument.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},t._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},t._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:Ee},je="show",He="out",Re={HIDE:"hide"+De,HIDDEN:"hidden"+De,SHOW:"show"+De,SHOWN:"shown"+De,INSERTED:"inserted"+De,CLICK:"click"+De,FOCUSIN:"focusin"+De,FOCUSOUT:"focusout"+De,MOUSEENTER:"mouseenter"+De,MOUSELEAVE:"mouseleave"+De},xe="fade",Fe="show",Ue=".tooltip-inner",We=".arrow",qe="hover",Me="focus",Ke="click",Qe="manual",Be=function(){function i(t,e){if("undefined"==typeof u)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var t=i.prototype;return t.enable=function(){this._isEnabled=!0},t.disable=function(){this._isEnabled=!1},t.toggleEnabled=function(){this._isEnabled=!this._isEnabled},t.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=g(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(g(this.getTipElement()).hasClass(Fe))return void this._leave(null,this);this._enter(null,this)}},t.dispose=function(){clearTimeout(this._timeout),g.removeData(this.element,this.constructor.DATA_KEY),g(this.element).off(this.constructor.EVENT_KEY),g(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&g(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,(this._activeTrigger=null)!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},t.show=function(){var e=this;if("none"===g(this.element).css("display"))throw new Error("Please use show on visible elements");var t=g.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){g(this.element).trigger(t);var n=_.findShadowRoot(this.element),i=g.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(t.isDefaultPrevented()||!i)return;var o=this.getTipElement(),r=_.getUID(this.constructor.NAME);o.setAttribute("id",r),this.element.setAttribute("aria-describedby",r),this.setContent(),this.config.animation&&g(o).addClass(xe);var s="function"==typeof this.config.placement?this.config.placement.call(this,o,this.element):this.config.placement,a=this._getAttachment(s);this.addAttachmentClass(a);var l=this._getContainer();g(o).data(this.constructor.DATA_KEY,this),g.contains(this.element.ownerDocument.documentElement,this.tip)||g(o).appendTo(l),g(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new u(this.element,o,{placement:a,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:We},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}}),g(o).addClass(Fe),"ontouchstart"in document.documentElement&&g(document.body).children().on("mouseover",null,g.noop);var c=function(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,g(e.element).trigger(e.constructor.Event.SHOWN),t===He&&e._leave(null,e)};if(g(this.tip).hasClass(xe)){var h=_.getTransitionDurationFromElement(this.tip);g(this.tip).one(_.TRANSITION_END,c).emulateTransitionEnd(h)}else c()}},t.hide=function(t){var e=this,n=this.getTipElement(),i=g.Event(this.constructor.Event.HIDE),o=function(){e._hoverState!==je&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),g(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(g(this.element).trigger(i),!i.isDefaultPrevented()){if(g(n).removeClass(Fe),"ontouchstart"in document.documentElement&&g(document.body).children().off("mouseover",null,g.noop),this._activeTrigger[Ke]=!1,this._activeTrigger[Me]=!1,this._activeTrigger[qe]=!1,g(this.tip).hasClass(xe)){var r=_.getTransitionDurationFromElement(n);g(n).one(_.TRANSITION_END,o).emulateTransitionEnd(r)}else o();this._hoverState=""}},t.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},t.isWithContent=function(){return Boolean(this.getTitle())},t.addAttachmentClass=function(t){g(this.getTipElement()).addClass(Ae+"-"+t)},t.getTipElement=function(){return this.tip=this.tip||g(this.config.template)[0],this.tip},t.setContent=function(){var t=this.getTipElement();this.setElementContent(g(t.querySelectorAll(Ue)),this.getTitle()),g(t).removeClass(xe+" "+Fe)},t.setElementContent=function(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=Se(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?g(e).parent().is(t)||t.empty().append(e):t.text(g(e).text())},t.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},t._getOffset=function(){var e=this,t={};return"function"==typeof this.config.offset?t.fn=function(t){return t.offsets=l({},t.offsets,e.config.offset(t.offsets,e.element)||{}),t}:t.offset=this.config.offset,t},t._getContainer=function(){return!1===this.config.container?document.body:_.isElement(this.config.container)?g(this.config.container):g(document).find(this.config.container)},t._getAttachment=function(t){return Pe[t.toUpperCase()]},t._setListeners=function(){var i=this;this.config.trigger.split(" ").forEach(function(t){if("click"===t)g(i.element).on(i.constructor.Event.CLICK,i.config.selector,function(t){return i.toggle(t)});else if(t!==Qe){var e=t===qe?i.constructor.Event.MOUSEENTER:i.constructor.Event.FOCUSIN,n=t===qe?i.constructor.Event.MOUSELEAVE:i.constructor.Event.FOCUSOUT;g(i.element).on(e,i.config.selector,function(t){return i._enter(t)}).on(n,i.config.selector,function(t){return i._leave(t)})}}),g(this.element).closest(".modal").on("hide.bs.modal",function(){i.element&&i.hide()}),this.config.selector?this.config=l({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},t._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},t._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||g(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?Me:qe]=!0),g(e.getTipElement()).hasClass(Fe)||e._hoverState===je?e._hoverState=je:(clearTimeout(e._timeout),e._hoverState=je,e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){e._hoverState===je&&e.show()},e.config.delay.show):e.show())},t._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||g(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?Me:qe]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=He,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){e._hoverState===He&&e.hide()},e.config.delay.hide):e.hide())},t._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},t._getConfig=function(t){var e=g(this.element).data();return Object.keys(e).forEach(function(t){-1!==Oe.indexOf(t)&&delete e[t]}),"number"==typeof(t=l({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),_.typeCheckConfig(be,t,this.constructor.DefaultType),t.sanitize&&(t.template=Se(t.template,t.whiteList,t.sanitizeFn)),t},t._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},t._cleanTipClass=function(){var t=g(this.getTipElement()),e=t.attr("class").match(Ne);null!==e&&e.length&&t.removeClass(e.join(""))},t._handlePopperPlacementChange=function(t){var e=t.instance;this.tip=e.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},t._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(g(t).removeClass(xe),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},i._jQueryInterface=function(n){return this.each(function(){var t=g(this).data(Ie),e="object"==typeof n&&n;if((t||!/dispose|hide/.test(n))&&(t||(t=new i(this,e),g(this).data(Ie,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return Le}},{key:"NAME",get:function(){return be}},{key:"DATA_KEY",get:function(){return Ie}},{key:"Event",get:function(){return Re}},{key:"EVENT_KEY",get:function(){return De}},{key:"DefaultType",get:function(){return ke}}]),i}();g.fn[be]=Be._jQueryInterface,g.fn[be].Constructor=Be,g.fn[be].noConflict=function(){return g.fn[be]=we,Be._jQueryInterface};var Ve="popover",Ye="bs.popover",ze="."+Ye,Xe=g.fn[Ve],$e="bs-popover",Ge=new RegExp("(^|\\s)"+$e+"\\S+","g"),Je=l({},Be.Default,{placement:"right",trigger:"click",content:"",template:''}),Ze=l({},Be.DefaultType,{content:"(string|element|function)"}),tn="fade",en="show",nn=".popover-header",on=".popover-body",rn={HIDE:"hide"+ze,HIDDEN:"hidden"+ze,SHOW:"show"+ze,SHOWN:"shown"+ze,INSERTED:"inserted"+ze,CLICK:"click"+ze,FOCUSIN:"focusin"+ze,FOCUSOUT:"focusout"+ze,MOUSEENTER:"mouseenter"+ze,MOUSELEAVE:"mouseleave"+ze},sn=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),(e.prototype.constructor=e).__proto__=n;var o=i.prototype;return o.isWithContent=function(){return this.getTitle()||this._getContent()},o.addAttachmentClass=function(t){g(this.getTipElement()).addClass($e+"-"+t)},o.getTipElement=function(){return this.tip=this.tip||g(this.config.template)[0],this.tip},o.setContent=function(){var t=g(this.getTipElement());this.setElementContent(t.find(nn),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(on),e),t.removeClass(tn+" "+en)},o._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},o._cleanTipClass=function(){var t=g(this.getTipElement()),e=t.attr("class").match(Ge);null!==e&&0=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t li > .active",Wn='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',qn=".dropdown-toggle",Mn="> .dropdown-menu .active",Kn=function(){function i(t){this._element=t}var t=i.prototype;return t.show=function(){var n=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&g(this._element).hasClass(Pn)||g(this._element).hasClass(Ln))){var t,i,e=g(this._element).closest(xn)[0],o=_.getSelectorFromElement(this._element);if(e){var r="UL"===e.nodeName||"OL"===e.nodeName?Un:Fn;i=(i=g.makeArray(g(e).find(r)))[i.length-1]}var s=g.Event(On.HIDE,{relatedTarget:this._element}),a=g.Event(On.SHOW,{relatedTarget:i});if(i&&g(i).trigger(s),g(this._element).trigger(a),!a.isDefaultPrevented()&&!s.isDefaultPrevented()){o&&(t=document.querySelector(o)),this._activate(this._element,e);var l=function(){var t=g.Event(On.HIDDEN,{relatedTarget:n._element}),e=g.Event(On.SHOWN,{relatedTarget:i});g(i).trigger(t),g(n._element).trigger(e)};t?this._activate(t,t.parentNode,l):l()}}},t.dispose=function(){g.removeData(this._element,wn),this._element=null},t._activate=function(t,e,n){var i=this,o=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?g(e).children(Fn):g(e).find(Un))[0],r=n&&o&&g(o).hasClass(jn),s=function(){return i._transitionComplete(t,o,n)};if(o&&r){var a=_.getTransitionDurationFromElement(o);g(o).removeClass(Hn).one(_.TRANSITION_END,s).emulateTransitionEnd(a)}else s()},t._transitionComplete=function(t,e,n){if(e){g(e).removeClass(Pn);var i=g(e.parentNode).find(Mn)[0];i&&g(i).removeClass(Pn),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}if(g(t).addClass(Pn),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),_.reflow(t),t.classList.contains(jn)&&t.classList.add(Hn),t.parentNode&&g(t.parentNode).hasClass(kn)){var o=g(t).closest(Rn)[0];if(o){var r=[].slice.call(o.querySelectorAll(qn));g(r).addClass(Pn)}t.setAttribute("aria-expanded",!0)}n&&n()},i._jQueryInterface=function(n){return this.each(function(){var t=g(this),e=t.data(wn);if(e||(e=new i(this),t.data(wn,e)),"string"==typeof n){if("undefined"==typeof e[n])throw new TypeError('No method named "'+n+'"');e[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.3.1"}}]),i}();g(document).on(On.CLICK_DATA_API,Wn,function(t){t.preventDefault(),Kn._jQueryInterface.call(g(this),"show")}),g.fn.tab=Kn._jQueryInterface,g.fn.tab.Constructor=Kn,g.fn.tab.noConflict=function(){return g.fn.tab=Nn,Kn._jQueryInterface};var Qn="toast",Bn="bs.toast",Vn="."+Bn,Yn=g.fn[Qn],zn={CLICK_DISMISS:"click.dismiss"+Vn,HIDE:"hide"+Vn,HIDDEN:"hidden"+Vn,SHOW:"show"+Vn,SHOWN:"shown"+Vn},Xn="fade",$n="hide",Gn="show",Jn="showing",Zn={animation:"boolean",autohide:"boolean",delay:"number"},ti={animation:!0,autohide:!0,delay:500},ei='[data-dismiss="toast"]',ni=function(){function i(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var t=i.prototype;return t.show=function(){var t=this;g(this._element).trigger(zn.SHOW),this._config.animation&&this._element.classList.add(Xn);var e=function(){t._element.classList.remove(Jn),t._element.classList.add(Gn),g(t._element).trigger(zn.SHOWN),t._config.autohide&&t.hide()};if(this._element.classList.remove($n),this._element.classList.add(Jn),this._config.animation){var n=_.getTransitionDurationFromElement(this._element);g(this._element).one(_.TRANSITION_END,e).emulateTransitionEnd(n)}else e()},t.hide=function(t){var e=this;this._element.classList.contains(Gn)&&(g(this._element).trigger(zn.HIDE),t?this._close():this._timeout=setTimeout(function(){e._close()},this._config.delay))},t.dispose=function(){clearTimeout(this._timeout),this._timeout=null,this._element.classList.contains(Gn)&&this._element.classList.remove(Gn),g(this._element).off(zn.CLICK_DISMISS),g.removeData(this._element,Bn),this._element=null,this._config=null},t._getConfig=function(t){return t=l({},ti,g(this._element).data(),"object"==typeof t&&t?t:{}),_.typeCheckConfig(Qn,t,this.constructor.DefaultType),t},t._setListeners=function(){var t=this;g(this._element).on(zn.CLICK_DISMISS,ei,function(){return t.hide(!0)})},t._close=function(){var t=this,e=function(){t._element.classList.add($n),g(t._element).trigger(zn.HIDDEN)};if(this._element.classList.remove(Gn),this._config.animation){var n=_.getTransitionDurationFromElement(this._element);g(this._element).one(_.TRANSITION_END,e).emulateTransitionEnd(n)}else e()},i._jQueryInterface=function(n){return this.each(function(){var t=g(this),e=t.data(Bn);if(e||(e=new i(this,"object"==typeof n&&n),t.data(Bn,e)),"string"==typeof n){if("undefined"==typeof e[n])throw new TypeError('No method named "'+n+'"');e[n](this)}})},s(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"DefaultType",get:function(){return Zn}},{key:"Default",get:function(){return ti}}]),i}();g.fn[Qn]=ni._jQueryInterface,g.fn[Qn].Constructor=ni,g.fn[Qn].noConflict=function(){return g.fn[Qn]=Yn,ni._jQueryInterface},function(){if("undefined"==typeof g)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=g.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||4<=t[0])throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(),t.Util=_,t.Alert=p,t.Button=P,t.Carousel=lt,t.Collapse=bt,t.Dropdown=Jt,t.Modal=ve,t.Popover=sn,t.Scrollspy=Dn,t.Tab=Kn,t.Toast=ni,t.Tooltip=Be,Object.defineProperty(t,"__esModule",{value:!0})});
\ No newline at end of file
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e((t=t||self).bootstrap={},t.jQuery,t.Popper)}(this,function(t,g,u){"use strict";function i(t,e){for(var n=0;nthis._items.length-1||t<0))if(this._isSliding)g(this._element).one(Q.SLID,function(){return e.to(t)});else{if(n===t)return this.pause(),void this.cycle();var i=ndocument.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},t._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},t._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:Ee},je="show",He="out",Re={HIDE:"hide"+De,HIDDEN:"hidden"+De,SHOW:"show"+De,SHOWN:"shown"+De,INSERTED:"inserted"+De,CLICK:"click"+De,FOCUSIN:"focusin"+De,FOCUSOUT:"focusout"+De,MOUSEENTER:"mouseenter"+De,MOUSELEAVE:"mouseleave"+De},xe="fade",Fe="show",Ue=".tooltip-inner",We=".arrow",qe="hover",Me="focus",Ke="click",Qe="manual",Be=function(){function i(t,e){if("undefined"==typeof u)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var t=i.prototype;return t.enable=function(){this._isEnabled=!0},t.disable=function(){this._isEnabled=!1},t.toggleEnabled=function(){this._isEnabled=!this._isEnabled},t.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=g(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(g(this.getTipElement()).hasClass(Fe))return void this._leave(null,this);this._enter(null,this)}},t.dispose=function(){clearTimeout(this._timeout),g.removeData(this.element,this.constructor.DATA_KEY),g(this.element).off(this.constructor.EVENT_KEY),g(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&g(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,(this._activeTrigger=null)!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},t.show=function(){var e=this;if("none"===g(this.element).css("display"))throw new Error("Please use show on visible elements");var t=g.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){g(this.element).trigger(t);var n=_.findShadowRoot(this.element),i=g.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(t.isDefaultPrevented()||!i)return;var o=this.getTipElement(),r=_.getUID(this.constructor.NAME);o.setAttribute("id",r),this.element.setAttribute("aria-describedby",r),this.setContent(),this.config.animation&&g(o).addClass(xe);var s="function"==typeof this.config.placement?this.config.placement.call(this,o,this.element):this.config.placement,a=this._getAttachment(s);this.addAttachmentClass(a);var l=this._getContainer();g(o).data(this.constructor.DATA_KEY,this),g.contains(this.element.ownerDocument.documentElement,this.tip)||g(o).appendTo(l),g(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new u(this.element,o,{placement:a,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:We},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}}),g(o).addClass(Fe),"ontouchstart"in document.documentElement&&g(document.body).children().on("mouseover",null,g.noop);var c=function(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,g(e.element).trigger(e.constructor.Event.SHOWN),t===He&&e._leave(null,e)};if(g(this.tip).hasClass(xe)){var h=_.getTransitionDurationFromElement(this.tip);g(this.tip).one(_.TRANSITION_END,c).emulateTransitionEnd(h)}else c()}},t.hide=function(t){var e=this,n=this.getTipElement(),i=g.Event(this.constructor.Event.HIDE),o=function(){e._hoverState!==je&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),g(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(g(this.element).trigger(i),!i.isDefaultPrevented()){if(g(n).removeClass(Fe),"ontouchstart"in document.documentElement&&g(document.body).children().off("mouseover",null,g.noop),this._activeTrigger[Ke]=!1,this._activeTrigger[Me]=!1,this._activeTrigger[qe]=!1,g(this.tip).hasClass(xe)){var r=_.getTransitionDurationFromElement(n);g(n).one(_.TRANSITION_END,o).emulateTransitionEnd(r)}else o();this._hoverState=""}},t.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},t.isWithContent=function(){return Boolean(this.getTitle())},t.addAttachmentClass=function(t){g(this.getTipElement()).addClass(Ae+"-"+t)},t.getTipElement=function(){return this.tip=this.tip||g(this.config.template)[0],this.tip},t.setContent=function(){var t=this.getTipElement();this.setElementContent(g(t.querySelectorAll(Ue)),this.getTitle()),g(t).removeClass(xe+" "+Fe)},t.setElementContent=function(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=Se(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?g(e).parent().is(t)||t.empty().append(e):t.text(g(e).text())},t.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},t._getOffset=function(){var e=this,t={};return"function"==typeof this.config.offset?t.fn=function(t){return t.offsets=l({},t.offsets,e.config.offset(t.offsets,e.element)||{}),t}:t.offset=this.config.offset,t},t._getContainer=function(){return!1===this.config.container?document.body:_.isElement(this.config.container)?g(this.config.container):g(document).find(this.config.container)},t._getAttachment=function(t){return Pe[t.toUpperCase()]},t._setListeners=function(){var i=this;this.config.trigger.split(" ").forEach(function(t){if("click"===t)g(i.element).on(i.constructor.Event.CLICK,i.config.selector,function(t){return i.toggle(t)});else if(t!==Qe){var e=t===qe?i.constructor.Event.MOUSEENTER:i.constructor.Event.FOCUSIN,n=t===qe?i.constructor.Event.MOUSELEAVE:i.constructor.Event.FOCUSOUT;g(i.element).on(e,i.config.selector,function(t){return i._enter(t)}).on(n,i.config.selector,function(t){return i._leave(t)})}}),g(this.element).closest(".modal").on("hide.bs.modal",function(){i.element&&i.hide()}),this.config.selector?this.config=l({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},t._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},t._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||g(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?Me:qe]=!0),g(e.getTipElement()).hasClass(Fe)||e._hoverState===je?e._hoverState=je:(clearTimeout(e._timeout),e._hoverState=je,e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){e._hoverState===je&&e.show()},e.config.delay.show):e.show())},t._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||g(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?Me:qe]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=He,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){e._hoverState===He&&e.hide()},e.config.delay.hide):e.hide())},t._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},t._getConfig=function(t){var e=g(this.element).data();return Object.keys(e).forEach(function(t){-1!==Oe.indexOf(t)&&delete e[t]}),"number"==typeof(t=l({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),_.typeCheckConfig(be,t,this.constructor.DefaultType),t.sanitize&&(t.template=Se(t.template,t.whiteList,t.sanitizeFn)),t},t._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},t._cleanTipClass=function(){var t=g(this.getTipElement()),e=t.attr("class").match(Ne);null!==e&&e.length&&t.removeClass(e.join(""))},t._handlePopperPlacementChange=function(t){var e=t.instance;this.tip=e.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},t._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(g(t).removeClass(xe),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},i._jQueryInterface=function(n){return this.each(function(){var t=g(this).data(Ie),e="object"==typeof n&&n;if((t||!/dispose|hide/.test(n))&&(t||(t=new i(this,e),g(this).data(Ie,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return Le}},{key:"NAME",get:function(){return be}},{key:"DATA_KEY",get:function(){return Ie}},{key:"Event",get:function(){return Re}},{key:"EVENT_KEY",get:function(){return De}},{key:"DefaultType",get:function(){return ke}}]),i}();g.fn[be]=Be._jQueryInterface,g.fn[be].Constructor=Be,g.fn[be].noConflict=function(){return g.fn[be]=we,Be._jQueryInterface};var Ve="popover",Ye="bs.popover",ze="."+Ye,Xe=g.fn[Ve],$e="bs-popover",Ge=new RegExp("(^|\\s)"+$e+"\\S+","g"),Je=l({},Be.Default,{placement:"right",trigger:"click",content:"",template:''}),Ze=l({},Be.DefaultType,{content:"(string|element|function)"}),tn="fade",en="show",nn=".popover-header",on=".popover-body",rn={HIDE:"hide"+ze,HIDDEN:"hidden"+ze,SHOW:"show"+ze,SHOWN:"shown"+ze,INSERTED:"inserted"+ze,CLICK:"click"+ze,FOCUSIN:"focusin"+ze,FOCUSOUT:"focusout"+ze,MOUSEENTER:"mouseenter"+ze,MOUSELEAVE:"mouseleave"+ze},sn=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),(e.prototype.constructor=e).__proto__=n;var o=i.prototype;return o.isWithContent=function(){return this.getTitle()||this._getContent()},o.addAttachmentClass=function(t){g(this.getTipElement()).addClass($e+"-"+t)},o.getTipElement=function(){return this.tip=this.tip||g(this.config.template)[0],this.tip},o.setContent=function(){var t=g(this.getTipElement());this.setElementContent(t.find(nn),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(on),e),t.removeClass(tn+" "+en)},o._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},o._cleanTipClass=function(){var t=g(this.getTipElement()),e=t.attr("class").match(Ge);null!==e&&0=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t li > .active",Wn='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',qn=".dropdown-toggle",Mn="> .dropdown-menu .active",Kn=function(){function i(t){this._element=t}var t=i.prototype;return t.show=function(){var n=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&g(this._element).hasClass(Pn)||g(this._element).hasClass(Ln))){var t,i,e=g(this._element).closest(xn)[0],o=_.getSelectorFromElement(this._element);if(e){var r="UL"===e.nodeName||"OL"===e.nodeName?Un:Fn;i=(i=g.makeArray(g(e).find(r)))[i.length-1]}var s=g.Event(On.HIDE,{relatedTarget:this._element}),a=g.Event(On.SHOW,{relatedTarget:i});if(i&&g(i).trigger(s),g(this._element).trigger(a),!a.isDefaultPrevented()&&!s.isDefaultPrevented()){o&&(t=document.querySelector(o)),this._activate(this._element,e);var l=function(){var t=g.Event(On.HIDDEN,{relatedTarget:n._element}),e=g.Event(On.SHOWN,{relatedTarget:i});g(i).trigger(t),g(n._element).trigger(e)};t?this._activate(t,t.parentNode,l):l()}}},t.dispose=function(){g.removeData(this._element,wn),this._element=null},t._activate=function(t,e,n){var i=this,o=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?g(e).children(Fn):g(e).find(Un))[0],r=n&&o&&g(o).hasClass(jn),s=function(){return i._transitionComplete(t,o,n)};if(o&&r){var a=_.getTransitionDurationFromElement(o);g(o).removeClass(Hn).one(_.TRANSITION_END,s).emulateTransitionEnd(a)}else s()},t._transitionComplete=function(t,e,n){if(e){g(e).removeClass(Pn);var i=g(e.parentNode).find(Mn)[0];i&&g(i).removeClass(Pn),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}if(g(t).addClass(Pn),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),_.reflow(t),t.classList.contains(jn)&&t.classList.add(Hn),t.parentNode&&g(t.parentNode).hasClass(kn)){var o=g(t).closest(Rn)[0];if(o){var r=[].slice.call(o.querySelectorAll(qn));g(r).addClass(Pn)}t.setAttribute("aria-expanded",!0)}n&&n()},i._jQueryInterface=function(n){return this.each(function(){var t=g(this),e=t.data(wn);if(e||(e=new i(this),t.data(wn,e)),"string"==typeof n){if("undefined"==typeof e[n])throw new TypeError('No method named "'+n+'"');e[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.3.1"}}]),i}();g(document).on(On.CLICK_DATA_API,Wn,function(t){t.preventDefault(),Kn._jQueryInterface.call(g(this),"show")}),g.fn.tab=Kn._jQueryInterface,g.fn.tab.Constructor=Kn,g.fn.tab.noConflict=function(){return g.fn.tab=Nn,Kn._jQueryInterface};var Qn="toast",Bn="bs.toast",Vn="."+Bn,Yn=g.fn[Qn],zn={CLICK_DISMISS:"click.dismiss"+Vn,HIDE:"hide"+Vn,HIDDEN:"hidden"+Vn,SHOW:"show"+Vn,SHOWN:"shown"+Vn},Xn="fade",$n="hide",Gn="show",Jn="showing",Zn={animation:"boolean",autohide:"boolean",delay:"number"},ti={animation:!0,autohide:!0,delay:500},ei='[data-dismiss="toast"]',ni=function(){function i(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var t=i.prototype;return t.show=function(){var t=this;g(this._element).trigger(zn.SHOW),this._config.animation&&this._element.classList.add(Xn);var e=function(){t._element.classList.remove(Jn),t._element.classList.add(Gn),g(t._element).trigger(zn.SHOWN),t._config.autohide&&t.hide()};if(this._element.classList.remove($n),this._element.classList.add(Jn),this._config.animation){var n=_.getTransitionDurationFromElement(this._element);g(this._element).one(_.TRANSITION_END,e).emulateTransitionEnd(n)}else e()},t.hide=function(t){var e=this;this._element.classList.contains(Gn)&&(g(this._element).trigger(zn.HIDE),t?this._close():this._timeout=setTimeout(function(){e._close()},this._config.delay))},t.dispose=function(){clearTimeout(this._timeout),this._timeout=null,this._element.classList.contains(Gn)&&this._element.classList.remove(Gn),g(this._element).off(zn.CLICK_DISMISS),g.removeData(this._element,Bn),this._element=null,this._config=null},t._getConfig=function(t){return t=l({},ti,g(this._element).data(),"object"==typeof t&&t?t:{}),_.typeCheckConfig(Qn,t,this.constructor.DefaultType),t},t._setListeners=function(){var t=this;g(this._element).on(zn.CLICK_DISMISS,ei,function(){return t.hide(!0)})},t._close=function(){var t=this,e=function(){t._element.classList.add($n),g(t._element).trigger(zn.HIDDEN)};if(this._element.classList.remove(Gn),this._config.animation){var n=_.getTransitionDurationFromElement(this._element);g(this._element).one(_.TRANSITION_END,e).emulateTransitionEnd(n)}else e()},i._jQueryInterface=function(n){return this.each(function(){var t=g(this),e=t.data(Bn);if(e||(e=new i(this,"object"==typeof n&&n),t.data(Bn,e)),"string"==typeof n){if("undefined"==typeof e[n])throw new TypeError('No method named "'+n+'"');e[n](this)}})},s(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"DefaultType",get:function(){return Zn}},{key:"Default",get:function(){return ti}}]),i}();g.fn[Qn]=ni._jQueryInterface,g.fn[Qn].Constructor=ni,g.fn[Qn].noConflict=function(){return g.fn[Qn]=Yn,ni._jQueryInterface},function(){if("undefined"==typeof g)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=g.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||4<=t[0])throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(),t.Util=_,t.Alert=p,t.Button=P,t.Carousel=lt,t.Collapse=bt,t.Dropdown=Jt,t.Modal=ve,t.Popover=sn,t.Scrollspy=Dn,t.Tab=Kn,t.Toast=ni,t.Tooltip=Be,Object.defineProperty(t,"__esModule",{value:!0})});
diff --git a/examples/demo_agents/gym_videos/openaigym.episode_batch.0.454210.stats.json b/examples/demo_agents/gym_videos/openaigym.episode_batch.0.454210.stats.json
index c99a9c033..1ac96070b 100644
--- a/examples/demo_agents/gym_videos/openaigym.episode_batch.0.454210.stats.json
+++ b/examples/demo_agents/gym_videos/openaigym.episode_batch.0.454210.stats.json
@@ -1 +1 @@
-{"initial_reset_timestamp": 22935.230051929, "timestamps": [22938.041554318], "episode_lengths": [71], "episode_rewards": [71.0], "episode_types": ["t"]}
\ No newline at end of file
+{"initial_reset_timestamp": 22935.230051929, "timestamps": [22938.041554318], "episode_lengths": [71], "episode_rewards": [71.0], "episode_types": ["t"]}
diff --git a/examples/demo_agents/gym_videos/openaigym.manifest.0.454210.manifest.json b/examples/demo_agents/gym_videos/openaigym.manifest.0.454210.manifest.json
index 2b34e39c0..d54618374 100644
--- a/examples/demo_agents/gym_videos/openaigym.manifest.0.454210.manifest.json
+++ b/examples/demo_agents/gym_videos/openaigym.manifest.0.454210.manifest.json
@@ -1 +1 @@
-{"stats": "openaigym.episode_batch.0.454210.stats.json", "videos": [["openaigym.video.0.454210.video000000.mp4", "openaigym.video.0.454210.video000000.meta.json"]], "env_info": {"gym_version": "0.21.0", "env_id": "CartPole-v0"}}
\ No newline at end of file
+{"stats": "openaigym.episode_batch.0.454210.stats.json", "videos": [["openaigym.video.0.454210.video000000.mp4", "openaigym.video.0.454210.video000000.meta.json"]], "env_info": {"gym_version": "0.21.0", "env_id": "CartPole-v0"}}
diff --git a/examples/demo_agents/gym_videos/openaigym.video.0.454210.video000000.meta.json b/examples/demo_agents/gym_videos/openaigym.video.0.454210.video000000.meta.json
index 8e824182a..331457df0 100644
--- a/examples/demo_agents/gym_videos/openaigym.video.0.454210.video000000.meta.json
+++ b/examples/demo_agents/gym_videos/openaigym.video.0.454210.video000000.meta.json
@@ -1 +1 @@
-{"episode_id": 0, "content_type": "video/mp4", "encoder_version": {"backend": "ffmpeg", "version": "b'ffmpeg version n4.4.1 Copyright (c) 2000-2021 the FFmpeg developers\\nbuilt with gcc 11.1.0 (GCC)\\nconfiguration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-shared --enable-version3\\nlibavutil 56. 70.100 / 56. 70.100\\nlibavcodec 58.134.100 / 58.134.100\\nlibavformat 58. 76.100 / 58. 76.100\\nlibavdevice 58. 13.100 / 58. 13.100\\nlibavfilter 7.110.100 / 7.110.100\\nlibswscale 5. 9.100 / 5. 9.100\\nlibswresample 3. 9.100 / 3. 9.100\\nlibpostproc 55. 9.100 / 55. 9.100\\n'", "cmdline": ["ffmpeg", "-nostats", "-loglevel", "error", "-y", "-f", "rawvideo", "-s:v", "600x400", "-pix_fmt", "rgb24", "-framerate", "50", "-i", "-", "-vf", "scale=trunc(iw/2)*2:trunc(ih/2)*2", "-vcodec", "libx264", "-pix_fmt", "yuv420p", "-r", "50", "/home/frost/tmpmath/rlberry/examples/demo_agents/gym_videos/openaigym.video.0.454210.video000000.mp4"]}}
\ No newline at end of file
+{"episode_id": 0, "content_type": "video/mp4", "encoder_version": {"backend": "ffmpeg", "version": "b'ffmpeg version n4.4.1 Copyright (c) 2000-2021 the FFmpeg developers\\nbuilt with gcc 11.1.0 (GCC)\\nconfiguration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-shared --enable-version3\\nlibavutil 56. 70.100 / 56. 70.100\\nlibavcodec 58.134.100 / 58.134.100\\nlibavformat 58. 76.100 / 58. 76.100\\nlibavdevice 58. 13.100 / 58. 13.100\\nlibavfilter 7.110.100 / 7.110.100\\nlibswscale 5. 9.100 / 5. 9.100\\nlibswresample 3. 9.100 / 3. 9.100\\nlibpostproc 55. 9.100 / 55. 9.100\\n'", "cmdline": ["ffmpeg", "-nostats", "-loglevel", "error", "-y", "-f", "rawvideo", "-s:v", "600x400", "-pix_fmt", "rgb24", "-framerate", "50", "-i", "-", "-vf", "scale=trunc(iw/2)*2:trunc(ih/2)*2", "-vcodec", "libx264", "-pix_fmt", "yuv420p", "-r", "50", "/home/frost/tmpmath/rlberry/examples/demo_agents/gym_videos/openaigym.video.0.454210.video000000.mp4"]}}
diff --git a/examples/demo_examples/demo_ball_exploration_benchmark.py b/examples/demo_examples/demo_ball_exploration_benchmark.py
index cd0c850df..8864ca7bb 100644
--- a/examples/demo_examples/demo_ball_exploration_benchmark.py
+++ b/examples/demo_examples/demo_ball_exploration_benchmark.py
@@ -1,6 +1,6 @@
-"""
- =====================
- Demo: demo_ball_exploration_benchmark
+"""
+ =====================
+ Demo: demo_ball_exploration_benchmark
=====================
"""
from rlberry.agents.mbqvi import MBQVIAgent
diff --git a/examples/demo_examples/demo_discretize_state.py b/examples/demo_examples/demo_discretize_state.py
index 596eb0fe2..d258fd6d6 100644
--- a/examples/demo_examples/demo_discretize_state.py
+++ b/examples/demo_examples/demo_discretize_state.py
@@ -1,6 +1,6 @@
-"""
- =====================
- Demo: demo_discretize_state
+"""
+ =====================
+ Demo: demo_discretize_state
=====================
"""
from rlberry.envs.classic_control import MountainCar
diff --git a/examples/demo_examples/demo_experiment/params_experiment.yaml b/examples/demo_examples/demo_experiment/params_experiment.yaml
index cbe93c098..c1899ef38 100644
--- a/examples/demo_examples/demo_experiment/params_experiment.yaml
+++ b/examples/demo_examples/demo_experiment/params_experiment.yaml
@@ -1,6 +1,6 @@
-# """
-# =====================
-# Demo: params_experiment.yaml
+# """
+# =====================
+# Demo: params_experiment.yaml
# =====================
# """
description: 'RSUCBVI in NRoom'
diff --git a/examples/demo_examples/demo_experiment/room.yaml b/examples/demo_examples/demo_experiment/room.yaml
index f2587130b..3223015c2 100644
--- a/examples/demo_examples/demo_experiment/room.yaml
+++ b/examples/demo_examples/demo_experiment/room.yaml
@@ -1,10 +1,10 @@
-# """
-# =====================
-# Demo: room.yaml
+# """
+# =====================
+# Demo: room.yaml
# =====================
# """
constructor: 'rlberry.envs.benchmarks.grid_exploration.nroom.NRoom'
params:
reward_free: false
array_observation: true
- nrooms: 5
\ No newline at end of file
+ nrooms: 5
diff --git a/examples/demo_examples/demo_experiment/rsucbvi.yaml b/examples/demo_examples/demo_experiment/rsucbvi.yaml
index a96334751..25cfadebc 100644
--- a/examples/demo_examples/demo_experiment/rsucbvi.yaml
+++ b/examples/demo_examples/demo_experiment/rsucbvi.yaml
@@ -1,6 +1,6 @@
-# """
-# =====================
-# Demo: rsucbvi.yaml
+# """
+# =====================
+# Demo: rsucbvi.yaml
# =====================
# """
agent_class: 'rlberry.agents.kernel_based.rs_ucbvi.RSUCBVIAgent'
@@ -15,4 +15,4 @@ init_kwargs:
eval_kwargs:
eval_horizon: 50
fit_kwargs:
- fit_budget: 100
\ No newline at end of file
+ fit_budget: 100
diff --git a/examples/demo_examples/demo_experiment/rsucbvi_alternative.yaml b/examples/demo_examples/demo_experiment/rsucbvi_alternative.yaml
index 54725f392..ce1b71826 100644
--- a/examples/demo_examples/demo_experiment/rsucbvi_alternative.yaml
+++ b/examples/demo_examples/demo_experiment/rsucbvi_alternative.yaml
@@ -1,6 +1,6 @@
-# """
-# =====================
-# Demo: rsucbvi_alternative.yaml
+# """
+# =====================
+# Demo: rsucbvi_alternative.yaml
# =====================
# """
base_config: 'examples/demo_examples/demo_experiment/rsucbvi.yaml'
diff --git a/examples/demo_examples/demo_experiment/run.py b/examples/demo_examples/demo_experiment/run.py
index 42e8e4c06..d25534ef1 100644
--- a/examples/demo_examples/demo_experiment/run.py
+++ b/examples/demo_examples/demo_experiment/run.py
@@ -2,8 +2,6 @@
=====================
Demo: run
=====================
-"""
-"""
To run the experiment:
$ python examples/demo_examples/demo_experiment/run.py examples/demo_examples/demo_experiment/params_experiment.yaml
diff --git a/examples/demo_examples/demo_gridworld.py b/examples/demo_examples/demo_gridworld.py
index 7a384a9bf..0416d6905 100644
--- a/examples/demo_examples/demo_gridworld.py
+++ b/examples/demo_examples/demo_gridworld.py
@@ -1,6 +1,6 @@
-"""
- =====================
- Demo: demo_gridworld
+"""
+ =====================
+ Demo: demo_gridworld
=====================
"""
from rlberry.envs.finite import GridWorld
diff --git a/examples/demo_examples/demo_gym_wrapper.py b/examples/demo_examples/demo_gym_wrapper.py
index 8dd4143ba..fcd209bf2 100644
--- a/examples/demo_examples/demo_gym_wrapper.py
+++ b/examples/demo_examples/demo_gym_wrapper.py
@@ -1,6 +1,6 @@
-"""
- =====================
- Demo: demo_gym_wrapper
+"""
+ =====================
+ Demo: demo_gym_wrapper
=====================
"""
from rlberry.envs import gym_make
diff --git a/examples/demo_examples/demo_hyperparam_optim.py b/examples/demo_examples/demo_hyperparam_optim.py
index f00b2939c..800ae8519 100644
--- a/examples/demo_examples/demo_hyperparam_optim.py
+++ b/examples/demo_examples/demo_hyperparam_optim.py
@@ -1,6 +1,6 @@
-"""
- =====================
- Demo: demo_hyperparam_optim
+"""
+ =====================
+ Demo: demo_hyperparam_optim
=====================
"""
from rlberry.envs.benchmarks.ball_exploration import PBall2D
diff --git a/examples/demo_examples/demo_jax_dqn.py b/examples/demo_examples/demo_jax_dqn.py
index 3368c9a6e..3871550c8 100644
--- a/examples/demo_examples/demo_jax_dqn.py
+++ b/examples/demo_examples/demo_jax_dqn.py
@@ -1,6 +1,6 @@
-"""
- =====================
- Demo: demo_jax_dqn
+"""
+ =====================
+ Demo: demo_jax_dqn
=====================
"""
import rlberry.agents.jax.nets.common as nets
diff --git a/examples/demo_examples/demo_network/run_remote_manager.py b/examples/demo_examples/demo_network/run_remote_manager.py
index c334c594a..5f00fe35d 100644
--- a/examples/demo_examples/demo_network/run_remote_manager.py
+++ b/examples/demo_examples/demo_network/run_remote_manager.py
@@ -1,6 +1,6 @@
-"""
- =====================
- Demo: run_remote_manager
+"""
+ =====================
+ Demo: run_remote_manager
=====================
"""
from rlberry.envs.gym_make import gym_make
diff --git a/examples/demo_examples/demo_network/run_server.py b/examples/demo_examples/demo_network/run_server.py
index 2426eb5b0..c1b6a15b5 100644
--- a/examples/demo_examples/demo_network/run_server.py
+++ b/examples/demo_examples/demo_network/run_server.py
@@ -1,6 +1,6 @@
-"""
- =====================
- Demo: run_server
+"""
+ =====================
+ Demo: run_server
=====================
"""
from rlberry.network.interface import ResourceItem
diff --git a/examples/demo_examples/demo_rnd.py b/examples/demo_examples/demo_rnd.py
index ef6b3c58d..54b73046d 100644
--- a/examples/demo_examples/demo_rnd.py
+++ b/examples/demo_examples/demo_rnd.py
@@ -1,6 +1,6 @@
-"""
- =====================
- Demo: demo_rnd
+"""
+ =====================
+ Demo: demo_rnd
=====================
"""
from rlberry.exploration_tools.torch.rnd import RandomNetworkDistillation
diff --git a/examples/demo_examples/demo_save_video.py b/examples/demo_examples/demo_save_video.py
index d6fafae07..baf50e130 100644
--- a/examples/demo_examples/demo_save_video.py
+++ b/examples/demo_examples/demo_save_video.py
@@ -1,6 +1,6 @@
-"""
- =====================
- Demo: demo_save_video
+"""
+ =====================
+ Demo: demo_save_video
=====================
"""
from rlberry.agents.dynprog import ValueIterationAgent
diff --git a/examples/demo_examples/demo_seeding.py b/examples/demo_examples/demo_seeding.py
index 0f85a2010..0afa61ec0 100644
--- a/examples/demo_examples/demo_seeding.py
+++ b/examples/demo_examples/demo_seeding.py
@@ -1,6 +1,6 @@
-"""
- =====================
- Demo: demo_seeding
+"""
+ =====================
+ Demo: demo_seeding
=====================
"""
from rlberry.seeding import Seeder
diff --git a/examples/demo_examples/demo_supervised_learning.py b/examples/demo_examples/demo_supervised_learning.py
index 2151399d5..859b3803b 100644
--- a/examples/demo_examples/demo_supervised_learning.py
+++ b/examples/demo_examples/demo_supervised_learning.py
@@ -1,10 +1,10 @@
-"""
+"""
==============================
Using rlberry for supervised learning
==============================
- Using rlberry to tackle a simple regression problem:
- train a multi-layer perceptron (with PyTorch) to fit a function,
+ Using rlberry to tackle a simple regression problem:
+ train a multi-layer perceptron (with PyTorch) to fit a function,
run cross-validation splits in parallel using AgentManager.
This example requires scikit-learn to be installed,
diff --git a/examples/demo_examples/demo_ucbvi_and_opqtl.py b/examples/demo_examples/demo_ucbvi_and_opqtl.py
index 7aae80eb6..4247aab75 100644
--- a/examples/demo_examples/demo_ucbvi_and_opqtl.py
+++ b/examples/demo_examples/demo_ucbvi_and_opqtl.py
@@ -1,6 +1,6 @@
-"""
- =====================
- Demo: demo_ucbvi_and_opqtl
+"""
+ =====================
+ Demo: demo_ucbvi_and_opqtl
=====================
"""
import numpy as np
diff --git a/examples/demo_examples/demo_vis2d.py b/examples/demo_examples/demo_vis2d.py
index d90ad2f21..c35731d90 100644
--- a/examples/demo_examples/demo_vis2d.py
+++ b/examples/demo_examples/demo_vis2d.py
@@ -1,6 +1,6 @@
-"""
- =====================
- Demo: demo_vis2d
+"""
+ =====================
+ Demo: demo_vis2d
=====================
"""
from rlberry.envs.benchmarks.grid_exploration.nroom import NRoom, get_nroom_state_coord
diff --git a/long_tests/rl_agent/ltest_mbqvi_applegold.py b/long_tests/rl_agent/ltest_mbqvi_applegold.py
index 8c7fe9d88..083562bde 100644
--- a/long_tests/rl_agent/ltest_mbqvi_applegold.py
+++ b/long_tests/rl_agent/ltest_mbqvi_applegold.py
@@ -8,9 +8,9 @@
params["gamma"] = 0.9
params["horizon"] = None
+
# hyperparameters from https://github.com/DLR-RM/rl-baselines3-zoo
def test_mbqvi_applegold():
-
rbagent = AgentManager(
MBQVIAgent,
(AppleGold, None),
diff --git a/long_tests/torch_agent/ltest_dqn_montaincar.py b/long_tests/torch_agent/ltest_dqn_montaincar.py
index 72dcb05a4..f36f662e9 100644
--- a/long_tests/torch_agent/ltest_dqn_montaincar.py
+++ b/long_tests/torch_agent/ltest_dqn_montaincar.py
@@ -8,6 +8,8 @@
"layer_sizes": (256, 256),
"reshape": False,
}
+
+
# hyperparameters from https://github.com/DLR-RM/rl-baselines3-zoo
def test_dqn_montaincar():
env_ctor = gym_make
diff --git a/rlberry/agents/bandits/ts_agents.py b/rlberry/agents/bandits/ts_agents.py
index 0a9a2a44a..9cf4874a3 100644
--- a/rlberry/agents/bandits/ts_agents.py
+++ b/rlberry/agents/bandits/ts_agents.py
@@ -68,7 +68,6 @@ class TSAgent(BanditWithSimplePolicy):
def __init__(self, env, prior_info=None, **kwargs):
BanditWithSimplePolicy.__init__(self, env, **kwargs)
if prior_info is None:
-
# Beta-Bernoulli prior by default
def prior_params(tr):
"""
diff --git a/rlberry/agents/experimental/torch/sac/sac.py b/rlberry/agents/experimental/torch/sac/sac.py
index f42d26c52..6e8c7a39d 100644
--- a/rlberry/agents/experimental/torch/sac/sac.py
+++ b/rlberry/agents/experimental/torch/sac/sac.py
@@ -96,7 +96,6 @@ def __init__(
device="cuda:best",
**kwargs
):
-
AgentWithSimplePolicy.__init__(self, env, **kwargs)
self.use_bonus = use_bonus
diff --git a/rlberry/agents/experimental/torch/sac/utils.py b/rlberry/agents/experimental/torch/sac/utils.py
index 19e6d5844..e9ac753c6 100644
--- a/rlberry/agents/experimental/torch/sac/utils.py
+++ b/rlberry/agents/experimental/torch/sac/utils.py
@@ -46,7 +46,6 @@ def get_qref(batch, target_val_net, gamma, device="cpu"):
@torch.no_grad()
def get_vref(env, batch, twinq_net, policy_net, ent_alpha: float, device="cpu"):
-
assert isinstance(twinq_net, tuple)
assert isinstance(env.action_space, spaces.Discrete)
num_actions = env.action_space.n
diff --git a/rlberry/agents/torch/a2c/a2c.py b/rlberry/agents/torch/a2c/a2c.py
index e2e3009f0..2b745a857 100644
--- a/rlberry/agents/torch/a2c/a2c.py
+++ b/rlberry/agents/torch/a2c/a2c.py
@@ -83,7 +83,6 @@ def __init__(
eval_interval: Optional[int] = None,
**kwargs
):
-
AgentWithSimplePolicy.__init__(self, env, **kwargs)
self.batch_size = batch_size
diff --git a/rlberry/agents/torch/ppo/ppo.py b/rlberry/agents/torch/ppo/ppo.py
index 3b42c0336..932618f82 100644
--- a/rlberry/agents/torch/ppo/ppo.py
+++ b/rlberry/agents/torch/ppo/ppo.py
@@ -107,7 +107,6 @@ def __init__(
device="cuda:best",
**kwargs
):
-
AgentWithSimplePolicy.__init__(self, env, **kwargs)
self.batch_size = batch_size
@@ -230,7 +229,6 @@ def fit(self, budget: int, **kwargs):
state = self.env.reset()
while timesteps_counter < budget:
-
# running policy_old
state = torch.from_numpy(state).float().to(self.device)
action, action_logprob = self._select_action(state)
@@ -288,7 +286,6 @@ def _select_action(self, state):
return action, action_logprob
def _update(self):
-
memory_data = self.memory.data
# convert list to tensor
@@ -315,7 +312,6 @@ def _update(self):
n_batches = self.n_steps // self.batch_size
for _ in range(self.k_epochs):
-
# shuffle samples
rd_indices = self.rng.choice(self.n_steps, size=self.n_steps, replace=False)
shuffled_states = full_old_states[rd_indices]
@@ -325,7 +321,6 @@ def _update(self):
shuffled_advantages = full_old_advantages[rd_indices]
for k in range(n_batches):
-
# sample batch
batch_idx = np.arange(
k * self.batch_size, min((k + 1) * self.batch_size, self.n_steps)
@@ -392,7 +387,6 @@ def _update(self):
self._policy_old.load_state_dict(self._policy.state_dict())
def _compute_returns_avantages(self, rewards, is_terminals, state_values):
-
length_rollout = len(rewards)
returns = torch.zeros(length_rollout).to(self.device)
advantages = torch.zeros(length_rollout).to(self.device)
diff --git a/rlberry/agents/torch/reinforce/reinforce.py b/rlberry/agents/torch/reinforce/reinforce.py
index f5e299512..d476245a6 100644
--- a/rlberry/agents/torch/reinforce/reinforce.py
+++ b/rlberry/agents/torch/reinforce/reinforce.py
@@ -72,7 +72,6 @@ def __init__(
device="cuda:best",
**kwargs
):
-
# For all parameters, define self.param = param
_, _, _, values = inspect.getargvalues(inspect.currentframe())
values.pop("self")
diff --git a/rlberry/agents/torch/tests/test_a2c.py b/rlberry/agents/torch/tests/test_a2c.py
index 5094d3378..1c20ce7c1 100644
--- a/rlberry/agents/torch/tests/test_a2c.py
+++ b/rlberry/agents/torch/tests/test_a2c.py
@@ -6,7 +6,6 @@
def test_a2c():
-
env = "CartPole-v0"
mdp = make(env)
env_ctor = Wrapper
diff --git a/rlberry/agents/torch/tests/test_ppo.py b/rlberry/agents/torch/tests/test_ppo.py
index 7f06ffc39..b7c60bcab 100644
--- a/rlberry/agents/torch/tests/test_ppo.py
+++ b/rlberry/agents/torch/tests/test_ppo.py
@@ -16,7 +16,6 @@
def test_ppo():
-
env = "CartPole-v0"
mdp = make(env)
env_ctor = Wrapper
diff --git a/rlberry/envs/benchmarks/generalization/twinrooms.py b/rlberry/envs/benchmarks/generalization/twinrooms.py
index 99ab2752b..77f2270cd 100644
--- a/rlberry/envs/benchmarks/generalization/twinrooms.py
+++ b/rlberry/envs/benchmarks/generalization/twinrooms.py
@@ -158,7 +158,7 @@ def get_background(self):
bg.add_shape(shape)
# rewards
- for (x, y) in [
+ for x, y in [
self.base_reward_pos,
self.base_reward_pos + np.array([1.0, 0.0]),
]:
diff --git a/rlberry/envs/benchmarks/grid_exploration/apple_gold.py b/rlberry/envs/benchmarks/grid_exploration/apple_gold.py
index d460a6714..18234d314 100644
--- a/rlberry/envs/benchmarks/grid_exploration/apple_gold.py
+++ b/rlberry/envs/benchmarks/grid_exploration/apple_gold.py
@@ -148,7 +148,7 @@ def get_background(self):
bg.add_shape(shape)
# rewards
- for (y, x) in self.reward_at:
+ for y, x in self.reward_at:
rwd = self.reward_at[(y, x)]
if rwd == -0.05:
rock = GeometricPrimitive("POLYGON")
diff --git a/rlberry/envs/benchmarks/grid_exploration/nroom.py b/rlberry/envs/benchmarks/grid_exploration/nroom.py
index 495ef8f55..497f1a6ca 100644
--- a/rlberry/envs/benchmarks/grid_exploration/nroom.py
+++ b/rlberry/envs/benchmarks/grid_exploration/nroom.py
@@ -70,7 +70,6 @@ def __init__(
initial_state_distribution="center",
include_traps=False,
):
-
assert nrooms > 0, "nrooms must be > 0"
assert initial_state_distribution in ("center", "uniform")
@@ -263,7 +262,7 @@ def get_background(self):
bg = Scene()
# traps
- for (y, x) in self.traps:
+ for y, x in self.traps:
shape = GeometricPrimitive("POLYGON")
shape.set_color((0.5, 0.0, 0.0))
shape.add_vertex((x, y))
@@ -284,7 +283,7 @@ def get_background(self):
bg.add_shape(shape)
# rewards
- for (y, x) in self.reward_at:
+ for y, x in self.reward_at:
flag = GeometricPrimitive("POLYGON")
rwd = self.reward_at[(y, x)]
if rwd == 1.0:
diff --git a/rlberry/envs/benchmarks/grid_exploration/six_room.py b/rlberry/envs/benchmarks/grid_exploration/six_room.py
index 095b62ae9..86dc2c900 100644
--- a/rlberry/envs/benchmarks/grid_exploration/six_room.py
+++ b/rlberry/envs/benchmarks/grid_exploration/six_room.py
@@ -131,7 +131,7 @@ def get_background(self):
bg.add_shape(shape)
# rewards
- for (y, x) in self.reward_at:
+ for y, x in self.reward_at:
flag = GeometricPrimitive("POLYGON")
rwd = self.reward_at[(y, x)]
if rwd == 10:
diff --git a/rlberry/envs/finite/gridworld.py b/rlberry/envs/finite/gridworld.py
index dc9a1f1b7..974b5ee00 100644
--- a/rlberry/envs/finite/gridworld.py
+++ b/rlberry/envs/finite/gridworld.py
@@ -279,7 +279,7 @@ def _build_ascii(self):
grid[rr][cc] = "o "
grid_idx[rr][cc] = str(self.coord2index[(rr, cc)]).zfill(3)
- for (rr, cc) in self.reward_at:
+ for rr, cc in self.reward_at:
rwd = self.reward_at[(rr, cc)]
if rwd > 0:
grid[rr][cc] = "+ "
@@ -452,7 +452,7 @@ def get_background(self):
bg.add_shape(shape)
# rewards
- for (y, x) in self.reward_at:
+ for y, x in self.reward_at:
flag = GeometricPrimitive("POLYGON")
rwd = self.reward_at[(y, x)]
color = 0.5 * np.abs(rwd) / self.reward_range[1]
diff --git a/rlberry/envs/tests/test_spring_env.py b/rlberry/envs/tests/test_spring_env.py
index 439194dbd..67ec1907f 100644
--- a/rlberry/envs/tests/test_spring_env.py
+++ b/rlberry/envs/tests/test_spring_env.py
@@ -16,7 +16,6 @@
def test_spring_cartpole():
-
# test 1 - default
env = SpringCartPole()
@@ -84,6 +83,7 @@ def test_rk4():
"""
Test of the rk4 utils defined in speingcartpole
"""
+
## 2D system
def derivs6(x, t):
d1 = x[0] + 2 * x[1]
diff --git a/rlberry/experiment/generator.py b/rlberry/experiment/generator.py
index 2cb487e6a..5adb9ed9d 100644
--- a/rlberry/experiment/generator.py
+++ b/rlberry/experiment/generator.py
@@ -32,7 +32,7 @@ def experiment_generator():
max_workers = int(args["--max_workers"])
if max_workers == -1:
max_workers = None
- for (_, agent_manager_kwargs) in parse_experiment_config(
+ for _, agent_manager_kwargs in parse_experiment_config(
Path(args[""]),
n_fit=int(args["--n_fit"]),
max_workers=max_workers,
diff --git a/rlberry/experiment/tests/room.yaml b/rlberry/experiment/tests/room.yaml
index 764d81a2c..8667278d5 100644
--- a/rlberry/experiment/tests/room.yaml
+++ b/rlberry/experiment/tests/room.yaml
@@ -2,4 +2,4 @@ constructor: 'rlberry.envs.benchmarks.grid_exploration.nroom.NRoom'
params:
reward_free: false
array_observation: true
- nrooms: 5
\ No newline at end of file
+ nrooms: 5
diff --git a/rlberry/experiment/tests/rsucbvi.yaml b/rlberry/experiment/tests/rsucbvi.yaml
index e9ae75c64..4c9273e1b 100644
--- a/rlberry/experiment/tests/rsucbvi.yaml
+++ b/rlberry/experiment/tests/rsucbvi.yaml
@@ -10,4 +10,4 @@ init_kwargs:
eval_kwargs:
eval_horizon: 50
fit_kwargs:
- fit_budget: 123
\ No newline at end of file
+ fit_budget: 123
diff --git a/rlberry/experiment/tests/rsucbvi_alternative.yaml b/rlberry/experiment/tests/rsucbvi_alternative.yaml
index cb61fdb84..eb829ec9e 100644
--- a/rlberry/experiment/tests/rsucbvi_alternative.yaml
+++ b/rlberry/experiment/tests/rsucbvi_alternative.yaml
@@ -2,4 +2,4 @@ base_config: 'rlberry/experiment/tests/rsucbvi.yaml'
init_kwargs:
gamma: 0.9
eval_kwargs:
- horizon: 50
\ No newline at end of file
+ horizon: 50
diff --git a/rlberry/experiment/yaml_utils.py b/rlberry/experiment/yaml_utils.py
index 05d4c61a5..ed8734d41 100644
--- a/rlberry/experiment/yaml_utils.py
+++ b/rlberry/experiment/yaml_utils.py
@@ -210,5 +210,5 @@ def parse_experiment_config(
if __name__ == "__main__":
filename = "examples/demo_experiment/params_experiment.yaml"
- for (seed, agent_manager) in parse_experiment_config(Path(filename)):
+ for seed, agent_manager in parse_experiment_config(Path(filename)):
print(seed)
diff --git a/rlberry/exploration_tools/torch/rnd.py b/rlberry/exploration_tools/torch/rnd.py
index 1acf88de7..7a9e4f3b8 100644
--- a/rlberry/exploration_tools/torch/rnd.py
+++ b/rlberry/exploration_tools/torch/rnd.py
@@ -146,7 +146,6 @@ def _get_embeddings(self, state, action=None, batch=False, all_actions=False):
@preprocess_args(expected_type="torch")
def update(self, state, action=None, next_state=None, reward=None, **kwargs):
-
batch = [(state, action)]
if self.batch_size > 0 and not self.memory.is_empty():
batch += self.memory.sample(self.batch_size)
diff --git a/rlberry/manager/agent_manager.py b/rlberry/manager/agent_manager.py
index 72815bbd5..a591e769a 100644
--- a/rlberry/manager/agent_manager.py
+++ b/rlberry/manager/agent_manager.py
@@ -877,7 +877,6 @@ def load(cls, filename):
return obj
def __eq__(self, other):
-
result = True
self_init_kwargs = [_strip_seed_dir(kw) for kw in self.init_kwargs]
other_init_kwargs = [_strip_seed_dir(kw) for kw in other.init_kwargs]
diff --git a/rlberry/manager/evaluation.py b/rlberry/manager/evaluation.py
index 7a2d121c9..2fe028b76 100644
--- a/rlberry/manager/evaluation.py
+++ b/rlberry/manager/evaluation.py
@@ -279,7 +279,6 @@ def read_writer_data(data_source, tag=None, preprocess_func=None, id_agent=None)
def _get_last_xp(input_dir, name):
-
dir_name = Path(input_dir) / "manager_data"
# list all of the experiments for this particular agent
diff --git a/rlberry/network/tests/test_server.py b/rlberry/network/tests/test_server.py
index f06b5ed74..a306633e3 100644
--- a/rlberry/network/tests/test_server.py
+++ b/rlberry/network/tests/test_server.py
@@ -32,7 +32,6 @@ class Starter(ProcessStarter):
def test_client():
-
port = 4242
client = BerryClient(port=port)
# Send params for AgentManager
diff --git a/rlberry/rendering/render_interface.py b/rlberry/rendering/render_interface.py
index 0b7621e9e..af846cf33 100644
--- a/rlberry/rendering/render_interface.py
+++ b/rlberry/rendering/render_interface.py
@@ -140,7 +140,6 @@ def render(self, loop=True, **kwargs):
return 1
def get_video(self, framerate=25, **kwargs):
-
# background and data
background, data = self._get_background_and_scenes()
diff --git a/rlberry/utils/writers.py b/rlberry/utils/writers.py
index 3cf99d3e5..fcdfdac46 100644
--- a/rlberry/utils/writers.py
+++ b/rlberry/utils/writers.py
@@ -289,7 +289,6 @@ def _log(self):
# log if enough time has passed since the last log
max_global_step = 0
if time_elapsed > self._log_interval:
-
self._time_last_log = t_now
size_term = shutil.get_terminal_size().columns
diff --git a/scripts/conda_env_setup.sh b/scripts/conda_env_setup.sh
index 9a194c173..8abd5485f 100644
--- a/scripts/conda_env_setup.sh
+++ b/scripts/conda_env_setup.sh
@@ -20,4 +20,4 @@ echo ""
echo "Contents of $CONDA_PREFIX/etc/conda/deactivate.d/env_vars.sh:"
cat ./etc/conda/deactivate.d/env_vars.sh
-echo ""
\ No newline at end of file
+echo ""
diff --git a/scripts/construct_video_examples.sh b/scripts/construct_video_examples.sh
index e260c111f..4bdc3c291 100755
--- a/scripts/construct_video_examples.sh
+++ b/scripts/construct_video_examples.sh
@@ -13,7 +13,7 @@ do
# construct the mp4
python $f
name=$(basename $f)
-# make a thumbnail. Warning : the video should have the same name as the python script
+# make a thumbnail. Warning : the video should have the same name as the python script
# i.e. video_plot_SOMETHING.mp4 to be detected
ffmpeg -i ../docs/_video/${name%%.py}.mp4 -vframes 1 -f image2 ../docs/thumbnails/${name%%.py}.jpg
done
diff --git a/scripts/fetch_contributors.py b/scripts/fetch_contributors.py
index 5203eabbc..51afaec98 100644
--- a/scripts/fetch_contributors.py
+++ b/scripts/fetch_contributors.py
@@ -111,7 +111,6 @@ def generate_list(contributors):
if __name__ == "__main__":
-
members = get_contributors()
with open(REPO_FOLDER / "docs" / "contributors.rst", "w+") as rst_file: