Skip to content

Commit a56f141

Browse files
authored
Merge branch 'development' into fix/readthedocs
2 parents 13d714a + 337e360 commit a56f141

File tree

110 files changed

+965
-115
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+965
-115
lines changed

.github/workflows/ci_test_all.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737

3838
- name: Run test script
3939
run: |
40+
pip install torch==2.8.0 # pinned to avoid issues with latest version taking up too much space...
4041
export NEURON_HOME=$pythonLocation
4142
./test_all.sh
4243

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,9 @@ Thumbs.db #thumbnail cache on Windows
274274
/examples/PyTorch/simple_pytorch_to_mdf.1
275275
/examples/MDF/NLP/TestNLP_3
276276
/examples/MDF/NLP/TestNLP
277+
/examples/MDF/networks/Net_acyclical
278+
/examples/MDF/net/Net_acyclical
279+
/examples/MDF/net/weight.py
277280
/examples/MDF/conditions/composite_example
278281
/examples/NeuroML/arm64
279282
/examples/MDF/RNN/iaf.net
@@ -313,3 +316,4 @@ examples/TensorFlow/Keras/keras_to_MDF
313316
/checkoutpngs.sh
314317
/docs/sphinx/source/api/export_format/MDF/images/newton.png
315318
/docs/sphinx/source/api/export_format/MDF/images/newton_plot.png
319+
/examples/MDF/networks/Net_acyclical

docs/MDF_specification.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,21 @@
106106
"type": "str",
107107
"description": "The unique (for this Node) id of the input port,"
108108
},
109+
"default_value": {
110+
"type": "Union",
111+
"description": "Value to set at this input port if no edge connected to it."
112+
},
109113
"shape": {
110114
"type": "Optional",
111115
"description": "The shape of the input port. This uses the same syntax as numpy ndarray shapes\n(e.g., :code:`numpy.zeros(shape)` would produce an array with the correct shape"
112116
},
113117
"type": {
114118
"type": "Optional",
115119
"description": "The data type of the input received at a port."
120+
},
121+
"reduce": {
122+
"type": "Optional",
123+
"description": "Specifies how to deal with multiple inputs to one port during a single timestep: add: add up all the values; multiply: multiply the values, overwrite: just use the last value supplied (default)"
116124
}
117125
}
118126
},

docs/MDF_specification.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ specification:
9191
id:
9292
type: str
9393
description: The unique (for this Node) id of the input port,
94+
default_value:
95+
type: Union
96+
description: Value to set at this input port if no edge connected
97+
to it.
9498
shape:
9599
type: Optional
96100
description: 'The shape of the input port. This uses the same syntax
@@ -101,6 +105,12 @@ specification:
101105
type:
102106
type: Optional
103107
description: The data type of the input received at a port.
108+
reduce:
109+
type: Optional
110+
description: 'Specifies how to deal with multiple inputs to one port
111+
during a single timestep: add: add up all the values; multiply:
112+
multiply the values, overwrite: just use the last value supplied
113+
(default)'
104114
Function:
105115
definition: A single value which is evaluated as a function of values on :class:`InputPort`(s)
106116
and other Functions

docs/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,13 @@ The <a href="#inputport">InputPort</a> is an attribute of a Node which allows ex
179179
</tr>
180180

181181

182+
<tr>
183+
<td><b>default_value</b></td>
184+
<td>Union</td>
185+
<td><i>Value to set at this input port if no edge connected to it.</i></td>
186+
</tr>
187+
188+
182189
<tr>
183190
<td><b>shape</b></td>
184191
<td>Optional</td>
@@ -194,6 +201,13 @@ The <a href="#inputport">InputPort</a> is an attribute of a Node which allows ex
194201
</tr>
195202

196203

204+
<tr>
205+
<td><b>reduce</b></td>
206+
<td>Optional</td>
207+
<td><i>Specifies how to deal with multiple inputs to one port during a single timestep: add: add up all the values; multiply: multiply the values, overwrite: just use the last value supplied (default)</i></td>
208+
</tr>
209+
210+
197211
</table>
198212

199213
## Function

docs/sphinx/source/api/Specification.rst

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,17 @@ The `InputPort <#inputport>`__ is an attribute of a Node which allows external i
8787

8888
**Allowed parameters**
8989

90-
=============== =========== =============================================================================================
91-
Allowed field Data Type Description
92-
=============== =========== =============================================================================================
93-
**metadata** Optional Optional metadata field, an arbitrary dictionary of string keys and JSON serializable values.
94-
**id** str The unique (for this Node) id of the input port,
95-
**shape** Optional The shape of the input port. This uses the same syntax as numpy ndarray shapes
96-
(e.g., **numpy.zeros(shape)** would produce an array with the correct shape
97-
**type** Optional The data type of the input received at a port.
98-
=============== =========== =============================================================================================
90+
================= =========== =================================================================================================================================================================================================
91+
Allowed field Data Type Description
92+
================= =========== =================================================================================================================================================================================================
93+
**metadata** Optional Optional metadata field, an arbitrary dictionary of string keys and JSON serializable values.
94+
**id** str The unique (for this Node) id of the input port,
95+
**default_value** Union Value to set at this input port if no edge connected to it.
96+
**shape** Optional The shape of the input port. This uses the same syntax as numpy ndarray shapes
97+
(e.g., **numpy.zeros(shape)** would produce an array with the correct shape
98+
**type** Optional The data type of the input received at a port.
99+
**reduce** Optional Specifies how to deal with multiple inputs to one port during a single timestep: add: add up all the values; multiply: multiply the values, overwrite: just use the last value supplied (default)
100+
================= =========== =================================================================================================================================================================================================
99101

100102
========
101103
Function
1 Byte
Loading
1014 Bytes
Loading
1 Byte
Loading
1.01 KB
Loading

0 commit comments

Comments
 (0)