Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove flatten params #2761

Merged
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
3d74f6f
remove flatten params
mvpatel2000 Dec 5, 2023
8b2ef02
Merge branch 'dev' into mvpatel2000/remove-flatten-params
mvpatel2000 Dec 5, 2023
bf06e25
simplify tests
mvpatel2000 Dec 5, 2023
ae7cbf2
Merge branch 'mvpatel2000/remove-flatten-params' of github.com:mvpate…
mvpatel2000 Dec 5, 2023
7d1bcce
simplify tests
mvpatel2000 Dec 5, 2023
a3be4cc
clean
mvpatel2000 Dec 5, 2023
114c30d
fix more tests
mvpatel2000 Dec 5, 2023
810037d
rerun tests
mvpatel2000 Dec 5, 2023
179b1b8
speed up icl
mvpatel2000 Dec 5, 2023
52151b2
fix tests
mvpatel2000 Dec 5, 2023
193fbea
fix cpu tests
mvpatel2000 Dec 5, 2023
6af7161
add more fixtures
mvpatel2000 Dec 5, 2023
b01e483
fix tests
mvpatel2000 Dec 5, 2023
c85311a
token count
mvpatel2000 Dec 5, 2023
cdb9c5e
fix vocab size
mvpatel2000 Dec 5, 2023
9cffa18
remove logger
mvpatel2000 Dec 5, 2023
4fa7196
remove clears
mvpatel2000 Dec 5, 2023
e84a67c
fix mosaicml logger
mvpatel2000 Dec 5, 2023
21a44ee
change codeowners
mvpatel2000 Dec 5, 2023
bc8a89e
clean up codeowners
mvpatel2000 Dec 5, 2023
e18c64b
rerun tests
mvpatel2000 Dec 6, 2023
7d82d23
shrink dataset
mvpatel2000 Dec 6, 2023
2225bc1
fix tests
mvpatel2000 Dec 6, 2023
3959386
fix test
mvpatel2000 Dec 6, 2023
1da1b58
rerun tests
mvpatel2000 Dec 6, 2023
b9b3c8d
fix tests
mvpatel2000 Dec 6, 2023
f230a3b
fix tests
mvpatel2000 Dec 6, 2023
fb616c4
fix seed
mvpatel2000 Dec 6, 2023
3d0dddd
set to 0
mvpatel2000 Dec 6, 2023
4264b3c
rerun tests
mvpatel2000 Dec 6, 2023
188f440
rerun tests
mvpatel2000 Dec 6, 2023
bf2631d
change threshold
mvpatel2000 Dec 6, 2023
714c2cf
rerun tests
mvpatel2000 Dec 6, 2023
ceb919a
rerun tests
mvpatel2000 Dec 6, 2023
5c7f510
logs
mvpatel2000 Dec 6, 2023
477e7b3
remove changes
mvpatel2000 Dec 6, 2023
ade52a4
logs
mvpatel2000 Dec 6, 2023
b8d4763
logs
mvpatel2000 Dec 6, 2023
9862827
remove logs
mvpatel2000 Dec 6, 2023
c2be0d2
rerun tests
mvpatel2000 Dec 6, 2023
d22e2c4
rerun tests
mvpatel2000 Dec 6, 2023
be58587
logs
mvpatel2000 Dec 6, 2023
ee3de65
rerun
mvpatel2000 Dec 6, 2023
a461a5d
logs
mvpatel2000 Dec 6, 2023
f26c4f0
rerun
mvpatel2000 Dec 6, 2023
30ca18c
rerun
mvpatel2000 Dec 6, 2023
9abf52c
rerun tests
mvpatel2000 Dec 6, 2023
f300455
many more logs
mvpatel2000 Dec 7, 2023
6ea9967
rerun tests
mvpatel2000 Dec 7, 2023
d279afe
strip logs
mvpatel2000 Dec 7, 2023
5f24f49
enable tests
mvpatel2000 Dec 7, 2023
5421742
remove opt
mvpatel2000 Dec 7, 2023
2de76cc
rerun tests
mvpatel2000 Dec 7, 2023
b3bdf9c
add test
mvpatel2000 Dec 7, 2023
58fbb84
lint
mvpatel2000 Dec 7, 2023
004d8d3
rerun tests
mvpatel2000 Dec 7, 2023
15343f4
fix lint
mvpatel2000 Dec 7, 2023
8ad4654
lint
mvpatel2000 Dec 7, 2023
1e8873d
filter warnings
mvpatel2000 Dec 7, 2023
c6911f2
rerun tests
mvpatel2000 Dec 7, 2023
f81a907
fixture
mvpatel2000 Dec 7, 2023
c93d0dc
add fixture
mvpatel2000 Dec 7, 2023
db58919
change
mvpatel2000 Dec 7, 2023
4d20f1e
logs
mvpatel2000 Dec 7, 2023
687cd2f
rerun tests
mvpatel2000 Dec 7, 2023
655bd36
add logs
mvpatel2000 Dec 7, 2023
0dc1320
rerun tests
mvpatel2000 Dec 7, 2023
4d22628
fixture
mvpatel2000 Dec 7, 2023
d240088
lint
mvpatel2000 Dec 7, 2023
d088a4f
lint
mvpatel2000 Dec 7, 2023
9bbc2ee
rerun tests
mvpatel2000 Dec 7, 2023
ad2adf0
fix ignore warning
mvpatel2000 Dec 7, 2023
4381b95
logs
mvpatel2000 Dec 7, 2023
8cfdefa
regex
mvpatel2000 Dec 7, 2023
b64bdf9
regex
mvpatel2000 Dec 7, 2023
62298c7
regex
mvpatel2000 Dec 7, 2023
23cd426
fix
mvpatel2000 Dec 7, 2023
7cd6113
logs
mvpatel2000 Dec 7, 2023
ee8f2be
reformat
mvpatel2000 Dec 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
# as an owner for all sections, so anyone on Composer Eng can approve any Composer PR
# According to the CODEOWNER docs, the last match takes precedence, so @mosaicml/composer-team-eng
# must be mentioned for each rule below.
/composer/algorithms/ @dskhudia @mvpatel2000 @nik-mosaic
/composer/algorithms/ @mosaicml/composer-team-eng
/composer/cli/ @mosaicml/composer-team-eng
/composer/datasets/ @mosaicml/composer-team-eng
/composer/functional/ @dblalock @mvpatel2000
/composer/loggers/ @eracah @dakinggg
/composer/functional/ @mosaicml/composer-team-eng @dblalock
/composer/loggers/ @mosaicml/composer-team-eng @eracah @dakinggg
/composer/loss/ @mosaicml/composer-team-eng
/composer/metrics/ @mosaicml/composer-team-eng
/composer/models/ @mosaicml/composer-team-eng
Expand Down
6 changes: 3 additions & 3 deletions composer/algorithms/stochastic_depth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from torch.utils.data import DataLoader
from tests.common import RandomImageDataset

train_dataloader = DataLoader(RandomImageDataset(), batch_size=2)
train_dataloader = DataLoader(RandomImageDataset(size=2), batch_size=2)
```
-->
<!--pytest-codeblocks:cont-->
Expand Down Expand Up @@ -65,8 +65,8 @@ for epoch in range(1):
from torch.utils.data import DataLoader
from tests.common import RandomImageDataset

train_dataloader = DataLoader(RandomImageDataset(), batch_size=2)
eval_dataloader = DataLoader(RandomImageDataset(), batch_size=2)
train_dataloader = DataLoader(RandomImageDataset(size=2), batch_size=2)
eval_dataloader = DataLoader(RandomImageDataset(size=2), batch_size=2)
```
-->
<!--pytest-codeblocks:cont-->
Expand Down
6 changes: 3 additions & 3 deletions composer/algorithms/weight_standardization/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ from torchvision import models
from torch.utils.data import DataLoader
from tests.common import RandomImageDataset

my_train_dataloader = DataLoader(RandomImageDataset(), batch_size=2)
my_train_dataloader = DataLoader(RandomImageDataset(size=2), batch_size=2)
my_cnn_model = models.resnet18()
```
-->
Expand Down Expand Up @@ -63,8 +63,8 @@ from torch.utils.data import DataLoader
from tests.common import RandomImageDataset

cnn_composer_model = composer_resnet('resnet50')
my_train_dataloader = DataLoader(RandomImageDataset(), batch_size=2)
my_eval_dataloader = DataLoader(RandomImageDataset(), batch_size=2)
my_train_dataloader = DataLoader(RandomImageDataset(size=2), batch_size=2)
my_eval_dataloader = DataLoader(RandomImageDataset(size=2), batch_size=2)
```
-->
<!--pytest-codeblocks:cont-->
Expand Down
1 change: 0 additions & 1 deletion composer/trainer/dist_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ def set_fsdp_default(fsdp_config: Dict[str, Any]):
fsdp_config.setdefault('backward_prefetch', 'BACKWARD_POST')
fsdp_config.setdefault('backward_prefetch_limit', 1)
fsdp_config.setdefault('cpu_offload', False)
fsdp_config.setdefault('flatten_parameters', True)
fsdp_config.setdefault('forward_prefetch', False)
fsdp_config.setdefault('forward_prefetch_limit', 1)
fsdp_config.setdefault('ignored_modules', None)
Expand Down
6 changes: 3 additions & 3 deletions docs/source/method_cards/stochastic_depth.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Block-wise stochastic depth assigns every residual block a probability of droppi
from torch.utils.data import DataLoader
from tests.common import RandomImageDataset

