Skip to content

Releases: jaxleyverse/jaxley

v0.6.0

07 Feb 12:43
Compare
Choose a tag to compare

Pin of JAX version

Installing Jaxley will no longer install the newest version of JAX. We realized that, on CPU, with version jax==0.4.32 or newer, simulation time in Jaxley is 10x slower and gradient time is 5x slower as compared to older versions of JAX. Newer versions of JAX can be made equally fast as older versions by setting os.environ['XLA_FLAGS'] = '--xla_cpu_use_thunk_runtime=false' at the beginning of your jupyter notebook (#570, @michaeldeistler).

New Features

  • Add ability to record synaptic currents (#523, @ntolley). Recordings can be turned on with
net.record("i_IonotropicSynapse")
  • refactor plotting (#539, @jnsbck).
    • rm networkx dependency
    • add Network.arrange_in_layers
    • disentangle moving of cells and plotting in Network.vis. To get the same as net.vis(layers=[3,3]), one now has to do:
net.arrange_in_layers([3,3])
net.vis()
  • Allow parameter sharing for groups of different sizes, i.e. due to inhomogenous numbers of compartments or for synapses with the same (pre-)synaptic parameters but different numbers of post-synaptic partners. (#514, @jnsbck)

  • Add jaxley.io.graph for exporting and importing of jaxley modules to and from networkx graph objects (#355, @jnsbck).

    • Adds a new (and improved) SWC reader, which is more flexible and should also be easier to extend in the future.
    from jaxley.io.graph import swc_to_graph, from_graph
    graph = swc_to_graph(fname)
    # do something to the swc graph, i.e. prune it
    pruned_graph = do_something_to_graph(graph)
    cell = from_graph(pruned_graph, ncomp=4)
    • Adds a new to_graph method for jaxley modules, which exports a module to a networkX graph. This allows to seamlessly work with networkX's graph manipulation or visualization functions.
    • "graph" can now also be selected as a backend in the read_swc.
    • See the improved SWC reader tutorial for more details.

Code Health

  • changelog added to CI (#537, #558, @jnsbck)

  • Add regression tests and supporting workflows for maintaining baselines (#475, #546, @jnsbck).

    • Regression tests can be triggered by commenting "/test_regression" on a PR.
    • Regression tests can be done locally by running NEW_BASELINE=1 pytest -m regression i.e. on main and then pytest -m regression on feature, which will produce a test report (printed to the console and saved to .txt).
  • Allow inspecting the version via import jaxley as jx; print(jx.__version__) (#577, @michaeldeistler).

Bug fixes

  • Fixed inconsistency with type assertions arising due to numpy functions returning different dtypes on platforms like Windows (#567, @Kartik-Sama)

v0.5.0

25 Nov 13:39
Compare
Choose a tag to compare

API changes

  • Synapse views no longer exist (#447, #453, @jnsbck). Previous code such as
net.IonotropicSynapse.set("IonotropicSynapse_s", 0.2)

must be updated to:

net.set("IonotropicSynapse_s", 0.2)

For a more detailed tutorial on how to index synapses, see
this new tutorial.

  • Throughout the codebase, we renamed any occurance of seg (for segment) to comp
    (for compartment). The most notable user-facing changes are:
    • branch = jx.Branch(comp, ncomp=4)
    • cell = jx.read_swc(fname, ncomp=4)
  • New defaults for the SWC reader with jx.read_swc(). By default, we now have
    assign_groups=True (previously False) and max_branch_len=None (previously
    300.0).
  • We renamed .view to .nodes, e.g., cell.branch(0).nodes (#447, #453, @jnsbck).
  • We renamed _update_nodes_with_xyz() to compute_compartment_centers() (#520,
    @jnsbck)
  • We updated the way in which transformations are built (#455, @manuelgloeckler).
    Previous code such as
tf = jx.ParamTransform(
    lower={"radius": 0.1, "length": 2.0},
    lower={"radius": 3.0, "length": 20.0},
)

must be updated to:

from jaxley.optimize.transforms import ParamTransform, SigmoidTransform
transforms = [
    {"radius": SigmoidTransform(lower=0.1, upper=3.0)},
    {"length": SigmoidTransform(lower=2.0, upper=20.0)},
]
tf = jt.ParamTransform(transforms)

New features

net.make_trainable("radius")
params = net.get_parameters()
net.write_trainables(params)
r_greater_1 = net.nodes.groupby("global_cell_index")["radius"].mean() > 1
net[r_greater_1].nodes.vis()

Bug fixes

  • allow for cells that were read from swc to be pickled (#525, @jnsbck)
  • fix units of compute_current() in channels (#461, @michaeldeistler)
  • fix issues with plotting when the morphology has a different number of compartments
    (#513, @jnsbck)

Documentation

Code health

v0.4.0

11 Oct 07:33
Compare
Choose a tag to compare

New features

Documentation

v0.3.0

24 Sep 06:39
7648bbe
Compare
Choose a tag to compare

New features

  • New solver: jx.integrate(..., voltage_solver="jax.sparse") which has very low
    compile time (#418, @michaeldeistler)
  • Support for different number of compartments per branch at initilization (modifying
    the number of compartments after initialization is not yet supported, #418, #426,
    @michaeldeistler)

Bugfixes

  • Bugfix for capacitances and their interplay with axial conductances (Thanks @Tunenip,
    #426, @michaeldeistler)
  • Bugfixes for tutorials on website

v0.2.1

16 Sep 18:01
a8d54ad
Compare
Choose a tag to compare

v0.2.1

v0.2.0

New features

Bugfixes

  • Bugfix for interpolation of x, y, z values (#411, @jnsbck)

v0.1.2

22 Aug 15:07
Compare
Choose a tag to compare
  • First public version
  • Minor fixups for README, website, and PyPI landing page (from v0.1.0)