From c5ceed208e5c00ba334a0687a552f5ec5b1f58aa Mon Sep 17 00:00:00 2001 From: yolhan83 Date: Fri, 20 Dec 2024 20:27:11 +0100 Subject: [PATCH] correct parsing of the DF --- .../AutomaticDifferentiationSparse/Manifest.toml | 2 +- .../ManualLoopDissusionSparseAD.jmd | 10 ++++++++++ benchmarks/AutomaticDifferentiationSparse/Project.toml | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/benchmarks/AutomaticDifferentiationSparse/Manifest.toml b/benchmarks/AutomaticDifferentiationSparse/Manifest.toml index fc53bd710..d94aac194 100644 --- a/benchmarks/AutomaticDifferentiationSparse/Manifest.toml +++ b/benchmarks/AutomaticDifferentiationSparse/Manifest.toml @@ -2,7 +2,7 @@ julia_version = "1.10.7" manifest_format = "2.0" -project_hash = "6b7ebd48c2ddf019d078dc63bd6da748e01f3c72" +project_hash = "66c017de4feba5a1b0f262d272a495d3a07cb06d" [[deps.ADTypes]] git-tree-sha1 = "72af59f5b8f09faee36b4ec48e014a79210f2f4f" diff --git a/benchmarks/AutomaticDifferentiationSparse/ManualLoopDissusionSparseAD.jmd b/benchmarks/AutomaticDifferentiationSparse/ManualLoopDissusionSparseAD.jmd index 00e53b4fd..f3ac6db71 100644 --- a/benchmarks/AutomaticDifferentiationSparse/ManualLoopDissusionSparseAD.jmd +++ b/benchmarks/AutomaticDifferentiationSparse/ManualLoopDissusionSparseAD.jmd @@ -10,6 +10,7 @@ using LinearAlgebra using SparseConnectivityTracer: TracerSparsityDetector using SparseMatrixColorings import Enzyme,ForwardDiff,Mooncake +import Markdown, PrettyTables, Printf ``` ## Backends tested @@ -79,4 +80,13 @@ scenarios = [ Scenario{:jacobian,:out}(Diffusion,u,res1=DDiffusion(u))]; ```julia df = benchmark_differentiation(bcks, scenarios) +table = PrettyTables.pretty_table( + String, + df; + backend=Val(:markdown), + header=names(df), + formatters=PrettyTables.ft_printf("%.1e"), +) + +Markdown.parse(table) ``` \ No newline at end of file diff --git a/benchmarks/AutomaticDifferentiationSparse/Project.toml b/benchmarks/AutomaticDifferentiationSparse/Project.toml index 9c2a60fbf..3b2c973b4 100644 --- a/benchmarks/AutomaticDifferentiationSparse/Project.toml +++ b/benchmarks/AutomaticDifferentiationSparse/Project.toml @@ -10,6 +10,7 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" PreallocationTools = "d236fae5-4411-538c-8e31-a6e3d9e00b46" +PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" SparseConnectivityTracer = "9f842d2f-2579-4b1d-911e-f412cf18a3f5" SparseDiffTools = "47a9eef4-7e08-11e9-0b38-333d64bd3804"