From 35b95fee202767bd79e1f0f363a93c3cd42ebc6e Mon Sep 17 00:00:00 2001 From: bigning Date: Tue, 4 Jun 2024 11:59:38 -0700 Subject: [PATCH] Deprecate and bump verstion to 0.23.0 (#3359) * deprecate and bump version * a --- composer/_version.py | 2 +- composer/loggers/neptune_logger.py | 21 ++------------------- docker/README.md | 4 ++-- docker/build_matrix.yaml | 12 ++++++------ docker/generate_build_matrix.py | 2 +- 5 files changed, 12 insertions(+), 29 deletions(-) diff --git a/composer/_version.py b/composer/_version.py index e2fe7dc153..a38b61a722 100644 --- a/composer/_version.py +++ b/composer/_version.py @@ -3,4 +3,4 @@ """The Composer Version.""" -__version__ = '0.23.0.dev0' +__version__ = '0.24.0.dev0' diff --git a/composer/loggers/neptune_logger.py b/composer/loggers/neptune_logger.py index 1608577fd4..eed8059135 100644 --- a/composer/loggers/neptune_logger.py +++ b/composer/loggers/neptune_logger.py @@ -18,7 +18,7 @@ from composer._version import __version__ from composer.loggers import LoggerDestination -from composer.utils import MissingConditionalImportError, VersionedDeprecationWarning, dist +from composer.utils import MissingConditionalImportError, dist if TYPE_CHECKING: from composer import Logger @@ -43,7 +43,6 @@ class NeptuneLogger(LoggerDestination): ``NEPTUNE_API_TOKEN`` environment variable (recommended). You can find your API token in the user menu of the Neptune web app. rank_zero_only (bool): Whether to log only on the rank-zero process (default: ``True``). - upload_artifacts (bool, optional): Deprecated. See ``upload_checkpoints``. upload_checkpoints (bool): Whether the logger should upload checkpoints to Neptune (default: ``False``). base_namespace (str, optional): The name of the base namespace where the metadata @@ -63,7 +62,6 @@ def __init__( project: Optional[str] = None, api_token: Optional[str] = None, rank_zero_only: bool = True, - upload_artifacts: Optional[bool] = None, upload_checkpoints: bool = False, base_namespace: str = 'training', mode: Optional[NEPTUNE_MODE_TYPE] = None, @@ -81,7 +79,6 @@ def __init__( verify_type('project', project, (str, type(None))) verify_type('api_token', api_token, (str, type(None))) verify_type('rank_zero_only', rank_zero_only, bool) - verify_type('upload_artifacts', upload_artifacts, (bool, type(None))) verify_type('upload_checkpoints', upload_checkpoints, bool) verify_type('base_namespace', base_namespace, str) @@ -92,11 +89,7 @@ def __init__( self._api_token = api_token self._rank_zero_only = rank_zero_only - if upload_artifacts is not None: - _warn_about_deprecated_upload_artifacts() - self._upload_checkpoints = upload_artifacts - else: - self._upload_checkpoints = upload_checkpoints + self._upload_checkpoints = upload_checkpoints self._base_namespace = base_namespace self._neptune_kwargs = neptune_kwargs @@ -343,15 +336,5 @@ def _scale_image_to_0_255(img: np.ndarray, array_min: Union[int, float], array_m return scaled_image.astype(np.uint8) -def _warn_about_deprecated_upload_artifacts() -> None: - warnings.warn( - VersionedDeprecationWarning( - 'The \'upload_artifacts\' parameter is deprecated and will be removed in the next version. ' - 'Use the \'upload_checkpoints\' parameter instead.', - remove_version='0.23', - ), - ) - - def _is_progress_bar_enabled() -> bool: return Version(version('neptune')) >= NEPTUNE_VERSION_WITH_PROGRESS_BAR diff --git a/docker/README.md b/docker/README.md index dbd41e9e7a..502e0fe8be 100644 --- a/docker/README.md +++ b/docker/README.md @@ -15,8 +15,8 @@ all dependencies for both NLP and Vision models. They are built on top of the | Composer Version | CUDA Support | Docker Tag | |--------------------|----------------|----------------------------------------------------------------| -| 0.22.0 | Yes | `mosaicml/composer:latest`, `mosaicml/composer:0.22.0` | -| 0.22.0 | No | `mosaicml/composer:latest_cpu`, `mosaicml/composer:0.22.0_cpu` | +| 0.23.0 | Yes | `mosaicml/composer:latest`, `mosaicml/composer:0.23.0` | +| 0.23.0 | No | `mosaicml/composer:latest_cpu`, `mosaicml/composer:0.23.0_cpu` | **Note**: For a lightweight installation, we recommended using a [MosaicML PyTorch Image](#pytorch-images) and manually diff --git a/docker/build_matrix.yaml b/docker/build_matrix.yaml index 0fe0bcd5ef..5f193eb3df 100644 --- a/docker/build_matrix.yaml +++ b/docker/build_matrix.yaml @@ -208,9 +208,9 @@ TORCHVISION_VERSION: 0.16.2 - AWS_OFI_NCCL_VERSION: '' BASE_IMAGE: nvidia/cuda:12.1.1-cudnn8-devel-ubuntu20.04 - COMPOSER_INSTALL_COMMAND: mosaicml[all]==0.22.0 + COMPOSER_INSTALL_COMMAND: mosaicml[all]==0.23.0 CUDA_VERSION: 12.1.1 - IMAGE_NAME: composer-0-22-0 + IMAGE_NAME: composer-0-23-0 MOFED_VERSION: latest-23.10 NVIDIA_REQUIRE_CUDA_OVERRIDE: cuda>=12.1 brand=tesla,driver>=450,driver<451 brand=tesla,driver>=470,driver<471 brand=unknown,driver>=470,driver<471 brand=nvidia,driver>=470,driver<471 brand=nvidiartx,driver>=470,driver<471 @@ -231,15 +231,15 @@ PYTORCH_NIGHTLY_VERSION: '' PYTORCH_VERSION: 2.3.0 TAGS: - - mosaicml/composer:0.22.0 + - mosaicml/composer:0.23.0 - mosaicml/composer:latest TARGET: composer_stage TORCHVISION_VERSION: 0.18.0 - AWS_OFI_NCCL_VERSION: '' BASE_IMAGE: ubuntu:20.04 - COMPOSER_INSTALL_COMMAND: mosaicml[all]==0.22.0 + COMPOSER_INSTALL_COMMAND: mosaicml[all]==0.23.0 CUDA_VERSION: '' - IMAGE_NAME: composer-0-22-0-cpu + IMAGE_NAME: composer-0-23-0-cpu MOFED_VERSION: latest-23.10 NVIDIA_REQUIRE_CUDA_OVERRIDE: '' PYTHON_VERSION: '3.11' @@ -247,7 +247,7 @@ PYTORCH_NIGHTLY_VERSION: '' PYTORCH_VERSION: 2.3.0 TAGS: - - mosaicml/composer:0.22.0_cpu + - mosaicml/composer:0.23.0_cpu - mosaicml/composer:latest_cpu TARGET: composer_stage TORCHVISION_VERSION: 0.18.0 diff --git a/docker/generate_build_matrix.py b/docker/generate_build_matrix.py index 299656579c..d7c9bea15b 100644 --- a/docker/generate_build_matrix.py +++ b/docker/generate_build_matrix.py @@ -231,7 +231,7 @@ def _main(): composer_entries = [] # The `GIT_COMMIT` is a placeholder and Jenkins will substitute it with the actual git commit for the `composer_staging` images - composer_versions = ['0.22.0'] # Only build images for the latest composer version + composer_versions = ['0.23.0'] # Only build images for the latest composer version composer_python_versions = [PRODUCTION_PYTHON_VERSION] # just build composer against the latest for product in itertools.product(composer_python_versions, composer_versions, cuda_options):