diff --git a/conda/meta.yaml b/conda/meta.yaml index 4a06a0a91..1620e62cc 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -21,7 +21,7 @@ requirements: - scipy~=1.11.0 - jinja2~=3.0 - torchvision - - pytorch~=2.2.0 + - pytorch~=2.1.0 - cudatoolkit - jsonschema - scikit-image~=0.21.0 diff --git a/environment.yml b/environment.yml index 4787271dc..242b8426c 100644 --- a/environment.yml +++ b/environment.yml @@ -14,7 +14,7 @@ dependencies: - scipy~=1.10.0 - jinja2~=3.0 - conda-forge::torchvision-cpu>=0.5.0 - - conda-forge::pytorch-cpu~=2.2.0 + - conda-forge::pytorch-cpu~=2.1.0 - jsonschema - scikit-learn~=1.2.1 - scikit-image~=0.21.0 diff --git a/environment_cuda.yml b/environment_cuda.yml index ebdda92de..83b75f850 100644 --- a/environment_cuda.yml +++ b/environment_cuda.yml @@ -14,7 +14,7 @@ dependencies: - scipy~=1.10.0 - jinja2~=3.0 - conda-forge::torchvision>=0.5.0 - - conda-forge::pytorch~=2.2.0 + - conda-forge::pytorch~=2.1.0 - cudatoolkit>=9.2 - jsonschema - scikit-learn~=1.2.1 diff --git a/kraken/lib/train.py b/kraken/lib/train.py index 31d6532a8..ec9685aff 100644 --- a/kraken/lib/train.py +++ b/kraken/lib/train.py @@ -80,7 +80,7 @@ def __init__(self, min_epochs: int = 5, max_epochs: int = 100, freeze_backbone=-1, - pl_logger: Union[L.loggers.logger.Logger, str, None] = None, + pl_logger: Union[L.pytorch.loggers.logger.Logger, str, None] = None, log_dir: Optional['PathLike'] = None, *args, **kwargs): @@ -93,14 +93,14 @@ def __init__(self, kwargs['callbacks'] = [kwargs['callbacks']] if pl_logger: - if 'logger' in kwargs and isinstance(kwargs['logger'], L.loggers.logger.Logger): + if 'logger' in kwargs and isinstance(kwargs['logger'], L.pytorch.loggers.logger.Logger): logger.debug('Experiment logger has been provided outside KrakenTrainer as `logger`') - elif isinstance(pl_logger, L.loggers.logger.Logger): + elif isinstance(pl_logger, L.pytorch.loggers.logger.Logger): logger.debug('Experiment logger has been provided outside KrakenTrainer as `pl_logger`') kwargs['logger'] = pl_logger elif pl_logger == 'tensorboard': logger.debug('Creating default experiment logger') - kwargs['logger'] = L.loggers.TensorBoardLogger(log_dir) + kwargs['logger'] = L.pytorch.loggers.TensorBoardLogger(log_dir) else: logger.error('`pl_logger` was set, but %s is not an accepted value', pl_logger) raise ValueError(f'{pl_logger} is not acceptable as logger') diff --git a/setup.cfg b/setup.cfg index 4f880f868..5f675f35e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -53,7 +53,7 @@ install_requires = jinja2~=3.0 python-bidi torchvision>=0.5.0 - torch~=2.2.0 + torch~=2.1.0 scikit-learn~=1.2.1 scikit-image~=0.21.0 shapely~=1.8.5