Origen-SDK / o2

MIT License
4 stars 0 forks source link

Parameter sets and specs modeling #36

Open info-rchitect opened 4 years ago

info-rchitect commented 4 years ago

Hi,

We extensively use the parameter set API here, which acts like a dynamic multi-dimensional hash. At FSL we used the spec model which is a 4-D hash. I think we need both features but that the implementation should recognize that the spec model is just a parameter set with specific keys.

thx

ginty commented 4 years ago

It never felt to me like specs were ever properly defined in O1, so that same issue currently exists in 02. If we can specify what attributes a spec should have then adding them should be fairly straight forward after that. Does anyone know about any 3rd party std we could leverage/rip-off for that?

info-rchitect commented 4 years ago

@ginty Can you elaborate on the miss-modeling in O1? I am not committed to using the exact same nomenclature but having the concept of the following is needed based on using the O1 model at two different workshops:

  1. Symbol/ID
  2. Type (e.g. DC/AC/Thermal)
  3. Mode (could default to being global)

We also had a sub-type that was necessary though I can't dig up any examples right now. Seth and I searched for an open source schema and found nothing, hence why we developed our own internal spec mark-up language. BTW, I wonder if we could get that open-sourced as it would be a powerful starting point.

ginty commented 4 years ago

Maybe its just my lack of familiarity with it. I've just noticed that we have a doc page on it which I never realized until now - https://origen-sdk.org/origen/guides/models/specs/

If that's valid then I would propose we just implement specs.py in blocks/ that covers the API from that guide, is that all we need?

info-rchitect commented 4 years ago

Maybe its just my lack of familiarity with it. I've just noticed that we have a doc page on it which I never realized until now - https://origen-sdk.org/origen/guides/models/specs/ If that's valid then I would propose we just implement specs.py in blocks/ that covers the API from that guide, is that all we need?

Yes that guide is what the internal schema modeled. My only question that still remains is how/if a 4-D spec model could be integrated into a future parameters set implementation? Is a chained multi-dimensional parameter set API possible in Python? The O1 spec model used a code block implementation similar to other base O1 objects, with specific named attributes versus the parameter set implementation which allowed generic attributes. I guess I could see the calling 'add_spec' method which would expect certain arguments but behind the scenes a multi-dimensional parameter set would be created in Rust.

ginty commented 4 years ago

Well, this is reminding me of why I felt this stuff was never really specified properly in O1. If you want to see something like this you are going to have to specify how it should work. Forget about worrying about what is possible in Python for now, just define the API that you wish you had and then we can worry about how to implement it later.

I am less worried about whether "a chained multi-dimensional parameter set API" is possible in Python and more worried about what that even means in the first place!

info-rchitect commented 4 years ago

Well, this is reminding me of why I think this stuff was never really specified properly in O1. If you want to see something like this you are going to have to specify how it should work. Forget about worrying about what is possible in Python for now, just define the API that you wish you had and then we can worry about how to implement it later. I am less worried about whether "a chained multi-dimensional parameter set API" is possible in Python and more worried about what that even means in the first place!

OK then let's use the O1 guide and see what develops. I just thought the parameter set API was so important to most Origen users that it was must-have going forward.

ginty commented 4 years ago

Well that's a quick cop-out!

info-rchitect commented 4 years ago

@ginty I really don't know what you mean. The O1 spec model is clearly defined as evidenced by it being used with its own XML schema. The purpose of this issue was just to highlight that if we plan to continue to support parameter sets in O2 that the spec API could create parameter sets versus rolling a unique class of objects.

ginty commented 4 years ago

Well, your exact words were:

My only question that still remains is how/if a 4-D spec model could be integrated into a future parameters set implementation?

I interpret that to mean that we need something over and above what O1 can do, so I ask you to specify it clearly. At that point it sounds like the requirement has gone and the current O1 feature set is all we need.