Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create benchmark suite infrastructure #341

Closed
wants to merge 17 commits into from
Closed

Conversation

MasonProtter
Copy link
Contributor

@MasonProtter MasonProtter commented Feb 21, 2024

Here's a set of benchmarks to track the performance of Neuroblox.

Here's the current README: https://github.com/Neuroblox/Neuroblox.jl/blob/benchmarks2/benchmarks/README.md

Here's an example of the sort of information saved:

julia> CSV.read("/shared/home/mason/Neuroblox/benchmarks/benchmark_history/benchmarks-2024-02-24T11:23:43.585.csv"
       , DataFrame)
13×12 DataFrame
 Row │ benchmark_name                     initial_runtime_ns  initial_compiletime_percent  warmed_up_minimum_runtime_ns  warmed_up_median_runtime_ns  initial_alloced_bytes  initial_gc_time_ns  initial_gc_alloc_count  warmed_up_allocated_bytes  warmed_up_median_gc_time_ns  warmed_up_gc_alloc_count  metadata                          
     │ String                             Float64             Float64                      Float64                       Float64                      Int64                  Float64             Int64                   Int64                      Float64                      Int64                     String?                           
─────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1 │ Load NeuroBlox                             2.36892e10                     0.960542                49708.4                      57840.4                     708067611          8.46162e8                  9865576                      14712                   0.0                              146  ------------------------------\n
   2 │ Create LinearNeuralMass                    1.34193e9                     99.7073                      1.36455e5                    1.4105e5                121010280          1.38614e8                  1767459                      33800                   0.0                              602  missing                           
   3 │ Harmonic Oscillator system creat          7.62728e9                     99.718                       3.26451e6                    3.34768e6               629220056          2.80532e8                  9020746                     773248                   0.0                            14025  missing                           
   4 │ Harmonic Oscillator structural s          6.32824e9                     99.6354                      4.51523e6                    4.67116e6               484370976          1.91972e8                  6930668                    1468456                   0.0                            23131  missing                           
   5 │ Harmonic Oscillator solve                  4.42676e9                     97.3199                      1.01578e8                    1.10576e8               380593208          1.03119e8                  5166826                   36117328                   8.40458e6                     261615  missing                           
   6 │ Jansen-Ritt system creation                8.62957e9                     99.4628                      2.26081e7                    2.41862e7               751370136          6.14412e8                 10806664                    4996656                   0.0                            91539  missing                           
   7 │ Jansen-Ritt structural simplify            6.53404e9                     99.4787                      1.306e7                      1.46482e7               501144352          1.72192e8                  7186954                    4948888                   0.0                            69411  missing                           
   8 │ Jansen-Ritt solve                          4.49475e9                     73.9051                      1.19206e9                    1.28251e9              1706325792          2.47025e8                 14100853                 1500799168                   2.49304e8                   11151973  missing                           
   940 randomly connected neurons sy          1.54386e10                    88.2222                      1.63092e9                    1.68807e9              1205756944          8.05259e8                 18341269                  375690560                   7.84903e7                    6479060  missing                           
  1040 randomly connected neurons st          1.07636e10                    60.5127                      3.92826e9                    4.02245e9              3363512680          4.86393e8                 31750486                 2874459600                   2.34693e8                   24756368  missing                           
  1140 randomly connected neurons so          2.07644e10                    99.8601                      2.81747e7                    2.95261e7               511097716          1.3265e8                   9185143                    5267248                   0.0                             8397  missing                           
  12 │ RF_learning_simple agent and env          3.93546e11                    10.6158                      3.54725e11                   3.54725e11           389967141616          3.00774e10              2102480891               390868456628                   3.11829e10                2071661808  missing                           
  13 │ RF_learning_simple run_experimen          1.46358e12                    18.4431                      1.1812e12                    1.19014e12           438096672434          8.14319e11               258818535               426681803520                   8.2785e11                   61756677  missing                           

We'll want to write more benchmarks, and they can simply be added by putting them into neuroblox_benchmark_suite with the BenchSetup object. That might look like e.g.

