forked from mosaicml/composer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add azure integration test (mosaicml#2996)
* add cpu test * new test file * fix
- Loading branch information
1 parent
6ff3041
commit 6d4575d
Showing
4 changed files
with
41 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Copyright 2022 MosaicML Composer authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
import pytest | ||
from torch.utils.data import DataLoader | ||
|
||
from composer.trainer import Trainer | ||
from tests.common import RandomClassificationDataset, SimpleModel | ||
|
||
|
||
@pytest.mark.remote | ||
def test_azure_object_store_integration(): | ||
model = SimpleModel() | ||
train_dataloader = DataLoader(dataset=RandomClassificationDataset()) | ||
trainer_save = Trainer( | ||
model=model, | ||
train_dataloader=train_dataloader, | ||
save_folder='azure://mosaicml-composer-tests/checkpoints/{run_name}', | ||
save_filename='test-model.pt', | ||
max_duration='1ba', | ||
) | ||
run_name = trainer_save.state.run_name | ||
trainer_save.fit() | ||
trainer_save.close() | ||
|
||
trainer_load = Trainer( | ||
model=model, | ||
train_dataloader=train_dataloader, | ||
load_path=f'azure://mosaicml-composer-tests/checkpoints/{run_name}/test-model.pt', | ||
max_duration='2ba', | ||
) | ||
trainer_load.fit() | ||
trainer_load.close() |
107 changes: 0 additions & 107 deletions
107
tests/utils/object_store/test_integration_gs_object_store.py
This file was deleted.
Oops, something went wrong.