feat(research): select and reuse frozen datasets in workbench
This commit is contained in:
parent
6a67ae8683
commit
b106c1ca85
29 changed files with 2295 additions and 426 deletions
|
|
@ -0,0 +1,39 @@
|
|||
import type { BacktestRunDatasetSelection } from '@stock-bot/types';
|
||||
|
||||
/** This binding belongs to the accepted run, never the editable backtest form. */
|
||||
export function RunDataset({ dataset }: { dataset?: BacktestRunDatasetSelection }) {
|
||||
return (
|
||||
<section
|
||||
aria-label="Run dataset"
|
||||
className="mb-4 rounded-lg border border-border p-3 text-sm text-text-secondary break-words"
|
||||
>
|
||||
{dataset?.pinnedHash ? (
|
||||
<p>
|
||||
Pinned dataset hash: <code>{dataset.pinnedHash}</code>
|
||||
</p>
|
||||
) : dataset?.requestedHash ? (
|
||||
<>
|
||||
<p>
|
||||
Requested frozen dataset hash: <code>{dataset.requestedHash}</code>
|
||||
</p>
|
||||
<p>
|
||||
{dataset.state === 'unavailable'
|
||||
? 'Dataset preparation is unavailable for this run.'
|
||||
: 'Waiting for dataset preparation and binding.'}
|
||||
</p>
|
||||
</>
|
||||
) : dataset?.state === 'requested' ? (
|
||||
<p>
|
||||
Source request ({dataset.source ?? 'auto'}) — unpinned. Historical data will be prepared
|
||||
asynchronously.
|
||||
</p>
|
||||
) : dataset?.state === 'preparing' ? (
|
||||
<p>Source request ({dataset.source ?? 'auto'}) — unpinned. Historical data is preparing.</p>
|
||||
) : dataset?.state === 'unavailable' ? (
|
||||
<p>No dataset was pinned. Historical data preparation is unavailable for this run.</p>
|
||||
) : (
|
||||
<p>Dataset provenance is unavailable for this run.</p>
|
||||
)}
|
||||
</section>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue