From 42bacbf88870aaa18858c3a5cbd94172421af928 Mon Sep 17 00:00:00 2001 From: alexkuzmik Date: Fri, 26 Apr 2024 09:14:00 +0000 Subject: [PATCH] Remove Literal type hint to work with older python versions, increased train_batch_size from 1 to 2 in TestCometMonitor --- deepspeed/monitor/config.py | 6 +++--- tests/unit/monitor/test_monitor.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deepspeed/monitor/config.py b/deepspeed/monitor/config.py index 800506684205..4e718e8d4d95 100644 --- a/deepspeed/monitor/config.py +++ b/deepspeed/monitor/config.py @@ -3,7 +3,7 @@ # DeepSpeed Team -from typing import Optional, Literal +from typing import Optional from deepspeed.pydantic_v1 import root_validator from deepspeed.runtime.config_utils import DeepSpeedConfigModel @@ -113,9 +113,9 @@ class CometConfig(DeepSpeedConfigModel): Defaults to True. """ - mode: Optional[Literal["get_or_create", "create", "get"]] = None + mode: Optional[str] = None """ - The strategy to obtain an experiment for logging data. + The strategy to obtain an experiment for logging data. 3 options are possible. `get_or_create` will get a running experiment instance if it exists or create a new one `create` will always create a new experiment (the previous one will be ended) `get` will strictly use experiments which already running, the new ones will not be created diff --git a/tests/unit/monitor/test_monitor.py b/tests/unit/monitor/test_monitor.py index 6e23cd236f83..b72bdd651363 100644 --- a/tests/unit/monitor/test_monitor.py +++ b/tests/unit/monitor/test_monitor.py @@ -110,7 +110,7 @@ def test_comet_monitor(self): mock_start = Mock(return_value=mock_experiment) config_dict = { - "train_batch_size": 1, + "train_batch_size": 2, "comet": { "enabled": True, "samples_log_interval": 42,