Skip to content

Commit

Permalink
resolves #26; resolving deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
TarekAbouChakra committed Dec 5, 2023
1 parent eec1222 commit 46bcc6e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/neps/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def run(
)
elif isinstance(searcher, BaseOptimizer):
# This check is not strict when a user-defined neps.optimizer is provided
logger.warn(
logger.warning(
"An instantiated optimizer is provided. The safety checks of NePS will be "
"skipped. Accurate continuation of runs can no longer be guaranteed!"
)
Expand Down
8 changes: 8 additions & 0 deletions src/neps/plot/tensorboard_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,18 @@

import math
import os
import warnings
from pathlib import Path

import numpy as np
import torch

# Remove this once we support pytorch > 2.1.0
# https://github.com/automl/neps/issues/26
warnings.filterwarnings(
"ignore", category=DeprecationWarning, module="torch.utils.tensorboard"
)

from torch.utils.tensorboard import SummaryWriter
from torch.utils.tensorboard.summary import hparams

Expand Down

0 comments on commit 46bcc6e

Please sign in to comment.