StanJulia / StanIO.jl

Cmdstan related I/O operations
MIT License
1 stars 0 forks source link

Reducing dependencies using extensions #3

Open sethaxen opened 2 months ago

sethaxen commented 2 months ago

It looks like roughly half the package load time is due to the DataFrames dependency alone. For users who want to load Stan draws in a different format, this dependency is unnecessary. Could extensions be used to turn any of the package dependencies (especially DataFrames) into weak dependencies?

goedman commented 2 months ago

Yes, this is a valid question and certainly doable. So is a related point made by Brian Ward in Issue 2. The current implementation is kind of interwoven with (nested) DataFrames as was in fact my intention with implementing Brian's Python solution.

All of this is part of a decision I made a few years ago: Focus on Stan[Sample, Diagnose, Optimise]/DataFrames/Makie(Graphs)/CausalInference/"a psis option" for the Pluto notebooks of Statistical Rethinking and Regression And Other Stories. But even with those constraints, I am simply running out of cycles.

So I'm hoping someone else is able to step in. If not, I will try to look into a single NamedTuple option after completing a few non-Julia projects.