Issue with subclassing a scheduler #7896
christopher-beckham
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
How exactly are we meant to subclass a particular scheduler if wanted to do it? Consider the following code block:
Now maybe I want to add my own scheduler which subclasses another. Let me do the simplest example which is just calling the constructor of the parent class:
image1
andimage2
are the following, respectively, so something is going on:If you print
sampler2
, you just get a string like thisEulerAncestralDiscreteSchedulerChris()
, so for some reason it's not printing the attributes inside the object. If you omit@dataclass
from the subclass then you get the error*** TypeError: Object of type type is not JSON serializable
.Is this a bug? Or am I not subclassing the scheduler correctly?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions