diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index c1c9b5c..073e69e 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -28,10 +28,11 @@ jobs: cd doc make html - - name: Deploy docs - if: github.ref == 'refs/heads/main' - uses: peaceiris/actions-gh-pages@v4 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: doc/_build/html - cname: hopes.foobot.io +# wait for project to be ready +# - name: Deploy docs +# if: github.ref == 'refs/heads/main' +# uses: peaceiris/actions-gh-pages@v4 +# with: +# github_token: ${{ secrets.GITHUB_TOKEN }} +# publish_dir: doc/_build/html +# cname: hopes.foobot.io diff --git a/hopes/policy/policies.py b/hopes/policy/policies.py index 49cd376..7704dd5 100644 --- a/hopes/policy/policies.py +++ b/hopes/policy/policies.py @@ -27,19 +27,21 @@ def name(self): return self._name or self.__class__.__name__ def with_name(self, name: str) -> "Policy": - """Set the name of the policy. + """Set the name of the policy. This is optional but can be useful for logging, + visualization and comparison with other policies. :param name: the name of the policy. """ self._name = name return self - def with_epsilon(self, epsilon: float | None = None) -> "Policy": - """Set the epsilon value for epsilon-greedy action selection. + def with_epsilon(self, epsilon: float) -> "Policy": + """Set the epsilon value for epsilon-greedy action selection. This is only needed if the + policy is used for action selection and epsilon-greedy action selection is desired. :param epsilon: the epsilon value for epsilon-greedy action selection. """ - assert epsilon is None or 0 <= epsilon <= 1, "Epsilon must be in [0, 1]." + assert epsilon is not None and 0 <= epsilon <= 1, "Epsilon must be in [0, 1]." self._epsilon = epsilon return self