Skip to content

Commit 4cb1547

Browse files
committed
groups get sorted alphabetically
1 parent 81e0082 commit 4cb1547

File tree

7 files changed

+16
-17
lines changed

7 files changed

+16
-17
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Version 1.1.4
2+
3+
## Groups
4+
- Groups now get a default name, if no name was entered by the user.
5+
- Groups get sorted alphabetically to appear more ordered.
6+
17
# Version 1.1.3
28

39
## Bug-Fixes

deepcave/layouts/sidebar.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def update_navigation_items(pathname): # type: ignore
4343
]
4444

4545
point_layouts = []
46-
for (id, name, icon) in points:
46+
for id, name, icon in points:
4747
href = f"/plugins/{id}"
4848
point_layouts += [
4949
html.Li(
@@ -106,7 +106,6 @@ def update_queue_info() -> List[Component]:
106106

107107
collect = []
108108
for jobs, status in zip(all_jobs, job_stati):
109-
110109
for job in jobs:
111110
name = job.meta["display_name"]
112111
job_id = job.id

deepcave/plugins/__init__.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def plugin_input_update(pathname: str, *inputs_list: str) -> List[str]:
314314
update_dict(inputs, new_inputs)
315315

316316
# Set not used inputs
317-
for (id, attribute, _, _) in self.inputs:
317+
for id, attribute, _, _ in self.inputs:
318318
if id not in inputs:
319319
inputs[id] = {}
320320

@@ -421,7 +421,7 @@ def toggle_help_modal(n: Optional[int], is_open: bool) -> Tuple[bool, str]:
421421
return is_open
422422

423423
# Register callback to click on configurations
424-
for (id, *_) in self.outputs:
424+
for id, *_ in self.outputs:
425425
internal_id = self.get_internal_output_id(id)
426426

427427
@app.callback(
@@ -470,8 +470,7 @@ def _inputs_changed(
470470
# If only filters changed, then we don't need to
471471
# calculate the results again.
472472
if last_inputs is not None:
473-
for (id, attribute, filter, _) in self.inputs:
474-
473+
for id, attribute, filter, _ in self.inputs:
475474
if self.activate_run_selection:
476475
if id == "run":
477476
continue
@@ -524,7 +523,7 @@ def _process_raw_outputs(
524523
# We have to add no_updates here for the mode we don't want
525524
count_outputs = 0
526525
count_mpl_outputs = 0
527-
for (_, _, mpl_mode) in self.outputs:
526+
for _, _, mpl_mode in self.outputs:
528527
if mpl_mode:
529528
count_mpl_outputs += 1
530529
else:
@@ -600,7 +599,7 @@ def _dict_to_list(
600599
order = self.outputs # type: ignore
601600

602601
result: List[Optional[str]] = []
603-
for (id, attribute, instance, *_) in order:
602+
for id, attribute, instance, *_ in order:
604603
if not input:
605604
# Instance is mlp_mode in case of outputs
606605
# Simply ignore other outputs.
@@ -637,7 +636,7 @@ def _dict_as_key(self, d: Dict[str, Any], remove_filters: bool = False) -> Optio
637636

638637
new_d = copy.deepcopy(d)
639638
if remove_filters:
640-
for (id, _, filter, _) in self.inputs:
639+
for id, _, filter, _ in self.inputs:
641640
if filter:
642641
if id in new_d:
643642
del new_d[id]
@@ -662,10 +661,9 @@ def _cast_inputs(self, inputs: Dict[str, Dict[str, str]]) -> Dict[str, Dict[str,
662661
casted_inputs: Dict[str, Dict[str, str]] = defaultdict(dict)
663662
for id, attributes in inputs.items():
664663
for attribute in attributes:
665-
666664
# Find corresponding input
667665
type = None
668-
for (id_, attribute_, _, type_) in self.inputs:
666+
for id_, attribute_, _, type_ in self.inputs:
669667
if id == id_ and attribute == attribute_:
670668
type = type_
671669
break
@@ -702,7 +700,7 @@ def _clean_inputs(self, inputs: Dict[str, Any]) -> Dict[str, Any]:
702700
"""
703701
used_ids = []
704702
cleaned_inputs = {}
705-
for (id, attribute, *_) in self.inputs:
703+
for id, attribute, *_ in self.inputs:
706704
# Since self.inputs is ordered, we use the first occuring attribute and add
707705
# the id so it is not used again.
708706
if id not in used_ids:
@@ -1332,7 +1330,7 @@ def generate_inputs(self, **kwargs: Any) -> Dict[str, Any]:
13321330
The inputs for the run.
13331331
"""
13341332
mapping = {}
1335-
for (id, attribute, *_) in self.inputs:
1333+
for id, attribute, *_ in self.inputs:
13361334
# Since `self.inputs` is ordered, we use the first occuring attribute and add
13371335
# the id so it is not used again.
13381336
if id not in mapping:

deepcave/plugins/objective/pareto_front.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ def process(run, inputs):
174174

175175
is_front: Union[List, np.ndarray] = np.ones(points.shape[0], dtype=bool)
176176
for point_idx, costs in enumerate(points):
177-
178177
if is_front[point_idx]:
179178
# Keep any point with a lower/upper cost
180179
# This loop is a little bit complicated than

deepcave/plugins/summary/overview.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ def load_outputs(run, *_):
291291
}
292292

293293
for hp_name, hp in run.configspace.get_hyperparameters_dict().items():
294-
295294
log = False
296295
value = None
297296
if (

deepcave/runs/converters/bohb.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ def from_path(cls, path):
4949

5050
first_starttime = None
5151
for bohb_run in bohb.get_all_runs():
52-
5352
times = bohb_run.time_stamps
5453
starttime = times["started"]
5554
endtime = times["finished"]

examples/record/mnist_pytorch.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ def prepare_data(self):
7171
MNIST(self.data_dir, train=False, download=True)
7272

7373
def setup(self, stage=None):
74-
7574
# Assign train/val datasets for use in dataloaders
7675
if stage == "fit" or stage is None:
7776
mnist_full = MNIST(self.data_dir, train=True, transform=self.transform)

0 commit comments

Comments
 (0)