Comments (3)
This code was introduced at some point in order to prevent exactly those problems "in other tests". When running different tests with different circuit structures that, however, included the exact same module names, sys.modules
would not update the modules between tests. Thus, this code was added to ensure that modules from older versions of the same circuit would be forgotten, so that the new ones could be added to sys.modules
. Since every CircuitIR
instance comes with just one backend, I did not expect this to cause trouble in "productive code". Also, I never ran into strange bugs. However, it is possible that changes to the code generation structure further down the line made this code unnecessary. Thus, I will see whether removing it causes any other problems. If not, we can get rid of it.
from pyrates.
Okay, so the problem is that Python registers modules for the backend that may need to be refreshed, correct? In my case, the backend removed all modules that contained "circuit" in their name, thus also removing PyRates' own modules for circuit templates and IR. That again cause a problem somewhere else, when I wanted to verify instances of template classes. Checking for instance itself is not a good practice in Python, so it might also be worth rewriting those checks...
Either, I'll still leave this open until we have decided, whether the current fix is acceptable or not.
from pyrates.
So I removed these parts of the code and they did not change anything about running the pytests or other test scripts on my end. I pushed the changes and will close this issue now.
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
- 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
- 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.