<?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>DEV Community: João Santiago</title>
    <description>The latest articles on DEV Community by João Santiago (@jcpsantiago).</description>
    <link>https://dev.to/jcpsantiago</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F359670%2Fd6f8a5cb-6afb-45ee-bbf3-3d1a9da53356.jpeg</url>
      <title>DEV Community: João Santiago</title>
      <link>https://dev.to/jcpsantiago</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jcpsantiago"/>
    <language>en</language>
    <item>
      <title>Print DVC plots and metrics directly in the terminal</title>
      <dc:creator>João Santiago</dc:creator>
      <pubDate>Mon, 07 Sep 2020 11:05:56 +0000</pubDate>
      <link>https://dev.to/jcpsantiago/print-dvc-plots-and-metrics-directly-in-the-terminal-1c6g</link>
      <guid>https://dev.to/jcpsantiago/print-dvc-plots-and-metrics-directly-in-the-terminal-1c6g</guid>
      <description>&lt;p&gt;&lt;a href="https://dvc.org/"&gt;DVC&lt;/a&gt; has changed the way I handle Machine Learning projects for the better. The &lt;code&gt;dvc plots diff&lt;/code&gt; command is a great way to see the effect of rounds of experimentation. &lt;/p&gt;

&lt;p&gt;If you use the &lt;a href="https://sw.kovidgoyal.net/kitty/index.html"&gt;kitty&lt;/a&gt; terminal, it's possible to print DVC plots directly in the terminal without opening an external program/browser. I wrote a function for the &lt;a href="https://fishshell.com/"&gt;fish shell&lt;/a&gt; to simplify this process.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JD35hrkh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1olzyqp8nowcjmt5vdic.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JD35hrkh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1olzyqp8nowcjmt5vdic.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Assuming you are using &lt;code&gt;fish&lt;/code&gt; as your shell, save this code as ~/.config/fish/functions/plotit.fish&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;Then refresh your shell with &lt;code&gt;source ~/.config/fish/functions/plotit.fish&lt;/code&gt;. Finally, install &lt;code&gt;jq&lt;/code&gt; and &lt;code&gt;vega-cli&lt;/code&gt;, if you don't have them in your system yet.&lt;/p&gt;

&lt;p&gt;Example usage when inside a DVC-enabled project:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;plotit pr_curve.csv&lt;/code&gt; -&amp;gt; prints diff plot with width x height of 500px x 500px and x set to row-index and y to the second column of the csv&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;plotit pr_curve.csv recall precision&lt;/code&gt; -&amp;gt; same as above but selects the columns for x and y&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;plotit pr_curve.csv recall precision 800 800&lt;/code&gt; -&amp;gt; with custom width and height in pixels&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>dvc</category>
      <category>machinelearning</category>
      <category>commandline</category>
    </item>
  </channel>
</rss>
