We would love to get you input. Please add it to this issue here. https://github.com/influxdata/kapacitor/issues/775
On Wednesday, November 23, 2016 at 10:16:20 AM UTC-7, [email protected] wrote: > > On Wednesday, November 23, 2016 at 9:05:38 AM UTC-8, [email protected] > wrote: > > Kent, > > > > > > There are a few ways this can be done: > > > > > > 1. Use the snapshot feature to load/store your weights. The moving_avg > example here is a good place to start. There are a few gotchas with this > approach, changing your TICKscript will invalidate the snapshot and require > that you generate a new one. Snapshots cannot be externally defined or > read. They must be generated from within the UDF, which creates a bit of a > chicken and the egg problem. > > > > > > 2. Manage loading and storing weights within the UDF such that it is > opaque to Kapacitor. Basically like you suggest, either pass a file path as > a parameter to the UDF to load during the init phase or possibly an > InfluxDB measurement. Using a local file will be simplest approach to get > you going but requires that the weights file be deployed with the UDF > binary :( > > > > > > In short we recognize that this is a generic need for UDFs and we want > to solve it within Kapacitor itself, and the snapshots feature was an > initial attempt at that. But its short comings cripple it enough that I > would recommend not trying to use it in its current state. We have already > put together an design doc for how we want this to work in the future, you > can find it here. > > > > > > For now I recommend going with option 2. This way you have control over > the weights and using an InfluxDB measurement could work well for this case > since the weights are inherently a series. Or if you have some other > distributed storage available to you, you could leverage that to store and > load the weights, eliminating the need to deploy the weights along side the > UDF binary. > > > > > > Let me know if I can clarify anything more. > > Nathaniel > > > > On Wednesday, November 23, 2016 at 9:46:41 AM UTC-7, [email protected] > wrote:I would like to implement a UDF for Kapacitor providing a weighted > moving average, which means I need to be able to initialize the UDF with > its array of weights (not necessarily a small array). Other than > initializing the weights, the rest of the function is similar to the > moving_avg example. > > At this point, my crucial bit of missing code is figuring out how best > to communicate to my UDF what its weights should be. I can imagine passing > a simple parameter pointing to a file, or a key to look up the data in a > measurement in influxdb, but I would like expert advice on the right way to > approach the problem. > > TIA > > Kent > > Thanks Nathaniel. I had seen the snapshot capabilities, and assumed they > were for restoring state on startup (which resolves a different problem). I > will certainly move forward with an externally-managed file for now. > > Thank you also for the pointer to the Blob Store proposal. Is there a > defined process to use to provide input/feedback? There are some particular > issues involved in supporting trained model data that I would like to > contribute to. -- Remember to include the version number! --- You received this message because you are subscribed to the Google Groups "InfluxData" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/influxdb. To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/7f0b3f1b-14e1-42f5-b3ab-3d144242b2a6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
