Comments (1)
More information: I drilled down and maybe narrowed the problem to the ['_abc_impl']
component of the bit:
Example code:
import magma as m
import pickle
bit = m.In(m.Bit)
d = bit.__dict__
print(d)
pickle.dumps(d['_abc_impl'])
Example result of running code:
{
'orig_name': 'Bit',
'_info_': (Bit, <Direction.In: 0>),
'__module__': 'magma.bit',
'__doc__': None,
'__abstractmethods__': frozenset(),
'_abc_impl': <_abc_data object at 0x7f24490023f0>
}
Traceback (most recent call last):
File "simple-example.py", line 7, in <module>
pickle.dumps(d['_abc_impl'])
TypeError: cannot pickle '_abc_data' object
The error cannot pickle '_abc_data' object
is a known long-standing problem with pickle, but they claim to have solved it: uqfoundation/dill#332
I tried their example (below) and did not get the error, so I guess they think it's fixed. But ours is still broken.
import dill
from abc import ABCMeta
class AbstractClass(metaclass=ABCMeta):
pass
class ConcreteClass(AbstractClass):
pass
dill.dumps(ConcreteClass)
The next step (if I were doing this) would be to find what's different between our abstract class and their example, and either fix our code or update their bug report. But I'm moving on to something else, so I'm hoping someone else might take up the cause...
from magma.
Related Issues (20)
- pip install -e . fails HOT 11
- DefineCircuit depreciated HOT 4
- [RFC] Mantle Style Conventions HOT 2
- DeclareCircuit HOT 2
- Recursive Circuit Definitions HOT 7
- [Discussion] Magma N-D Arrays have unintuitive behavior HOT 2
- [Types] Tuple field wiring check needs to happen recursively
- How to "group" assign to a Product type? HOT 3
- Add support for key/value pair arguments to product constructor
- Type of IOs appear flipped HOT 3
- Creating intermediate values using `Wire` gives `TypeError` HOT 2
- Reducing compile time HOT 1
- Using input types to index Array register gives TypeError HOT 5
- Should sv=True be default for mlir-verilog? HOT 1
- Automatic formatter HOT 1
- [IO] Unintuitive behavior with IO objects HOT 1
- Installation on latest `main` branch is failing HOT 5
- Migrate output_filelist attribute to use emit dialect HOT 1
- Warning when wiring enable using __call__ syntax HOT 1
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 magma.