Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,19 @@ jobs:
python -m pytest -m coremdf tests/

- name: Install optional dependencies
run: python -m pip install .[all]
run: |
python -m pip install .[all]

- name: Version info for optional installed packages
run: |
pip list

- name: Install graphviz
if: ${{ matrix.runs-on != 'windows-latest' }}
run: |
if [[ ${{ matrix.runs-on }} == *"macos"* ]]; then brew install graphviz ; fi
if [[ ${{ matrix.runs-on }} == *"ubuntu"* ]]; then sudo apt install graphviz ; fi

- name: Test interface ACT-R
if: ${{ matrix.python-version != '3.10' || matrix.runs-on != 'windows-latest' }}
run: |
Expand All @@ -88,8 +95,6 @@ jobs:
- name: Test interface TensorFlow linux/mac
if: ${{ matrix.runs-on != 'windows-latest' }}
run: |
if [[ ${{ matrix.runs-on }} == *"macos"* ]]; then brew install graphviz ; fi
if [[ ${{ matrix.runs-on }} == *"ubuntu"* ]]; then sudo apt install graphviz ; fi
dot -V
python -m pytest -v -m "tensorflow" tests/

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/sphinx/source/api/export_format/MDF/images/abcd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/sphinx/source/api/export_format/MDF/images/abcd_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/sphinx/source/api/export_format/MDF/images/arrays.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/sphinx/source/api/export_format/MDF/images/params_funcs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/sphinx/source/api/export_format/MDF/images/simple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/sphinx/source/api/export_format/MDF/images/simple_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/sphinx/source/api/export_format/MDF/images/states.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/sphinx/source/api/export_format/NeuroML/ABCD.1.mdf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/sphinx/source/api/export_format/NeuroML/ABCD.mdf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/sphinx/source/api/export_format/NeuroML/ABCD.nmllite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/sphinx/source/api/export_format/NeuroML/FN.gv.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/sphinx/source/api/export_format/NeuroML/FNmulti.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/sphinx/source/api/export_format/NeuroML/Izh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/sphinx/source/api/export_format/NeuroML/LEMS_SimABCD.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/sphinx/source/api/export_format/NeuroML/LEMS_SimFN.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/sphinx/source/api/export_format/NeuroML/MDFFNrun.multi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/sphinx/source/api/export_format/ONNX/ab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion docs/sphinx/source/api/export_format/ONNX/simple_ab.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import torch
import onnx
import sys
import os


from modeci_mdf.interfaces.onnx import onnx_to_mdf
Expand Down Expand Up @@ -80,7 +81,9 @@ def main():
view_on_render=False,
level=3,
filename_root="ab",
only_warn_on_fail=True, # Makes sure test of this doesn't fail on Windows on GitHub Actions
only_warn_on_fail=(
os.name == "nt"
), # Makes sure test of this doesn't fail on Windows on GitHub Actions
)
if "-run" in sys.argv:
verbose = True
Expand Down
5 changes: 4 additions & 1 deletion docs/sphinx/source/api/export_format/ONNX/simple_abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"""
import torch
import onnx
import os


from modeci_mdf.interfaces.onnx import onnx_to_mdf
Expand Down Expand Up @@ -82,7 +83,9 @@ def main():
view_on_render=False,
level=3,
filename_root="abc",
only_warn_on_fail=True, # Makes sure test of this doesn't fail on Windows on GitHub Actions
only_warn_on_fail=(
os.name == "nt"
), # Makes sure test of this doesn't fail on Windows on GitHub Actions
)


Expand Down
Binary file modified docs/sphinx/source/api/export_format/PyTorch/inception.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/sphinx/source/api/export_format/PyTorch/mlp_pure_mdf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion examples/MDF/Arrays.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@
},
"middle_node": {
"input_ports": {
"input_port1": {}
"input_port1": {
"shape": [
2,
2
]
}
},
"parameters": {
"slope": {
Expand Down
5 changes: 4 additions & 1 deletion examples/MDF/Arrays.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ Arrays:
value: input_level
middle_node:
input_ports:
input_port1: {}
input_port1:
shape:
- 2
- 2
parameters:
slope:
value: 0.5
Expand Down
219 changes: 63 additions & 156 deletions examples/MDF/RNN/IAF_net.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
}
},
"output_ports": {
"out_port": {
"current_output": {
"value": "level"
}
}
Expand All @@ -57,17 +57,9 @@
"shape": [
8
]
},
"spike_input": {
"shape": [
8
]
}
},
"parameters": {
"syn_tau": {
"value": 10
},
"v0": {
"value": [
-54.67038134416407,
Expand Down Expand Up @@ -107,108 +99,6 @@
-20
]
},
"spike_weights": {
"value": [
[
1.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
1.0
]
]
},
"weighted_spike": {
"function": "MatMul",
"args": {
"A": "spike_weights",
"B": "spike_input"
}
},
"syn_i": {
"default_initial_value": "0",
"time_derivative": "-1 * syn_i",
"conditions": [
{
"id": "spike_detected",
"test": "spike_input > 0",
"value": "weighted_spike"
}
]
},
"spiking": {
"default_initial_value": "0",
"conditions": [
Expand All @@ -226,7 +116,7 @@
},
"v": {
"default_initial_value": "v0",
"time_derivative": "-1 * (v-erev)/tau + syn_i + current_input",
"time_derivative": "-1 * (v-erev)/tau + current_input",
"conditions": [
{
"id": "reset",
Expand All @@ -237,10 +127,10 @@
}
},
"output_ports": {
"out_port_v": {
"v_output": {
"value": "v"
},
"out_port_spiking": {
"spiking_output": {
"value": "spiking"
}
}
Expand All @@ -251,17 +141,9 @@
"shape": [
8
]
},
"spike_input": {
"shape": [
8
]
}
},
"parameters": {
"syn_tau": {
"value": 10
},
"v0": {
"value": [
-54.67038134416407,
Expand Down Expand Up @@ -301,6 +183,54 @@
-20
]
},
"spiking": {
"default_initial_value": "0",
"conditions": [
{
"id": "is_spiking",
"test": "v >= thresh",
"value": "1"
},
{
"id": "not_spiking",
"test": "v < thresh",
"value": "0"
}
]
},
"v": {
"default_initial_value": "v0",
"time_derivative": "-1 * (v-erev)/tau + current_input",
"conditions": [
{
"id": "reset",
"test": "v > thresh",
"value": "erev"
}
]
}
},
"output_ports": {
"v_output": {
"value": "v"
},
"spiking_output": {
"value": "spiking"
}
}
},
"syn_post": {
"input_ports": {
"spike_input": {
"shape": [
8
]
}
},
"parameters": {
"syn_tau": {
"value": 10
},
"spike_weights": {
"value": [
[
Expand Down Expand Up @@ -402,40 +332,11 @@
"value": "weighted_spike"
}
]
},
"spiking": {
"default_initial_value": "0",
"conditions": [
{
"id": "is_spiking",
"test": "v >= thresh",
"value": "1"
},
{
"id": "not_spiking",
"test": "v < thresh",
"value": "0"
}
]
},
"v": {
"default_initial_value": "v0",
"time_derivative": "-1 * (v-erev)/tau + syn_i + current_input",
"conditions": [
{
"id": "reset",
"test": "v > thresh",
"value": "erev"
}
]
}
},
"output_ports": {
"out_port_v": {
"value": "v"
},
"out_port_spiking": {
"value": "spiking"
"current_output": {
"value": "syn_i"
}
}
}
Expand All @@ -444,13 +345,19 @@
"input_edge": {
"sender": "current_input_node",
"receiver": "pre",
"sender_port": "out_port",
"sender_port": "current_output",
"receiver_port": "current_input"
},
"post_internal_edge": {
"sender": "syn_post",
"receiver": "post",
"sender_port": "current_output",
"receiver_port": "current_input"
},
"syn_edge": {
"sender": "pre",
"receiver": "post",
"sender_port": "out_port_spiking",
"receiver": "syn_post",
"sender_port": "spiking_output",
"receiver_port": "spike_input"
}
}
Expand Down
Loading