Skip to content

Commit

Permalink
Deprecate and bump verstion to 0.23.0 (mosaicml#3359)
Browse files Browse the repository at this point in the history
* deprecate and bump version

* a
  • Loading branch information
bigning authored Jun 4, 2024
1 parent f0eae8a commit 35b95fe
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 29 deletions.
2 changes: 1 addition & 1 deletion composer/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

"""The Composer Version."""

__version__ = '0.23.0.dev0'
__version__ = '0.24.0.dev0'
21 changes: 2 additions & 19 deletions composer/loggers/neptune_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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,
Expand All @@ -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)

Expand All @@ -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
Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ all dependencies for both NLP and Vision models. They are built on top of the
<!-- BEGIN_COMPOSER_BUILD_MATRIX -->
| 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` |
<!-- END_COMPOSER_BUILD_MATRIX -->

**Note**: For a lightweight installation, we recommended using a [MosaicML PyTorch Image](#pytorch-images) and manually
Expand Down
12 changes: 6 additions & 6 deletions docker/build_matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -231,23 +231,23 @@
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'
PYTORCH_NIGHTLY_URL: ''
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
2 changes: 1 addition & 1 deletion docker/generate_build_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 35b95fe

Please sign in to comment.