flatironinstitute / mcmc-monitor

Monitor MCMC runs in the browser
Other
35 stars 0 forks source link

hook dependency problems #37

Closed magland closed 1 year ago

magland commented 1 year ago

@jsoules I think you may not have the eslint vscode set up the same way that I do. I get a warning of missing dependencies for this section:

https://github.com/flatironinstitute/mcmc-monitor/blob/d09acd5e8c30180f609d02e3757cf8b8b1a2bf3d/src/useMCMCMonitor.ts#L77-L83

Do you see that warning in your vscode?

To resolve this warning:

defaultInitialDrawExclusionOptions should be defined outside of the hook function, otherwise it's a different reference each time.

If detectedWarmupIterationCount only depends on data.chains, then it should take data.chains as the argument rather than data

jsoules commented 1 year ago

Looks like my eslint somehow got turned off. Thanks.

I'll push a fix for these in a sec.