Comments (4)
Apart from parameters nodes also have stateful parameters whose values are associated with a function and evolves with time as the graph is evaluated.
.
A stateful parameter has the following components:
- id
- default initial value to start with
- value updated by a MDF function that uses the previous value of the stateful parameter, time increment (dt)
Initial work on this here: https://github.com/ModECI/MDF/tree/stateful_parameter
Initial thoughts on implementing the translator:
- Input should be any json file with implementation of states.
- Extract the parameters / arguments from the expression of time derivative, parameters field of the nodes.
- Create a new MDF function using the expression of time derivative for each state, extracted arguments.
from mdf.
from mdf.
Translator has been implemented and tested successfully. Translator converts files with state if it contains to file with stateful parameters, otherwise unchanged. The output file upon evaluation produces the same results.
Steps to implement translator
- import the original json file to be translated
- if node object has states and time derivative then add 'dt' to the parameters of the node object and add 'time' as a stateful parameter
- create functions for time_derivative expression for each state variable
- Replace all names containing states into stateful_parameters
- While evaluating the graph of the translated version, add the corresponding MDF functions
file location: src/modeci_mdf/full_translator.py
currently on branch 'stateful_parameter': https://github.com/ModECI/MDF/blob/stateful_parameter/src/modeci_mdf/full_translator.py
from mdf.
Translator code merged
from mdf.
Related Issues (20)
- Remove sphinx pin to 3.x? HOT 1
- torch.fx to MDF
- Support for populations/templates HOT 1
- Support for cyclical graphs HOT 3
- onnx 1.14 incompatibility HOT 2
- Py3.10 builds failing due to fastkde HOT 1
- simple_pytorch_to_mdf.py breaking in pytorch 2.0 HOT 2
- Example for testing with Keras->MDF conversion: 3D convolutional neural network HOT 1
- Refactor PyTorch_MDF examples to ease benchmarking HOT 2
- Keras to MDF HOT 1
- Support PyTorch v2.2.0
- Support latest graph_scheduler HOT 5
- ACTR importer condition typo? HOT 1
- Tasks/ Milestones HOT 1
- Missing Link to Functions List in Parameter Section in Documentation HOT 4
- Incorrect GitHub Edit Links in 'modeci_mdf' API Reference Section
- Failure of tests on macos-latest on graphviz setup step
- Allow parameters in Graph to be accessible from any node?
- pypi refusing to make new release as modeci requires verified email HOT 2
- Create a Streamlit based app to run a generic MDF model HOT 3
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 mdf.