@@ -5,8 +5,10 @@ This directory contains tests for the TorchTitan project, including unit tests a
55## Test Structure
66
77- ` unit_tests/ ` : Contains unit tests for individual components
8- - ` integration_tests.py ` : Contains integration tests that test multiple components together
9- - ` integration_tests_h100.py ` : Contains integration tests specifically designed for H100 GPUs, which utilize symmetric memory and float8.
8+ - ` integration_tests/ ` : Contains integration tests that test multiple components together
9+ - ` integration_tests.py ` : Main integration tests for various model configurations
10+ - ` integration_tests_h100.py ` : Tests specifically designed for H100 GPUs, utilizing symmetric memory and float8
11+ - ` base_config.toml ` : Base configuration file for integration tests
1012- ` assets/ ` : Contains test assets and fixtures used by the tests
1113
1214## Running Tests
@@ -25,25 +27,27 @@ pip install -r requirements.txt
2527To run the integration tests:
2628
2729``` bash
28- python ./ tests/ integration_tests.py < output_dir> [--config_dir CONFIG_DIR ] [--test TEST ] [--ngpu NGPU]
30+ python -m tests. integration_tests.integration_tests < output_dir> [--config_path CONFIG_PATH ] [--test_name TEST_NAME] [--test_suite TEST_SUITE] [--model MODEL ] [--ngpu NGPU]
2931```
3032
3133Arguments:
3234- ` output_dir ` : (Required) Directory where test outputs will be stored
33- - ` --config_dir ` : (Optional) Directory containing configuration files (default: "./torchtitan/models/llama3/train_configs")
34- - ` --test ` : (Optional) Specific test to run, use test names from the ` build_test_list() ` function (default: "all")
35+ - ` --config_path ` : (Optional) Path to the base config file (default: "./tests/integration_tests/base_config.toml")
36+ - ` --test_name ` : (Optional) Specific test to run by name (default: "all")
37+ - ` --test_suite ` : (Optional) Test suite to run: 'core', 'parallelism', or 'all' (default: "all")
38+ - ` --model ` : (Optional) Specify the model to run tests on (default: "all")
3539- ` --ngpu ` : (Optional) Number of GPUs to use for testing (default: 8)
3640
3741Examples:
3842``` bash
3943# Run all integration tests with 8 GPUs
40- python ./ tests/ integration_tests.py ./test_output
44+ python -m tests. integration_tests.integration_tests ./test_output
4145
4246# Run a specific test with 4 GPUs
43- python ./ tests/ integration_tests.py ./test_output --test default --ngpu 4
47+ python -m tests. integration_tests.integration_tests ./test_output --test_name tp_only --ngpu 4
4448
45- # Run all tests with a custom config directory
46- python ./ tests/ integration_tests.py ./test_output --config_dir ./my_configs
49+ # Run only core functionality tests
50+ python -m tests. integration_tests.integration_tests ./test_output --test_suite core
4751```
4852
4953### Running Unit Tests
0 commit comments