feat(research): compare saved experiments against explicit trials
This commit is contained in:
parent
397cd0e160
commit
46a4f13acd
22 changed files with 3045 additions and 35 deletions
|
|
@ -0,0 +1,11 @@
|
|||
import type { ExperimentTrial } from '@stock-bot/stock-config/experiments';
|
||||
|
||||
export function metricText(
|
||||
trial: ExperimentTrial,
|
||||
key: keyof NonNullable<ExperimentTrial['metrics']>
|
||||
) {
|
||||
const value = trial.metrics?.[key];
|
||||
return value === null || value === undefined
|
||||
? `Unavailable${trial.unavailable?.[key] ? `: ${trial.unavailable[key]}` : ''}`
|
||||
: String(value);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue