Skip to content

Commit

Permalink
Installs and runs pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgondu committed Nov 6, 2024
1 parent 0519f52 commit aba5008
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 27 deletions.
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: hdbo_benchmark
name: hdbo_benchmark
channels:
- defaults
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion envs/environment.bounce.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: hdbo_bounce
name: hdbo_bounce
channels:
- defaults
dependencies:
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ warn_return_any = true
warn_unused_configs = true
ignore_missing_imports = true

[tool.isort]
profile = "black"

[tool.pytest.ini_options]
markers = [
"hdbo_base: base tests for HDBO",
Expand Down
20 changes: 9 additions & 11 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,24 @@

import click
import numpy as np

from poli.core.util.seeding import seed_python_numpy_and_torch
from poli.core.exceptions import BudgetExhaustedException
from poli.core.util.seeding import seed_python_numpy_and_torch

from hdbo_benchmark.utils.experiments.load_solvers import (
load_solver_from_problem,
SOLVER_NAMES,
CONTINUOUS_SPACE_SOLVERS,
)
from hdbo_benchmark.utils.experiments.load_problems import load_problem
from hdbo_benchmark.utils.experiments.load_generative_models import (
load_generative_model_and_bounds,
)
from hdbo_benchmark.utils.experiments.verify_status_pre_experiment import (
verify_repos_are_clean,
from hdbo_benchmark.utils.experiments.load_problems import load_problem
from hdbo_benchmark.utils.experiments.load_solvers import (
CONTINUOUS_SPACE_SOLVERS,
SOLVER_NAMES,
load_solver_from_problem,
)
from hdbo_benchmark.utils.experiments.problem_transformations import (
transform_problem_from_discrete_to_continuous,
)

from hdbo_benchmark.utils.experiments.verify_status_pre_experiment import (
verify_repos_are_clean,
)
from hdbo_benchmark.utils.logging.idempotence_of_experiments import (
experiment_has_already_run,
)
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ include_package_data = True
where=src

[options.package_data]
* = *.sht, *.yml, *.jar, *.pt, *.json, *.pdb, *.npz
* = *.sht, *.yml, *.jar, *.pt, *.json, *.pdb, *.npz
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import warnings


import matplotlib.pyplot as plt
import numpy as np
from poli import objective_factory # type: ignore
Expand Down
6 changes: 1 addition & 5 deletions src/hdbo_benchmark/utils/ax/interface.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import numpy as np
from ax import ( # type: ignore[import]
ParameterType,
RangeParameter,
SearchSpace,
)
from ax import ParameterType, RangeParameter, SearchSpace # type: ignore[import]
from ax.core.generator_run import GeneratorRun # type: ignore[import]
from ax.core.metric import Metric # type: ignore[import]
from ax.metrics.noisy_function import NoisyFunctionMetric # type: ignore[import]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import pandas as pd
import seaborn as sns # type: ignore[import]


from hdbo_benchmark.utils.data.experiments import load_results_as_dataframe

from .colors import COLORS
Expand Down
6 changes: 2 additions & 4 deletions test_main_entry_point.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import os

import pytest

from run import _main

from poli.benchmarks import PMOBenchmark

from hdbo_benchmark.utils.experiments.load_solvers import (
SOLVER_NAMES,
SOLVER_NAME_TO_ENV,
SOLVER_NAMES,
)
from run import _main

SOLVERS_THAT_RUN_IN_BASE_ENV = [
solver_name
Expand Down
4 changes: 2 additions & 2 deletions workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install Dart Sass
run: sudo snap install dart-sass
- name: Checkout
Expand All @@ -59,7 +59,7 @@ jobs:
hugo \
--gc \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down

0 comments on commit aba5008

Please sign in to comment.