File tree Expand file tree Collapse file tree 4 files changed +13
-3
lines changed Expand file tree Collapse file tree 4 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 18
18
matrix :
19
19
os : [ubuntu-latest-16-cores, macos-latest, windows-latest-8-cores]
20
20
pyv : ['3.9', '3.12']
21
+ group : ['get_started', 'llm_and_nlp or computer_vision', 'multimodal']
21
22
steps :
22
23
- uses : actions/checkout@v4
23
24
34
35
uv --version
35
36
36
37
- name : Run examples
37
- run : nox -s examples -p ${{ matrix.pyv }}
38
+ run : nox -s examples -p ${{ matrix.pyv }} -- -m "${{ matrix.group }}"
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ def forward(self, x):
64
64
optimizer = optim .Adam (model .parameters (), lr = 0.001 )
65
65
66
66
# Train the model
67
- num_epochs = 1
67
+ num_epochs = 3
68
68
for epoch in range (num_epochs ):
69
69
for i , data in enumerate (train_loader ):
70
70
inputs , labels = data
Original file line number Diff line number Diff line change @@ -118,7 +118,12 @@ namespaces = false
118
118
addopts = " -rfEs -m 'not benchmark and not examples'"
119
119
markers = [
120
120
" benchmark: benchmarks." ,
121
- " e2e: End-to-end tests"
121
+ " e2e: End-to-end tests" ,
122
+ " examples: All examples" ,
123
+ " computer_vision: Computer vision examples" ,
124
+ " get_started: Get started examples" ,
125
+ " llm_and_nlp: LLM and NLP examples" ,
126
+ " multimodal: Multimodal examples" ,
122
127
]
123
128
asyncio_mode = " auto"
124
129
filterwarnings = [
Original file line number Diff line number Diff line change @@ -64,24 +64,28 @@ def smoke_test(example: str):
64
64
65
65
66
66
@pytest .mark .examples
67
+ @pytest .mark .get_started
67
68
@pytest .mark .parametrize ("example" , get_started_examples )
68
69
def test_get_started_examples (example ):
69
70
smoke_test (example )
70
71
71
72
72
73
@pytest .mark .examples
74
+ @pytest .mark .llm_and_nlp
73
75
@pytest .mark .parametrize ("example" , llm_and_nlp_examples )
74
76
def test_llm_and_nlp_examples (example ):
75
77
smoke_test (example )
76
78
77
79
78
80
@pytest .mark .examples
81
+ @pytest .mark .multimodal
79
82
@pytest .mark .parametrize ("example" , multimodal_examples )
80
83
def test_multimodal (example ):
81
84
smoke_test (example )
82
85
83
86
84
87
@pytest .mark .examples
88
+ @pytest .mark .computer_vision
85
89
@pytest .mark .parametrize ("example" , computer_vision_examples )
86
90
def test_computer_vision_examples (example ):
87
91
smoke_test (example )
You can’t perform that action at this time.
0 commit comments