Skip to content

Commit 5c5edb3

Browse files
author
Sarah Krebs
committed
Allow multiple seeds (fix run init)
1 parent f5af523 commit 5c5edb3

File tree

1 file changed

+30
-26
lines changed

1 file changed

+30
-26
lines changed

deepcave/runs/__init__.py

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ def get_objective_name(self, objectives: Optional[List[Objective]] = None) -> st
356356
----------
357357
objectives : Optional[List[Objective]]
358358
A list of the objectives.
359-
By default, None.
359+
By default None.
360360
361361
Returns
362362
-------
@@ -395,8 +395,8 @@ def get_configs(
395395
"""
396396
Get configurations of the run.
397397
398-
Optionally, only configurations which were evaluated
399-
on the passed budget, seed, and status are considered.
398+
Optionally, only configurations which were evaluated on the passed budget, seed,
399+
and statuses are considered.
400400
401401
Parameters
402402
----------
@@ -694,15 +694,18 @@ def get_avg_costs(
694694
statuses: Optional[Union[Status, List[Status]]] = None,
695695
) -> Tuple[List[float], List[float]]:
696696
"""
697-
Get average costs over all seeds for a config and budget.
697+
Get average costs over all seeds for a config.
698+
699+
Optionally, only configurations which were evaluated on the passed budget and statuses
700+
are considered.
698701
699702
Parameters
700703
----------
701704
config_id : int
702705
Configuration id to get the costs for.
703706
budget : Optional[Union[int, float]]
704-
Budget to get the costs from the configuration id for. By default, None. If budget is
705-
None, the highest budget is chosen.
707+
Budget to get the costs from the configuration id for. If budget is
708+
None, the highest budget is chosen. By default None.
706709
statuses : Optional[Union[Status, List[Status]]]
707710
Only selected stati are considered. If no status is given, all stati are considered.
708711
By default None.
@@ -743,11 +746,11 @@ def get_costs(
743746
config_id : int
744747
Configuration id to get the costs for.
745748
budget : Optional[Union[int, float]]
746-
Budget to get the costs from the configuration id for. By default, None. If budget is
747-
None, the highest budget is chosen.
749+
Budget to get the costs from the configuration id for. If budget is
750+
None, the highest budget is chosen. By default None.
748751
seed : Optional[int], optional
749-
Seed to get the costs from the configuration id for. By default None. If no seed is
750-
given, all seeds are considered.
752+
Seed to get the costs from the configuration id for. If no seed is
753+
given, all seeds are considered. By default None.
751754
statuses : Optional[Union[Status, List[Status]]]
752755
Only selected stati are considered. If no status is given, all stati are considered.
753756
By default None.
@@ -796,7 +799,7 @@ def get_all_costs(
796799
----------
797800
budget : Optional[Union[int, float]]
798801
Budget to select the costs. If no budget is given, the highest budget is chosen.
799-
By default, None.
802+
By default None.
800803
statuses : Optional[Union[Status, List[Status]]]
801804
Only selected stati are considered. If no status is given, all stati are considered.
802805
By default None.
@@ -869,8 +872,8 @@ def get_status(
869872
seed : Optional[int]
870873
Seed to get the status from the configuration id for.
871874
budget : Optional[Union[int, float]]
872-
Budget to get the status from the configuration id for. By default, None. If budget is
873-
None, the highest budget is chosen.
875+
Budget to get the status from the configuration id for. If budget is
876+
None, the highest budget is chosen. By default None.
874877
875878
Returns
876879
-------
@@ -915,13 +918,13 @@ def get_incumbent(
915918
Parameters
916919
----------
917920
objectives : Optional[Union[Objective, List[Objective]]], optional
918-
Considered objectives. By default, None. If None, all objectives are considered.
921+
Considered objectives. If None, all objectives are considered. By default None.
919922
budget : Optional[Union[int, float]], optional
920-
Considered budget. By default, None. If None, the highest budget is chosen.
923+
Considered budget. If None, the highest budget is chosen. By default None.
921924
seed : Optional[int], optional
922-
Considered seed. By default None. If no seed is given, all seeds are considered.
925+
Considered seed. If no seed is given, all seeds are considered. By default None.
923926
statuses : Optional[Union[Status, List[Status]]], optional
924-
Considered statuses. By default, None. If None, all stati are considered.
927+
Considered statuses. If None, all stati are considered. By default None.
925928
selected_ids: Optional[List[int]], optional
926929
If set, only history ids in the list will be considered. This can for example be
927930
useful if only ids up to a certain end-time shall be considered. By default None.
@@ -1003,7 +1006,7 @@ def merge_costs(
10031006
The costs, which should be merged. Must be the same length as the original number of
10041007
objectives.
10051008
objectives : Optional[List[Objective]]
1006-
The considered objectives to the costs. By default, None.
1009+
The considered objectives to the costs. By default None.
10071010
If None, all objectives are considered. The passed objectives can differ from the
10081011
original number objectives.
10091012
@@ -1276,22 +1279,23 @@ def get_encoded_data(
12761279
Parameters
12771280
----------
12781281
objectives : Optional[Union[Objective, List[Objective]]]
1279-
Which objectives should be considered. If None, all objectives are
1280-
considered. By default, None.
1282+
Which objectives should be considered. If None, all objectives are considered.
1283+
By default None.
12811284
budget : Optional[List[Status]]
1282-
Which budget should be considered. By default, None. If None, only the highest budget
1283-
is considered.
1285+
Which budget should be considered. If None, only the highest budget is considered.
1286+
By default None.
12841287
seed: Optional[int]
1285-
Which seed should be considered. By default, None. If None, all seeds are considered.
1288+
Which seed should be considered. If None, all seeds are considered.
1289+
By default None.
12861290
statuses : Optional[Union[Status, List[Status]]]
1287-
Which statuses should be considered. By default, None. If None, all statuses are
1288-
considered.
1291+
Which statuses should be considered. If None, all statuses are considered.
1292+
By default None.
12891293
specific : bool
12901294
Whether a specific encoding should be used. This encoding is compatible with pyrfr.
12911295
A wrapper for pyrfr is implemented in ``deepcave.evaluators.epm``.
12921296
By default False.
12931297
include_config_ids : bool
1294-
Whether to include configuration ids. By default, False.
1298+
Whether to include configuration ids. By default False.
12951299
include_combined_cost : bool, optional
12961300
Whether to include combined cost. Note that the combined cost is calculated by the
12971301
passed objectives only. By default False.

0 commit comments

Comments
 (0)