-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
frontend: export chain csvs #68
Conversation
Any name is fine as long as it generally follows the _1.csv, _2.csv, ... setup. Stan uses |
Okay I changed "chain-1.csv" to "chain_1.csv" |
@WardBrian shall I merge this now that ess PR is in? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few smaller comments but then I think this can be merged yes
@@ -161,6 +161,7 @@ const computeEss = (x: number[], chainIds: number[]) => { | |||
draws[chainIndex].push(x[i]); | |||
} | |||
const ess = compute_effective_sample_size(draws); | |||
// const ess = compute_split_effective_sample_size(draws); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is from a merge gone awry or something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
const createZipBlobForMultipleCsvs = async (csvTexts: string[], uniqueChainIds: number[]) => { | ||
const zip = new JSZip(); | ||
// put them all in a folder called 'draws' | ||
const folder = zip.folder('draws'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really a separate feature request, but it would be nice if we included samplerOpts.json in this download as well, for reference. Not necessary in V1 on this, since I think that would make it depend on some other PRs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created new issue.
@@ -197,6 +218,29 @@ const prepareCsvText = (draws: number[][], paramNames: string[], drawChainIds: n | |||
return [['Chain', 'Draw', ...paramNames].join(','), ...lines].join('\n') | |||
} | |||
|
|||
const prepareMultipleCsvsText = (draws: number[][], paramNames: string[], drawChainIds: number[], uniqueChainIds: number[]) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind adding some comments to this function? I’m having a hard time telling the difference between the drawChainIds and the unique ones (or even what size that they would be expected to be)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comments.
New button to export Zip file of multiple csv files for the draws of individual chains.
This includes the changes of #48 enabling convenient comparison of SP ess with stansummary. (Unfortunately these still don't quite match)
@WardBrian I couldn't remember how to name these... I have it as chain_1.csv chain_2.csv etc