BenchSetup(
    name="Harmonic Oscillator solve",
    setup=quote
        using Neuroblox, DifferentialEquations, Graphs, MetaGraphs

        @named osc1 = HarmonicOscillator()
        @named osc2 = HarmonicOscillator()

        params = @parameters k=1.0
        adj = [0 k; k 0]
        
        g = MetaDiGraph()
        add_blox!.(Ref(g), [osc1, osc2])
        create_adjacency_edges!(g, adj)
        @named sys = system_from_graph(g, Num[])

        final_sys = structural_simplify(sys)

        sim_dur = 20_000.0 # 20 seconds
        prob = ODEProblem(final_sys, [], (0.0, sim_dur),[])
    end,
    args = [:prob],
    bench = :(sol = solve(prob, AutoVern7(Rodas4()), saveat=0.1)),
    seconds = 50
)

which will benchmark solve(prob, AutoVern7(Rodas4()), saveat=0.1) in a fresh session where the above setup code is run, and prob is taken as a function argument. The seconds parameter lets you allow the benchmark to run for around 50 seconds (or less if it collects enough samples / evaluations).

@hstrey
Copy link
Member

hstrey commented Feb 22, 2024

I am not sure what I did wrong, but when I tried your script, I got the following message. I ran everything inside the benchmarks folder, activate, initiate and then executed the script.
run_and_save_benchmarks() [ Info: Running benchmark "Load NeuroBlox" From worker 3: Important Note: Neuroblox is a commercial product of Neuroblox, Inc. From worker 3: It is free to use for non-commercial academic teaching From worker 3: and research purposes. For commercial users, license fees apply. From worker 3: Please refer to the End User License Agreement From worker 3: (https://github.com/Neuroblox/NeurobloxEULA) for details. From worker 3: Please contact sales@neuroblox.org for purchasing information. From worker 3: From worker 3: To report any bugs, issues, or feature requests for Neuroblox software, From worker 3: please use the public Github repository NeurobloxIssues, located at From worker 3: https://github.com/Neuroblox/NeurobloxIssues. From worker 3: ┌ Info: TTFX result for Load NeuroBlox: From worker 3: └ ttfx = TimeData(name="Load NeuroBlox", 6.585362 seconds (10.94 M allocations: 728.305 MiB, 4.45% gc time, 1.73% compilation time: 10% of which was recompilation)) From worker 3: ┌ Info: runtime benchmark result for Load NeuroBlox: From worker 3: │ runtime_bench = From worker 3: │ BenchmarkTools.Trial: 100 samples with 5 evaluations. From worker 3: │ Range (min … max): 37.933 μs … 69.333 μs ┊ GC (min … max): 0.00% … 0.00% From worker 3: │ Time (median): 39.317 μs ┊ GC (median): 0.00% From worker 3: │ Time (mean ± σ): 40.404 μs ± 3.881 μs ┊ GC (mean ± σ): 0.00% ± 0.00% From worker 3: │ From worker 3: │ █▃▃█▅█▂▃ From worker 3: │ ████████▃█▃▅▆▃▆▃▆▁▁▃▁▁▁▃▁▁▁▅▁▁▅▁▁▁▁▃▁▁▁▁▁▃▁▁▃▁▁▁▁▁▁▁▁▁▁▁▁▁▃ ▃ From worker 3: │ 37.9 μs Histogram: frequency by time 52.9 μs < From worker 3: │ From worker 3: └ Memory estimate: 15.69 KiB, allocs estimate: 169. ERROR: KeyError: key BenchmarkTools [6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf] not found Stacktrace: [1] getindex @ ./dict.jl:498 [inlined] [2] macro expansion @ ./lock.jl:267 [inlined] [3] root_module(key::Base.PkgId) @ Base ./loading.jl:1878 [4] deserialize_module(s::Distributed.ClusterSerializer{Sockets.TCPSocket}) @ Serialization ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Serialization/src/Serialization.jl:994 [5] handle_deserialize(s::Distributed.ClusterSerializer{Sockets.TCPSocket}, b::Int32) @ Serialization ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Serialization/src/Serialization.jl:896 [6] deserialize(s::Distributed.ClusterSerializer{Sockets.TCPSocket}) @ Serialization ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Serialization/src/Serialization.jl:814 [7] deserialize_datatype(s::Distributed.ClusterSerializer{Sockets.TCPSocket}, full::Bool) @ Serialization ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Serialization/src/Serialization.jl:1398 [8] handle_deserialize(s::Distributed.ClusterSerializer{Sockets.TCPSocket}, b::Int32) @ Serialization ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Serialization/src/Serialization.jl:867 [9] deserialize(s::Distributed.ClusterSerializer{Sockets.TCPSocket}) @ Serialization ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Serialization/src/Serialization.jl:814 [10] deserialize_datatype(s::Distributed.ClusterSerializer{Sockets.TCPSocket}, full::Bool) @ Serialization ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Serialization/src/Serialization.jl:1414 [11] handle_deserialize(s::Distributed.ClusterSerializer{Sockets.TCPSocket}, b::Int32) @ Serialization ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Serialization/src/Serialization.jl:867 [12] deserialize(s::Distributed.ClusterSerializer{Sockets.TCPSocket}) @ Serialization ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Serialization/src/Serialization.jl:814 [13] deserialize_datatype(s::Distributed.ClusterSerializer{Sockets.TCPSocket}, full::Bool) @ Serialization ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Serialization/src/Serialization.jl:1423 [14] handle_deserialize(s::Distributed.ClusterSerializer{Sockets.TCPSocket}, b::Int32) @ Serialization ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Serialization/src/Serialization.jl:867 [15] deserialize(s::Distributed.ClusterSerializer{Sockets.TCPSocket}) @ Serialization ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Serialization/src/Serialization.jl:814 [16] handle_deserialize(s::Distributed.ClusterSerializer{Sockets.TCPSocket}, b::Int32) @ Serialization ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Serialization/src/Serialization.jl:874 [17] deserialize @ ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Serialization/src/Serialization.jl:814 [inlined] [18] deserialize_msg(s::Distributed.ClusterSerializer{Sockets.TCPSocket}) @ Distributed ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Distributed/src/messages.jl:87 [19] #invokelatest#2 @ ./essentials.jl:892 [inlined] [20] invokelatest @ ./essentials.jl:889 [inlined] [21] message_handler_loop(r_stream::Sockets.TCPSocket, w_stream::Sockets.TCPSocket, incoming::Bool) @ Distributed ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Distributed/src/process_messages.jl:176 [22] process_tcp_streams(r_stream::Sockets.TCPSocket, w_stream::Sockets.TCPSocket, incoming::Bool) @ Distributed ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Distributed/src/process_messages.jl:133 [23] (::Distributed.var"#103#104"{Sockets.TCPSocket, Sockets.TCPSocket, Bool})() @ Distributed ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Distributed/src/process_messages.jl:121 Stacktrace: [1] remotecall_fetch(f::Function, w::Distributed.Worker, args::Distributed.RRID; kwargs::@Kwargs{}) @ Distributed ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Distributed/src/remotecall.jl:465 [2] remotecall_fetch(f::Function, w::Distributed.Worker, args::Distributed.RRID) @ Distributed ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Distributed/src/remotecall.jl:454 [3] remotecall_fetch @ ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Distributed/src/remotecall.jl:492 [inlined] [4] call_on_owner @ ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Distributed/src/remotecall.jl:565 [inlined] [5] fetch(r::Future) @ Distributed ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Distributed/src/remotecall.jl:619 [6] runbench(::BenchSetup) @ Main ~/Documents/programming/Neuroblox.jl/benchmarks/utils.jl:124 [7] _broadcast_getindex_evalf @ ./broadcast.jl:709 [inlined] [8] _broadcast_getindex @ ./broadcast.jl:682 [inlined] [9] getindex @ ./broadcast.jl:636 [inlined] [10] copy @ ./broadcast.jl:942 [inlined] [11] materialize @ ./broadcast.jl:903 [inlined] [12] run_and_save_benchmarks(benches::Vector{BenchSetup}, filename::String) @ Main ~/Documents/programming/Neuroblox.jl/benchmarks/benchmarks.jl:16 [13] top-level scope @ REPL[6]:1

@MasonProtter
Copy link
Contributor Author

Hi @helmutstrey, sorry about that, it was a silly error because the benchmarks.jl script wasn't explicitly loading BenchmarkTools.jl, should be fixed now.

@hstrey
Copy link
Member

hstrey commented Feb 23, 2024

Hi @helmutstrey, sorry about that, it was a silly error because the benchmarks.jl script wasn't explicitly loading BenchmarkTools.jl, should be fixed now.

Thanks. I ran it again. Most of the benches are running, but towards the end it gives this error:
[ Info: Running benchmark "RF_learning_simple neuron agent/environment creation" From worker 12: Important Note: Neuroblox is a commercial product of Neuroblox, Inc. From worker 12: It is free to use for non-commercial academic teaching From worker 12: and research purposes. For commercial users, license fees apply. From worker 12: Please refer to the End User License Agreement From worker 12: (https://github.com/Neuroblox/NeurobloxEULA) for details. From worker 12: Please contact sales@neuroblox.org for purchasing information. From worker 12: From worker 12: To report any bugs, issues, or feature requests for Neuroblox software, From worker 12: please use the public Github repository NeurobloxIssues, located at From worker 12: https://github.com/Neuroblox/NeurobloxIssues. From worker 12: ┌ Info: TTFX result for RF_learning_simple neuron agent/environment creation: From worker 12: └ ttfx = TimeData(name="RF_learning_simple neuron agent/environment creation",889.901766 seconds (2.10 G allocations: 368.282 GiB, 81.87% gc time, 2.31% compilation time: 5% of which was recompilation)) From worker 12: ┌ Info: runtime benchmark result for RF_learning_simple neuron agent/environment creation: From worker 12: │ runtime_bench = From worker 12: │ BenchmarkTools.Trial: 2 samples with 5 evaluations. From worker 12: │ Range (min … max): 172.169 s … 573.255 s ┊ GC (min … max): 14.00% … 45.34% From worker 12: │ Time (median): 372.712 s ┊ GC (median): 38.10% From worker 12: │ Time (mean ± σ): 372.712 s ± 283.611 s ┊ GC (mean ± σ): 38.10% ± 22.16% From worker 12: │ From worker 12: │ █ █ From worker 12: │ █▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█ ▁ From worker 12: │ 172 s Histogram: frequency by time 573 s < From worker 12: │ From worker 12: └ Memory estimate: 366.87 GiB, allocs estimate: 2069659788. [ Info: Running benchmark "RF_learning_simple run_experiment (single trial)" From worker 13: Important Note: Neuroblox is a commercial product of Neuroblox, Inc. From worker 13: It is free to use for non-commercial academic teaching From worker 13: and research purposes. For commercial users, license fees apply. From worker 13: Please refer to the End User License Agreement From worker 13: (https://github.com/Neuroblox/NeurobloxEULA) for details. From worker 13: Please contact sales@neuroblox.org for purchasing information. From worker 13: From worker 13: To report any bugs, issues, or feature requests for Neuroblox software, From worker 13: please use the public Github repository NeurobloxIssues, located at From worker 13: https://github.com/Neuroblox/NeurobloxIssues. ERROR: On worker 13: UndefVarError: reset!not defined Stacktrace: [1] macro expansion @ ~/Documents/programming/Neuroblox.jl/benchmarks/benchmarks.jl:115 [inlined] [2] top-level scope @ ~/Documents/programming/Neuroblox.jl/benchmarks/utils.jl:109 [3] eval @ ./boot.jl:385 [inlined] [4] #4 @ ~/Documents/programming/Neuroblox.jl/benchmarks/utils.jl:108 [5] #invokelatest#2 @ ./essentials.jl:892 [inlined] [6] invokelatest @ ./essentials.jl:889 [7] #107 @ ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Distributed/src/process_messages.jl:282 [8] run_work_thunk @ ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Distributed/src/process_messages.jl:70 [9] run_work_thunk @ ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Distributed/src/process_messages.jl:79 [10] #100 @ ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Distributed/src/process_messages.jl:88 Stacktrace: [1] remotecall_fetch(f::Function, w::Distributed.Worker, args::Distributed.RRID; kwargs::@Kwargs{}) @ Distributed ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Distributed/src/remotecall.jl:465 [2] remotecall_fetch(f::Function, w::Distributed.Worker, args::Distributed.RRID) @ Distributed ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Distributed/src/remotecall.jl:454 [3] remotecall_fetch @ ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Distributed/src/remotecall.jl:492 [inlined] [4] call_on_owner @ ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Distributed/src/remotecall.jl:565 [inlined] [5] fetch(r::Future) @ Distributed ~/.julia/juliaup/julia-1.10.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Distributed/src/remotecall.jl:619 [6] runbench(::BenchSetup) @ Main ~/Documents/programming/Neuroblox.jl/benchmarks/utils.jl:124 [7] _broadcast_getindex_evalf @ ./broadcast.jl:709 [inlined] [8] _broadcast_getindex @ ./broadcast.jl:682 [inlined] [9] getindex @ ./broadcast.jl:636 [inlined] [10] copyto_nonleaf!(dest::Vector{…}, bc::Base.Broadcast.Broadcasted{…}, iter::Base.OneTo{…}, state::Int64, count::Int64) @ Base.Broadcast ./broadcast.jl:1098 [11] copy @ ./broadcast.jl:950 [inlined] [12] materialize @ ./broadcast.jl:903 [inlined] [13] run_and_save_benchmarks(benches::Vector{BenchSetup}, filename::String) @ Main ~/Documents/programming/Neuroblox.jl/benchmarks/benchmarks.jl:17 [14] top-level scope @ REPL[4]:1 Some type information was truncated. Useshow(err)` to see complete types.

julia>
`

@MasonProtter
Copy link
Contributor Author

Hmm that's strange, it seems to be complaining about reset! not being defined, but this PR has the change that added reset! in its git history...

Let me see if I can figure out what's up.

@hstrey
Copy link
Member

hstrey commented Feb 23, 2024

Hmm that's strange, it seems to be complaining about reset! not being defined, but this PR has the change that added reset! in its git history...

Let me see if I can figure out what's up.

I just checked. When you
`julia> using Neuroblox
Important Note: Neuroblox is a commercial product of Neuroblox, Inc.
It is free to use for non-commercial academic teaching
and research purposes. For commercial users, license fees apply.
Please refer to the End User License Agreement
(https://github.com/Neuroblox/NeurobloxEULA) for details.
Please contact sales@neuroblox.org for purchasing information.

To report any bugs, issues, or feature requests for Neuroblox software,
please use the public Github repository NeurobloxIssues, located at
https://github.com/Neuroblox/NeurobloxIssues.

julia> reset!
ERROR: UndefVarError: reset! not defined

julia> reset!()
ERROR: UndefVarError: reset! not defined
Stacktrace:
[1] top-level scope
@ REPL[7]:1

julia> Neuroblox.reset!
reset! (generic function with 5 methods)

julia> methods(Neuroblox.reset!)

5 methods for generic function "reset!" from DSP.Filters:

[1] reset!(self::DSP.Filters.FIRFilter)
@ ~/.julia/packages/DSP/H0J1V/src/Filters/stream_filt.jl:270
[2] reset!(kernel::DSP.Filters.FIRArbitrary)
@ ~/.julia/packages/DSP/H0J1V/src/Filters/stream_filt.jl:260
[3] reset!(kernel::DSP.Filters.FIRDecimator)
@ ~/.julia/packages/DSP/H0J1V/src/Filters/stream_filt.jl:255
[4] reset!(kernel::DSP.Filters.FIRRational)
@ ~/.julia/packages/DSP/H0J1V/src/Filters/stream_filt.jl:249
[5] reset!(kernel::DSP.Filters.FIRKernel)
@ ~/.julia/packages/DSP/H0J1V/src/Filters/stream_filt.jl:245
`
this is weird since it is used in the test, and Neuroblox exports reset!. But there seems to be a name conflict with DSP.

@MasonProtter
Copy link
Contributor Author

MasonProtter commented Feb 23, 2024

Okay that's very weird and not what I see:

julia> using Neuroblox
Important Note: Neuroblox is a commercial product of Neuroblox, Inc.
It is free to use for non-commercial academic teaching
and research purposes. For commercial users, license fees apply.
Please refer to the End User License Agreement
(https://github.com/Neuroblox/NeurobloxEULA) for details.
Please contact sales@neuroblox.org for purchasing information.

To report any bugs, issues, or feature requests for Neuroblox software,
please use the public Github repository NeurobloxIssues, located at
https://github.com/Neuroblox/NeurobloxIssues.

julia> reset!
reset! (generic function with 2 methods)

julia> methods(Neuroblox.reset!)
# 2 methods for generic function "reset!" from Neuroblox:
 [1] reset!(ag::Agent)
     @ ~/Dropbox/neuroblox/Neuroblox/src/blox/reinforcement_learning.jl:203
 [2] reset!(env::Neuroblox.AbstractEnvironment)
     @ ~/Dropbox/neuroblox/Neuroblox/src/blox/reinforcement_learning.jl:126

Do you see the same behaviour if you checkout the master branch of Neuroblox?


By the way, when posting code in here, it'll work better if you wrap it in triple backticks, e.g. the above snippet was written as

```julia
julia> using Neuroblox
Important Note: Neuroblox is a commercial product of Neuroblox, Inc.
It is free to use for non-commercial academic teaching
and research purposes. For commercial users, license fees apply.
Please refer to the End User License Agreement
(https://github.com/Neuroblox/NeurobloxEULA) for details.
Please contact sales@neuroblox.org for purchasing information.

To report any bugs, issues, or feature requests for Neuroblox software,
please use the public Github repository NeurobloxIssues, located at
https://github.com/Neuroblox/NeurobloxIssues.

julia> reset!
reset! (generic function with 2 methods)

julia> methods(Neuroblox.reset!)
# 2 methods for generic function "reset!" from Neuroblox:
 [1] reset!(ag::Agent)
     @ ~/Dropbox/neuroblox/Neuroblox/src/blox/reinforcement_learning.jl:203
 [2] reset!(env::Neuroblox.AbstractEnvironment)
     @ ~/Dropbox/neuroblox/Neuroblox/src/blox/reinforcement_learning.jl:126
```

@hstrey
Copy link
Member

hstrey commented Feb 23, 2024

could it be that I have the wrong Neuroblox version installed:

Status `~/Documents/programming/Neuroblox.jl/benchmarks/Project.toml`
  [6e4b80f9] BenchmarkTools v1.4.0
  [336ed68f] CSV v0.10.12
  [a93c6f00] DataFrames v1.6.1
⌃ [0c46a032] DifferentialEquations v7.11.0
  [31c24e10] Distributions v0.25.107
  [5789e2e9] FileIO v1.16.2
  [86223c79] Graphs v1.9.0
  [033835bb] JLD2 v0.4.46
  [1914dd2f] MacroTools v0.5.13
  [626554b9] MetaGraphs v0.7.2
  [769b91e5] Neuroblox v0.3.0
  [c46f51b8] ProfileView v1.7.2
  [37e2e46d] LinearAlgebra
  [9abbd945] Profile
  [9a3f8284] Random
  [10745b16] Statistics v1.10.0
Info Packages marked with ⌃ have new versions available and may be upgradable.

@MasonProtter
Copy link
Contributor Author

Oh crap, yeah I see the problem. The issue is that it's taking the registered Neuroblox, not the one from the enclosing folder. I forgot that when I had initially set this up, I did ]dev .. to force the benchmarks environment to use the enclosing Neurblox.

We really need JuliaLang/Pkg.jl#3783, but in the meantime I'll have to git commit the manifest here.

@hstrey
Copy link
Member

hstrey commented Feb 25, 2024

@MasonProtter The benchmarks are now working on my end. I will add my M2 Mac Pro run to the benchmark history folder. One thing that I noticed is that in the 80 randomly connected neurons solve, there are lots of warnings: Instability detected. This example is also very unrealistic since these neural mass blox, are not really neurons. @anandpathak31 could you provide a nicer example. I would say that simulating a Cortical blox of significant size would do here.

@MasonProtter
Copy link
Contributor Author

Great! I've just done some overhauls and changed a few things (including making that example smaller due to the warnings), and also include metadata about the random seed, the git commit of neuroblox, and the full system information about the computer running the benchmarks.

I'm starting to think though, maybe this should be a separate package in the Neuroblox org instead of just some sub-directory in here?

@harisorgn
Copy link
Member

I'm starting to think though, maybe this should be a separate package in the Neuroblox org instead of just some sub-directory in here?

Agreed. We will keep adding more benchmarks over time dependent on papers and/or communications with developers from other packages with similar functionalities. It would be good housekeeping to split benchmarks into their own repo.

@hstrey
Copy link
Member

hstrey commented Feb 26, 2024

I'm starting to think though, maybe this should be a separate package in the Neuroblox org instead of just some sub-directory in here?

Agreed. We will keep adding more benchmarks over time dependent on papers and/or communications with developers from other packages with similar functionalities. It would be good housekeeping to split benchmarks into their own repo.

Good idea. Yes, let's make this a separate repository in Neuroblox.

@MasonProtter MasonProtter deleted the benchmarks2 branch October 9, 2024 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants