9ca3682Stan remote sampling: compile via stan-wasm-wasi, sample via wasm-execJeremy Magland 1export type SamplingOpts = {
2 num_chains: number;
3 num_warmup: number;
4 num_samples: number;
5 init_radius: number;
6 seed: number | undefined;
7};
9export const defaultSamplingOpts: SamplingOpts = {
10 num_chains: 4,
11 num_warmup: 1000,
12 num_samples: 1000,
13 init_radius: 2.0,
14 seed: undefined,
15};
17export type ChainProgress = {
18 iteration: number;
19 totalIterations: number;
20 warmup: boolean;
21};
23// Result of one chain (one wasm-exec job)
24export type ChainResult = {
25 chainId: number;
26 paramNames: string[];
27 draws: number[][]; // draws[paramIndex][drawIndex]
28 consoleText: string;
29};
31export type MultiChainResult = {
32 paramNames: string[];
33 draws: number[][]; // draws[paramIndex][drawIndex], chains concatenated
34 numChains: number;
35 computeTimeSec: number;
36 consoleText: string;
37};
39export type ChainStatus = ChainProgress | "done" | "error";
41export type ChainStatusMap = {
42 [chainId: number]: ChainStatus;
43};