Skip to content

Commit 6842b37

Browse files
committed
formatted
1 parent daca23e commit 6842b37

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

tests/fixtures/fixtures.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,15 @@ def uc_volume_read_only(request: pytest.FixtureRequest):
138138
else:
139139
return os.environ.get('UC_VOLUME_READ_ONLY_PATH', 'Volumes/main/regression_testing/composer_artifacts')
140140

141+
141142
@pytest.fixture
142143
def uc_volume_ephemeral(request: pytest.FixtureRequest):
143144
if request.node.get_closest_marker('remote') is None:
144145
return 'my-volume'
145146
else:
146147
return os.environ.get('UC_VOLUME_EPHEMERAL_PATH', 'Volumes/main/regression_testing/composer_ephemeral')
147148

149+
148150
## MODEL HELPERS ##
149151
def causal_lm_model_helper(config): # type: ignore
150152
transformers = pytest.importorskip('transformers')

tests/test_notebooks.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@ def test_notebook(notebook: str, device: str, uc_volume_read_only: str):
137137

138138
# Download CIFAR-10 data from UC Volumes
139139
uc_store = UCObjectStore(uc_volume_read_only)
140-
files = uc_store.list_objects(prefix="CIFAR-10")
140+
files = uc_store.list_objects(prefix='CIFAR-10')
141141

142142
for file_path in files:
143-
file_relative_path = file_path[len(f"/{uc_volume_read_only}/"):]
144-
target = os.path.join(os.getcwd(), 'data', file_relative_path[len("CIFAR-10/"):])
143+
file_relative_path = file_path[len(f'/{uc_volume_read_only}/'):]
144+
target = os.path.join(os.getcwd(), 'data', file_relative_path[len('CIFAR-10/'):])
145145
if os.path.exists(target):
146146
continue
147147
os.makedirs(os.path.dirname(target), exist_ok=True)

tests/trainer/test_fsdp_checkpoint.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,7 @@ def test_fsdp_partitioned_state_dict_load(
953953
trainer2.fit()
954954
trainer2.close()
955955

956+
956957
@pytest.mark.gpu
957958
@pytest.mark.remote
958959
@world_size(2)
@@ -1070,7 +1071,7 @@ def test_cleanup_sharded_checkpoints(
10701071
tmp_path: pathlib.Path,
10711072
num_ckpts_to_keep: int,
10721073
):
1073-
del world_size # not needed
1074+
del world_size # not needed
10741075
run_name = None
10751076
batches_to_train = 3
10761077

0 commit comments

Comments
 (0)