CausalNetDeployment
You can directly use an instance of this class.
causalNetDeployment
Extends:
* → CausalNetDeployment
The implementation for event-based model deployment which is supplied to pipeline class instance as Deployment attribute. Pipeline class must be mixed with DeploymentMixins.
Example:
import { causalNetDeployment } from 'causal-net.deployment';
(async ()=>{
var emitCounter = 0;
causalNetDeployment.Emitter = async ()=>{
return new Promise((resolve, reject)=>{
setTimeout(()=>{
let data = (emitCounter < 3)?{Predict: [0,1,2,3]}:null;
emitCounter += 1;
console.log({ emitter: data});
resolve(data);
}, 1000);
});
};
causalNetDeployment.Listener = async (data)=>{
console.log({listener: data});
};
causalNetDeployment.Inferencer = (data)=>{
console.log({'inferencer': data});
return data;
};
console.log(await causalNetDeployment.deploy());
})().catch(console.error);
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public set |
|
|
public get |
Emitter: * |
|
public set |
|
|
public get |
|
|
public |
F: * |
|
public set |
|
|
public get |
Inferencer: * |
|
public set |
|
|
public get |
Listener: * |
|
public |
R: * |
|
public |
|
|
public |
|
|
public |
|
|
public |
|
Method Summary
Public Methods | ||
public |
async deploy(): * |