Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation review #121

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Following features are provided:
- A large collection of plugins to explore multiple areas like performance, hyperparameter and
budget analysis.
- Save your runs using DeepCAVE's native recorder.
- Support for many optimizers using converter (e.g., DeepCAVE, SMAC and BOHB).
- Support for many optimizers using converters (e.g., DeepCAVE, SMAC and BOHB).
- Select runs directly from a working directory in the interface.
- Select groups of runs for combined analysis.
- Modularized plugin structure with access to selected runs/groups to provide maximal flexibility.
Expand All @@ -41,6 +41,7 @@ pip install DeepCAVE
If you want to contribute to DeepCAVE use the following steps instead:
```bash
git clone https://github.com/automl/DeepCAVE.git
cd DeepCAVE
conda create -n DeepCAVE python=3.9
conda activate DeepCAVE
conda install -c anaconda swig
Expand Down
1 change: 1 addition & 0 deletions deepcave/plugins/hyperparameter/pdp.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def get_input_layout(register: Callable) -> List[dbc.Row]:
[
dbc.Label("Budget"),
help_button(
"Budget refers to the Multi-Fidelity budget."
"Combined budget means that the trial on the highest"
" evaluated budget is used.\n\n"
"Note: Selecting combined budget might be misleading if"
Expand Down
1 change: 1 addition & 0 deletions deepcave/plugins/hyperparameter/symbolic_explanations.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def get_input_layout(register: Callable) -> List[Union[dbc.Row, html.Details]]:
[
dbc.Label("Budget"),
help_button(
"Budget refers to the Multi-Fidelity budget."
"Combined budget means that the trial on the highest"
" evaluated budget is used.\n\n"
"Note: Selecting combined budget might be misleading if"
Expand Down
1 change: 1 addition & 0 deletions deepcave/plugins/objective/configuration_cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def get_input_layout(register: Callable) -> List[dbc.Row]:
[
dbc.Label("Budget"),
help_button(
"Budget refers to the Multi-Fidelity budget."
"Combined budget means that the trial on the highest"
" evaluated budget is used.\n\n"
"Note: Selecting combined budget might be misleading if"
Expand Down
1 change: 1 addition & 0 deletions deepcave/plugins/summary/footprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def get_input_layout(register: Callable) -> List[Any]:
[
dbc.Label("Budget"),
help_button(
"Budget refers to the Multi-Fidelity budget."
"Combined budget means that the trial on the highest"
" evaluated budget is used.\n\n"
"Note: Selecting combined budget might be misleading if"
Expand Down
3 changes: 3 additions & 0 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ to see the dashboard in action:
.. image:: images/plugins/general.png


Displaying the data is done via plugins. You can select the plugins you want to use in the menu on the left.
This is further explained in the :ref:`plugins<Displaying Data with Plugins>` section.

DeepCAVE uses runs to interprete data. A run is a collection of trials
(a configuration with associated costs). Once valid runs (see :ref:`converter<Converters>`) are
found, you can select them to analyze them further. After selecting runs, you can also add them to
Expand Down
66 changes: 66 additions & 0 deletions docs/how_to_contribute.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
==================
How to Contribute
==================
We would appreciate your help in making this project better. Whether it's a bug report, new feature, correction, or additional documentation, we greatly value feedback and contributions from our community. If you think you have found a bug, or have a new feature idea, please check for `github issues <github_issues_>`_ and create a new issue if needed. For new feature ideas, open a new issue and setup a development workflow to work on the issue. If you have a correction or addition to the documentation, please submit a pull request.

.. _contribute_fork_project:

Setup Development Workflow
---------------------------
The development workflow is based on the "fork-and-pull" Git workflow. A full description of the workflow can be found `here <fork_and_pull_>`_. To contribute to the project, follow these steps:

1. Fork the project.
2. Install the project in development mode as described in the :ref:`installation` section.
3. Create a new branch for the new feature on your own fork, note that all changes should be based on the `development` branch.
4. Make your changes and commit them to your branch.
5. Push your changes to your fork.
6. Open a pull request from your fork to the main repository's `development` branch.



.. _contribute_unit_tests:

Extend Unit Tests
------------------
When adding new features or making changes to the codebase, it is important to add unit tests and check for mistakes revealed by preexisting test cases. This project uses `unittest` for testing. To run the test suite, use the following command:

.. code-block:: bash

python -m unittest discover -s tests


.. _contribute_update_documentation:

Update Documentation
---------------------

The documentation is written in reStructuredText and uses Sphinx to generate HTML documentation. To build the documentation, use the following command:

.. code-block:: bash

make docs


.. _contribute_pre_commit_hook:

Pre-Commit Hook
---------------
Before submitting a pull request, you should run the pre-commit hook to check for formatting errors and run the test suite.

.. _contribute_pull_request:

Create Pull Request
--------------------

After making changes to the codebase, you can submit a pull request. Your pull request will be reviewed by the maintainers, and if everything looks good, it will be merged. Before submitting a pull request, please make sure of the following:

- Make sure the you reference the issue in the pull request.
- The pull request should include tests for the new feature or bug fix.
- The pull request should include documentation for the new feature or bug fix.
- All tests should pass.
- Make sure to select the correct source and destination repositories and according branches.
- The pull request should include a description of the change and the reason for the change.


.. _github_issues: https://github.com/automl/DeepCAVE/issues
.. _fork_and_pull: https://reflectoring.io/github-fork-and-pull/
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Home
examples/index
plugins/index
converters
how_to_contribute
api
glossary
faq
Expand Down
4 changes: 2 additions & 2 deletions docs/plugins/index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Plugins
=======
Displaying Data with Plugins
============================

.. toctree::
:hidden:
Expand Down
6 changes: 4 additions & 2 deletions docs/plugins/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This plugin is capable of answering following questions:
* Is the configuration space as expected?
* How many trials have been successful/unsuccessful?
* Why did certain trials crash?
* On which budgets were the configurations evaluated?
* On which Multi Fidelity budgets were the configurations evaluated?


Quick Information
Expand All @@ -36,7 +36,9 @@ the runs were last updated and a handy quick link to the best **Configuration**.
Meta
----
Next we show some meta information regarding your runs. Notably, you can see information such as the
possible **budget** allocations that were considered during the run.
possible **budget** allocations that were considered during the run. The **budget** is the amount of
resources that were allocated to a configuration as it was beeing evaluated using a Multi-Fidelity
Approach.


Objectives
Expand Down
20 changes: 18 additions & 2 deletions docs/plugins/partial_dependencies.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
Partial Dependencies
====================

The quality of a machine learning algorithm is highly dependent on the choice of hyperparameters. PdP plots aim to visualize how chaning one or two hyperparameters affects the objective function. To reduce comptutational complexity the plugin utilizes a random forest surrogate model.

* In the one hyperparameter case, random samples or the selected hyperparameters are combined with each combination of the othre hyperparameters present in the dataset resulting in a multitude of ice curves. The resulting ice curves are than averaged to a PD plot. The hyperparameter is plotted along the x axis, and the respective objective function value along the y-axis

* The two hyperparameter case works as the one hyperparameter case, but the then two dimensional ice-curves are disregarded in the plot. The resulting plot has one target hyperparameter plotted along the x-axis and the other hyperparameter plotted along the y-axis. The color in the plot indicates the respective objective function value.


This plugin is capable of answering following questions:

* How does the objective change with respect to one or two hyperparameters? For example, does the
accuracy increase if the learning rate decreases?
* Do multiple trials show similar behavior?
Options
-------
* **Objective**: Here you can select the objective you wish to analyze for. In the one hyperparameter case the objective is plotted on the y-axis, in the two hyperparameter case it is represented by the color.

* **Budget**: Here you can select the budget used to compute ICE. TODO

* **Hyperparameter 1**: Here you can select the first hyperparameter. It is plotted along the x-axis.

* **Hyperparameter 2**: Here you can optionally select the second hyperparameter.

* **Show Confidence**: Selection for whether or not to show certainty estimates (based on the difference of ice curves).

.. warning::
This page is under construction.
* **Show ICE Curves**: Selection for whether or not to to show the ICE curves used during computation


.. image:: ../images/plugins/partial_dependencies.png
52 changes: 52 additions & 0 deletions docs/sg_execution_times.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@

:orphan:

.. _sphx_glr_sg_execution_times:


Computation times
=================
**00:00.000** total execution time for 6 files **from all galleries**:

.. container::

.. raw:: html

<style scoped>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.3.0/css/bootstrap.min.css" rel="stylesheet" />
<link href="https://cdn.datatables.net/1.13.6/css/dataTables.bootstrap5.min.css" rel="stylesheet" />
</style>
<script src="https://code.jquery.com/jquery-3.7.0.js"></script>
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.13.6/js/dataTables.bootstrap5.min.js"></script>
<script type="text/javascript" class="init">
$(document).ready( function () {
$('table.sg-datatable').DataTable({order: [[1, 'desc']]});
} );
</script>

.. list-table::
:header-rows: 1
:class: table table-striped sg-datatable

* - Example
- Time
- Mem (MB)
* - :ref:`sphx_glr_examples_api_importances.py` (``../examples/api/importances.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_examples_api_parallel_coordinates.py` (``../examples/api/parallel_coordinates.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_examples_api_pdp.py` (``../examples/api/pdp.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_examples_record_digits_sklearn.py` (``../examples/record/digits_sklearn.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_examples_record_minimal.py` (``../examples/record/minimal.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_examples_record_mnist_pytorch.py` (``../examples/record/mnist_pytorch.py``)
- 00:00.000
- 0.0
Loading