<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Julia Community 🟣: Saransh</title>
    <description>The latest articles on Julia Community 🟣 by Saransh (@saransh).</description>
    <link>https://forem.julialang.org/saransh</link>
    <image>
      <url>https://forem.julialang.org/images/jowK6OSqJ9wFR-Db-oa4fDTfPwBpER5hbc057K8lpKY/rs:fill:90:90/g:sm/mb:500000/ar:1/aHR0cHM6Ly9mb3Jl/bS5qdWxpYWxhbmcu/b3JnL3JlbW90ZWlt/YWdlcy91cGxvYWRz/L3VzZXIvcHJvZmls/ZV9pbWFnZS8zOTEv/MjUzNWJiOGItZjY5/ZS00NmQ0LTg1MDgt/YTliMjJmODFmMmNi/LmpwZWc</url>
      <title>Julia Community 🟣: Saransh</title>
      <link>https://forem.julialang.org/saransh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.julialang.org/feed/saransh"/>
    <language>en</language>
    <item>
      <title>My experience working as a Technical Writer with FluxML - Part 2</title>
      <dc:creator>Saransh</dc:creator>
      <pubDate>Sun, 06 Nov 2022 14:28:40 +0000</pubDate>
      <link>https://forem.julialang.org/saransh/my-experience-working-as-a-technical-writer-with-fluxml-part-2-4npj</link>
      <guid>https://forem.julialang.org/saransh/my-experience-working-as-a-technical-writer-with-fluxml-part-2-4npj</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;“One thing that open-source can’t get enough of is documentation”&lt;/p&gt;

&lt;p&gt;— Anonymous&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I have finally completed my official period as a Technical Writer at &lt;code&gt;FluxML&lt;/code&gt;, and I have enjoyed every second of it! This blog serves as a summary of the work done during the second half of my time at &lt;code&gt;FluxML&lt;/code&gt;. You'd notice that the contributions listed in this blog would cover the entire &lt;code&gt;FluxML&lt;/code&gt; ecosystem and not just &lt;code&gt;Flux.jl&lt;/code&gt;. Furthermore, I will also list some additional documentation contributions made to the much larger &lt;code&gt;Julia&lt;/code&gt; ecosystem during this period!&lt;/p&gt;

&lt;p&gt;A quick introduction to &lt;code&gt;FluxML&lt;/code&gt;, quoting their documentation -&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Flux is a 100% pure-Julia stack and provides lightweight abstractions on top of Julia's native GPU and AD support. It makes the easy things easy while remaining fully hackable.&lt;/p&gt;

&lt;p&gt;Flux is a library for machine learning geared towards high-performance production pipelines. It comes "batteries-included" with many useful tools built in, but also lets you use the full power of the Julia language where you need it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Honestly, the nature of my work at &lt;code&gt;FluxML&lt;/code&gt; diverged so quickly that summarising it would be a difficult task, but I will try my best! Buckle up! Psst, you can find more about the first half of the time spent at &lt;code&gt;FluxML&lt;/code&gt; &lt;a href="http://saransh-cpp.github.io/blog/2022/fluxml-tw-pt1/"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting started section
&lt;/h2&gt;

&lt;p&gt;Let's start from where I left the last blog - the new "Getting Started" section. The good news is that &lt;code&gt;Flux&lt;/code&gt; has a better structured "Getting Started" section now! The bad news is that I did not work on it, but the second good news is that it turned out better than the one I had in mind!&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Flux&lt;/code&gt; had a lot of tutorials and examples, but they were scattered around and very hard to navigate through. The old “Getting Started” section, “Overview” section, and “Basics” section had valuable information for beginners, but the information was scattered among these three sections. Now, all of these sections have been combined (a huge thanks to &lt;a href="https://github.com/mcabbott"&gt;&lt;code&gt;@mcabbott&lt;/code&gt;&lt;/a&gt;) in a single "Getting Started" section in &lt;code&gt;Flux&lt;/code&gt;'s docs! We still have a Getting Started page on &lt;code&gt;Flux&lt;/code&gt;'s website, but it will be either migrated or scrapped very soon!&lt;/p&gt;

&lt;p&gt;Have a look at the new "Getting Started" section &lt;a href="https://fluxml.ai/Flux.jl/dev/"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tutorials section
&lt;/h2&gt;

&lt;p&gt;The new (and different than the one I imagined) "Getting Started" prompted a discussion on revamping the existing "Tutorials" section present on &lt;code&gt;FluxML&lt;/code&gt;'s website. This section is currently heavily outdated and is not updated very regularly, which often misguides or scares newcomers.&lt;/p&gt;

&lt;p&gt;We are planning to migrate these tutorials to &lt;code&gt;Flux&lt;/code&gt;'s documentation to keep them up-to-date using doctests. The contents I initially planned for the new "Getting Started" section are now planned to go into the revamped "Tutorials" section.&lt;/p&gt;

&lt;p&gt;Have a look at the new "Tutorials" section &lt;a href="https://fluxml.ai/Flux.jl/dev/models/advanced/"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Independent docs for NNlib.jl
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;NNlib&lt;/code&gt; now has standalone docs! &lt;code&gt;NNlib&lt;/code&gt;'s documentation used to live as an independent page under &lt;code&gt;Flux&lt;/code&gt;'s documentation, which was not helpful, as &lt;code&gt;NNlib&lt;/code&gt; is an independent &lt;code&gt;Julia&lt;/code&gt; package. This was not convenient for both the users and the developers of &lt;code&gt;NNlib&lt;/code&gt;, as one had to constantly refer to the section in &lt;code&gt;Flux&lt;/code&gt;'s documentation to get &lt;code&gt;NNlib&lt;/code&gt; working.&lt;/p&gt;

&lt;p&gt;My work here started with migrating the existing page from &lt;code&gt;Flux&lt;/code&gt;'s documentation to &lt;code&gt;NNlib&lt;/code&gt;, which was then iterated through helpful reviews! This page was then included in a brand new documentation infrastructure, which was merged way back, but the documentation did not appear live until a few days back. The delay in the deployment of the documentation was caused by a few minor &lt;code&gt;Documenter.jl&lt;/code&gt; and &lt;code&gt;DOCUMENTER_KEY&lt;/code&gt; related bugs which have been resolved.&lt;/p&gt;

&lt;p&gt;Have a look at &lt;code&gt;NNlib&lt;/code&gt;'s updated and independent documentation &lt;a href="https://fluxml.ai/NNlib.jl"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Revamped docs for Metalhead.jl
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Metalhead.jl&lt;/code&gt; saw a great amount of development this summer, thanks to a GSoC project led by &lt;a href="https://github.com/theabhirath"&gt;&lt;code&gt;@theabhirath&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://github.com/darsnack"&gt;&lt;code&gt;@darsnack&lt;/code&gt;&lt;/a&gt;. With all of this development, it was required to revamp the old &lt;code&gt;Publish.jl&lt;/code&gt; infrastructure to a modern &lt;code&gt;Documenter.jl&lt;/code&gt; infrastructure. This invited numerous discussions from FluxML maintainers, given that both the packages have their ups and downs, but in the end, everyone agreed to migrate &lt;code&gt;Metalhead&lt;/code&gt;'s docs to &lt;code&gt;Documenter.jl&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I aimed for a 1:1 port, not adding any information and not removing any information in the porting process, and the new documentation looks beautiful!&lt;/p&gt;

&lt;p&gt;Have a look at &lt;code&gt;Metalhead&lt;/code&gt;'s revamped documentation &lt;a href="https://fluxml.ai/Metalhead.jl/dev/index.html"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Better community health
&lt;/h2&gt;

&lt;p&gt;I have noticed that &lt;code&gt;Julia&lt;/code&gt;'s ecosystem can be a bit daunting for new contributors because of the missing "Community Health" files. Most of the repositories under &lt;code&gt;FluxML&lt;/code&gt; lacked issue and PR templates, making the review and triage process harder than it should be. &lt;code&gt;FluxML&lt;/code&gt; also lacked an organization-wide README, recently introduced by GitHub.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;FluxML&lt;/code&gt; now has default issues and PR templates, which can be overridden by every repository! The organization-wide README is also in its place, guiding newcomers better than ever!&lt;/p&gt;

&lt;p&gt;Have a look at the default issue templates &lt;a href="https://github.com/FluxML/Flux.jl/issues/new/choose"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Have a look at the organization-wide README &lt;a href="https://github.com/FluxML"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Create a PR in a repository under &lt;code&gt;FluxML&lt;/code&gt; to see the default PR template 😉&lt;/p&gt;

&lt;h2&gt;
  
  
  Better docs for OneHotArrays.jl
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Flux.jl&lt;/code&gt; maintainers recently decided to move the "One Hot Encoding" functionalities of &lt;code&gt;Flux&lt;/code&gt; into a separate independent package. As you might have guessed, this called for some documentation audits!&lt;/p&gt;

&lt;p&gt;I have updated and added the docstrings of the &lt;code&gt;OneHot*&lt;/code&gt; structs to &lt;code&gt;OneHotArray&lt;/code&gt;'s manual, making them accessible to the users. I also debugged and helped to build the missing &lt;code&gt;v0.1.0&lt;/code&gt; documentation of &lt;code&gt;OneHotArrays.jl&lt;/code&gt;!&lt;/p&gt;

&lt;p&gt;Have a look at &lt;code&gt;OneHotArray&lt;/code&gt;'s &lt;code&gt;v0.1.0&lt;/code&gt; documentation &lt;a href="https://fluxml.ai/OneHotArrays.jl"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Migrating FluxML's website to Franklin.jl
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Franklin.jl&lt;/code&gt; is a modern static site generator written in &lt;code&gt;Julia&lt;/code&gt;! Quoting their documentation -&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Franklin is a simple, customisable static site generator oriented towards technical blogging and light, fast-loading pages.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;code&gt;FluxML&lt;/code&gt; maintainers decided to port the existing &lt;code&gt;FluxML&lt;/code&gt; website (built using &lt;code&gt;Jekyll&lt;/code&gt;) to &lt;code&gt;Franklin&lt;/code&gt;, and this was primarily carried out by &lt;a href="https://github.com/logankilpatrick"&gt;&lt;code&gt;@logankilpatrick&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://github.com/darsnack"&gt;&lt;code&gt;@darsnack&lt;/code&gt;&lt;/a&gt;. Where do I come in? I helped set up the infrastructure of the new site! I primarily worked on enabling PR previews using GitHub Actions, something not documented in &lt;code&gt;Franklin&lt;/code&gt;'s documentation (and has not been done before). I also fixed some minor bugs revolving around relative paths and production deployment!&lt;/p&gt;

&lt;p&gt;Have a look at the migrated website &lt;a href="https://fluxml.ai"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding a new section to Franklin.jl's docs 😉
&lt;/h2&gt;

&lt;p&gt;Referring to the section above, I decided to update &lt;code&gt;Franklin.jl&lt;/code&gt;'s documentation to include a section on deploying PR previews using GitHub Actions. This eliminated the need for extra infrastructure and also lead to restructuring the original "deploy" documentation of &lt;code&gt;Franklin&lt;/code&gt;. The revamped "deploy" documentation provides much more options to a user and is easier to navigate through.&lt;/p&gt;

&lt;p&gt;I also took the liberty to update outdated documentation of &lt;code&gt;Franklin&lt;/code&gt;, including outdated GitHub Actions and variable definitions!&lt;/p&gt;

&lt;p&gt;Have a look at the revamped deployment page &lt;a href="https://franklinjl.org/workflow/deploy/"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Misc
&lt;/h2&gt;

&lt;p&gt;I cannot possibly think of writing this section without missing out on something. I worked extensively on miscellaneous issues, not limited only to &lt;code&gt;Flux.jl&lt;/code&gt;, but also related to &lt;code&gt;FluxML&lt;/code&gt; as a whole. These miscellaneous issues ranged from refining existing &lt;code&gt;FluxML&lt;/code&gt;'s logos to developing and fixing CI/CD pipelines of &lt;code&gt;FluxML&lt;/code&gt; packages.&lt;/p&gt;

&lt;p&gt;Additionally, while working with &lt;code&gt;Franklin.jl&lt;/code&gt;, I discovered that &lt;code&gt;Julia&lt;/code&gt;'s website is open-source and written in &lt;code&gt;Franklin&lt;/code&gt;! I took this opportunity to update some outdated Actions and syntax on the website. Currently, I am also looking at migrating Julia's website to the new GitHub Pages infrastructure, or the new PR preview infrastructure (mentioned in the section above).&lt;/p&gt;

&lt;p&gt;Refer to my GitHub for all the "misc" work carried out by me during the past six months 🙂&lt;/p&gt;

&lt;h2&gt;
  
  
  Minor code contributions 😉
&lt;/h2&gt;

&lt;p&gt;Surprisingly, I also contributed to &lt;code&gt;Flux&lt;/code&gt;'s code. The code contributions weren't in the form of feature additions, instead, I worked on minor bugs and refined the public API.&lt;/p&gt;

&lt;p&gt;For instance, I deprecated &lt;code&gt;rng_from_array()&lt;/code&gt; in the favor of &lt;code&gt;default_rng_value()&lt;/code&gt;, and then marked it as &lt;code&gt;@non_differentiable&lt;/code&gt;. These contributions weren't too big, but adding code to &lt;code&gt;Flux&lt;/code&gt;'s repository did feel good. I look forward to writing more code for &lt;code&gt;FluxML&lt;/code&gt; in the future! &lt;/p&gt;

&lt;h2&gt;
  
  
  Final words
&lt;/h2&gt;

&lt;p&gt;I will be forever grateful to the whole FluxML community for giving me such a wonderful time! I do feel like I have accomplished a bit in the last 6 months, and the documentation of FluxML is at a better place than the point when I started.&lt;/p&gt;

&lt;p&gt;A special thanks to &lt;a href="https://github.com/DhairyaLGandhi"&gt;&lt;code&gt;@DhairyaLGandhi&lt;/code&gt;&lt;/a&gt;, &lt;a href="https://github.com/ToucheSir"&gt;&lt;code&gt;@ToucheSir&lt;/code&gt;&lt;/a&gt;, &lt;a href="https://github.com/mcabbott"&gt;&lt;code&gt;@mcabbott&lt;/code&gt;&lt;/a&gt;, and &lt;a href="https://github.com/darsnack"&gt;&lt;code&gt;@darsnack&lt;/code&gt;&lt;/a&gt; for bearing with me through my untidy PRs and helping me out as always!&lt;/p&gt;

&lt;p&gt;Oh, I also joined FluxML's GitHub organisation a few weeks back! 🥳&lt;/p&gt;

&lt;h2&gt;
  
  
  Tweets
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://twitter.com/saranshchopra7/status/1581569050555330560"&gt;https://twitter.com/saranshchopra7/status/1581569050555330560&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Appendix
&lt;/h2&gt;

&lt;h3&gt;
  
  
  PRs and issues
&lt;/h3&gt;

&lt;p&gt;Either I created these PRs/issues, or I had some significant involvement in them 😄&lt;/p&gt;

&lt;h4&gt;
  
  
  Flux.jl
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/pull/2035"&gt;Fix the last remaining 404 errors&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/pull/2046"&gt;Better docs for reexported packages&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/pull/2055"&gt;Leftover changes from #2046&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/pull/2063"&gt;Add a dark mode version of logo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/pull/2064"&gt;Fix a few crossrefs + update Zygote's page&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/pull/2065"&gt;Make rng_from_array non differentiable&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/pull/2081"&gt;Back to create_bias&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/pull/2074"&gt;Add GH action format check files with JuliaFormatter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/issues/2086"&gt;@autosize does not work with semi-colon separated kwargs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/issues/2038"&gt;Discussion: documentation for @reexported and imported (or using) packages&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Metalhead.jl
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Metalhead.jl/pull/199"&gt;Migrate docs to Documenter.jl&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  NNlib.jl
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/NNlib.jl/pull/431"&gt;Add minimal infrastructure for the docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/NNlib.jl/pull/438"&gt;Create root level index.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/NNlib.jl/pull/440"&gt;Trigger tagbot on issue comments&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/NNlib.jl/issues/430"&gt;Create independent documentation for NNlib.jl?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  OneHotArrays.jl
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/OneHotArrays.jl/pull/18"&gt;minor doc additions and fixes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/OneHotArrays.jl/issues/19"&gt;Missing v0.1.0 docs + add docs URL in About section&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  fluxml.github.io
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/fluxml.github.io/pull/146"&gt;Use the latest API of MLDatasets.MNIST&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/fluxml.github.io/pull/154"&gt;Use relative folder paths instead of root paths to fix previews&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/fluxml.github.io/pull/145"&gt;Port website to Franklin.jl&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/fluxml.github.io/issues/141"&gt;Discussion: Update and periodically test posts and model-zoo tutorials&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Franklin.jl
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/tlienart/Franklin.jl/pull/982"&gt;New section on previews using GH Actions + update outdated deployment workflows&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/tlienart/Franklin.jl/issues/980"&gt;Rendering and deploying previews using GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/tlienart/Franklin.jl/pull/981"&gt;Indent YAML block&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;a href="http://www.julialang.org"&gt;www.julialang.org&lt;/a&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/JuliaLang/www.julialang.org/pull/1760"&gt;Update outdated Actions and syntax for variable definition&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/JuliaLang/www.julialang.org/issues/1719"&gt;Use the new github pages deployment workflow&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  .github
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/.github/pull/3"&gt;Add PR template, README, and contact links&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/.github/issues/2"&gt;Discussion: Flesh out FluxML/.github repository&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>fluxml</category>
      <category>techincalwriter</category>
      <category>jsoc</category>
      <category>ml</category>
    </item>
    <item>
      <title>My experience working as a Technical Writer with FluxML - Part 1</title>
      <dc:creator>Saransh</dc:creator>
      <pubDate>Sun, 06 Nov 2022 14:26:51 +0000</pubDate>
      <link>https://forem.julialang.org/saransh/my-experience-working-as-a-technical-writer-with-fluxml-part-1-33g</link>
      <guid>https://forem.julialang.org/saransh/my-experience-working-as-a-technical-writer-with-fluxml-part-1-33g</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;“One thing that open-source can’t get enough of is documentation”&lt;/p&gt;

&lt;p&gt;— Anonymous&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This summer, I started working as a technical writer with &lt;code&gt;FluxML&lt;/code&gt; under &lt;code&gt;Julia Season of Contributions&lt;/code&gt;, and as expected, this experience was very different from writing code.&lt;/p&gt;

&lt;p&gt;During the beginning of the summer, I decided to take up a technical writer’s job that involved writing documentation and tutorials for Machine Learning. At the same time, I was learning &lt;code&gt;Julia&lt;/code&gt;, and the &lt;code&gt;FluxML&lt;/code&gt; ecosystem sounded like a perfect place for me. I applied for the position through Google Season of Docs but unfortunately couldn’t get in because of limited openings. Fortunately, the &lt;code&gt;Julia&lt;/code&gt; Language decided to fund me for the next few months to work on &lt;code&gt;FluxML&lt;/code&gt; under Julia Season of Contributions!&lt;/p&gt;

&lt;p&gt;In the following blog, I will share my experience and the work I have done so far as a part of Julia Season of Contributions!&lt;/p&gt;

&lt;p&gt;
    &lt;a href="https://forem.julialang.org/images/RxUNImLgrLGuhaJn7AJr4AK0k4RJdMMFSoqxzWFSH6Q/w:880/mb:500000/ar:1/aHR0cHM6Ly9taXJv/Lm1lZGl1bS5jb20v/bWF4LzEwMzQvMCpx/NkpYT0NWS1YxaUZh/U2RGLmpwZw" class="article-body-image-wrapper"&gt;&lt;img src="https://forem.julialang.org/images/RxUNImLgrLGuhaJn7AJr4AK0k4RJdMMFSoqxzWFSH6Q/w:880/mb:500000/ar:1/aHR0cHM6Ly9taXJv/Lm1lZGl1bS5jb20v/bWF4LzEwMzQvMCpx/NkpYT0NWS1YxaUZh/U2RGLmpwZw" width="517" height="499"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Doctests
&lt;/h2&gt;

&lt;p&gt;
    &lt;a href="https://forem.julialang.org/images/UutIZx_VjM5J4MANwXpjhOIYfHjZWXjauAupdnRJPvs/w:880/mb:500000/ar:1/aHR0cHM6Ly9taXJv/Lm1lZGl1bS5jb20v/bWF4LzE0MDAvMCo4/R1NSZmpNVEFfYlRN/bFlGLmpwZw" class="article-body-image-wrapper"&gt;&lt;img src="https://forem.julialang.org/images/UutIZx_VjM5J4MANwXpjhOIYfHjZWXjauAupdnRJPvs/w:880/mb:500000/ar:1/aHR0cHM6Ly9taXJv/Lm1lZGl1bS5jb20v/bWF4LzE0MDAvMCo4/R1NSZmpNVEFfYlRN/bFlGLmpwZw" width="717" height="348"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Flux&lt;/code&gt;’s documentation lacked doctests, making its code examples stale after each release. Further, many current examples thought to be covered by doctests, were already outdated.&lt;/p&gt;

&lt;p&gt;Some of the doctests were straightforward to add, but most of them require in-depth discussions with the mentors and the community members. In addition, the documentation written in markdown format also required periodic testing to ensure that the changing API does not break the examples.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Flux&lt;/code&gt; now has doctests written for every single public API, and most of the markdown example are also covered under these doctests. Some of these changes haven’t been merged yet, but they are under review!&lt;/p&gt;