train_dataloader = DataLoader(RandomImageDataset(), batch_size=2)
train_dataloader = DataLoader(RandomImageDataset(size=2), batch_size=2)
```
-->
<!--pytest-codeblocks:cont-->
Expand Down Expand Up @@ -65,8 +65,8 @@ for epoch in range(1):
from torch.utils.data import DataLoader
from tests.common import RandomImageDataset

train_dataloader = DataLoader(RandomImageDataset(), batch_size=2)
eval_dataloader = DataLoader(RandomImageDataset(), batch_size=2)
train_dataloader = DataLoader(RandomImageDataset(size=2), batch_size=2)
eval_dataloader = DataLoader(RandomImageDataset(size=2), batch_size=2)
```
-->
<!--pytest-codeblocks:cont-->
Expand Down
1 change: 0 additions & 1 deletion docs/source/notes/distributed_training.rst
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ The full spec and defaults for Composer's `fsdp_config` is here:
'activation_cpu_offload': bool = True | False, # Default: False
'backward_prefetch': str = 'BACKWARD_PRE' | 'BACKWARD_POST' | 'NONE', # Default: 'BACKWARD_POST'
'cpu_offload': bool = True | False, # Default: False, cpu_offload not supported yet
'flatten_parameters': bool = True | False, # Default: True
'forward_prefetch': bool = True | False, # Default: False
'ignored_modules': Optional[Iterable[torch.nn.Module]], # Default: None
'keep_low_precision_grads': bool = True | False, # Default: False
Expand Down
6 changes: 5 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,18 @@ def pytest_configure():
if TRANSFORMERS_INSTALLED:
from tests.fixtures.fixtures import (tiny_bert_config_helper, tiny_bert_model_helper,
tiny_bert_tokenizer_helper, tiny_gpt2_config_helper,
tiny_gpt2_model_helper, tiny_gpt2_tokenizer_helper, tiny_t5_config_helper,
tiny_gpt2_model_helper, tiny_gpt2_tokenizer_helper, tiny_opt_config_helper,
tiny_opt_model_helper, tiny_opt_tokenizer_helper, tiny_t5_config_helper,
tiny_t5_model_helper, tiny_t5_tokenizer_helper)
pytest.tiny_bert_config = tiny_bert_config_helper() # type: ignore
pytest.tiny_bert_model = tiny_bert_model_helper(pytest.tiny_bert_config) # type: ignore
pytest.tiny_bert_tokenizer = tiny_bert_tokenizer_helper() # type: ignore
pytest.tiny_gpt2_config = tiny_gpt2_config_helper() # type: ignore
pytest.tiny_gpt2_model = tiny_gpt2_model_helper(pytest.tiny_gpt2_config) # type: ignore
pytest.tiny_gpt2_tokenizer = tiny_gpt2_tokenizer_helper() # type: ignore
pytest.tiny_opt_config = tiny_opt_config_helper() # type: ignore
pytest.tiny_opt_model = tiny_opt_model_helper(pytest.tiny_opt_config) # type: ignore
pytest.tiny_opt_tokenizer = tiny_opt_tokenizer_helper() # type: ignore
pytest.tiny_t5_config = tiny_t5_config_helper() # type: ignore
pytest.tiny_t5_model = tiny_t5_model_helper(pytest.tiny_t5_config) # type: ignore
pytest.tiny_t5_tokenizer = tiny_t5_tokenizer_helper() # type: ignore
Expand Down
Loading
Loading