Closed yoavram closed 4 years ago
Hi Yoavram,
gen_single is for simulators, not generators.
In general, inheriting from the BaseGenerator allows us to define a lot of functions in the same place. But I don't think we require the generator object supplied to the inference methods to actually be of any particular class, nor do we check anything about it.
If any of this stuff is still not clear, feel free to reopen this issue!
thx!
Hi I'm wondering why you require class inheritance for the generator etc.? You can just require that the generator object has a
gen_single()
method that returns a dictionary, etc. In Python, this is usually the preferred way to implement what other languages use interfaces for. This would make implementing generators a bit easier. You always check that a generator has the desired attribute usinghasattr
.BTW I also don't see that
delfi.generator.Default.Default
hasgen_single
.