&lt;h2&gt;
  
  
  Missing docstrings
&lt;/h2&gt;

&lt;p&gt;
    &lt;a href="https://forem.julialang.org/images/bHoLlJOLfIuB7RBjBHjbkNcRiUdoQnzqdGaqEzI07QU/w:880/mb:500000/ar:1/aHR0cHM6Ly9taXJv/Lm1lZGl1bS5jb20v/bWF4LzEwMDYvMCo4/a24wQ1h5NHI3STFP/WHc2LmpwZw" class="article-body-image-wrapper"&gt;&lt;img src="https://forem.julialang.org/images/bHoLlJOLfIuB7RBjBHjbkNcRiUdoQnzqdGaqEzI07QU/w:880/mb:500000/ar:1/aHR0cHM6Ly9taXJv/Lm1lZGl1bS5jb20v/bWF4LzEwMDYvMCo4/a24wQ1h5NHI3STFP/WHc2LmpwZw" width="503" height="496"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;Some of &lt;code&gt;Flux&lt;/code&gt;’s public API was undocumented, or had a relatively less clear documentation. For example, most of the neural network layers provided by &lt;code&gt;Flux&lt;/code&gt; have two constructors — one for initializing layers with pre-defined weights and biases and another for generating weights and biases from a distribution. In most cases, only one constructor was documented, and the other was not.&lt;/p&gt;

&lt;p&gt;Other such instance of missing docstrings was &lt;code&gt;Flux&lt;/code&gt;‘s manual. Here the docstrings were present in the codebase, but they were not present in the manual. Such cases were solved by adding the docstrings to the manual or creating a new section for such missing docstrings.&lt;/p&gt;

&lt;p&gt;In addition to &lt;code&gt;Flux&lt;/code&gt;, other packages under FluxML also had a similar problem. Some of these packages like &lt;code&gt;NNLib.jl&lt;/code&gt;, &lt;code&gt;Zygote.jl&lt;/code&gt;, &lt;code&gt;Optimisers.jl&lt;/code&gt;, &lt;code&gt;Functors.jl&lt;/code&gt;, and &lt;code&gt;MLUtils.jl&lt;/code&gt; (under &lt;code&gt;JuliaML&lt;/code&gt;) were also referenced in &lt;code&gt;Flux&lt;/code&gt;‘s documentation. The missing docstrings in these packages were transmitted to &lt;code&gt;Flux&lt;/code&gt;‘s docs, resulting in even more missing docstrings.&lt;/p&gt;

&lt;p&gt;All the missing docstrings have now been added to the respective manuals and functions, including that of other &lt;code&gt;FluxML&lt;/code&gt; packages!&lt;/p&gt;

&lt;h2&gt;
  
  
  Broken documentation
&lt;/h2&gt;

&lt;p&gt;
    &lt;a href="https://forem.julialang.org/images/ZZs3t1nrwq1dWxdD844Ln5oUP0kS0yfRgLWW_EOgzQ4/w:880/mb:500000/ar:1/aHR0cHM6Ly9taXJv/Lm1lZGl1bS5jb20v/bWF4LzEwMDAvMCpN/YXJaTkN6ZG5PYjhj/MnZ5LmpwZw" class="article-body-image-wrapper"&gt;&lt;img src="https://forem.julialang.org/images/ZZs3t1nrwq1dWxdD844Ln5oUP0kS0yfRgLWW_EOgzQ4/w:880/mb:500000/ar:1/aHR0cHM6Ly9taXJv/Lm1lZGl1bS5jb20v/bWF4LzEwMDAvMCpN/YXJaTkN6ZG5PYjhj/MnZ5LmpwZw" width="500" height="626"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;Documentation is incomplete without cross-references, and &lt;code&gt;Julia&lt;/code&gt;’s wonderful documentation package makes this super smooth. &lt;code&gt;Flux&lt;/code&gt; had these cross-references in place, but some of them lead to nowhere.&lt;/p&gt;

&lt;p&gt;Additionally, some of the docstrings were not rendered correctly in the manual, making the newcomers stray off from the ecosystem. These instances of broken documentation have been fixed, and once the PR is merged, users should not see 404 pages or un-rendered docstrings anymore!&lt;/p&gt;

&lt;h2&gt;
  
  
  CI/CD
&lt;/h2&gt;

&lt;p&gt;
    &lt;a href="https://forem.julialang.org/images/Va5fKbt6DTuAvJpei7h8DAIcCU2SmCY4Og0PlDMLXQk/w:880/mb:500000/ar:1/aHR0cHM6Ly9taXJv/Lm1lZGl1bS5jb20v/bWF4LzE0MDAvMCpr/NkMxMVQ0Q1IwQjc1/R015LmpwZw" class="article-body-image-wrapper"&gt;&lt;img src="https://forem.julialang.org/images/Va5fKbt6DTuAvJpei7h8DAIcCU2SmCY4Og0PlDMLXQk/w:880/mb:500000/ar:1/aHR0cHM6Ly9taXJv/Lm1lZGl1bS5jb20v/bWF4LzE0MDAvMCpr/NkMxMVQ0Q1IwQjc1/R015LmpwZw" width="735" height="500"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;The user-facing documentation of &lt;code&gt;Flux&lt;/code&gt; is facilitated by a CI/CD service, which keeps this documentation deployed and available to users at all times. It is common for open-source projects to open-source their deployment recipes and work on it collaboratively.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;FluxML&lt;/code&gt;‘s ecosystem had some minor issues in this CI service. For instance - &lt;code&gt;Zygote.jl&lt;/code&gt; had doctests running twice, using twice the CI time and resources. On the other hand, &lt;code&gt;Flux&lt;/code&gt; specified different versions of Julia in its CI and &lt;code&gt;make.jl&lt;/code&gt; file, making the CI environment very ambiguous.&lt;/p&gt;

&lt;p&gt;Further, &lt;code&gt;Documenter.jl&lt;/code&gt; allows a user to generate documentation previews for pull requests, and &lt;code&gt;Flux&lt;/code&gt; had a bot set up to facilitate this, but it was down for a long time. These documentation previews are collected in the &lt;code&gt;gh-pages&lt;/code&gt; branch, which was getting very bulky and had to be cleaned up with an automated workflow.&lt;/p&gt;

&lt;p&gt;I have restarted this bot and have added a workflow for cleaning these generated previews periodically! I have also fixed some issues in &lt;code&gt;Optimisers.jl&lt;/code&gt;‘s documentation that were causing its CI to fail.&lt;/p&gt;

&lt;h2&gt;
  
  
  FluxML’s ecosystem
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;FluxML&lt;/code&gt; ecosystem, in addition to &lt;code&gt;Flux.jl&lt;/code&gt;, also had some documentation problems. For instance, &lt;code&gt;Optimisers.jl&lt;/code&gt; and &lt;code&gt;Zygote.jl&lt;/code&gt; had shortcomings in their CI suite, which have been discussed above. Similarly, &lt;code&gt;Functors.jl&lt;/code&gt; and &lt;code&gt;MLUtils.jl&lt;/code&gt; had broken documentation, missing docstrings, and an incomplete manual, which has also been discussed in great detail above!&lt;/p&gt;

&lt;p&gt;Lastly, the “ecosystem” pages present on &lt;code&gt;Flux&lt;/code&gt;‘s website and documentation were out of sync and had redundant information. The “ecosystem” page was completely revamped and updated with the latest advancements related to Machine Learning in &lt;code&gt;Julia&lt;/code&gt;!&lt;/p&gt;

&lt;h2&gt;
  
  
  Minor code changes
&lt;/h2&gt;

&lt;p&gt;Yes! The documentation changes were also accompanied by minor code changes!&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Flux&lt;/code&gt;‘s public and internal API is very hard to differentiate if you are new to the codebase; hence, newcomers used to find it hard to navigate through this. The API was made clear by removing internal instances from the documentation and prepending an underscore to the internal API.&lt;/p&gt;

&lt;p&gt;Furthermore, I also stumbled upon a bug while writing doctests for tversky loss. The tversky loss has two parameters, &lt;code&gt;α&lt;/code&gt;, and &lt;code&gt;β&lt;/code&gt;, and &lt;code&gt;Flux&lt;/code&gt; internally calculates the value of &lt;code&gt;α&lt;/code&gt; as &lt;code&gt;1-β&lt;/code&gt;. The loss mathematically is defined as &lt;code&gt;1-tversky index&lt;/code&gt;, and the &lt;code&gt;tversky index&lt;/code&gt; mathematically is defined as:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;S(P, G; α, β) = |P G| / (|P G| + α|P \ G| + β|G \ P|)&lt;/p&gt;

&lt;p&gt;where α and β control the magnitude of penalties for FPs and FNs, respectively.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Flux implements the loss in the following way -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight julia"&gt;&lt;code&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="n"&gt;—&lt;/span&gt; &lt;span class="n"&gt;sum&lt;/span&gt;&lt;span class="x"&gt;(&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;.*&lt;/span&gt; &lt;span class="n"&gt;ŷ&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="x"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sum&lt;/span&gt;&lt;span class="x"&gt;(&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;.*&lt;/span&gt; &lt;span class="n"&gt;ŷ&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;β&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="x"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;.-&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="x"&gt;)&lt;/span&gt; &lt;span class="o"&gt;.*&lt;/span&gt; &lt;span class="n"&gt;ŷ&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="x"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="n"&gt;—&lt;/span&gt; &lt;span class="n"&gt;β&lt;/span&gt;&lt;span class="x"&gt;)&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;.*&lt;/span&gt; &lt;span class="x"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;.-&lt;/span&gt; &lt;span class="n"&gt;ŷ&lt;/span&gt;&lt;span class="x"&gt;))&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;with the following code -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight julia"&gt;&lt;code&gt;&lt;span class="s"&gt;"""
     tversky_loss(ŷ, y; β = 0.7)

 Return the [Tversky loss](https://arxiv.org/abs/1706.05721).
 Used with imbalanced data to give more weight to false negatives.
 Larger β weigh recall more than precision (by placing more emphasis on false negatives)
 Calculated as:
     1 - sum(|y .* ŷ| + 1) / (sum(y .* ŷ + β*(1 .- y) .* ŷ + (1 - β)*y .* (1 .- ŷ)) + 1)
 """&lt;/span&gt;
 &lt;span class="k"&gt;function&lt;/span&gt;&lt;span class="nf"&gt; tversky_loss&lt;/span&gt;&lt;span class="x"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ŷ&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="x"&gt;;&lt;/span&gt; &lt;span class="n"&gt;β&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ofeltype&lt;/span&gt;&lt;span class="x"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ŷ&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.7&lt;/span&gt;&lt;span class="x"&gt;))&lt;/span&gt;
     &lt;span class="n"&gt;_check_sizes&lt;/span&gt;&lt;span class="x"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ŷ&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="x"&gt;)&lt;/span&gt;
     &lt;span class="c"&gt;#TODO add agg&lt;/span&gt;
     &lt;span class="n"&gt;num&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sum&lt;/span&gt;&lt;span class="x"&gt;(&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;.*&lt;/span&gt; &lt;span class="n"&gt;ŷ&lt;/span&gt;&lt;span class="x"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
     &lt;span class="n"&gt;den&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sum&lt;/span&gt;&lt;span class="x"&gt;(&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;.*&lt;/span&gt; &lt;span class="n"&gt;ŷ&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;β&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="x"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;.-&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="x"&gt;)&lt;/span&gt; &lt;span class="o"&gt;.*&lt;/span&gt; &lt;span class="n"&gt;ŷ&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="x"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;β&lt;/span&gt;&lt;span class="x"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;.*&lt;/span&gt; &lt;span class="x"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;.-&lt;/span&gt; &lt;span class="n"&gt;ŷ&lt;/span&gt;&lt;span class="x"&gt;))&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
     &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;num&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;den&lt;/span&gt;
 &lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice how the term &lt;code&gt;(1 .- y) .* ŷ&lt;/code&gt; (False Positives) is multiplied by &lt;code&gt;β&lt;/code&gt;, whereas it should be multiplied with &lt;code&gt;α&lt;/code&gt; (which is &lt;code&gt;1-β&lt;/code&gt;). Similarly, the term &lt;code&gt;y .* (1 .- ŷ)&lt;/code&gt; is multiplied with &lt;code&gt;α&lt;/code&gt; (that is &lt;code&gt;1-β&lt;/code&gt;), whereas it should be multiplied with &lt;code&gt;β&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This detail makes the loss function behave in a manner opposite to its documentation. For example -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight julia"&gt;&lt;code&gt;&lt;span class="n"&gt;julia&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="x"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;];&lt;/span&gt;

&lt;span class="n"&gt;julia&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;ŷ_fp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="x"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;];&lt;/span&gt; &lt;span class="c"&gt;# 2 false positive -&amp;gt; 2 wrong predictions&lt;/span&gt;

&lt;span class="n"&gt;julia&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;ŷ_fnp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="x"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="x"&gt;];&lt;/span&gt; &lt;span class="c"&gt;# 1 false negative, 1 false positive -&amp;gt; 2 wrong predictions&lt;/span&gt;

&lt;span class="n"&gt;julia&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Flux&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tversky_loss&lt;/span&gt;&lt;span class="x"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ŷ_fnp&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="x"&gt;)&lt;/span&gt;
&lt;span class="mf"&gt;0.19999999999999996&lt;/span&gt;

&lt;span class="n"&gt;julia&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Flux&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tversky_loss&lt;/span&gt;&lt;span class="x"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ŷ_fp&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="x"&gt;)&lt;/span&gt; &lt;span class="c"&gt;# should be smaller than tversky_loss(ŷ_fnp, y), as FN is given more weight&lt;/span&gt;
&lt;span class="mf"&gt;0.21875&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here the loss for &lt;code&gt;ŷ_fnp&lt;/code&gt;, &lt;code&gt;y&lt;/code&gt; should have been larger than the loss for &lt;code&gt;ŷ_fp&lt;/code&gt;, &lt;code&gt;y&lt;/code&gt; as the loss should give more weight or penalize the False Negatives (default &lt;code&gt;β&lt;/code&gt; is &lt;code&gt;0.7&lt;/code&gt;; hence it should give more weight to FN), but the exact opposite happens.&lt;/p&gt;

&lt;p&gt;Changing the implementation of the loss yields the following results -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight julia"&gt;&lt;code&gt;&lt;span class="n"&gt;julia&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="x"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;];&lt;/span&gt;

&lt;span class="n"&gt;julia&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;ŷ_fp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="x"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;];&lt;/span&gt; &lt;span class="c"&gt;# 2 false positive -&amp;gt; 2 wrong predictions&lt;/span&gt;

&lt;span class="n"&gt;julia&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;ŷ_fnp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="x"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="x"&gt;];&lt;/span&gt; &lt;span class="c"&gt;# 1 false negative, 1 false positive -&amp;gt; 2 wrong predictions&lt;/span&gt;

&lt;span class="n"&gt;julia&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Flux&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tversky_loss&lt;/span&gt;&lt;span class="x"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ŷ_fnp&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="x"&gt;)&lt;/span&gt;
&lt;span class="mf"&gt;0.19999999999999996&lt;/span&gt;

&lt;span class="n"&gt;julia&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Flux&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tversky_loss&lt;/span&gt;&lt;span class="x"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ŷ_fp&lt;/span&gt;&lt;span class="x"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="x"&gt;)&lt;/span&gt; &lt;span class="c"&gt;# should be smaller than tversky_loss(ŷ_fnp, y), as FN is given more weight&lt;/span&gt;
&lt;span class="mf"&gt;0.1071428571428571&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;which looks right!&lt;/p&gt;

