Comments (2)
Hi @GanshengT ,
Thank you for your interest in working with PyRates.
From your example, I think the issue is connected to multiple executions of your jupyter notebook cells.
When calling CircuitTemplate.run
, PyRates uses a caching system to reduce the number of templates that have to be loaded separately. These templates, however, are altered along the process of translating a given model into the backend. Thus, the cache has to be cleared first, before you can call CircuitTemplate.run
again.
I think the following adjustments just allow to execute a cell with your code multiple times:
from pyrates import CircuitTemplate, clear_frontend_caches
jrc = CircuitTemplate.from_yaml("model_templates.neural_mass_models.jansenrit.JRC")
results = jrc.run(simulation_time=1.0,
step_size=1e-2,
sampling_step_size=1e-2,
outputs={'V_pce': 'pc/rpo_e_in/V',
'V_pci': 'pc/rpo_i/V'},
backend='default',
solver='scipy')
Notice, that I have also changed the name of the output variables from Z
to V
, to account for a recent modification I made to the model templates. Should you not use the most recent version of PyRates, feel free to go back to your original variable names. For me, the code above worked with the most recent PyRates version, using Python 3.8 and jupyter notebook on Ubuntu 20.04.
Hope that solves your problem!
from pyrates.
Thank you for the prompt response! It did solve the problem!
from pyrates.
Related Issues (20)
- Allow additional (modulating) source nodes in edges HOT 3
- Add variable setter method to CircuitIR HOT 1
- Add to_file/from_file methods HOT 4
- Found test problem caused by changes of working directory in backend HOT 4
- Removing parts of pyrates from sys.modules in the backend causes troubles in other parts of the pipeline HOT 3
- Improving user friendliness and stability of PyRates HOT 2
- Add possibility to CircuitTemplate.apply() method to change constants HOT 3
- Enable purely scalar network models by disabling vectorization HOT 2
- Implement logging
- Trouble reproducing Jansen-Rit model dynamics in current version HOT 8
- Unexpected behavior of a zero-weighted edge with delay HOT 6
- Inheriting from an operator more than once causes operator key errors HOT 1
- Remove unnecessary indexing operations and variable definitions from equation file HOT 1
- error running jansenrit.py (jrc.compile) on MacOS HOT 3
- Continuous data generation HOT 3
- Rework delay-coupling implementations HOT 3
- is there an option to get an ouput of the non-state variable? HOT 2
- error while using delay DE HOT 4
- issue with time-varying edge variables when multiple nodes are used HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyrates.