Skip to content

Conversation

@js-d
Copy link
Contributor

@js-d js-d commented Jul 1, 2020

I started writing a documentation page called How Turing samplers implement AbstractMCMC. It takes the Interface Guide as a prerequisite, and gives an overview of the structs and functions used in src/inference/ files, taking Importance Sampling as an example.

Among other things, it covers:

  • the links and hierarchy between samplers, sampling methods, states, instances of VarInfo, etc.
  • how assume and observe are used during sampling

I followed the instructions here in order to add the file how_turing_implements_abstractmcmc.md in Turing.jl/docs/src/for-developers, and to build the site locally. However, I am not able to access the new page with my browser, as I get the following error messages:

  • ERROR '/versions.js' not found
  • ERROR '/dev/docs/for-developers/how_turing_implements_abstractmcmc' not found

@js-d js-d requested a review from yebai July 1, 2020 10:06
@devmotion
Copy link
Member

Great, every improvement of the documentation is helpful IMO! However, I guess you only want to add the markdown file but not all other generated files?

BTW we should make sure to update the documentation after switching to TuringLang/AbstractMCMC.jl#42.

This reverts commit 42a74d7.
@devmotion
Copy link
Member

See also TuringLang/AbstractMCMC.jl#43 (comment).

@codecov
Copy link

codecov bot commented Jul 2, 2020

Codecov Report

Merging #1344 into master will increase coverage by 0.06%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1344      +/-   ##
==========================================
+ Coverage   69.61%   69.67%   +0.06%     
==========================================
  Files          27       27              
  Lines        1540     1540              
==========================================
+ Hits         1072     1073       +1     
+ Misses        468      467       -1     
Impacted Files Coverage Δ
src/inference/AdvancedSMC.jl 96.45% <0.00%> (-1.39%) ⬇️
src/variational/advi.jl 63.23% <0.00%> (ø)
src/inference/hmc.jl 85.52% <0.00%> (+0.65%) ⬆️
src/inference/mh.jl 82.92% <0.00%> (+0.66%) ⬆️
src/inference/emcee.jl 97.72% <0.00%> (+2.17%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bbc8c27...ca8b972. Read the comment docs.

@yebai
Copy link
Member

yebai commented Jul 20, 2020

@denainjs is this ready for a review?

Copy link
Member

@yebai yebai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very helpful additional docs on samplers, thanks, @denainjs. There are many immediate files included in this PR (see below). I suggest that we remove them before merging this PR.

@cpfiffer @devmotion Do you have any comments?

@@ -0,0 +1 @@
I"� {"source"=>"/Users/js/Turing.jl/docs", "destination"=>"/Users/js/Turing.jl/docs/_site", "collections_dir"=>"", "cache_dir"=>".jekyll-cache", "plugins_dir"=>"_plugins", "layouts_dir"=>"_layouts", "data_dir"=>"_data", "includes_dir"=>"_includes", "collections"=>{"posts"=>{"output"=>true, "permalink"=>"/:collection/:path"}, "docs"=>{"output"=>true, "permalink"=>"/:collection/:path"}, "tutorials"=>{"output"=>true, "permalink"=>"/:collection/:path"}, "team"=>{"output"=>true, "permalink"=>"/:collection/:path"}}, "safe"=>false, "include"=>[".htaccess"], "exclude"=>[".gems", "_site", "CHANGELOG.md", "CNAME", "LICENSE", "src", "Gemfile", "Gemfile.lock", "jekyll-build", "make.jl", "make-utils.jl", "README.md", "vendor", "test.sh", "*.org", ".sass-cache", ".jekyll-cache", "gemfiles", "node_modules", "vendor/bundle/", "vendor/cache/", "vendor/gems/", "vendor/ruby/"], "keep_files"=>[".git", ".svn"], "encoding"=>"utf-8", "markdown_ext"=>"markdown,mkdown,mkdn,mkd,md", "strict_front_matter"=>false, "show_drafts"=>nil, "limit_posts"=>0, "future"=>false, "unpublished"=>false, "whitelist"=>[], "plugins"=>["jekyll-paginate", "jekyll-sitemap", "jekyll-gist", "jekyll-feed", "jemoji", "jekyll-sitemap"], "markdown"=>"kramdown", "highlighter"=>"rouge", "lsi"=>false, "excerpt_separator"=>"\n\n", "incremental"=>false, "detach"=>false, "port"=>"4000", "host"=>"127.0.0.1", "baseurl"=>"/dev", "show_dir_listing"=>false, "permalink"=>"/:year/:title/", "paginate_path"=>"/page:num", "timezone"=>nil, "quiet"=>false, "verbose"=>false, "defaults"=>[{"scope"=>{"path"=>"_docs", "type"=>"docs"}, "values"=>{"layout"=>"page", "sidebar"=>true}}, {"scope"=>{"path"=>"_tutorials", "type"=>"tutorials"}, "values"=>{"layout"=>"page", "sidebar"=>true}}, {"scope"=>{"path"=>"", "type"=>"pages"}, "values"=>{"layout"=>"page", "sidebar"=>true}}, {"scope"=>{"path"=>"_team", "type"=>"team"}, "values"=>{"layout"=>"team", "sidebar"=>false}}, {"scope"=>{"path"=>"_posts", "type"=>"posts"}, "values"=>{"layout"=>"post", "sidebar"=>false}}], "liquid"=>{"error_mode"=>"warn", "strict_filters"=>false, "strict_variables"=>false}, "kramdown"=>{"auto_ids"=>true, "toc_levels"=>[1, 2, 3, 4, 5, 6], "entity_output"=>"as_char", "smart_quotes"=>"lsquo,rsquo,ldquo,rdquo", "input"=>"GFM", "hard_wrap"=>false, "guess_lang"=>true, "footnote_nr"=>1, "show_warnings"=>false}, "title"=>"Turing.jl", "email"=>"[email protected]", "author"=>"The Turing Team", "description"=>"Turing: A robust, efficient and modular library for general-purpose probabilistic programming.\n", "url"=>"http://localhost:4000", "repo"=>"https://github.com/TuringLang/Turing.jl", "github_user"=>"TuringLang", "github_repo"=>"Turing.jl", "twitter"=>"Turingjl", "linkedin"=>"Turingjl", "dockerhub"=>"Turingjl", "logo"=>"assets/img/favicon.ico", "logo_pixels"=>34, "color"=>"#d2e6f5", "navbarcolor"=>"#073c44", "tag_search_endpoint"=>"https://ask.cyberinfrastructure.org/search?q=", "tag_color"=>"danger", "accentColor"=>"red", "themeColor"=>"red", "fixedNav"=>"true", "livereload_port"=>35729, "serving"=>true, "watch"=>true}:ET No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@denainjs Perhaps consider removing these immediate files from Jekyll?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why .jekyll-cache was checked in. It should be removed from the PR and we should probably add .jekyll-cache to the .gitignore file.


### Samplers

Samplers are **not** the same as algorithms. An algorithm is a generic sampling method, a sampler is an object that stores information about how algorithm and model interact during sampling, and is modified as sampling progresses. The `Sampler` struct is defined in DynamicPPL.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice explanation!

@@ -1,6 +1,3 @@
---
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to keep these yaml headers, I think. Similarly for all other deletions below.

Maybe @cpfiffer can confirm whether we need these.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, these should all be left in.

@yebai yebai merged commit 9049c5e into TuringLang:master Aug 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants