Skip to content

Commit

Permalink
Release 1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
shukon authored Apr 11, 2020
2 parents 91d022b + 827e135 commit 6519159
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cave/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.3.0"
__version__ = "1.3.1"
4 changes: 2 additions & 2 deletions cave/analyzer/bohb_learning_curves.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def _plot(self, result_object, learning_curves, hyperparameter_names, reset_time
HB_iterations, HB_handles, HB_labels = list(HB_iterations), list(HB_handles), list(HB_labels)
self.logger.debug("HB_iterations to labels: %s", str(list(zip(HB_iterations, HB_labels))))

checkbox, select_all, select_none = get_checkbox(HB_handles, HB_labels, max_checkbox_length=10)
checkboxes, select_all, select_none = get_checkbox(HB_handles, HB_labels, max_checkbox_length=10)

callback_color = CustomJS(args=dict(source_multiline=source_multiline,
source_scatter=source_scatter,
Expand Down Expand Up @@ -234,7 +234,7 @@ def _plot(self, result_object, learning_curves, hyperparameter_names, reset_time

# Put it all together in a layout (width of checkbox-field sizes with number of elements
width_of_checkbox = 650 if len(HB_labels) > 100 else 500 if len(HB_labels) > 70 else 400
layout = row(p, column(*[widgetbox(chkbox, max_width=width_of_checkbox, width_policy="min") for chkbox in checkbox],
layout = row(p, column(*[widgetbox(chkbox, max_width=width_of_checkbox, width_policy="min") for chkbox in checkboxes],
row(widgetbox(select_all, width=50),
widgetbox(select_none, width=50)),
widgetbox(select_color, width=200)))
Expand Down
11 changes: 8 additions & 3 deletions cave/utils/bokeh_routines.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@ def get_checkbox(glyph_renderers, labels, max_checkbox_length=None):
list of glyph-renderers
labels: List[str]
list with strings to be put in checkbox
max_checkbox_length: None or int
maximum number of checkboxes in a single CheckboxButtonGroup, splits up the checkboxes over multiple
CheckboxButtonGroups (e.g. to simulate "line-breaks" in the visual layout)
NOTE: if this is not None, will return List[CheckboxButtonGroup]
Returns
-------
checkbox: CheckboxGroup or List[CheckboxGroup]
checkbox object
checkbox: CheckboxButtonGroup or List[CheckboxButtonGroup]
checkbox object (or list of checkbox-objects)
select_all: Button
button related to checkbox
select_none: Button
Expand Down Expand Up @@ -54,7 +59,7 @@ def get_checkbox(glyph_renderers, labels, max_checkbox_length=None):
select_none = Button(label="None", callback=CustomJS(args=dict({'checkbox':checkbox}, **args_checkbox),
code="var labels = {}; ".format('[]') + code_button_tail))

if max_checkbox_length is not None and len(glyph_renderers) > max_checkbox_length:
if max_checkbox_length:
# Keep all and none buttons, but create new checkboxes and return a list
slices = list(range(0, len(glyph_renderers), max_checkbox_length)) + [len(glyph_renderers)]
checkboxes = [get_checkbox(glyph_renderers[s:e], labels[s:e])[0] for s, e in zip(slices[:-1], slices[1:])]
Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 1.3.1

## Bug fixes

* Fix #261, `get_checkbox` threw an error due to unpredictable return type

# 1.3.0

## Major changes
Expand Down
4 changes: 2 additions & 2 deletions ci_scripts/circle_install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!bin/bash
#!/bin/bash

# on circle ci, each command run with it's own execution context so we have to
# activate the conda testenv on a per command basis. That's why we put calls to
Expand All @@ -8,7 +8,7 @@ source activate testenv

# install documentation building dependencies
pip install --upgrade numpy
pip install --upgrade matplotlib setuptools nose coverage sphinx pillow sphinx-gallery sphinx_bootstrap_theme cython numpydoc
pip install --upgrade matplotlib setuptools nose coverage sphinx==2.4.4 pillow sphinx-gallery sphinx_bootstrap_theme cython numpydoc
# And finally, all other dependencies
cat requirements.txt | xargs -n 1 -L 1 pip install

Expand Down
2 changes: 1 addition & 1 deletion ci_scripts/create_doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if ! [[ -z ${DOCPUSH+x} ]]; then

echo "DOCPUSH is TRUE"
# install documentation building dependencies
pip install --upgrade matplotlib pillow sphinx sphinx-gallery sphinx_rtd_theme
pip install --upgrade matplotlib pillow sphinx==2.4.4 sphinx-gallery sphinx_rtd_theme

# $1 is the branch name
# $2 is the global variable where we set the script status
Expand Down

0 comments on commit 6519159

Please sign in to comment.