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

Codegen #27

Open
wants to merge 177 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
177 commits
Select commit Hold shift + click to select a range
a949410
add gitignore
TK-21st Dec 13, 2020
a7969b5
return object name in update assert error
TK-21st Dec 13, 2020
7c341b7
add logger. change how input is stepped to allow for input reuse.
TK-21st Dec 13, 2020
e1f538a
cudarecorder now records total number of spikes recorded in a given t…
TK-21st Dec 13, 2020
126574f
sync
TK-21st Dec 19, 2020
3755523
update gitignore
TK-21st Dec 19, 2020
6f4d26f
run black
TK-21st Dec 19, 2020
8e557d4
format code. wip test case for utility
TK-21st Dec 22, 2020
4cbbb32
add initialization routine and test
TK-21st Dec 27, 2020
26f0252
additional plotting utilities (raster, matrix)
TK-21st Dec 27, 2020
56dfba8
update network module error reporting
TK-21st Dec 27, 2020
805f545
update utils
TK-21st Dec 27, 2020
9cbdb05
add more error and warning classes
TK-21st Dec 27, 2020
fdb79e2
update raster and matrix plot utilities
TK-21st Dec 27, 2020
416210d
format code
TK-21st Dec 27, 2020
5265af6
type hints and cosmetic changes
TK-21st Dec 27, 2020
c9b568e
remove cuda recorder source that does not seem to be used.
TK-21st Dec 27, 2020
56c3c7b
update spike utils. Change API for generating spikes from PSTH
TK-21st Dec 27, 2020
126dffb
more docstrings
TK-21st Dec 28, 2020
dd7ea4d
update test suites
TK-21st Jan 11, 2021
fecf9ad
move init's logic to backend
TK-21st Jan 11, 2021
4fb21ae
black.
TK-21st Jan 11, 2021
04ed544
black
TK-21st Jan 11, 2021
e3b0508
update docs and docstring
TK-21st Mar 16, 2021
64b05db
import type hinting
TK-21st Mar 17, 2021
a194f27
wip recorder. spike recording need more work
TK-21st Mar 17, 2021
1e74a8c
add optimize method for optimizing model
TK-21st Mar 27, 2021
03310e2
refactor network a bit
TK-21st Mar 27, 2021
b93fb8b
make compilation error reporting include object name
TK-21st Mar 28, 2021
9c54c71
Merge branch 'master' into optimize
TK-21st Mar 29, 2021
671f570
update type checking in optimization
TK-21st Mar 29, 2021
5992719
cleanup script and docstring
TK-21st Mar 29, 2021
9a8d156
make update reporting more informative
TK-21st Mar 29, 2021
0b1e7d4
change result sent to cost function in model optimizer
TK-21st Mar 30, 2021
2ab616a
add pylint flags
TK-21st Mar 30, 2021
a91f5c9
fix some typing erros
TK-21st Mar 30, 2021
f443aca
add basic tests for optimizer module
TK-21st Mar 30, 2021
df77b20
cleanup
TK-21st Mar 30, 2021
6b50a27
Merge branch 'master' into optimize
TK-21st Mar 30, 2021
5893e88
add logger. change how input is stepped to allow for input reuse.
TK-21st Dec 13, 2020
2719ecf
do not include logger yet
TK-21st Apr 5, 2021
98f8239
you can use atol/rtol in optimize now
TK-21st Apr 5, 2021
01ef4e1
yyaxis sets color to both major/minor ticks
TK-21st Apr 12, 2021
2d6600c
refactor update to separate function
TK-21st Apr 12, 2021
74daeb7
update de description. No need to verbose description since cost eval…
TK-21st Apr 12, 2021
67eef03
cleanup
TK-21st Apr 12, 2021
6031b9d
py37 codegen wip
TK-21st Apr 12, 2021
cfab031
py37 codegen wip
TK-21st Apr 12, 2021
b6fcd08
remove pdb
TK-21st Apr 12, 2021
766e639
cleanup.
TK-21st Apr 12, 2021
f81b973
Merge branch 'codegen' into optimize
TK-21st Apr 12, 2021
baf6b29
update gitignore
TK-21st Apr 12, 2021
48db448
add ability to randomize parameters based on initial condition
TK-21st May 6, 2021
89c3e24
use pcolormesh instead of imshow for matrix plot, add y scale
TK-21st May 6, 2021
b762da5
format
TK-21st May 6, 2021
a47653a
pop gpu buffer as part of network run argument
TK-21st May 17, 2021
a5fb186
fix a typo in the error message
TK-21st May 17, 2021
9faeb04
import error reporting
TK-21st Jul 16, 2021
8ad4df0
fix some bugs in utils and plot.
TK-21st Jul 16, 2021
d9879b9
format with black
TK-21st Jul 16, 2021
835c949
merge changes from optimize by ignore optimizer packages
TK-21st Jul 16, 2021
f2bb791
Merge branch 'master' into develop
TK-21st Jul 16, 2021
5a5d3ca
fix bug in recorder
TK-21st Jul 17, 2021
775cded
update setup requirements
TK-21st Jul 17, 2021
fcc0b06
format code
TK-21st Jul 17, 2021
6c4b199
format code and add new tests
TK-21st Jul 18, 2021
5862439
fix a bug in clipping. update tests
TK-21st Jul 18, 2021
086794c
remove unnecessary clipping api for scalar backend. update tests
TK-21st Jul 19, 2021
a49d535
remove uncessary file
TK-21st Jul 19, 2021
cc587ce
add setup requirement
TK-21st Jul 19, 2021
79a3cf7
sync changes
TK-21st Dec 8, 2021
e986206
ignore docs
TK-21st Jan 4, 2022
ce9675a
Merge branch 'optimize' into develop
TK-21st Jan 5, 2022
373f340
cleanup
TK-21st Jan 5, 2022
d036dfa
rename logger to errors everywhere.
TK-21st Jan 5, 2022
f292499
use dynamic import for pep562 based on python version
TK-21st Jan 5, 2022
e56a8b8
remove py2 support
TK-21st Jan 5, 2022
2acab37
remove optimizer model. moved to standalone package
TK-21st Jan 5, 2022
f718678
remove all unncessary files. config and math modules should still hap…
TK-21st Jan 5, 2022
50320eb
optimizer module no longer needed
TK-21st Jan 5, 2022
78636e2
use latest cookiecutter template
TK-21st Jan 6, 2022
38528cf
fix residual error with config
TK-21st Jan 6, 2022
54507cb
cleanup
TK-21st Jan 6, 2022
273cb62
remove duplicate errors
TK-21st Jan 6, 2022
c520aee
fix a typo
TK-21st Jan 6, 2022
19e2ee1
cleanup here and there
TK-21st Jan 10, 2022
482021c
add ast-based model parser.
TK-21st Jan 10, 2022
6050bfa
move solver part of model definition to a separate module.
TK-21st Feb 1, 2022
7cc5bfb
add a parsed model module that parses the ode specification of models…
TK-21st Feb 1, 2022
92f6fc8
fix recursion bug in setattr/getattr. standardize model api.
TK-21st Feb 1, 2022
3b0da16
1) separate solver of basemodel into mixin backend class.
TK-21st Feb 2, 2022
0eddda5
recreate pylintrc that cased vscode pylint extension to crash
TK-21st Feb 3, 2022
98f87e2
add ast parser/transformer for model.ode
TK-21st Feb 3, 2022
cf860d0
rollback backendmixin to explicit backend class.
TK-21st Feb 3, 2022
e1452ea
lint.
TK-21st Feb 3, 2022
eded3f7
move solver modules to a subfolder.
TK-21st Feb 3, 2022
e36dcad
make bounds also a structured array
TK-21st Feb 3, 2022
39b4818
all tests passed for basemodel
TK-21st Feb 4, 2022
977c495
move utils to separate module
TK-21st Feb 4, 2022
c6f1393
change asserts to explicit raises.
TK-21st Feb 4, 2022
f462780
rollback recarray/structured array to dict
TK-21st Feb 4, 2022
84b659a
add more class validator. slightly simplify jaccobian computation.
TK-21st Feb 5, 2022
bc61a69
resolve cyclic import
TK-21st Feb 5, 2022
710f79f
format ufuncs
TK-21st Feb 5, 2022
314a29a
cleanup solvers module
TK-21st Feb 5, 2022
2f222c9
update signal utils.
TK-21st Feb 5, 2022
4d5ec28
cleanup
TK-21st Feb 5, 2022
c788433
update utils
TK-21st Feb 5, 2022
f347ae9
use np.where instead of if else
TK-21st Feb 5, 2022
2c3c268
cleanup
TK-21st Feb 5, 2022
8760061
fix duplicate tests
TK-21st Feb 5, 2022
d8dc9f4
move to plot
TK-21st Feb 5, 2022
01f8bd6
too many checks. rollback shape check.
TK-21st Feb 5, 2022
2ed6dd2
cleanup types.
TK-21st Feb 5, 2022
7d385ad
refactor network. wip
TK-21st Feb 5, 2022
77d5831
cleanup utils. wip
TK-21st Feb 5, 2022
72f087d
lint
TK-21st Feb 5, 2022
a9e2278
add spike stimulus generator
TK-21st Feb 5, 2022
66c4abd
container cannot exist without obj
TK-21st Feb 5, 2022
ebd8fdf
array utils added
TK-21st Feb 7, 2022
49e117c
recorder revamped and tested.
TK-21st Feb 7, 2022
41e8be4
remove pytorch support. torch.tensor is too different from numpy/cupy…
TK-21st Feb 7, 2022
23bc8a8
revamp network module.
TK-21st Feb 8, 2022
dcfd82a
cleanup scipy solver. address corner case of no gradient
TK-21st Feb 8, 2022
a516cb1
basesolver recast_array should be no-op
TK-21st Feb 8, 2022
17fe377
move some utilities into utils module
TK-21st Feb 8, 2022
511002a
update tests
TK-21st Feb 8, 2022
8e2dee1
sync local changes. branching to test numba integration
TK-21st Feb 8, 2022
3905d45
add set_num method to model and associated utilities. add _ode_scalar…
TK-21st Feb 8, 2022
e3477a0
force everything in model to be array. this will mean duplicating par…
TK-21st Feb 8, 2022
f1c19a6
all tests except for solver passed (dependent on vectorization)
TK-21st Feb 8, 2022
66ec50d
use builtin math module
TK-21st Feb 8, 2022
58af279
update numba codegen
TK-21st Feb 8, 2022
e23a824
lint
TK-21st Feb 8, 2022
c2cc2d2
method dispatcher class decorator/descriptor for dispatching method b…
TK-21st Feb 15, 2022
4cbb76e
fix method dispatcher logic
TK-21st Feb 15, 2022
5136c4b
put back backend module
TK-21st Feb 15, 2022
7cf5c97
rework numba codegen.
TK-21st Feb 15, 2022
4009593
recast is part of backend.
TK-21st Feb 15, 2022
7d3aee8
recast is part of backend.
TK-21st Feb 15, 2022
46544af
lint
TK-21st Feb 15, 2022
14a1eec
use mixin for backend, it works.
TK-21st Feb 17, 2022
b1cc9f2
require 3.9 or later python versions to support all features
TK-21st Feb 17, 2022
12bf91c
fix some bugs in numba codegen. wip
TK-21st Feb 17, 2022
363c542
cleanup.
TK-21st Feb 17, 2022
7fc128a
lint
TK-21st Feb 17, 2022
044ec50
fix numba codegen error. backends work but seems to be slow. need to …
TK-21st Feb 17, 2022
6c4e72a
lint
TK-21st Feb 17, 2022
96c79e6
Merge pull request #25 from chungheng/numba
TK-21st Feb 17, 2022
231c533
cupy module is required for cuda backends.
TK-21st Feb 21, 2022
4c1f3ed
cleanup
TK-21st Feb 21, 2022
14ed06f
Reworked Operator. WIP. Need to numba codegen for operator.
TK-21st Feb 21, 2022
9f07f9c
add an implementation of fixed size rk solver.
TK-21st Feb 22, 2022
cbcee79
use structured array. This will allow codegen for numba backend to co…
TK-21st Feb 24, 2022
80de1aa
simplify numba codegen with structured array.
TK-21st Feb 24, 2022
6668cc9
refactor backend
TK-21st Mar 28, 2022
7a49c26
make numba kernels work with scalar or array inputs. only work for CP…
TK-21st Mar 28, 2022
b46814a
network constructor should be aware of backend for all components
TK-21st Mar 28, 2022
7a5bf5d
make rk solver work with cpu backend.
TK-21st Mar 28, 2022
1d6fdb0
make network util work with refactored network class
TK-21st Mar 28, 2022
b6d05a3
change plot_multiple argument
TK-21st Mar 28, 2022
cb571df
change model setattr to take care of cuda array. WIP
TK-21st Mar 28, 2022
a7626f2
better reporting in compilation error
TK-21st Mar 28, 2022
9f2d56b
fix a bug in jinja template
TK-21st Mar 28, 2022
dec07fa
cleanup solver init
TK-21st Mar 28, 2022
303e0d2
update notebook to use latest api
TK-21st Mar 28, 2022
c4ee484
network's compile method seems obselete. will need to test
TK-21st Mar 28, 2022
a6319be
change synapse models
TK-21st Mar 28, 2022
e7fb9f1
small fixes here and there.
TK-21st Mar 28, 2022
108955a
update examples
TK-21st Mar 28, 2022
07fabc1
cleanup utility functions
TK-21st Mar 28, 2022
e8ff37b
format
TK-21st Mar 28, 2022
6583c8b
remove method dispatcher. only use mixin
TK-21st May 26, 2022
1bedfeb
scipy solver tests passed.
TK-21st May 26, 2022
7101127
all tests passed. more network tests required for cpu support.
TK-21st May 26, 2022
5151358
lint
TK-21st May 26, 2022
031c1ab
fix a bug in scipy solver. added numba solver. some tests are not pas…
TK-21st May 27, 2022
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
Binary file added .coverage
Binary file not shown.
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# http://editorconfig.org

root = true

[*]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
end_of_line = lf

[*.bat]
indent_style = tab
end_of_line = crlf

[LICENSE]
insert_final_newline = false

[Makefile]
indent_style = tab
15 changes: 15 additions & 0 deletions .github/workflows/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
* neural version:
* Python version:
* Operating System:

### Description

Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.

### What I Did

```
Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
```
2 changes: 1 addition & 1 deletion .github/workflows/Lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v1
with:
python-version: '3.7'
python-version: '3.9'
architecture: 'x64'
- name: Install black
run: python -m pip install black
Expand Down
111 changes: 106 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,108 @@
*.pyc
*.pytest_cache
neural.egg-info/
examples/
*.bak
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# dotenv
.env

# virtualenv
.venv
venv/
ENV/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

# IDE settings
.vscode/
.idea/
*.bak
notebooks/tmp
Loading