Closed Zbysekz closed 4 years ago
Second addition, while this PR is already opened,
I discovered out big problems with order calls, that i have in all scripts (2D object recognition, hotgym example and this)
It spend literally hours to get the execution order right in my head and i must say that it was very hard. :tired_face:
But finally this is the right. I changed here the order of calls. Basically
@Zbysekz can we continue your work here? Either by merging as is, or by revamping the API?
@Zbysekz can we continue your work here? Either by merging as is, or by revamping the API?
I am now working on the new interface, baking data to the database. (already got working partially) This then would be much simplier, i am for cancelling this PR and then i start new one with the revamp when it will be ready.
I am now working on the new interface,
oh, that's great :+1: , I was worried the progress got lost.
Could you post an example (pseudocode) how the new API would be used in 3rd party? As in here?
I think it will be like this: Method to define system structure same as now:
global variable for "pandaBaker" with database file specified
pandaBaker = PandaBaker('/home/zz/Desktop/test1.db')
Filling data into dicts
# fill up values
pandaBaker.inputs["SL_Consumption"].stringValue = "consumption: {:.2f}".format(consumption)
pandaBaker.inputs["SL_Consumption"].bits = consumptionBits.sparse
pandaBaker.inputs["SL_TimeOfDay"].stringValue = record[0]
pandaBaker.inputs["SL_TimeOfDay"].bits = dateBits.sparse
pandaBaker.layers["SensoryLayer"].activeColumns = activeColumns.sparse
pandaBaker.layers["SensoryLayer"].winnerCells = tm.getWinnerCells().sparse
pandaBaker.layers["SensoryLayer"].predictiveCells = tm.getPredictiveCells().sparse
pandaBaker.layers["SensoryLayer"].activeCells = tm.getActiveCells().sparse
And custom data for plots user configurable window like:
pandaBaker.customStream["myTagNameOfStream"] = value
I will probably use exactly this universality for raw anomaly:
pandaBaker.customStream["SensoryLayer_rawAnomaly"] = rawAnomaly
I will try to make this as simple as possible
Small bugfix, as result clicking on cells was causing exception