tinker-engine / sailon-protocols

0 stars 0 forks source link

Call algorithm steps directly instead of using execute method #14

Closed nrsyed closed 3 years ago

nrsyed commented 3 years ago

@waxlamp @cfunk1210 @as6520

This PR calls the various algorithm step methods directly instead of passing string arguments to an execute method. While, in this example with the random novelty detector, the algorithm class methods are called directly in the protocol, this scheme would also generalize to an adapter that would serve as an interface between the protocol and the algorithm.

Closes #12.

nrsyed commented 3 years ago

@as6520 @waxlamp Please see latest commits. At the risk of introducing too many changes in one PR, I went ahead and updated the dataset_request logic to closely follow that of the original OND protocol because it affects the inputs to the algorithm step calls that this PR originally sought to address.

With these changes, I've maintained the idea of the toolset but propose replacing toolset with three dicts that more clearly define what's being supplied/returned/used by the algorithm or adapter at each step:

This can be refined in upcoming PRs, but looking for feedback on whether this is an appropriate step in that direction.