&lt;p&gt;(This bug has not been confirmed by someone other than me yet, and the fix is still under review.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting started section
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Flux&lt;/code&gt; has a lot of tutorials and examples, but they are scattered around and are very hard to navigate through. The current “Getting Started” section, “Overview” section, and “Basics” section have valuable information for beginners, but the information is scattered among these three sections.&lt;/p&gt;

&lt;p&gt;Additionally, one of these three sections is on Flux’s website, and two are available on the documentation website, making it difficult for newcomers to navigate between these hackable yet basic examples. Instead, these three tutorials could be moved out of their current places and combined under a single section named “Getting Started”, which could then be added to the documentation and linked on the website.&lt;/p&gt;

&lt;p&gt;I have started working on this section, and two extensive tutorials have already been added as PRs: one on linear regression (with and without &lt;code&gt;Flux&lt;/code&gt;) and one on logistic regression (with and without &lt;code&gt;Flux&lt;/code&gt;). These PRs are currently under review and should be merged in the upcoming weeks.&lt;/p&gt;




&lt;p&gt;I have had an incredible time contributing to &lt;code&gt;Flux&lt;/code&gt; and its neighbor repositories, and I hope to continue these contributions with the same momentum. I have also learned a lot, including that documentation additions require more discussions than code additions.&lt;/p&gt;

&lt;p&gt;This work wouldn’t have been possible without my mentor &lt;a href="https://github.com/DhairyaLGandhi"&gt;&lt;code&gt;@DhairyaLGandhi&lt;/code&gt;&lt;/a&gt; and a lot of other &lt;code&gt;FluxML&lt;/code&gt;’s maintainers (&lt;a href="https://github.com/ToucheSir"&gt;&lt;code&gt;@ToucheSir&lt;/code&gt;&lt;/a&gt;, &lt;a href="https://github.com/mcabbott"&gt;&lt;code&gt;@mcabbott&lt;/code&gt;&lt;/a&gt;, &lt;a href="https://github.com/CarloLucibello"&gt;&lt;code&gt;@CarloLucibello&lt;/code&gt;&lt;/a&gt;, &lt;a href="https://github.com/darsnack"&gt;&lt;code&gt;@darsnack&lt;/code&gt;&lt;/a&gt;). They have been very patient with my questions and messy PRs 😆&lt;/p&gt;




&lt;h2&gt;
  
  
  Tweets
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://twitter.com/saranshchopra7/status/1532365616610672640"&gt;https://twitter.com/saranshchopra7/status/1532365616610672640&lt;/a&gt; &lt;/p&gt;




&lt;h2&gt;
  
  
  Appendix
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Pull requests
&lt;/h3&gt;

&lt;h5&gt;
  
  
  Flux.jl
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/pull/1916"&gt;Add a ton of doctests + fix outdated documentation in .md files&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/pull/1978"&gt;Update docstrings of basic.jl and conv.jl&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/pull/1995"&gt;Update docstrings in upsample.jl, recurrent.jl, and normalise.jl&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/pull/1998"&gt;Miscellaneous docstring additions and fixes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/pull/1910"&gt;Add MLUtils’s docs and fix some missing docstrings&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/pull/1915"&gt;Turn off doctests while building docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/pull/1923"&gt;Unify ecosystem.md&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/pull/1937"&gt;Get the DocBot up again!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/pull/1943"&gt;Add a workflow to delete PR previews&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/pull/1987"&gt;Get rid of documentation warnings and 404 pages&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/pull/2016"&gt;Create a getting started section and add a new linear regression example&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/pull/2021"&gt;Add a logistic regression example to the Getting Started section&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Zygote.jl
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Zygote.jl/pull/1255"&gt;Run doctests only once&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Optimisers.jl
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Optimisers.jl/pull/98"&gt;Fix the doctests and the broken CI&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Functors.jl
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Functors.jl/pull/42"&gt;Fix missing docs and cross-references&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  MLUtils.jl
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/JuliaML/MLUtils.jl/pull/95"&gt;Add missing docstrings to the manual&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Issues / discussions
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Flux.jl
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/issues/1909"&gt;Missing docstring for Flux.Data.Dataloader&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/issues/1914"&gt;Different Julia versions at different places for doctests&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/issues/1922"&gt;Inconsistent “Julia ecosystem” docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/issues/1940"&gt;Add a workflow to clean-up gh-pages branch?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/issues/1990"&gt;Discussion: doctests, docstrings, documentation manual, and unclear internal API (for newcomers)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/issues/1993"&gt;Bug: Swapped alpha and beta in tversky loss?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Flux.jl/issues/2012"&gt;Discussion: Revamped Getting Started guide&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Zygote.jl
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/FluxML/Zygote.jl/issues/1199"&gt;Doctests running twice&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Bonus
&lt;/h2&gt;

&lt;p&gt;
    &lt;a href="https://forem.julialang.org/images/gqo0LhJmb-hKUVIJmFSUBnw6MLNlsQLzfv7VvQ9-550/w:880/mb:500000/ar:1/aHR0cHM6Ly9taXJv/Lm1lZGl1bS5jb20v/bWF4LzEzNDQvMCoy/U0xxS1d0Ul9kR1p3/UkFtLmpwZw" class="article-body-image-wrapper"&gt;&lt;img src="https://forem.julialang.org/images/gqo0LhJmb-hKUVIJmFSUBnw6MLNlsQLzfv7VvQ9-550/w:880/mb:500000/ar:1/aHR0cHM6Ly9taXJv/Lm1lZGl1bS5jb20v/bWF4LzEzNDQvMCoy/U0xxS1d0Ul9kR1p3/UkFtLmpwZw" width="672" height="500"&gt;&lt;/a&gt;
&lt;/p&gt;

</description>
      <category>technicalwriter</category>
      <category>jsoc</category>
      <category>ml</category>
      <category>fluxml</category>
    </item>
  </channel>
</rss>
