Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: optimized dependencies #165

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ path

# From example that uses MNIST
.data
data/MNIST/raw/
neps_examples/convenience/declarative_usage/data/MNIST/raw/
5 changes: 3 additions & 2 deletions neps/plot/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
from scipy import stats

_map_axs = (
Expand Down Expand Up @@ -64,7 +63,9 @@ def _get_fig_and_axs(
)

fig.tight_layout(pad=2.0, h_pad=2.5) # type: ignore
sns.despine(fig)
for ax in fig.get_axes():
ax.spines["top"].set_visible(False)
ax.spines["right"].set_visible(False)

return fig, axs # type: ignore

Expand Down
18 changes: 9 additions & 9 deletions neps/utils/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import warnings
from typing import Tuple
from datetime import timedelta, datetime
import seaborn as sns
import matplotlib.pyplot as plt
import os
import numpy as np
Expand Down Expand Up @@ -797,6 +796,7 @@ def plot_incumbents(
all_trials: List[Trial], incumbents: List[Trial], directory_path: Path
) -> str:
"""Plot the evolution of incumbent trials over the total number of trials."""

id_to_index = {trial.id: idx + 1 for idx, trial in enumerate(all_trials)}

# Collect data for plotting
Expand All @@ -808,14 +808,12 @@ def plot_incumbents(
]

plt.figure(figsize=(12, 6))
sns.lineplot(
x=x_values,
y=y_values,
marker="o",
linestyle="-",
markersize=8,
color="dodgerblue",

# Create the line plot with desired styles
plt.plot(
x_values, y_values, marker="o", linestyle="-", markersize=8, color="dodgerblue"
)

plt.xlabel("Number of Trials")
plt.ylabel("Loss")
plt.title("Evolution of Incumbents Over Trials")
Expand All @@ -833,8 +831,10 @@ def plot_incumbents(
ticks[0] = 1
plt.xticks(ticks)

sns.set_style("whitegrid")
# Manually set grid and style elements from Seaborn
plt.grid(True, linestyle="--", linewidth=0.5)
plt.axis("on") # Equivalent to whitegrid background

plt.tight_layout()

# Save the figure
Expand Down
24 changes: 12 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ keywords = [
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX :: Linux",
Expand All @@ -45,23 +45,23 @@ requires-python = ">=3.10,<3.13"
dependencies = [
"ConfigSpace>=0.7,<1.0",
"grakel>=0.1,<0.2",
"numpy>=1.0,<2.0",
"pandas>=2.0,<3.0",
"networkx>=2.6.3,<3.0",
"nltk>=3.6.4,<4.0",
"scipy>=1.13.1",
"torch>=2.0.1",
"matplotlib>=3.0,<4.0",
"more-itertools",
"portalocker>=2.0,<3.0",
"seaborn>=0.13,<0.14",
"pyyaml>=6.0,<7.0",
"tensorboard>=2.0,<3.0",
"typing-extensions",
"torchvision>=0.8.0",
"ifbo>=0.3.10",
"botorch>=0.12",
"gpytorch==1.13.0",
"pandas>=2.0,<3.0",
"networkx>=2.6.3,<3.0",
"nltk>=3.6.4,<4.0",
"matplotlib>=3.0,<4.0",
"more-itertools",
"portalocker>=2.0,<3.0",
# "numpy>=1.0,<2.0", # included in tensorboard (>=1.12.0), botorch (>1.7), ifbo (<2)
# "scipy>=1.13.1", # included in configspace (*), botorch,grakel (>= 1.6.0), results in (2.2.3)
# "torch>=2.0.1", # included in ifbo (>=1.9.0), botorch (>=2.0.1), torchvision (2.5.1)
# "seaborn>=0.13,<0.14", # removed any seaborn appearance, therefore not needed anymore
# "gpytorch==1.13.0", # included in botorch (1.13.0)
]

[project.urls]
Expand Down
Loading