Bridge for Stactics AICore
Project description
corebridge
This package provides functions and classes to run wodan style processing functions in the Stactics AICore environment.
Install
pip install corebridge
How to use
Introduction
Wodan processing functions
Wodan is a proprietary backend service that applies high performance, custom analytical processing to timeseries data in the Whysor data and dashboarding environment.
Each wodan module defines one function that operates as the entry point. The parameter annotations in this function definition are used to format data and retrieve parameters from the originating call to the wodan api. This function is called with data retrieved according to a specification and with additional parameters as annotated.
A simple function might look like:
import numpy as np
def multiply(data:np.ndarray, multiplier:float=1.0):
return data * multiplier
AICore modules
For AICore one defines a class, always named Module
with a constructor
__init__
and a method infer
.
This package defines a baseclass to quickly construct a custom Module
class that uses a wodan processor function inside the AICore system:
import numpy as np
import corebridge
def multiply(data:np.ndarray, multiplier:float=1.0):
return data * multiplier
class Module(corebridge.aicorebridge.AICoreModule):
def __init__(self, save_dir, assets_dir, *args, **kwargs):
super().__init__(read, save_dir, assets_dir, *args, **kwargs)
That’s it. Well, you can add parameters to __init__
that can be used
as hyperparameters and you could override infer
for the same reason.
</code></pre>
<pre><code>2
nbdev cycle
- edit
- nbdev_export
- pip install -e ‘.[dev]’
- nbdev_test
- nbdev_clean
- nbdev_readme
- nbdev_prepare
- git add .
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for corebridge-0.2.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8250f802e29f60fbfe892bd1b1e813dd373fd32d669ad7e83ad4fd7259740591 |
|
MD5 | 3b8d191a6ef9ce3d85cf0c2cec61231d |
|
BLAKE2b-256 | 8dcaed784569274e45bf292584ad13cb525d5b2b2afbb3dec7385c851899c8d5 |