johnnychen94 / Workflows.jl

MIT License
10 stars 1 forks source link

implement the "tasks.matrix" syntax #12

Closed johnnychen94 closed 2 years ago

johnnychen94 commented 2 years ago

Calling collect(t::LoopTask) generates 2*7+1-1 = 14 tasks:

version = "0.1"
dialect = "manifest"

order = ["1"]

[[tasks]]
    name = "basic"
    id = "1"
    groups = ["Type:LinearAlgebra", "Type:Benchmark", "Framework:Julia"]
    deps = ["scripts/julia"]
    runner = "shell"
    [tasks.matrix]
        script = ["rand.jl", "sum.jl"]
        length = ["64", "128", "256", "512", "1024", "2048", "4096"]
        [[tasks.matrix.includes]]
            script = "sum.jl"
            length = "8192"
        [[tasks.matrix.excludes]]
            script = "rand.jl"
            length = "4096"
    [tasks.run]
        command = "julia --startup=no --project=. scripts/julia/${{ matrix.script }} ${{ matrix.length }}"
        capture = true
julia> map(t->runner_info(t)["command"], collect(w.tasks["1"]))
14-element Vector{String}:
 "julia --startup=no --project=. scripts/julia/rand.jl 64"
 "julia --startup=no --project=. scripts/julia/rand.jl 128"
 "julia --startup=no --project=. scripts/julia/rand.jl 256"
 "julia --startup=no --project=. scripts/julia/rand.jl 512"
 "julia --startup=no --project=. scripts/julia/rand.jl 1024"
 "julia --startup=no --project=. scripts/julia/rand.jl 2048"
 "julia --startup=no --project=. scripts/julia/sum.jl 64"
 "julia --startup=no --project=. scripts/julia/sum.jl 128"
 "julia --startup=no --project=. scripts/julia/sum.jl 256"
 "julia --startup=no --project=. scripts/julia/sum.jl 512"
 "julia --startup=no --project=. scripts/julia/sum.jl 1024"
 "julia --startup=no --project=. scripts/julia/sum.jl 2048"
 "julia --startup=no --project=. scripts/julia/sum.jl 4096"
 "julia --startup=no --project=. scripts/julia/sum.jl 8192"

closes #10

codecov[bot] commented 2 years ago

Codecov Report

Merging #12 (eccecb3) into master (244b4c3) will decrease coverage by 0.72%. The diff coverage is 89.87%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #12      +/-   ##
==========================================
- Coverage   92.02%   91.30%   -0.73%     
==========================================
  Files          10       12       +2     
  Lines         301      368      +67     
==========================================
+ Hits          277      336      +59     
- Misses         24       32       +8     
Impacted Files Coverage Δ
src/dialects/simpletask.jl 80.00% <80.00%> (ø)
src/dialects/looptask.jl 89.65% <89.65%> (ø)
src/dialects/manifest.jl 96.77% <100.00%> (-0.45%) :arrow_down:
src/runners/Runners.jl 71.42% <100.00%> (+21.42%) :arrow_up:
src/runners/juliamodule.jl 100.00% <100.00%> (ø)
src/scheduler.jl 93.61% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 244b4c3...eccecb3. Read the comment docs.