Skip to content

Commit 8826220

Browse files
committed
docs: update test doc
1 parent 44f30b4 commit 8826220

File tree

7 files changed

+37
-45
lines changed

7 files changed

+37
-45
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Enzyme = "0.13.120"
113113
EnzymeCore = "0.8.16"
114114
FastClosures = "0.3.2"
115115
Flux = "0.16.3"
116-
ForwardDiff = "0.10.36, 1"
116+
ForwardDiff = "1"
117117
FunctionWrappers = "1.1.3"
118118
Functors = "0.5"
119119
GPUArrays = "11"
@@ -129,7 +129,7 @@ MacroTools = "0.5.13"
129129
Markdown = "1.10"
130130
Mooncake = "0.5"
131131
NCCL = "0.1.2"
132-
NNlib = "0.9.27"
132+
NNlib = "0.9.33"
133133
Optimisers = "0.4.6"
134134
PrecompileTools = "1.2.1"
135135
Preferences = "1.4.3"

README.md

Lines changed: 24 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -271,51 +271,44 @@ format(".")
271271

272272
The full test of `Lux.jl` takes a long time, here's how to test a portion of the code.
273273

274-
For each `@testitem`, there are corresponding `tags`, for example:
274+
Tests are organized by directories, where each directory contains test files with `@testset`
275+
blocks. For example, tests for `SkipConnection` are in `test/core_layers/containers_tests.jl`.
275276

276-
```julia
277-
@testitem "SkipConnection" setup=[SharedTestSetup] tags=[:core_layers]
278-
```
277+
#### Running a Specific Test File
279278

280-
For example, let's consider the tests for `SkipConnection`:
279+
The easiest way to run a specific test is to directly activate the test directory and
280+
include the test file:
281281

282282
```julia
283-
@testitem "SkipConnection" setup=[SharedTestSetup] tags=[:core_layers] begin
284-
...
285-
end
286-
```
287-
288-
We can test the group to which `SkipConnection` belongs by testing `core_layers`.
289-
To do so set the `LUX_TEST_GROUP` environment variable, or rename the tag to
290-
further narrow the test scope:
283+
# From the Lux.jl root directory
284+
using Pkg
285+
Pkg.activate("test")
291286

292-
```shell
293-
export LUX_TEST_GROUP="core_layers"
287+
# Run a specific test file
288+
include("test/core_layers/containers_tests.jl")
294289
```
295290

296-
Or directly modify the default test tag in `runtests.jl`:
291+
This approach allows you to quickly iterate on specific tests without running the entire
292+
test suite.
297293

298-
```julia
299-
# const LUX_TEST_GROUP = lowercase(get(ENV, "LUX_TEST_GROUP", "all"))
300-
const LUX_TEST_GROUP = lowercase(get(ENV, "LUX_TEST_GROUP", "core_layers"))
301-
```
294+
See [ParallelTestRunners.jl](https://github.com/JuliaTesting/ParallelTestRunner.jl) for
295+
details on executing specific groups of tests.
302296

303-
But be sure to restore the default value "all" before submitting the code.
297+
#### Running Test Groups via CI
304298

305-
Furthermore if you want to run a specific test based on the name of the testset, you can
306-
use [TestEnv.jl](https://github.com/JuliaTesting/TestEnv.jl) as follows. Start with activating the Lux environment and then run the following:
299+
To run a specific group of tests via the test runner, you can pass the directory name as a
300+
positional argument:
307301

308-
```julia
309-
using TestEnv; TestEnv.activate(); using ReTestItems;
310-
311-
# Assuming you are in the main directory of Lux
312-
ReTestItems.runtests("tests/"; name = "NAME OF THE TEST")
302+
```shell
303+
julia --project -e 'using Pkg; Pkg.test(test_args=["core_layers"])'
313304
```
314305

315-
For the `SkipConnection` tests that would be:
306+
#### Running All Tests
316307

317-
```julia
318-
ReTestItems.runtests("tests/"; name = "SkipConnection")
308+
To run the full test suite:
309+
310+
```shell
311+
julia --project -e 'using Pkg; Pkg.test()'
319312
```
320313

321314
### 📖 Documentation

lib/LuxLib/Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "LuxLib"
22
uuid = "82251201-b29d-42c6-8e01-566dec8acb11"
3-
version = "1.15.3"
3+
version = "1.15.4"
44
authors = ["Avik Pal <avikpal@mit.edu> and contributors"]
55

66
[deps]
@@ -68,7 +68,7 @@ TrackerExt = "Tracker"
6868
cuDNNExt = ["CUDA", "cuDNN"]
6969

7070
[compat]
71-
AMDGPU = "0.9.6, 1, 2"
71+
AMDGPU = "2.2"
7272
AppleAccelerate = "0.4, 0.5"
7373
ArrayInterface = "7.17.1"
7474
BLISBLAS = "0.1, 0.2"

lib/MLDataDevices/Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "MLDataDevices"
22
uuid = "7e8f7934-dd98-4c1a-8fe8-92b47a384d40"
33
authors = ["Avik Pal <avikpal@mit.edu> and contributors"]
4-
version = "1.17.4"
4+
version = "1.17.5"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
@@ -53,7 +53,7 @@ oneAPIExt = ["GPUArrays", "oneAPI"]
5353
OpenCLExt = ["GPUArrays", "OpenCL"]
5454

5555
[compat]
56-
AMDGPU = "1, 2"
56+
AMDGPU = "2.2"
5757
Adapt = "4.4"
5858
CUDA = "5.8"
5959
ChainRules = "1.51"

lib/WeightInitializers/Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "WeightInitializers"
22
uuid = "d49dbf32-c5c2-4618-8acc-27bb2598ef2d"
33
authors = ["Avik Pal <avikpal@mit.edu> and contributors"]
4-
version = "1.3.1"
4+
version = "1.3.2"
55

66
[deps]
77
ConcreteStructs = "2569d6c7-a4a2-43d3-a901-331e8e4be471"
@@ -26,7 +26,7 @@ GPUArraysExt = "GPUArrays"
2626
ReactantExt = "Reactant"
2727

2828
[compat]
29-
AMDGPU = "0.9.6, 1, 2"
29+
AMDGPU = "2.2"
3030
CUDA = "5.8"
3131
ChainRulesCore = "1.25.1"
3232
ConcreteStructs = "0.2.3"

test/Project.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ Preferences = "21216c6a-2e73-6563-6e65-726566657250"
3333
PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d"
3434
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
3535
Reactant = "3c362404-f566-11ee-1572-e11a4b42c853"
36-
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
3736
ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267"
3837
Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46"
3938
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
@@ -53,6 +52,7 @@ LuxTestUtils = {path = "../lib/LuxTestUtils"}
5352
MLDataDevices = {path = "../lib/MLDataDevices"}
5453

5554
[compat]
55+
AMDGPU = "2.2"
5656
ADTypes = "1.19"
5757
Adapt = "4"
5858
Aqua = "0.8.4"
@@ -63,7 +63,7 @@ DispatchDoctor = "0.4.12"
6363
Documenter = "1.4"
6464
Enzyme = "0.13.120"
6565
ExplicitImports = "1.14.2"
66-
ForwardDiff = "0.10.36, 1"
66+
ForwardDiff = "1"
6767
Functors = "0.5"
6868
LinearAlgebra = "1.10"
6969
Logging = "1.10"
@@ -73,7 +73,7 @@ LuxLib = "1.15"
7373
LuxTestUtils = "2"
7474
MLDataDevices = "1.17"
7575
Mooncake = "0.4.138, 0.5"
76-
NNlib = "0.9.27"
76+
NNlib = "0.9.33"
7777
Octavian = "0.3.28"
7878
OneHotArrays = "0.2.5"
7979
Optimisers = "0.4.6"
@@ -83,7 +83,6 @@ Preferences = "1.4.3"
8383
PythonCall = "0.9"
8484
Random = "1.10"
8585
Reactant = "0.2.205"
86-
Reexport = "1.2.2"
8786
ReverseDiff = "1.15.3"
8887
Setfield = "1.1.1"
8988
StableRNGs = "1.0.2"

test/runtests.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ end
140140
if (isempty(parsed_args.positionals) || "others" parsed_args.positionals)
141141
@testset "DispatchDoctor Preferences" begin
142142
@testset "set_dispatch_doctor_preferences!" begin
143-
@test_throws ArgumentError Lux.set_dispatch_doctor_preferences!("invalid")
144-
@test_throws ArgumentError Lux.set_dispatch_doctor_preferences!(;
143+
@test_throws AssertionError Lux.set_dispatch_doctor_preferences!("invalid")
144+
@test_throws AssertionError Lux.set_dispatch_doctor_preferences!(;
145145
luxcore="invalid"
146146
)
147147

0 commit comments

Comments
 (0)