Skip to content

Commit

Permalink
Updates by running pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgondu committed Feb 2, 2025
1 parent 458815e commit a8af50b
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import click
import numpy as np
import torch
import wandb

import hdbo_benchmark
import wandb
from hdbo_benchmark.generative_models.vae_selfies import VAESelfies
from hdbo_benchmark.utils.constants import DEVICE, WANDB_ENTITY
from hdbo_benchmark.utils.data.zinc_250k import load_zinc_250k_dataloaders
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import click
import numpy as np
import torch
import wandb

import hdbo_benchmark
import wandb
from hdbo_benchmark.generative_models.vae_rnn_selfies import VAERNNSelfies
from hdbo_benchmark.utils.constants import DEVICE, WANDB_ENTITY
from hdbo_benchmark.utils.data.zinc_250k import load_zinc_250k_dataloaders
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"""

import pandas as pd

import wandb

from hdbo_benchmark.utils.constants import ROOT_DIR
from hdbo_benchmark.utils.results.download_from_wandb import get_all_runs_for_experiment

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"""
"""
""" """

import matplotlib
import matplotlib.pyplot as plt
Expand Down
2 changes: 1 addition & 1 deletion src/hdbo_benchmark/results/download_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"""

import pandas as pd

import wandb

from hdbo_benchmark.utils.constants import ROOT_DIR
from hdbo_benchmark.utils.results.download_from_wandb import (
get_all_runs_for_function_names,
Expand Down
2 changes: 1 addition & 1 deletion src/hdbo_benchmark/utils/ax/ax_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def __init__(
)

def evaluate(
parametrization: dict[str, float]
parametrization: dict[str, float],
) -> dict[str, tuple[float, float]]:
x = np.array([[parametrization[f"x{i}"] for i in range(x0.shape[1])]])
y = black_box(x)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from typing import Any, Dict, List

import pandas as pd

import wandb

from hdbo_benchmark.utils.constants import WANDB_ENTITY

ROOT_DIR = Path(__file__).parent.parent.parent.parent.parent.parent.resolve()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ def load_generative_model_and_bounds(
problem: Problem,
) -> tuple[VAE | LitAutoEncoder, tuple[float, float]]:
match function_name:
case function_name if function_name in PMOBenchmark(
string_representation="SELFIES"
).problem_names:
case function_name if (
function_name in PMOBenchmark(string_representation="SELFIES").problem_names
):
experiment_name = "benchmark_on_pmo"
latent_space_bounds = (-10.0, 10.0)
vae = VAEFactory().create(
Expand Down
6 changes: 3 additions & 3 deletions src/hdbo_benchmark/utils/experiments/load_problems.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ def _load_ehrlich_holo(size: Literal["tiny", "small", "large"]) -> Problem:

def _load_problem(function_name: str) -> Problem:
match function_name:
case function_name if function_name in PMOBenchmark(
string_representation="SELFIES"
).problem_names:
case function_name if (
function_name in PMOBenchmark(string_representation="SELFIES").problem_names
):
return _load_pmo_problem(function_name)
case "rfp_rasp":
return _load_rasp()
Expand Down
2 changes: 1 addition & 1 deletion src/hdbo_benchmark/utils/logging/back_up.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
from time import time

import pandas as pd

import wandb

from hdbo_benchmark.utils.constants import ROOT_DIR, WANDB_ENTITY, WANDB_PROJECT
from hdbo_benchmark.utils.data.experiments.loading_results import _load_run_as_row

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import wandb

from hdbo_benchmark.utils.constants import WANDB_ENTITY


Expand Down
2 changes: 1 addition & 1 deletion src/hdbo_benchmark/utils/logging/wandb_observer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
import numpy as np
import poli
import poli_baselines
import wandb
from poli.core.black_box_information import BlackBoxInformation
from poli.core.problem import Problem
from poli.core.util.abstract_observer import AbstractObserver

import hdbo_benchmark
import wandb
from hdbo_benchmark.utils.constants import WANDB_ENTITY, WANDB_PROJECT
from hdbo_benchmark.utils.logging.library_hashes import get_git_hash_of_library
from hdbo_benchmark.utils.logging.uncommited_changes import has_uncommitted_changes
Expand Down
1 change: 1 addition & 0 deletions src/hdbo_benchmark/utils/results/download_from_wandb.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import wandb

from hdbo_benchmark.utils.constants import WANDB_ENTITY


Expand Down

0 comments on commit a8af50b

Please sign in to comment.