Git Product home page Git Product logo

Comments (8)

goedman avatar goedman commented on June 1, 2024

That place is in src/require/turing in StatisticalRethinking.jl. The same is true for StatisticalRethinkingPlots.jl. Both hold subdirs named src/require/[Stan|Turing|...] which will be included by Requires.jl if e.g. Turing or StanSample is included.

from sr2turingpluto.jl.

goedman avatar goedman commented on June 1, 2024

StatisticalRethinkingStan and StatisticalRethinkingTuring only provide the (package) environment and the (basic) snippets/clips/codes in Pluto notebooks. These are Julia projects, not packages.

from sr2turingpluto.jl.

goedman avatar goedman commented on June 1, 2024

I am taking a look how your versions of the Jupiter notebooks would work in Pluto. I've completed first stabs for chapters 2, 3 and 7 (that's how I started this) and 4 partially. I think they work well but are in some cases too long for Pluto.

My view on these projects is a user downloads them once and then the downloaded version becomes your own work copy as you continue to explore, extent and add stuff (e.g. exercises?) to the local project repo.

from sr2turingpluto.jl.

goedman avatar goedman commented on June 1, 2024

Your versions are called Chapter-02.jl, Chapter_03.jl, etc.. If you don't agree with using your versions, just let me know, I'll keep them locally and remove them from the master repo. If we leave them there we should list you as an author (in fact the first author) and I will take that along as I update the README.

from sr2turingpluto.jl.

goedman avatar goedman commented on June 1, 2024

There are multiple ways of doing this in Julia.

I opted to use projects, which are not registered (but can be tagged) and a user can store these wherever they like. That local directory gives users read & write access. But projects are not really intended to hold source code to be included in other packages, Projects are typically saved in the repository including a Manifest.toml file.

The other way, as suggested in your question, would be to turn these into a package. Packages are stored in .julia/packages and users can not write to that directory. The notebooks would have to be duplicated to a different location if they need to be modified. Or such users could work with the package dev-ed. By using a package, we could add src code and drop the whole Requires.jl approach.

StatisticalRethinking.jl for about 4 years or so indeed was Jupiter notebook based. It became rather unwieldy over time and when I started to think about also supporting Turing.

But nothing is cast in concrete!

from sr2turingpluto.jl.

Shmuma avatar Shmuma commented on June 1, 2024

Hi!

Thanks for the explanation. At the moment the question is not urgent at all, just having a small piece of code (method to sample from ModeResult objects, produced by optimize()), which relies on Turing, but also generic enough to be put in the package, rather than copy-paste in notebooks.

In principle, I can contribute it to the Turing.jl itself, but it might take a while before merging. So, my though was to put it in the StatisticalRethinking somewhere.

from sr2turingpluto.jl.

goedman avatar goedman commented on June 1, 2024

I would suggest to maybe put it into a new file StatisticalRethinking/src/require/Turing/turing_sample.jl?

I know there is currently no sample method on turing quap objects in Turing (as far as I know), that would be another good method to put in that file if you need it. Or maybe we're talking in fact about the same functionality here.

By adding include("turing_sample.jl") to src/require/Turing.jl it will be loaded if Turing is present.

from sr2turingpluto.jl.

Shmuma avatar Shmuma commented on June 1, 2024

Yes, sure, will do

from sr2turingpluto.jl.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.