Comments (3)
Funny... I kind of expected to work already, but it doesn't. All other templates already support that functionality. Thus, it is only a matter having the keyword/dictionary point to the respective node/edge and so on. For nodes it should be easy. For edges it is necessary to specify source and target as in the template and it might still not be unique, if multiple edges between the same nodes are defined in a circuit template. I do not think, there is an easy way around this (except for overwriting the edges in a custom yaml/Python template).
Thus the partial solution: Implement node_values
keyword argument, that can point to nodes by key as defined in the template. The rest is simply passed to the node template's apply
method. I would prefer to leave edges the way they are now, because this could potentially introduce bugs leading to unexpected results (or confuse error handling). Would that be sufficient for now?
from pyrates.
I think that sounds like a good temporary solution. If we have a good idea for how to handle changes to edge attributes during the CircuitTemplate.apply()
call, we can easily add this later on.
from pyrates.
Implemented with 1d4428e . Behaviour is documented in test_frontend_yaml_parser.py/test_circuit_instantiation. I went for a dictionary of the form {'node/op/var':value}
for consistency with existing APIs. Closing.
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
- 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
- issues when running the example codes HOT 2
- 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.