Skip to content

Commit

Permalink
Expand description of each component (#335)
Browse files Browse the repository at this point in the history
## Description

<!-- Provide a brief description of the PR's purpose here. -->

Add more details to the description of each pyribs component.

## TODO

<!-- Notable points that this PR has either accomplished or will
accomplish. -->

## Questions

<!-- Any concerns or points of confusion? -->

## Status

- [x] I have read the guidelines in
[CONTRIBUTING.md](https://github.com/icaros-usc/pyribs/blob/master/CONTRIBUTING.md)
- [x] I have formatted my code using `yapf`
- [x] I have tested my code by running `pytest`
- [x] I have linted my code with `pylint`
- [ ] ~I have added a one-line description of my change to the changelog
in `HISTORY.md`~
- [x] This PR is ready to go
  • Loading branch information
btjanaka committed Apr 5, 2023
1 parent e02dd90 commit 4385f02
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
12 changes: 11 additions & 1 deletion ribs/archives/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
"""Archives store solutions found by a QD algorithm.
"""Archive implementations and associated utilities.
The archive is a data structure which stores solutions generated by the QD
algorithm, along with any information relevant to solutions, such as objective
and measure values. Archives in pyribs can also store metadata (i.e., arbitrary
objects) alongside each solution.
The archives in this subpackage are arranged in a one-layer hierarchy, with all
archives inheriting from :class:`~ribs.archives.ArchiveBase`. This subpackage
also contains several utilities associated with the archives, such as
:class:`~ribs.archives.Elite` and :class:`~ribs.archives.ArchiveDataFrame`.
.. autosummary::
:toctree:
Expand Down
12 changes: 7 additions & 5 deletions ribs/emitters/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
"""Emitters output new candidate solutions in QD algorithms.
"""Emitters generate new candidate solutions in QD algorithms.
All emitters should inherit from :class:`EmitterBase`, except for emitters
designed for differentiable quality diversity (DQD), which should instead
inherit from :class:`DQDEmitterBase`.
More formally, emitters are algorithms that generate solutions and adapt to
objective, measure, and archive insertion feedback.
The emitters in this module follow a one-layer hierarchy, with all emitters
inheriting from :class:`~ribs.emitters.EmitterBase`.
.. note::
Emitters provided here take on the data type of the archive passed to their
Expand All @@ -23,7 +25,7 @@
from ribs.emitters._evolution_strategy_emitter import EvolutionStrategyEmitter
from ribs.emitters._gaussian_emitter import GaussianEmitter
from ribs.emitters._gradient_arborescence_emitter import \
GradientArborescenceEmitter
GradientArborescenceEmitter
from ribs.emitters._iso_line_emitter import IsoLineEmitter

__all__ = [
Expand Down
10 changes: 9 additions & 1 deletion ribs/schedulers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
"""Schedulers link the entire QD algorithm together.
Specifically, the scheduler performs two roles. First, the scheduler facilitates
the interaction between the archive and the population of emitters. The
scheduler adds solutions generated by emitters to the archive and passes the
results of evaluation and archive insertion to the emitters. Second, schedulers
select which emitters generate new solutions on each iteration of the algorithm.
Schedulers make decisions on active emitters based on how well each emitter
performs in previous iterations.
.. autosummary::
:toctree:
ribs.schedulers.Scheduler
ribs.schedulers.BanditScheduler
"""
from ribs.schedulers._scheduler import Scheduler
from ribs.schedulers._bandit_scheduler import BanditScheduler
from ribs.schedulers._scheduler import Scheduler

__all__ = [
"Scheduler",
Expand Down

0 comments on commit 4385f02

Please sign in to comment.