diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml
index 404cbaec..5bfec32e 100644
--- a/.github/workflows/python-package-conda.yml
+++ b/.github/workflows/python-package-conda.yml
@@ -10,25 +10,19 @@ jobs:
steps:
- uses: actions/checkout@v4
- - name: Set up Python 3.10
- uses: actions/setup-python@v3
+
+ - name: Install Miniconda
+ uses: conda-incubator/setup-miniconda@v2
with:
- python-version: '3.10'
- - name: Add conda to system path
+ auto-update-conda: true
+ python-version: 3.11
+ environment-name: test
+
+ - name: Install dependencies
run: |
- # $CONDA is an environment variable pointing to the root of the miniconda directory
- echo $CONDA/bin >> $GITHUB_PATH
- - name: Install current library and dependencies
- run: |
- pip install -e .
- # - name: Lint with flake8
- # run: |
- # conda install flake8
- # # stop the build if there are Python syntax errors or undefined names
- # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- # # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
- # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- - name: Test with pytest
+ conda install -n test numpy=1.26 pytest pip
+ conda run -n test pip install -e .
+
+ - name: Run tests
run: |
- conda install pytest
- pytest
+ conda run -n test pytest
diff --git a/README.md b/README.md
index 7355b0bb..26d37e56 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,7 @@ ngc-learn requires:
1) Python (>=3.10)
2) NumPy (>=1.22.0)
3) SciPy (>=1.7.0)
-4) ngcsimlib (>=1.0.0), (visit official page here)
+4) ngcsimlib (>=1.0.1), (visit official page here)
5) JAX (>=0.4.28) (to enable GPU use, make sure to install one of the CUDA variants)
---
-ngc-learn 2.0.0 and later require Python 3.10 or newer as well as ngcsimlib >=1.0.0.
+ngc-learn 2.0.3 and later require Python 3.10 or newer as well as ngcsimlib >=1.0.1.
ngc-learn's plotting capabilities (routines within `ngclearn.utils.viz`) require
Matplotlib (>=3.8.0) and imageio (>=2.31.5) and both plotting and density estimation
tools (routines within ``ngclearn.utils.density``) will require Scikit-learn (>=0.24.2).
@@ -75,7 +75,7 @@ Python 3.11.4 (main, MONTH DAY YEAR, TIME) [GCC XX.X.X] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ngclearn
>>> ngclearn.__version__
-'2.0.0'
+'2.0.3'
```
Note: For access to the previous Tensorflow-2 version of ngc-learn (of
@@ -122,7 +122,7 @@ $ python install -e .
**Version:**
-2.0.2
+2.0.3
Author:
Alexander G. Ororbia II
diff --git a/docs/installation.md b/docs/installation.md
index 03bbe8a2..64bcc5c1 100644
--- a/docs/installation.md
+++ b/docs/installation.md
@@ -9,7 +9,7 @@ requires that you ensure that you have installed the following base dependencies
your system. Note that this library was developed and tested on Ubuntu 22.04 (and earlier versions on 18.04/20.04).
Specifically, ngc-learn requires:
* Python (>=3.10)
-* ngcsimlib (>=1.0.0), (official page)
+* ngcsimlib (>=1.0.1), (official page)
* NumPy (>=1.22.0)
* SciPy (>=1.7.0)
* JAX (>= 0.4.28; and jaxlib>=0.4.28)
@@ -78,7 +78,7 @@ Python 3.11.4 (main, MONTH DAY YEAR, TIME) [GCC XX.X.X] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ngclearn
>>> ngclearn.__version__
-'2.0.2'
+'2.0.3'
```
Note: If you do not have a JSON configuration file in place (see tutorials
diff --git a/docs/requirements.txt b/docs/requirements.txt
index 8fb2158c..0ebb3dc3 100644
--- a/docs/requirements.txt
+++ b/docs/requirements.txt
@@ -8,4 +8,4 @@ matplotlib>=3.8.0
jax>=0.4.28
jaxlib>=0.4.28
imageio>=2.31.5
-ngcsimlib>=1.0.0
+ngcsimlib>=1.0.1
diff --git a/docs/tutorials/neurocog/hodgkin_huxley_cell.md b/docs/tutorials/neurocog/hodgkin_huxley_cell.md
index 44e3b0a7..d47f23bf 100755
--- a/docs/tutorials/neurocog/hodgkin_huxley_cell.md
+++ b/docs/tutorials/neurocog/hodgkin_huxley_cell.md
@@ -82,7 +82,7 @@ neurons and muscle cells. It is a continuous-time dynamical system.
Formally, the core dynamics of the H-H cell can be written out as follows:
$$
-\tau_v \frac{\partial \mathbf{v}_t}{\partial t} &= \mathbf{j}_t - g_Na * \mathbf{m}^3_t * \mathbf{h}_t * (\mathbf{v}_t - v_Na) - g_K * \mathbf{n}^4_t * (\mathbf{v}_t - v_K) - g_L * (\mathbf{v}_t - v_L) \\
+\tau_v \frac{\partial \mathbf{v}_t}{\partial t} &= \mathbf{j}_t - g_{Na} * \mathbf{m}^3_t * \mathbf{h}_t * (\mathbf{v}_t - v_{Na}) - g_K * \mathbf{n}^4_t * (\mathbf{v}_t - v_K) - g_L * (\mathbf{v}_t - v_L) \\
\frac{\partial \mathbf{n}_t}{\partial t} &= \alpha_n(\mathbf{v}_t) * (1 - \mathbf{n}_t) - \beta_n(\mathbf{v}_t) * \mathbf{n}_t \\
\frac{\partial \mathbf{m}_t}{\partial t} &= \alpha_m(\mathbf{v}_t) * (1 - \mathbf{m}_t) - \beta_m(\mathbf{v}_t) * \mathbf{m}_t \\
\frac{\partial \mathbf{h}_t}{\partial t} &= \alpha_h(\mathbf{v}_t) * (1 - \mathbf{h}_t) - \beta_h(\mathbf{v}_t) * \mathbf{h}_t
diff --git a/history.txt b/history.txt
index 108b82d6..4ee30278 100644
--- a/history.txt
+++ b/history.txt
@@ -80,3 +80,8 @@ History
* integration of reinforce-synapse, block/partitioned synapse component ("patched-synapse")
* basic unit-tests (pytest framework) integrated to support dev
* includes support for Intel's lava-nc emulator (several spiking/stdp components that play with ngc-lava)
+
+2.0.3
+— — — — — — — — -
+ * Minor patch to point / depend on minor-patched ngcsimlib 1.0.1 (nudge to minor patched release)
+ * Added wrapper `inverse_sigmoid` for original `inverse_logistic` routine in model_utils (for convenience)
diff --git a/ngclearn/utils/model_utils.py b/ngclearn/utils/model_utils.py
index a7b9f141..facad87e 100755
--- a/ngclearn/utils/model_utils.py
+++ b/ngclearn/utils/model_utils.py
@@ -508,10 +508,13 @@ def d_sigmoid(x):
sigm_x = nn.sigmoid(x) ## pre-compute once
return sigm_x * (1. - sigm_x)
+def inverse_sigmoid(x, clip_bound=0.03): ## wrapper call for naming convention ease
+ return inverse_logistic(x, clip_bound=clip_bound)
+
@jit
-def inverse_logistic(x, clip_bound=0.03): # 0.03
+def inverse_logistic(x, clip_bound=0.03):
"""
- The inverse logistic link - logit function.
+ The inverse logistic link - the logit function.
Args:
x: data to transform via inverse logistic function
diff --git a/pyproject.toml b/pyproject.toml
index 012f7e41..71681a99 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,10 +1,14 @@
[build-system]
-requires = ["setuptools>=61.0"]
-build-backend = "setuptools.build_meta"
+requires = [
+ "setuptools>=61.0", # default
+ "wheel", # also often needed
+ "numpy>=1.19.5" # add numpy here for build-time use
+]
+build-backend = "setuptools.build_meta" # using setuptool building engine
[project]
name = "ngclearn"
-version = "2.0.2"
+version = "2.0.3"
description = "Simulation software for building and analyzing arbitrary predictive coding, spiking network, and biomimetic neural systems."
authors = [
{name = "Alexander Ororbia", email = "ago@cs.rit.edu"},
diff --git a/requirements.txt b/requirements.txt
index e689ce87..36285e9d 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -5,6 +5,6 @@ matplotlib>=3.8.0
patchify
jax>=0.4.28
jaxlib>=0.4.28
-ngcsimlib>=1.0.0
+ngcsimlib>=1.0.1
imageio>=2.31.5
pandas>=2.2.3