arundo / adtk

A Python toolkit for rule-based/unsupervised anomaly detection in time series
https://adtk.readthedocs.io
Mozilla Public License 2.0
1.09k stars 145 forks source link

Request for adding an API to "insert" into pipenet #14

Open pushkarjain opened 4 years ago

pushkarjain commented 4 years ago

Using built-in features for pipes is great. But it would be helpful to have an ability to insert a custom step/node in the workflow. For instance, in the workflow shown in the attached image, if I want to add another pre-processing step after abs_residual, then one possible way,

  1. First need to navigate the pipenet summary (via steps_),
  2. Find the appropriate index for the corresponding node
  3. Update the corresponding connections to which the new node wishes to attach to/from.

It would be helpful to have an API that can easily add custom nodes/models/steps to this pipenet by providing the new method, the name of the new method and the from/to connections in the pipeline. Referring to the attached image, inserting a node can probably be something like this - insert_node(method=CustomMethod(), name='custom', from='abs_residual', to='iqr_ad'

adtk_issues
tailaiw commented 4 years ago

@pushkarjain Thanks for the request for the new feature. I agree this could be a useful API in certain circumstances but seems not super common. I will put it in the backlog with lower priority than other issues for now (it would not be added until issue #16 that you raised is resolved anyway), and we may add it into the roadmap for future release. If you're in urgent need of this feature, we are more than happy to review your PR if you may implement it :smiley: