Skip to content

Commit

Permalink
ready for a draft
Browse files Browse the repository at this point in the history
  • Loading branch information
KrissiHub committed Nov 6, 2023
1 parent fea9889 commit e20d749
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 130 deletions.
118 changes: 0 additions & 118 deletions deepcave/evaluators/epm/test.py

This file was deleted.

2 changes: 0 additions & 2 deletions deepcave/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,9 +508,7 @@ def toggle_help_modal(n: Optional[int], is_open: bool) -> bool:
A tuple containing the is open information and the code.
"""
if n:
# Wait for meeting
return not is_open
# Wait for meeting
return is_open

# Register callback to click on configurations
Expand Down
6 changes: 1 addition & 5 deletions deepcave/plugins/static.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ def plugin_process(n_clicks, _, *inputs_list): # type: ignore
# Map the list `inputs_list` to a dict s.t.
# it's easier to access them.
inputs = self._list_to_dict(list(inputs_list), input=True)
# Wait for meeting
inputs_key = self._dict_as_key(inputs, remove_filters=True)
cleaned_inputs = self._clean_inputs(inputs)
last_inputs = c.get("last_inputs", self.id)
Expand Down Expand Up @@ -206,7 +205,7 @@ def plugin_process(n_clicks, _, *inputs_list): # type: ignore
_process,
args=[self.process, run, cleaned_inputs],
job_id=job_id,
meta=job_meta, # wait for meeting
meta=job_meta,
)

# Reset button
Expand All @@ -224,7 +223,6 @@ def plugin_process(n_clicks, _, *inputs_list): # type: ignore
job_plugin_id = job_meta["plugin_id"]

self.logger.debug(f"Job {job_id} for run_id {job_meta['run_id']}.")
# Waiting for meeting
run = run_handler.get_run(job_run_id)

# Save results in cache
Expand All @@ -248,7 +246,6 @@ def plugin_process(n_clicks, _, *inputs_list): # type: ignore
queue_running = False
queue_pending = False
for run in runs:
# Same problem, wait till meeting
job_id = self._get_job_id(run.id, inputs_key)
if queue.is_running(job_id):
queue_running = True
Expand Down Expand Up @@ -326,7 +323,6 @@ def plugin_update_status(_): # type: ignore
):
# However: We have to unset the previous state so if we really change the inputs
# the visualizes will be updated.
# Same problem, wait till meeting
self._previous_state = PluginState.UNSET
raise PreventUpdate

Expand Down
3 changes: 0 additions & 3 deletions deepcave/runs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ def reset(self) -> None:
self.configspace: ConfigSpace.ConfigurationSpace
self.configs: Dict[int, Union[Configuration, Dict[Any, Any]]] = {}
self.origins: Dict[int, Optional[str]] = {}
# Wait until meeting
self.models: Dict[int, Optional[Union[str, "torch.nn.Module"]]] = {} # noqa: F821

self.history: List[Trial] = []
Expand Down Expand Up @@ -884,7 +883,6 @@ def merge_costs(

return cost

# Wait until meeting
def get_model(self, config_id: int) -> Optional["torch.nn.Module"]: # noqa: F821
"""
Get a torch model associated with a configuration ID.
Expand Down Expand Up @@ -1185,7 +1183,6 @@ def get_encoded_data(
columns += [COMBINED_COST_NAME]

if include_config_ids:
# wait till meeting
data: np.ndarray = np.concatenate((config_ids, x_set_array, y_set_array), axis=1)
else:
data = np.concatenate((x_set_array, y_set_array), axis=1)
Expand Down
4 changes: 2 additions & 2 deletions deepcave/runs/recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def _set_path(

def start(
self,
config: Union[dict, Configuration],
config: Configuration,
budget: Optional[float] = None,
model: Optional[Union[str, Any]] = None,
origin: Optional[str] = None,
Expand All @@ -175,7 +175,7 @@ def start(
Parameters
----------
config : Union[dict, Configuration]
config : Configuration
Holds the configuration settings for the trial.
budget : Optional[float], optional
The budget for the trial.
Expand Down

0 comments on commit e20d749

Please sign in to comment.