diff --git a/neps/api.py b/neps/api.py index 963ae5fe..e4ac2fbc 100644 --- a/neps/api.py +++ b/neps/api.py @@ -251,7 +251,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!" ) diff --git a/neps/plot/tensorboard_eval.py b/neps/plot/tensorboard_eval.py index ad76cca7..7c658c8e 100644 --- a/neps/plot/tensorboard_eval.py +++ b/neps/plot/tensorboard_eval.py @@ -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