Skip to content

Commit

Permalink
Version 0.3 [Bugfixes]
Browse files Browse the repository at this point in the history
  • Loading branch information
renesass committed Feb 25, 2022
1 parent 5dc1c4b commit 6208479
Show file tree
Hide file tree
Showing 40 changed files with 350 additions and 678 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ on:
push:
branches:
- main
- development

# Trigger on any push to a PR that targets master
pull_request:
branches:
- main
- development

env:
name: DeepCAVE
Expand All @@ -27,22 +29,20 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.9

- name: Install dependencies
run: |
pip install -e ".[dev]"
pip install .
pip install .[dev]
- name: Make docs
run: |
cd docs
make docs
- name: Make Examples
run: |
make examples
- name: Pull latest gh-pages
if: (contains(github.ref, 'main'))
if: (contains(github.ref, 'development') || contains(github.ref, 'main'))
run: |
cd ..
git clone https://github.com/automl/${{ env.name }}.git --branch gh-pages --single-branch gh-pages
Expand All @@ -56,7 +56,7 @@ jobs:
cp -r ../${{ env.name }}/docs/build/html $branch_name
- name: Push to gh-pages
if: (contains(github.ref, 'main'))
if: (contains(github.ref, 'development') || contains(github.ref, 'main'))
run: |
last_commit=$(git log --pretty=format:"%an: %s")
cd ../gh-pages
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@ on:

# When a push occurs on either of these branches
push:
branches:
- main
- development
branches-ignore:
- '**'
# branches:
# - main
# - development

# When a push occurs on a PR that targets these branches
pull_request:
branches:
- main
- development
branches-ignore:
- '**'
# branches:
# - main
# - development

jobs:
run-all-files:
Expand All @@ -25,10 +29,10 @@ jobs:
with:
submodules: recursive

- name: Setup Python 3.8
- name: Setup Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.9

- name: Install pre-commit
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PyTest
name: tests
on: [ push ]
jobs:
pytest:
Expand All @@ -11,10 +11,10 @@ jobs:
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Setup Python 3.8
- name: Setup Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.9

- name: Install dependencies
run: |
Expand Down
24 changes: 0 additions & 24 deletions Dockerfile

This file was deleted.

10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,10 @@ The webserver as well as the queue/workers can be started by running
```
deepcave --start
```
or
```
./start.sh
```

Visit `http://127.0.0.1:8050/` to get started.
Visit `http://127.0.0.1:8050/` to get started. The following figures gives
you a first impression of DeepCAVE. You can find more screenshots
in the documentation.

![interface](media/interface.png)
![interface](docs/images/plugins/pareto_front.png)

6 changes: 3 additions & 3 deletions deepcave/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Type
from typing import Dict, List
from pathlib import Path


Expand Down Expand Up @@ -30,7 +30,7 @@ class Config:

# Plugins
@property
def PLUGINS(self) -> dict[str, list[Type["Plugin"]]]:
def PLUGINS(self) -> Dict[str, List["Plugin"]]:
"""
Returns:
dictionary [category -> List[Plugins]]
Expand Down Expand Up @@ -69,7 +69,7 @@ def PLUGINS(self) -> dict[str, list[Type["Plugin"]]]:

# Run Converter
@property
def AVAILABLE_CONVERTERS(self) -> list[Type["Run"]]:
def AVAILABLE_CONVERTERS(self) -> List["Run"]:
from deepcave.runs.converters.bohb import BOHBRun
from deepcave.runs.converters.deepcave import DeepCAVERun
from deepcave.runs.converters.smac import SMACRun
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 4 additions & 11 deletions deepcave/evaluators/fanova.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,7 @@ def quantify_importance(

if sort:
sorted_importance_dict = {
k: v
for k, v in sorted(importance_dict.items(), key=lambda item: item[1][1])
k: v for k, v in sorted(importance_dict.items(), key=lambda item: item[1][1])
}

return sorted_importance_dict
Expand Down Expand Up @@ -277,15 +276,11 @@ def get_triple_marginals(self, params=None):
self.cs_params[combi[1]].name,
self.cs_params[combi[2]].name,
]
triple_marginals.append(
(tot_imp, combi_names[0], combi_names[1], combi_names[2])
)
triple_marginals.append((tot_imp, combi_names[0], combi_names[1], combi_names[2]))

triple_marginal_performance = sorted(triple_marginals, reverse=True)
if params:
triple_marginal_performance = triple_marginal_performance[
: len(list(triplets))
]
triple_marginal_performance = triple_marginal_performance[: len(list(triplets))]

for marginal, p1, p2, p3 in triple_marginal_performance:
self.tot_imp_dict[(p1, p2, p3)] = marginal
Expand Down Expand Up @@ -348,9 +343,7 @@ def get_triple_marginals(self, params=None):
conditional[idx] = True
if isinstance(hp, CategoricalHyperparameter):
impute_values[idx] = len(hp.choices)
elif isinstance(
hp, (UniformFloatHyperparameter, UniformIntegerHyperparameter)
):
elif isinstance(hp, (UniformFloatHyperparameter, UniformIntegerHyperparameter)):
impute_values[idx] = -1
elif isinstance(hp, Constant):
impute_values[idx] = 1
Expand Down
Loading

0 comments on commit 6208479

Please sign in to comment.