Repository: lf1-io/padl (language: python)

Issue:
Support for old variables
## 🛰️ Feature

In `aleph` we had variables which could be specified at load time, and which were not saved with the model (because that didn't necessarily always make sense.

At load time we had `load(path, some_variable_to_be_changed=<value>)`. This makes sense for many training scenarios. 


Discussion / hints:

Fix patch:
diff --git a/docs/src/advanced/saving.md b/docs/src/advanced/saving.md
index ba8e5cc5..12b61985 100644
--- a/docs/src/advanced/saving.md
+++ b/docs/src/advanced/saving.md
@@ -255,6 +255,34 @@ x = value(x, (mysaver, myloader))
 [...]
 ```
 
+## Parameters
+
+Using {func}`padl.param` one can specify parameters which can then be overridden when loading files.
+
+```python
+from padl import transform, param, load
+
+x = param(1, name='x', description='add this much')
+
+@transform
+def f(y):
+  return x + y
+
+save(f, 'f.padl')
+```
+
+When loading a Transform that uses a parameter, one can specify the value of the parameter as a keyword argument to {func}`padl.load`:
+
+```python
+>>> from padl import load
+>>> f = load('f.padl', x=1000)
+>>> f(1)
+1001
+```
+
+Params usually have a default value. One can force the user to provide them with
+`use_default=False`.
+
 ## Saving pytorch modules
 
 When saving, PADL automatically serializes pytorch model parameters and stores them in the `.padl`
diff --git a/docs/unstable/README.html b/docs/unstable/README.html
index 2816ce1e..9ede3f65 100644
--- a/docs/unstable/README.html
+++ b/docs/unstable/README.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/_sources/advanced/saving.md.txt b/docs/unstable/_sources/advanced/saving.md.txt
index ba8e5cc5..12b61985 100644
--- a/docs/unstable/_sources/advanced/saving.md.txt
+++ b/docs/unstable/_sources/advanced/saving.md.txt
@@ -255,6 +255,34 @@ x = value(x, (mysaver, myloader))
 [...]
 ```
 
+## Parameters
+
+Using {func}`padl.param` one can specify parameters which can then be overridden when loading files.
+
+```python
+from padl import transform, param, load
+
+x = param(1, name='x', description='add this much')
+
+@transform
+def f(y):
+  return x + y
+
+save(f, 'f.padl')
+```
+
+When loading a Transform that uses a parameter, one can specify the value of the parameter as a keyword argument to {func}`padl.load`:
+
+```python
+>>> from padl import load
+>>> f = load('f.padl', x=1000)
+>>> f(1)
+1001
+```
+
+Params usually have a default value. One can force the user to provide them with
+`use_default=False`.
+
 ## Saving pytorch modules
 
 When saving, PADL automatically serializes pytorch model parameters and stores them in the `.padl`
diff --git a/docs/unstable/advanced.html b/docs/unstable/advanced.html
index e0269bdb..22b07b86 100644
--- a/docs/unstable/advanced.html
+++ b/docs/unstable/advanced.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/advanced/saving.html b/docs/unstable/advanced/saving.html
index 9f8f40a7..597415aa 100644
--- a/docs/unstable/advanced/saving.html
+++ b/docs/unstable/advanced/saving.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
@@ -393,6 +394,30 @@ <h3>Custom serializers<a class="headerlink" href="#custom-serializers" title="Pe
 </div>
 </section>
 </section>
+<section id="parameters">
+<h2>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline"></a></h2>
+<p>Using <a class="reference internal" href="../apidocs/padl.html#padl.param" title="padl.param"><code class="xref py py-func docutils literal notranslate"><span class="pre">padl.param()</span></code></a> one can specify parameters which can then be overridden when loading files.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">padl</span> <span class="kn">import</span> <span class="n">transform</span><span class="p">,</span> <span class="n">param</span><span class="p">,</span> <span class="n">load</span>
+
+<span class="n">x</span> <span class="o">=</span> <span class="n">param</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s1">&#39;x&#39;</span><span class="p">,</span> <span class="n">description</span><span class="o">=</span><span class="s1">&#39;add this much&#39;</span><span class="p">)</span>
+
+<span class="nd">@transform</span>
+<span class="k">def</span> <span class="nf">f</span><span class="p">(</span><span class="n">y</span><span class="p">):</span>
+  <span class="k">return</span> <span class="n">x</span> <span class="o">+</span> <span class="n">y</span>
+
+<span class="n">save</span><span class="p">(</span><span class="n">f</span><span class="p">,</span> <span class="s1">&#39;f.padl&#39;</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>When loading a Transform that uses a parameter, one can specify the value of the parameter as a keyword argument to <a class="reference internal" href="../apidocs/padl.html#padl.load" title="padl.load"><code class="xref py py-func docutils literal notranslate"><span class="pre">padl.load()</span></code></a>:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">padl</span> <span class="kn">import</span> <span class="n">load</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">f</span> <span class="o">=</span> <span class="n">load</span><span class="p">(</span><span class="s1">&#39;f.padl&#39;</span><span class="p">,</span> <span class="n">x</span><span class="o">=</span><span class="mi">1000</span><span class="p">)</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">f</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
+<span class="go">1001</span>
+</pre></div>
+</div>
+<p>Params usually have a default value. One can force the user to provide them with
+<code class="docutils literal notranslate"><span class="pre">use_default=False</span></code>.</p>
+</section>
 <section id="saving-pytorch-modules">
 <h2>Saving pytorch modules<a class="headerlink" href="#saving-pytorch-modules" title="Permalink to this headline"></a></h2>
 <p>When saving, PADL automatically serializes pytorch model parameters and stores them in the <code class="docutils literal notranslate"><span class="pre">.padl</span></code>
diff --git a/docs/unstable/apidocs/padl.dumptools.ast_utils.html b/docs/unstable/apidocs/padl.dumptools.ast_utils.html
index 285d63d7..9da6d323 100644
--- a/docs/unstable/apidocs/padl.dumptools.ast_utils.html
+++ b/docs/unstable/apidocs/padl.dumptools.ast_utils.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="../advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/apidocs/padl.dumptools.html b/docs/unstable/apidocs/padl.dumptools.html
index 1ac037a4..8e253faf 100644
--- a/docs/unstable/apidocs/padl.dumptools.html
+++ b/docs/unstable/apidocs/padl.dumptools.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="../advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/apidocs/padl.dumptools.inspector.html b/docs/unstable/apidocs/padl.dumptools.inspector.html
index c9e70446..f5df8312 100644
--- a/docs/unstable/apidocs/padl.dumptools.inspector.html
+++ b/docs/unstable/apidocs/padl.dumptools.inspector.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="../advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/apidocs/padl.dumptools.packagefinder.html b/docs/unstable/apidocs/padl.dumptools.packagefinder.html
index d719f11c..50e3813a 100644
--- a/docs/unstable/apidocs/padl.dumptools.packagefinder.html
+++ b/docs/unstable/apidocs/padl.dumptools.packagefinder.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="../advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/apidocs/padl.dumptools.serialize.html b/docs/unstable/apidocs/padl.dumptools.serialize.html
index ee1698e1..7496e29c 100644
--- a/docs/unstable/apidocs/padl.dumptools.serialize.html
+++ b/docs/unstable/apidocs/padl.dumptools.serialize.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="../advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
@@ -225,6 +226,25 @@
 <dd><p>Loader for json.</p>
 </dd></dl>
 
+<dl class="py function">
+<dt class="sig sig-object py" id="padl.dumptools.serialize.param">
+<span class="sig-prename descclassname"><span class="pre">padl.dumptools.serialize.</span></span><span class="sig-name descname"><span class="pre">param</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">val</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">description</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">use_default</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#padl.dumptools.serialize.param" title="Permalink to this definition"></a></dt>
+<dd><p>Helper function for marking parameters.</p>
+<p>Parameters can be overridden when loading. See also <a class="reference internal" href="padl.html#padl.load" title="padl.load"><code class="xref py py-func docutils literal notranslate"><span class="pre">padl.load()</span></code></a>.</p>
+<dl class="field-list simple">
+<dt class="field-odd">Parameters</dt>
+<dd class="field-odd"><ul class="simple">
+<li><p><strong>val</strong> – The default value of the parameter / the value before saving.</p></li>
+<li><p><strong>name</strong> – The name of the parameter.</p></li>
+<li><p><strong>use_default</strong> – If True, will use <em>val</em> when loading without specifying a different value.</p></li>
+</ul>
+</dd>
+<dt class="field-even">Returns</dt>
+<dd class="field-even"><p><em>val</em></p>
+</dd>
+</dl>
+</dd></dl>
+
 <dl class="py function">
 <dt class="sig sig-object py" id="padl.dumptools.serialize.save_json">
 <span class="sig-prename descclassname"><span class="pre">padl.dumptools.serialize.</span></span><span class="sig-name descname"><span class="pre">save_json</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">val</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">path</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#padl.dumptools.serialize.save_json" title="Permalink to this definition"></a></dt>
diff --git a/docs/unstable/apidocs/padl.dumptools.sourceget.html b/docs/unstable/apidocs/padl.dumptools.sourceget.html
index afd9180b..739bb71f 100644
--- a/docs/unstable/apidocs/padl.dumptools.sourceget.html
+++ b/docs/unstable/apidocs/padl.dumptools.sourceget.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="../advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
@@ -321,6 +322,12 @@
 </dl>
 </dd></dl>
 
+<dl class="py function">
+<dt class="sig sig-object py" id="padl.dumptools.sourceget.replace">
+<span class="sig-prename descclassname"><span class="pre">padl.dumptools.sourceget.</span></span><span class="sig-name descname"><span class="pre">replace</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">string</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">repl</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">from_line</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">to_line</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">from_col</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">to_col</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#padl.dumptools.sourceget.replace" title="Permalink to this definition"></a></dt>
+<dd><p>Replace a substring in <em>string</em> with <em>repl</em>.</p>
+</dd></dl>
+
 </section>
 
 
diff --git a/docs/unstable/apidocs/padl.dumptools.symfinder.html b/docs/unstable/apidocs/padl.dumptools.symfinder.html
index 0ab8b34c..4957a407 100644
--- a/docs/unstable/apidocs/padl.dumptools.symfinder.html
+++ b/docs/unstable/apidocs/padl.dumptools.symfinder.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="../advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/apidocs/padl.dumptools.var2mod.html b/docs/unstable/apidocs/padl.dumptools.var2mod.html
index f3316420..6ec720e2 100644
--- a/docs/unstable/apidocs/padl.dumptools.var2mod.html
+++ b/docs/unstable/apidocs/padl.dumptools.var2mod.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="../advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/apidocs/padl.exceptions.html b/docs/unstable/apidocs/padl.exceptions.html
index 2b1bde59..383e8a16 100644
--- a/docs/unstable/apidocs/padl.exceptions.html
+++ b/docs/unstable/apidocs/padl.exceptions.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="../advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/apidocs/padl.html b/docs/unstable/apidocs/padl.html
index 9c5c2827..2a62979c 100644
--- a/docs/unstable/apidocs/padl.html
+++ b/docs/unstable/apidocs/padl.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="../advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
@@ -313,8 +314,28 @@
 
 <dl class="py function">
 <dt class="sig sig-object py" id="padl.load">
-<span class="sig-prename descclassname"><span class="pre">padl.</span></span><span class="sig-name descname"><span class="pre">load</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#padl.load" title="Permalink to this definition"></a></dt>
+<span class="sig-prename descclassname"><span class="pre">padl.</span></span><span class="sig-name descname"><span class="pre">load</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#padl.load" title="Permalink to this definition"></a></dt>
 <dd><p>Load a transform (as saved with padl.save) from <em>path</em>.</p>
+<p>Use keyword arguments to override params (see <a class="reference internal" href="#padl.param" title="padl.param"><code class="xref py py-func docutils literal notranslate"><span class="pre">padl.param()</span></code></a>).</p>
+</dd></dl>
+
+<dl class="py function">
+<dt class="sig sig-object py" id="padl.param">
+<span class="sig-prename descclassname"><span class="pre">padl.</span></span><span class="sig-name descname"><span class="pre">param</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">val</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">description</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">use_default</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#padl.param" title="Permalink to this definition"></a></dt>
+<dd><p>Helper function for marking parameters.</p>
+<p>Parameters can be overridden when loading. See also <a class="reference internal" href="#padl.load" title="padl.load"><code class="xref py py-func docutils literal notranslate"><span class="pre">padl.load()</span></code></a>.</p>
+<dl class="field-list simple">
+<dt class="field-odd">Parameters</dt>
+<dd class="field-odd"><ul class="simple">
+<li><p><strong>val</strong> – The default value of the parameter / the value before saving.</p></li>
+<li><p><strong>name</strong> – The name of the parameter.</p></li>
+<li><p><strong>use_default</strong> – If True, will use <em>val</em> when loading without specifying a different value.</p></li>
+</ul>
+</dd>
+<dt class="field-even">Returns</dt>
+<dd class="field-even"><p><em>val</em></p>
+</dd>
+</dl>
 </dd></dl>
 
 <dl class="py function">
diff --git a/docs/unstable/apidocs/padl.print_utils.html b/docs/unstable/apidocs/padl.print_utils.html
index b3daee30..fbfa85d8 100644
--- a/docs/unstable/apidocs/padl.print_utils.html
+++ b/docs/unstable/apidocs/padl.print_utils.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="../advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/apidocs/padl.transforms.html b/docs/unstable/apidocs/padl.transforms.html
index 18807937..c2e0a0d1 100644
--- a/docs/unstable/apidocs/padl.transforms.html
+++ b/docs/unstable/apidocs/padl.transforms.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="../advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
@@ -746,8 +747,9 @@
 
 <dl class="py function">
 <dt class="sig sig-object py" id="padl.transforms.load">
-<span class="sig-prename descclassname"><span class="pre">padl.transforms.</span></span><span class="sig-name descname"><span class="pre">load</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#padl.transforms.load" title="Permalink to this definition"></a></dt>
+<span class="sig-prename descclassname"><span class="pre">padl.transforms.</span></span><span class="sig-name descname"><span class="pre">load</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#padl.transforms.load" title="Permalink to this definition"></a></dt>
 <dd><p>Load a transform (as saved with padl.save) from <em>path</em>.</p>
+<p>Use keyword arguments to override params (see <a class="reference internal" href="padl.html#padl.param" title="padl.param"><code class="xref py py-func docutils literal notranslate"><span class="pre">padl.param()</span></code></a>).</p>
 </dd></dl>
 
 <dl class="py function">
diff --git a/docs/unstable/apidocs/padl.util_transforms.html b/docs/unstable/apidocs/padl.util_transforms.html
index 02188398..49018560 100644
--- a/docs/unstable/apidocs/padl.util_transforms.html
+++ b/docs/unstable/apidocs/padl.util_transforms.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="../advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/apidocs/padl.utils.html b/docs/unstable/apidocs/padl.utils.html
index 6f18093a..f835820e 100644
--- a/docs/unstable/apidocs/padl.utils.html
+++ b/docs/unstable/apidocs/padl.utils.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="../advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/apidocs/padl.version.html b/docs/unstable/apidocs/padl.version.html
index 372a77c5..46971067 100644
--- a/docs/unstable/apidocs/padl.version.html
+++ b/docs/unstable/apidocs/padl.version.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="../advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/apidocs/padl.wrap.html b/docs/unstable/apidocs/padl.wrap.html
index f6986a87..d4544d49 100644
--- a/docs/unstable/apidocs/padl.wrap.html
+++ b/docs/unstable/apidocs/padl.wrap.html
@@ -115,6 +115,7 @@
 <li class="toctree-l4"><a class="reference internal" href="../advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/genindex.html b/docs/unstable/genindex.html
index 531e0e33..7e20b5a5 100644
--- a/docs/unstable/genindex.html
+++ b/docs/unstable/genindex.html
@@ -113,6 +113,7 @@
 <li class="toctree-l4"><a class="reference internal" href="advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
@@ -644,6 +645,12 @@ <h2 id="P">P</h2>
       </ul></li>
       <li><a href="apidocs/padl.transforms.html#padl.transforms.Parallel">Parallel (class in padl.transforms)</a>
 </li>
+      <li><a href="apidocs/padl.html#padl.param">param() (in module padl)</a>
+
+      <ul>
+        <li><a href="apidocs/padl.dumptools.serialize.html#padl.dumptools.serialize.param">(in module padl.dumptools.serialize)</a>
+</li>
+      </ul></li>
       <li><a href="apidocs/padl.wrap.html#padl.wrap.PatchedModule">PatchedModule (class in padl.wrap)</a>
 </li>
       <li><a href="apidocs/padl.transforms.html#padl.transforms.Transform.pd_call_in_mode">pd_call_in_mode() (padl.transforms.Transform method)</a>
@@ -707,6 +714,8 @@ <h2 id="R">R</h2>
 <table style="width: 100%" class="indextable genindextable"><tr>
   <td style="width: 33%; vertical-align: top;"><ul>
       <li><a href="apidocs/padl.dumptools.var2mod.html#padl.dumptools.var2mod.rename">rename() (in module padl.dumptools.var2mod)</a>
+</li>
+      <li><a href="apidocs/padl.dumptools.sourceget.html#padl.dumptools.sourceget.replace">replace() (in module padl.dumptools.sourceget)</a>
 </li>
       <li><a href="apidocs/padl.dumptools.symfinder.html#padl.dumptools.symfinder.replace_star_imports">replace_star_imports() (in module padl.dumptools.symfinder)</a>
 </li>
diff --git a/docs/unstable/index.html b/docs/unstable/index.html
index 39d061c0..fbae6e4d 100644
--- a/docs/unstable/index.html
+++ b/docs/unstable/index.html
@@ -115,6 +115,7 @@
 <li class="toctree-l4"><a class="reference internal" href="advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/modules.html b/docs/unstable/modules.html
index 588ceee9..48b6f2b2 100644
--- a/docs/unstable/modules.html
+++ b/docs/unstable/modules.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/objects.inv b/docs/unstable/objects.inv
index d9b78dde..e1442e95 100644
Binary files a/docs/unstable/objects.inv and b/docs/unstable/objects.inv differ
diff --git a/docs/unstable/py-modindex.html b/docs/unstable/py-modindex.html
index d35d6ae4..d7c358ef 100644
--- a/docs/unstable/py-modindex.html
+++ b/docs/unstable/py-modindex.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/search.html b/docs/unstable/search.html
index dba7990b..89b09d9a 100644
--- a/docs/unstable/search.html
+++ b/docs/unstable/search.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/searchindex.js b/docs/unstable/searchindex.js
index 80ff3e0e..ab0974fb 100644
--- a/docs/unstable/searchindex.js
+++ b/docs/unstable/searchindex.js
@@ -1,1 +1,1 @@
-Search.setIndex({docnames:["README","advanced","advanced/saving","apidocs/padl","apidocs/padl.dumptools","apidocs/padl.dumptools.ast_utils","apidocs/padl.dumptools.inspector","apidocs/padl.dumptools.packagefinder","apidocs/padl.dumptools.serialize","apidocs/padl.dumptools.sourceget","apidocs/padl.dumptools.symfinder","apidocs/padl.dumptools.var2mod","apidocs/padl.exceptions","apidocs/padl.print_utils","apidocs/padl.transforms","apidocs/padl.util_transforms","apidocs/padl.utils","apidocs/padl.version","apidocs/padl.wrap","index","modules","usage","usage/apply","usage/combining_transforms","usage/creating_transforms","usage/debugging_your_transforms","usage/extras","usage/print_slice","usage/pytorch","usage/saving","usage/stages","usage/transform"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":4,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.intersphinx":1,sphinx:56},filenames:["README.md","advanced.md","advanced/saving.md","apidocs/padl.md","apidocs/padl.dumptools.md","apidocs/padl.dumptools.ast_utils.md","apidocs/padl.dumptools.inspector.md","apidocs/padl.dumptools.packagefinder.md","apidocs/padl.dumptools.serialize.md","apidocs/padl.dumptools.sourceget.md","apidocs/padl.dumptools.symfinder.md","apidocs/padl.dumptools.var2mod.md","apidocs/padl.exceptions.md","apidocs/padl.print_utils.md","apidocs/padl.transforms.md","apidocs/padl.util_transforms.md","apidocs/padl.utils.md","apidocs/padl.version.md","apidocs/padl.wrap.md","index.md","modules.md","usage.md","usage/apply.md","usage/combining_transforms.md","usage/creating_transforms.md","usage/debugging_your_transforms.md","usage/extras.md","usage/print_slice.md","usage/pytorch.md","usage/saving.md","usage/stages.md","usage/transform.md"],objects:{"":[[3,0,0,"-","padl"]],"padl.dumptools":[[5,0,0,"-","ast_utils"],[6,0,0,"-","inspector"],[7,0,0,"-","packagefinder"],[8,0,0,"-","serialize"],[9,0,0,"-","sourceget"],[10,0,0,"-","symfinder"],[11,0,0,"-","var2mod"]],"padl.dumptools.ast_utils":[[5,1,1,"","Position"],[5,2,1,"","get_position"],[5,2,1,"","get_source_segment"]],"padl.dumptools.inspector":[[6,1,1,"","CallInfo"],[6,2,1,"","caller_frame"],[6,2,1,"","caller_module"],[6,2,1,"","get_segment_from_frame"],[6,2,1,"","get_statement"],[6,2,1,"","get_surrounding_block"],[6,2,1,"","non_init_caller_frameinfo"],[6,2,1,"","outer_caller_frameinfo"],[6,2,1,"","trace_this"]],"padl.dumptools.inspector.CallInfo":[[6,3,1,"","module"]],"padl.dumptools.packagefinder":[[7,2,1,"","dump_packages_versions"],[7,2,1,"","get_packages"],[7,2,1,"","get_version"]],"padl.dumptools.serialize":[[8,1,1,"","Serializer"],[8,2,1,"","json_serializer"],[8,2,1,"","load_json"],[8,2,1,"","save_json"],[8,2,1,"","value"]],"padl.dumptools.serialize.Serializer":[[8,4,1,"","save"],[8,4,1,"","save_all"],[8,3,1,"","varname"]],"padl.dumptools.sourceget":[[9,1,1,"","ReplaceString"],[9,1,1,"","ReplaceStrings"],[9,2,1,"","cut"],[9,2,1,"","get_module_source"],[9,2,1,"","get_source"],[9,2,1,"","original"],[9,2,1,"","put_into_cache"]],"padl.dumptools.sourceget.ReplaceString":[[9,4,1,"","cut"]],"padl.dumptools.sourceget.ReplaceStrings":[[9,4,1,"","cut"]],"padl.dumptools.symfinder":[[10,5,1,"","NameNotFound"],[10,1,1,"","Scope"],[10,1,1,"","ScopedName"],[10,2,1,"","find"],[10,2,1,"","find_in_ipython"],[10,2,1,"","find_in_module"],[10,2,1,"","find_in_scope"],[10,2,1,"","find_in_source"],[10,2,1,"","replace_star_imports"],[10,2,1,"","split_call"]],"padl.dumptools.symfinder.Scope":[[10,4,1,"","empty"],[10,4,1,"","from_level"],[10,4,1,"","from_source"],[10,4,1,"","global_"],[10,4,1,"","is_global"],[10,3,1,"","module_name"],[10,4,1,"","toplevel"],[10,4,1,"","unscoped"],[10,4,1,"","up"]],"padl.dumptools.var2mod":[[11,1,1,"","CodeGraph"],[11,1,1,"","CodeNode"],[11,1,1,"","Finder"],[11,1,1,"","Vars"],[11,2,1,"","find_codenode"],[11,2,1,"","find_globals"],[11,2,1,"","increment_same_name_var"],[11,2,1,"","rename"]],"padl.dumptools.var2mod.CodeGraph":[[11,4,1,"","build"],[11,4,1,"","dumps"],[11,4,1,"","print"]],"padl.dumptools.var2mod.CodeNode":[[11,4,1,"","from_source"]],"padl.dumptools.var2mod.Finder":[[11,4,1,"","find"],[11,4,1,"","generic_visit"],[11,4,1,"","get_source_segments"]],"padl.dumptools.var2mod.Vars":[[11,6,1,"","globals"],[11,6,1,"","locals"]],"padl.exceptions":[[12,5,1,"","WrongDeviceError"]],"padl.print_utils":[[13,2,1,"","combine_multi_line_strings"],[13,2,1,"","create_arrow"],[13,2,1,"","create_reverse_arrow"],[13,2,1,"","format_argument"],[13,2,1,"","make_bold"],[13,2,1,"","make_green"],[13,2,1,"","visible_len"]],"padl.transforms":[[14,1,1,"","AtomicTransform"],[14,1,1,"","Batchify"],[14,1,1,"","BuiltinTransform"],[14,1,1,"","ClassTransform"],[14,1,1,"","Compose"],[14,1,1,"","FunctionTransform"],[14,1,1,"","Identity"],[14,1,1,"","Map"],[14,1,1,"","Parallel"],[14,1,1,"","Pipeline"],[14,1,1,"","Rollout"],[14,1,1,"","TorchModuleTransform"],[14,1,1,"","Transform"],[14,1,1,"","Unbatchify"],[14,2,1,"","fulldump"],[14,2,1,"","group"],[14,2,1,"","importdump"],[14,2,1,"","load"],[14,2,1,"","save"]],"padl.transforms.ClassTransform":[[14,3,1,"","source"]],"padl.transforms.FunctionTransform":[[14,3,1,"","source"]],"padl.transforms.Pipeline":[[14,4,1,"","grouped"],[14,4,1,"","pd_forward_device_check"],[14,4,1,"","pd_to"]],"padl.transforms.TorchModuleTransform":[[14,4,1,"","post_load"],[14,4,1,"","pre_save"]],"padl.transforms.Transform":[[14,4,1,"","eval_apply"],[14,4,1,"","infer_apply"],[14,4,1,"","pd_call_in_mode"],[14,3,1,"","pd_device"],[14,3,1,"","pd_forward"],[14,4,1,"","pd_forward_device_check"],[14,4,1,"","pd_get_loader"],[14,3,1,"","pd_layers"],[14,3,1,"","pd_name"],[14,4,1,"","pd_parameters"],[14,4,1,"","pd_post_load"],[14,3,1,"","pd_postprocess"],[14,4,1,"","pd_pre_save"],[14,3,1,"","pd_preprocess"],[14,4,1,"","pd_save"],[14,3,1,"","pd_stages"],[14,4,1,"","pd_to"],[14,4,1,"","pd_varname"],[14,4,1,"","pd_zip_save"],[14,4,1,"","train_apply"]],"padl.util_transforms":[[15,1,1,"","IfEval"],[15,1,1,"","IfInMode"],[15,1,1,"","IfInfer"],[15,1,1,"","IfTrain"],[15,1,1,"","Try"]],"padl.utils":[[16,6,1,"","same"]],"padl.wrap":[[18,1,1,"","PatchedModule"],[18,2,1,"","transform"]],padl:[[3,1,1,"","Batchify"],[3,1,1,"","Identity"],[3,1,1,"","IfEval"],[3,1,1,"","IfInMode"],[3,1,1,"","IfInfer"],[3,1,1,"","IfTrain"],[3,1,1,"","Unbatchify"],[4,0,0,"-","dumptools"],[12,0,0,"-","exceptions"],[3,2,1,"","fulldump"],[3,2,1,"","group"],[3,2,1,"","importdump"],[3,2,1,"","load"],[13,0,0,"-","print_utils"],[3,2,1,"","save"],[3,2,1,"","transform"],[14,0,0,"-","transforms"],[3,7,1,"","unbatch"],[15,0,0,"-","util_transforms"],[16,0,0,"-","utils"],[3,2,1,"","value"],[17,0,0,"-","version"],[18,0,0,"-","wrap"]]},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","function","Python function"],"3":["py","property","Python property"],"4":["py","method","Python method"],"5":["py","exception","Python exception"],"6":["py","attribute","Python attribute"],"7":["py","data","Python data"]},objtypes:{"0":"py:module","1":"py:class","2":"py:function","3":"py:property","4":"py:method","5":"py:exception","6":"py:attribute","7":"py:data"},terms:{"0":[0,3,6,9,10,11,14,25,26,27],"0x":11,"1":[0,2,3,9,10,11,14,15,23,25,26,27,28],"10":[0,3,15,24,25],"100":[2,11,23,24,26,27],"1000":24,"11":[3,6,15],"123":6,"13":9,"2":[0,3,9,10,11,14,23,25,26,27],"20":0,"200":26,"244":23,"3":[0,3,5,6,10,11,14,23,25,26],"300":26,"4":[11,25,26],"5":[9,25],"6":25,"7":[0,25],"8":[0,5,25],"9":[0,9,25],"99":[3,15],"abstract":[0,14,19,25,31],"case":[2,3,9,10,14,23],"catch":[15,21],"class":[2,3,5,6,8,9,10,11,14,15,18,24,25,30],"const":2,"default":[2,3,6,7,8,10,14,15,23],"do":[2,3,12,14,21,22,24],"final":[15,26],"function":[0,2,3,6,8,10,11,14,18,19,23,24,25,31],"import":[0,2,3,7,10,11,14,15,18,19,22,23,24,25,26,29,30],"int":[5,6,9,10,11,13,14],"new":[9,10],"return":[0,2,6,7,8,9,10,11,14,22,23,24,26,27,30],"switch":[2,3,14,25],"true":[3,7,9,10,11,13,14,18,23,25,27],"try":[3,6,9,14,15,18,21,26],"var":11,A:[3,6,9,10,11,14,31],As:[2,11,30],At:25,By:23,For:[2,23,24,25,26],If:[0,2,3,8,9,10,11,13,14,15],In:[3,9,10,14,23,24],It:[2,6,10,14,22,24,28],No:15,On:25,One:[2,14,23],The:[2,3,6,8,9,10,11,13,14,15,21,22,23,25,30,31],Then:25,These:[2,14],To:[2,3,9,14,22,23,30],With:31,_:2,____________:13,__call__:[2,24],__file__:2,__init__:[2,6,24],__main__:10,_ast:[10,11],_generatorwithlength:22,_pd_main:2,_thingfind:10,_trace_thi:6,a_transform:2,about:[6,14,25,28,31],abov:23,absolut:[2,25],accept:14,access:[10,27,30],ad:[3,10,14,22,31],adam:28,adapt:28,add:[2,3,9,14,24,26,27],add_n:2,addconst:2,addfirst:26,addit:9,advanc:19,after:[2,3,14,25,28],again:2,ai:[0,19],airplan:22,alia:11,all:[0,2,6,8,11,12,14,18,19,21,22,23,28,29],allow:[0,9,10,19,22,23,26],along:28,also:[2,3,14,22,24,26],alwai:14,am:25,an:[0,2,6,9,10,11,13,14,19,22,25,26,28,31],analog:26,analysi:0,ani:[3,8,13,14,15],anoth:13,anyth:[2,19],apach:0,api:19,append:[2,8],appli:[2,3,13,14,15,19,21,23,25,30],applic:26,ar:[2,3,8,10,11,14,21,22,23,24,25,28,29,30],arbitrari:[0,19,26],arg:[2,6,14,22,25,27],argument:[2,6,10,13,14,22],aris:23,arrai:[2,11,26],arrow:13,ascii:13,assign:[10,14],ast:[5,7,10,11],ast_nod:11,ast_util:[19,20],atom:14,atomictransform:[14,25],attribut:[6,9,16,25],augment:[23,26,28,30],automat:[2,3,14,22],avail:[6,22],awar:2,axxxxxxxxxxxxxxxxxxxx:9,b:[3,9,11,14,15],back:15,backward:28,bar:[11,22,23],base:[0,8,14,19],batch:[0,3,14,21,22,23,25,28,30,31],batch_siz:[22,25,28],batchifi:[3,10,14,21,25],baz:23,becaus:0,becom:[6,10,23,24],been:14,befor:[2,6,14,22],being:[3,14,26],below:[11,25],berlin:[0,19],between:[11,23],bia:25,big:2,bla:7,blip:7,blob:0,block:6,blop:7,blu:7,bodi:[2,6,7,10,11],boilerpl:31,bold:13,bool:[3,6,9,10,11,14],both:[2,9,28],build:[0,2,10,11,19,31],build_my_transform:2,builder:[0,19],built:28,builtin:[11,14],builtintransform:14,bup:7,c:[3,14],cach:9,call:[3,6,8,10,11,14,15,24,25,30],call_info:14,call_sourc:10,callabl:[3,6,8,14,18,24],caller:6,caller_fram:6,caller_modul:6,callinfo:[6,14],calling_scop:10,can:[0,2,3,6,9,10,14,15,19,22,23,24,25,26,27,28,29,30,31],canb:22,cannot:2,capabl:28,captur:16,carri:15,cat:22,catch_transform:15,caus:2,caveat:2,cell:9,central:31,chang:[2,6,15],charact:13,check:[14,25],checkpoint:29,child:[12,14],child_transform:12,children:14,classifi:[23,30],classmethod:[8,10,11],classtransform:14,claus:15,clean:2,close:26,co:25,code:[0,2,3,6,7,8,9,10,11,14,25,28,31],code_of_conduct:0,codegraph:[8,11],codenod:11,col:[6,9,11],col_offset:[5,11],collect:[9,14,21],column:6,com:0,combin:[13,14,19,21,24,31],combine_multi_line_str:13,come:[18,24],command:25,comment:6,common:23,complet:[6,15],complex:[2,14,27,31],compon:[0,19,23],compos:[14,25,27,30],composit:23,comprehens:0,compress:[3,14],concat_low:26,concis:[0,21],condit:[15,21],condition:23,conduct:0,conflict:2,consid:2,consist:2,consol:25,constant:[2,9],construct:14,contain:[2,6,8,9,10,12,13,14,28,29],content:11,context:[6,14],continu:[23,30],contrast:14,contribut:19,conveni:28,convert:[0,10,19,24,28,30],coor:13,coordin:13,correct:14,correspond:[5,10,11,30],could:[2,10,23],count:10,counter:[10,11],cpu:[3,14],creat:[0,2,6,8,10,11,13,14,19,21,22,23,28,29,31],create_arrow:13,create_reverse_arrow:13,crop:23,cuda:[14,28],current:[0,2,10,25],custom:[14,25,31],cut:9,d:25,data:[2,14,19,21,30,31],dataload:[14,22,31],datapoint:[14,23],dataset:2,debug:[11,19,21,31],debugg:25,decor:[3,14,18,24],deep:[0,2,19,23,30,31],deeper:25,def:[0,2,6,10,11,14,24,26,27,30],def_sourc:10,defin:[8,10,11,21,25,29,30],definit:2,depend:[2,11,29],detail:[6,14,23],determin:[3,6,9,11,14,18],develop:[0,19],devic:[3,12,14,22],di:31,diagnos:25,dict:9,dictionari:[2,14],differ:[2,9,22,25,30],dim:[3,14,25],dimens:[3,14,22,31],directli:14,directori:2,disabl:[3,13,14,22],displai:25,document:[6,14],doe:[14,22,25],doesn:[3,15],dog:22,don:[2,3,6,13,14,18],done:[14,22],down:[2,25],drop:[6,10],drop_n:[6,10],dump:[2,3,7,8,11,14],dump_packages_vers:7,dumptool:[14,19,20],dure:[3,14,23,26],e:[3,10,14],each:[2,14,22,25,30],easili:31,ecosystem:[0,19],edg:11,effect:2,either:[2,9],eleg:31,element:[14,23,25,30],elp:25,els:[3,11,15],else_:[3,15],else_transform:15,emb:25,embed:25,embedding_dim:25,empti:[6,10],enabl:[2,3,14,31],end:[3,11,13,14],end_col_offset:[5,11],end_lineno:[5,11],enter:[6,25],entir:[24,25],entiti:10,entri:2,enumer:2,epeat:25,equival:26,error:[15,25],escap:13,eval:[3,14,15,21,22,26],eval_appli:[3,14,15,22,25,26],evalu:30,even:23,event:6,everi:13,everyth:[11,21,23,24],exactli:23,exampl:[0,2,3,6,7,9,10,11,13,14,15,18,22,26,30],except:[10,15,19,20,21,25],execut:[0,2,6,23,25],exist:[3,11,14],expect:[2,3,9,14,22,25],explicit:[9,11],explicitli:14,extens:[3,14],extra:[15,19,21,28],extract:6,f1:14,f2:14,f:[2,9,10,11,14],factori:16,fail:[15,25],fall:15,fals:[3,6,10,11,13,14,18],few:2,field:11,file:[2,3,9,14,26,29],file_suffix:8,fileexistserror:[3,14],filenam:[2,9,14,26],filter:11,filter_builtin:11,finally_transform:15,find:[0,7,10,11],find_codenod:11,find_glob:11,find_in_ipython:10,find_in_modul:10,find_in_scop:10,find_in_sourc:10,finder:11,finish_right:13,first:[3,6,9,13,14,23],flat:23,flatten:[3,14,23],flexibl:31,folder:[2,3,14,29],follow:[2,6,10,11,21,25],foo:[7,11,14,23],force_overwrit:[3,14],form:[10,14,24,31],formal:31,format:[7,13,30,31],format_argu:13,forward:[0,14,19,21,22,24,25],found:[6,10,11],four:10,frame:[6,9],frameinfo:6,from:[0,3,6,7,9,10,11,14,15,19,22,24,25,26,28,29,30],from_:11,from_col:9,from_level:10,from_lin:9,from_sourc:[10,11],front:6,full:[0,2,3,14],full_dump_module_nam:11,fulldump:[2,3,14],fulli:[3,14],functiontransform:14,fundament:14,futur:2,g:14,gener:[14,22],generic_visit:11,germani:[0,19],get:[2,5,6,7,9,10,11,13,14,16,19,21,23,25,26],get_module_sourc:9,get_packag:7,get_posit:5,get_segment_from_fram:6,get_sourc:9,get_source_seg:[5,11],get_stat:6,get_surrounding_block:6,get_vers:7,getitem:[6,27],github:0,give:9,given:[3,6,7,9,10,11,14],global:[2,10,11],global_:10,globals_:11,go:[0,11,25],good:14,got:25,gotten:9,gpu:[14,22,30,31],gradient:[14,22,31],graph:11,great:[0,19],green:13,group:[3,14,21],h:25,ha:[2,9,11,14,23,25,28,30],hacki:6,handl:22,happen:[15,30],have:[0,14,19,28],head:23,hello:26,help:[14,25],helper:[3,8],here:[2,6,25],hidden:24,hierarchi:10,histori:10,hood:22,how:[10,14,22,23,24,27,29,30,31],howev:2,http:0,i:[2,3,10,14,25],id:9,ident:[3,14,15,21,27],identifi:10,if_:[3,15],ifev:[3,15,21,26],iff:10,ifinf:[3,15,21,26],ifinmod:[3,15],iftrain:[3,15,21,23,26],ignor:14,ignore_grad:14,ignore_scop:[3,6,14,18],iim:[3,15],imag:[13,30],implement:[14,24],importdump:[2,3,14],in_featur:25,includ:[2,9,14,28,29],incorpor:25,increment:11,increment_same_name_var:11,indent:6,index:14,indic:[10,14],individu:23,infer:[3,14,15,21,22,26,28,30],infer_appli:[3,14,15,22,25,26],infer_pipelin:28,inform:[6,14,25],initi:[2,14,28],inlin:[6,14],innov:[0,19],input:[3,9,13,14,22,23,25,26],insert:9,insid:[15,25],inspect:[6,9,14,25,31],inspector:[14,19,20],instanc:[2,22,23,24,28],instead:[2,3,6,14,18],interact:[2,25,29,31],interest:0,intern:22,introduct:19,invers:[3,14],io:0,ipython:[2,9,10,27],is_glob:10,isinst:[9,11,18],issu:0,item:[0,3,10,14,16,22,26],iter:[14,22,28],its:[10,11,14,25],itself:6,jpg:22,json:[2,8],json_seri:8,just:[2,3,14],keep:23,kei:9,keyword:[0,14,19],know:21,kwarg:[6,14],l1:24,l2:24,lab:[0,19],lambda:[3,14,15,23,24,25,26],larg:2,larger:6,largest:6,last:[2,9,13,14],layer1:28,layer2:28,layer:[0,14,19,25],learn:[0,19,22,23,24,28,29,30,31],len:[2,22],length:[13,23],let:25,level:[2,6,10,23,25],lf1:[0,19],licens:19,like:[2,22,30],limit:2,lin:24,line:[6,9,10,13,25],linear:[0,24,25],lineno:[5,6,10,11],list:[2,3,7,9,10,11,13,14,15,22,25,26,28,29],liter:[3,6,14,15],live:11,load:[0,2,3,8,14,19,21,22,23,28,30],load_data:2,load_funct:8,load_imag:[23,30],load_json:8,loader:[8,14],loc:9,local:11,locat:[6,9],log10:24,longtensor:25,look:[0,2,6,10],lookup:[28,30],loop:[10,22,28],loss:[0,19,23,28],lower:26,lr:28,macro:23,made:[6,14],mai:[0,19],main:[0,10,12],maintain:9,make:[0,13,19,21,25,28],make_bold:13,make_green:13,manual:0,map:14,mark:[3,8,14],match:[3,6,12,14,15,25],math:24,md:0,mean:[2,3,14,23],messi:2,method:[6,14,21,26],might:[2,26],minim:31,minus100:24,minusx:[24,26,27],mlp:24,mml:24,mnist:0,mode:[3,14,15,22],model:[0,2,14,19,28,30],model_pass:23,modifi:9,modul:[3,6,7,8,9,10,11,14,18,19,21,23,24,27,29,30],module_nam:[6,10],more:[2,3,6,14,23,31],most:[10,23,30],mother:12,mother_transform:12,move:[3,14,23,25],mpiler:25,much:31,multi:[6,13,31],multipl:[2,14,22,24,28],multiprocess:14,must:[2,6,14,23],my:2,my_classifi:[22,30],my_classifier_transform:[23,30],my_pipelin:[0,2,28,29],myfil:2,myfunct:6,mykei:9,myload:2,mypipelin:29,mypytorchlay:28,mysav:2,mytransform:2,n:[6,10,11,14],n_final_row:13,n_in:24,n_initial_row:13,n_out:24,n_to_add:2,name:[2,3,6,7,10,11,14,15,30],namenotfound:10,natur:22,need:[2,8,14,19],nest:[10,27,28],never:14,next:[22,23,24,27,28,29,30,31],nextmodul:6,nlp:0,nn:[0,14,24,25],node:[5,7,10,11],nodetyp:11,nodevisitor:11,non:9,non_init_caller_frameinfo:6,none:[3,6,8,10,11,14,15,18],normal:[2,9,14],not_found:2,note:[2,6],notebook:[2,31],noth:[3,14,21],now:2,np:[2,11,18,24,26],nput:25,npy:2,nth:23,num_embed:25,num_work:[22,25,28],number:[6,10,11,13],numpi:[2,18,24],o:11,object:[6,9,10,11,14,22,26],occur:15,offset:[6,11],often:26,one:[2,3,10,13,14,15,23,25,30],onli:[2,11,23,26],open:[2,23,26],open_fil:26,oper:23,optim:28,option:[3,6,8,11,14,15],order:14,ordereddict:14,origin:[6,9],other:[14,15],otherwis:[3,14,15],out:[6,9,10,11,15,18,23,24],out_featur:25,outer:6,outer_caller_frameinfo:6,output:[3,14,15,22,23,30],over:[13,14,23,28],overlap:9,overrid:14,overwrit:[3,14],own:[2,25],p:25,packag:[0,2,3,7,14,19,25,29],packagefind:[19,20],pad:13,padl:[2,20,23,24,25,26,27,29,30,31],padl_value_0:2,page:21,parallel:[3,14],param:14,paramet:[2,3,6,7,8,9,10,11,12,13,14,15,18,29],parent:[2,18],parenthes:23,pars:[7,11],part:[9,14,21,22,25,30],parti:2,particular:24,pass:[0,2,3,14,19,22],patch:18,patchedmodul:18,path:[2,3,8,14,23,30],pathlib:[2,3,8,14],pd_call_in_mod:14,pd_debug:[21,25],pd_devic:14,pd_forward:[14,22,30],pd_forward_device_check:14,pd_get_load:14,pd_group:14,pd_layer:[14,28],pd_name:[14,15],pd_np:18,pd_paramet:[14,28],pd_post_load:14,pd_postprocess:[14,30],pd_pre_sav:14,pd_preprocess:[14,30],pd_save:14,pd_stage:14,pd_to:[14,28],pd_varnam:14,pd_zip_sav:14,perform:[3,14,15],pick:2,piec:[10,11],pil:23,piltotensor:23,pip:0,pipelin:[0,14,19,21,22,24,25,27,28,29,30],pleas:0,pluson:2,plustwo:2,posit:[5,9,11,25],possibl:[2,6,14,24,28],post:[0,14,19,30],post_load:14,postprocess:[3,14,19,21,22,23,25],potenti:[2,6],power:23,pre:[0,9,14,19,30],pre_sav:14,preced:13,predict:[23,28],prefer:0,prepar:0,preprocess:[3,14,19,21,22,23,25,28,31],preprocess_imag:23,pretti:27,prevent:[2,3,14],previous:2,print:[6,11,13,14,19,21,25,29],print_util:[19,20],process:[0,2,14,19,22,30,31],produc:25,progress:22,propag:14,properti:[6,8,10,14],provid:[2,23,25],pt:2,put:9,put_into_cach:9,py:[2,29],pypi:2,python:[0,2,5,6,10,11,19,23,24,29],pytorch:[0,14,19,21,22,23,24,27,29,30],q:25,quit:25,r:25,rais:[3,6,14,25],rand:18,random:18,randomresizedcrop:23,randomrot:23,rang:2,ransform:25,rather:[2,6,14],re:[0,19,23],reach:25,read:[2,21,22,26,27,31],read_from_path:26,readabl:30,recent:10,recreat:2,recurs:[3,14,25],ref:25,refer:21,regardless:15,relev:25,relu:24,rememb:28,remov:[3,6,14,22],renam:[2,11],rename_loc:11,repeat:[2,23,25],repl:9,replac:[9,10],replace_cach:9,replace_star_import:10,replacestr:9,repres:[10,11],reproduc:31,requir:[2,6],reshap:30,resiz:23,resnet18:[23,30],respect:[3,11,14,26],respons:[2,30],rest:6,result:[2,3,6,9,14,23],retriev:25,return_loc:6,return_parti:10,revers:2,roll:23,rollout:[3,14],row:6,rstring:9,run:25,runtimeerror:25,s:[3,6,7,8,9,10,14,15,21,22,24,28,29,30],same:[3,5,6,9,10,11,14,16,21,23,25,28],save:[1,3,8,14,19,21,22,31],save_al:8,save_funct:8,save_json:8,saver:8,scope:[3,6,10,11,14,18],scoped_nam:11,scopednam:[10,11],scopelist:10,search:[10,11,14],second:[2,3,10,14,23],section:[9,22,23,24,27,28,29,30,31],see:[0,2,3,6,14,22],segment:[5,6,10,11],segment_typ:6,self:[2,10,14,24],send:[14,22,28,31],sentiment:0,sequenc:[13,14,23],seri:14,serial:[3,14,19,20],session:[2,29],set:[2,8,11,14,22],settrac:6,shape:25,should:[2,3,6,8,14],show:[22,25],shown:25,similar:2,simpl:0,simpli:[2,14],sin:24,sinc:25,singl:[0,14,19,22,23],size:[22,25],slice:[19,21,29,31],slower:0,so:[10,23,25],some:[2,23,25,28],somemodul:11,someobject:2,someth:[2,26],sometim:2,soon:6,sourc:[5,6,7,9,10,11,14],sourceget:[19,20],space:[6,13],special:[23,26,30],specifi:[3,9,10,14,22],split:[2,10],split_cal:10,stack:6,stage:[14,19,21,22,23,25],stand:30,standard:[0,19],star:[2,10],start:[3,10,13,14,19,21,25],start_left:13,state_dict:28,statement:[2,3,6,10,14,15,25],step:[23,28],stop:31,store:[2,3,8,28,29],str:[2,3,6,8,9,10,11,13,14,15],string:[3,7,8,9,10,11,13,14],sub:[9,11,14,23,27],subclass:10,substr:9,subval:2,successfulli:15,suffix:2,suggest:30,superimpos:13,support:[0,2,22],surround:[6,10],sy:6,symbol:[2,10],symfind:[6,11,19,20],t1:[14,23,27],t2:[14,23,27],t3:[14,23,27],t4:27,t5:27,t:[2,3,6,13,14,15,18,23,25,26],take:[13,23],taken:[9,24],target:[6,23],target_mod:[3,15],tensor:[0,3,14,22],text:[0,2],textcorpu:2,than:2,them:[2,3,14,21,23,28],thereof:[3,14],thi:[2,3,6,9,10,11,13,14,15,22,23,24,25,27,28,29],thing:[2,3,8,9,10,11],third:2,those:[2,11,28,30],three:[22,23],through:[11,22,23],thu:[2,23],time:2,to_col:9,to_lin:9,to_tensor:25,toarrai:2,togeth:27,too:[24,27,29],top:[10,13,25],topic:19,topk:0,toplevel:[3,6,10,14,18],topolog:[0,19],torch:[0,14,24,25,28],torchmoduletransform:14,torchvis:[23,30],totensor:[23,30],tqdm:22,trace:6,trace_thi:6,tracefunc:6,track:2,train:[3,14,15,21,22,26,28,30],train_appli:[14,22,25,28],train_data:28,train_model:28,train_pipelin:28,training_pipelin:23,transform:[0,3,10,12,15,16,18,19,20,21,27,29,30],transform_or_modul:[3,14],transpar:[13,31],tree:[0,10,11],tupl:[2,3,6,10,11,14,15,23],turn:14,tvt:23,two:2,txt:[2,29],type:[6,11],typic:14,u:25,uit:25,unbatch:[0,3,21,23,30],unbatchifi:[3,14],under:[0,22],undo:2,unind:6,union:[3,14,15],uniqu:14,unscop:10,unsqueez:[3,14],until:25,up:[2,10,25],updat:22,us:[0,2,3,6,7,8,9,10,11,13,14,15,18,19,21,22,23,24,25,26,27,30,31],usag:[0,19],use_replace_cach:9,user:[0,19,25],usual:30,util:[6,7,13,14,19,20,23,28],util_transform:[19,20],v:13,val:[2,3,8],valu:[3,8,9,10,13,21],valueerror:6,var2mod:[19,20],var_nam:10,variabl:[10,11,14,25],variou:[9,10],varnam:[8,10],veri:2,version:[0,2,7,9,10,14,19,20,29],via:[2,14,27,28,29,30],view:23,visibl:13,visible_len:13,visitor:11,w:25,wa:[0,6,14,19,25],wai:[10,25],want:[2,26],we:[2,25,30],well:10,were:[2,10],what:[14,26,30],whatev:14,when:[2,3,14,15,24,25,28,29],where:[6,9,11,13,25],wherea:30,which:[2,3,6,9,10,11,14,22,23,29],whole:[14,31],whose:[3,14],wide:6,within:[6,9,10,14,28],without:31,word:2,word_index:2,wordindex:2,work:[27,28,31],worker:22,workflow:[30,31],worri:31,would:[2,9,10,23],wrap:[2,3,14,19,20,24],wrap_typ:14,wrappe:[3,18],wrapper:[3,18,24],write:[0,2,3,14,19],written:10,wrongdeviceerror:12,x1:14,x2:14,x3:14,x:[0,2,3,9,10,11,13,14,15,23,24,25,26,27,30],xxxx:9,xxxxxaxxxxxxxxxxxxxxxxxxxx:9,xxxxxxxxxxx:9,xxxxxxxxxxxxxb:9,xxxxxxxxxxxxxbxxxx:9,y:[11,13,23,24,27],you:[0,2,19,23,26,31],your:[2,19,21,31],z:[11,23],zero_grad:28,zip:[3,14]},titles:["Introduction","Advanced Topics","Saving","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.dumptools</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.dumptools.ast_utils</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.dumptools.inspector</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.dumptools.packagefinder</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.dumptools.serialize</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.dumptools.sourceget</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.dumptools.symfinder</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.dumptools.var2mod</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.exceptions</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.print_utils</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.transforms</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.util_transforms</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.utils</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.version</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.wrap</span></code>","Welcome to PADL\u2019s documentation!","API Documentation","Usage","Applying Transforms to Data","Combining Transforms into Pipelines","Creating Transforms","Debugging your Transforms","Extras","Printing and Slicing","Using PyTorch Modules with Transforms","Saving and Loading","Stages: Preprocess, Forward and Postprocess","<em>Transforms</em> and <em>Pipelines</em>"],titleterms:{"import":21,"try":0,The:26,access:28,advanc:1,an:23,anyth:21,api:20,appli:[22,26],ast_util:5,automat:28,block:2,build:23,colab:0,combin:23,compos:23,content:[1,19,20,21],contribut:0,convert:23,creat:24,custom:2,data:22,debug:25,defin:2,depend:26,devic:28,dict:28,dictionari:23,differ:23,document:[19,20],doe:2,dumptool:[4,5,6,7,8,9,10,11],exampl:[23,25],except:[12,26],extra:26,extract:23,first:0,forward:[23,30],from:[2,21,23],gener:23,get:0,group:23,handl:26,how:2,imag:23,inspector:6,instal:0,introduct:0,item:23,layer:28,licens:0,load:29,loop:2,map:23,mode:26,model:23,modul:[2,28],multipl:23,mutat:2,need:21,nest:2,notebook:0,object:2,other:2,out:0,packagefind:7,padl:[0,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,21,28],parallel:23,paramet:28,pass:23,pipelin:[23,31],post:23,postprocess:30,pre:23,preprocess:30,print:27,print_util:13,process:23,program:0,pytorch:[2,28],resourc:0,rollout:23,s:19,same:26,sampl:23,save:[2,28,29],scope:2,serial:[2,8],share:28,slice:27,sourceget:9,stage:30,start:0,state:28,symfind:10,target:2,tensor:23,topic:1,train:23,transform:[2,14,22,23,24,25,26,28,31],us:28,usag:21,util:[16,26],util_transform:15,valu:2,var2mod:11,variabl:2,version:[17,23],weight:28,welcom:19,what:2,within:2,work:2,wrap:18,you:21,your:[0,25]}})
\ No newline at end of file
+Search.setIndex({docnames:["README","advanced","advanced/saving","apidocs/padl","apidocs/padl.dumptools","apidocs/padl.dumptools.ast_utils","apidocs/padl.dumptools.inspector","apidocs/padl.dumptools.packagefinder","apidocs/padl.dumptools.serialize","apidocs/padl.dumptools.sourceget","apidocs/padl.dumptools.symfinder","apidocs/padl.dumptools.var2mod","apidocs/padl.exceptions","apidocs/padl.print_utils","apidocs/padl.transforms","apidocs/padl.util_transforms","apidocs/padl.utils","apidocs/padl.version","apidocs/padl.wrap","index","modules","usage","usage/apply","usage/combining_transforms","usage/creating_transforms","usage/debugging_your_transforms","usage/extras","usage/print_slice","usage/pytorch","usage/saving","usage/stages","usage/transform"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":4,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.intersphinx":1,sphinx:56},filenames:["README.md","advanced.md","advanced/saving.md","apidocs/padl.md","apidocs/padl.dumptools.md","apidocs/padl.dumptools.ast_utils.md","apidocs/padl.dumptools.inspector.md","apidocs/padl.dumptools.packagefinder.md","apidocs/padl.dumptools.serialize.md","apidocs/padl.dumptools.sourceget.md","apidocs/padl.dumptools.symfinder.md","apidocs/padl.dumptools.var2mod.md","apidocs/padl.exceptions.md","apidocs/padl.print_utils.md","apidocs/padl.transforms.md","apidocs/padl.util_transforms.md","apidocs/padl.utils.md","apidocs/padl.version.md","apidocs/padl.wrap.md","index.md","modules.md","usage.md","usage/apply.md","usage/combining_transforms.md","usage/creating_transforms.md","usage/debugging_your_transforms.md","usage/extras.md","usage/print_slice.md","usage/pytorch.md","usage/saving.md","usage/stages.md","usage/transform.md"],objects:{"":[[3,0,0,"-","padl"]],"padl.dumptools":[[5,0,0,"-","ast_utils"],[6,0,0,"-","inspector"],[7,0,0,"-","packagefinder"],[8,0,0,"-","serialize"],[9,0,0,"-","sourceget"],[10,0,0,"-","symfinder"],[11,0,0,"-","var2mod"]],"padl.dumptools.ast_utils":[[5,1,1,"","Position"],[5,2,1,"","get_position"],[5,2,1,"","get_source_segment"]],"padl.dumptools.inspector":[[6,1,1,"","CallInfo"],[6,2,1,"","caller_frame"],[6,2,1,"","caller_module"],[6,2,1,"","get_segment_from_frame"],[6,2,1,"","get_statement"],[6,2,1,"","get_surrounding_block"],[6,2,1,"","non_init_caller_frameinfo"],[6,2,1,"","outer_caller_frameinfo"],[6,2,1,"","trace_this"]],"padl.dumptools.inspector.CallInfo":[[6,3,1,"","module"]],"padl.dumptools.packagefinder":[[7,2,1,"","dump_packages_versions"],[7,2,1,"","get_packages"],[7,2,1,"","get_version"]],"padl.dumptools.serialize":[[8,1,1,"","Serializer"],[8,2,1,"","json_serializer"],[8,2,1,"","load_json"],[8,2,1,"","param"],[8,2,1,"","save_json"],[8,2,1,"","value"]],"padl.dumptools.serialize.Serializer":[[8,4,1,"","save"],[8,4,1,"","save_all"],[8,3,1,"","varname"]],"padl.dumptools.sourceget":[[9,1,1,"","ReplaceString"],[9,1,1,"","ReplaceStrings"],[9,2,1,"","cut"],[9,2,1,"","get_module_source"],[9,2,1,"","get_source"],[9,2,1,"","original"],[9,2,1,"","put_into_cache"],[9,2,1,"","replace"]],"padl.dumptools.sourceget.ReplaceString":[[9,4,1,"","cut"]],"padl.dumptools.sourceget.ReplaceStrings":[[9,4,1,"","cut"]],"padl.dumptools.symfinder":[[10,5,1,"","NameNotFound"],[10,1,1,"","Scope"],[10,1,1,"","ScopedName"],[10,2,1,"","find"],[10,2,1,"","find_in_ipython"],[10,2,1,"","find_in_module"],[10,2,1,"","find_in_scope"],[10,2,1,"","find_in_source"],[10,2,1,"","replace_star_imports"],[10,2,1,"","split_call"]],"padl.dumptools.symfinder.Scope":[[10,4,1,"","empty"],[10,4,1,"","from_level"],[10,4,1,"","from_source"],[10,4,1,"","global_"],[10,4,1,"","is_global"],[10,3,1,"","module_name"],[10,4,1,"","toplevel"],[10,4,1,"","unscoped"],[10,4,1,"","up"]],"padl.dumptools.var2mod":[[11,1,1,"","CodeGraph"],[11,1,1,"","CodeNode"],[11,1,1,"","Finder"],[11,1,1,"","Vars"],[11,2,1,"","find_codenode"],[11,2,1,"","find_globals"],[11,2,1,"","increment_same_name_var"],[11,2,1,"","rename"]],"padl.dumptools.var2mod.CodeGraph":[[11,4,1,"","build"],[11,4,1,"","dumps"],[11,4,1,"","print"]],"padl.dumptools.var2mod.CodeNode":[[11,4,1,"","from_source"]],"padl.dumptools.var2mod.Finder":[[11,4,1,"","find"],[11,4,1,"","generic_visit"],[11,4,1,"","get_source_segments"]],"padl.dumptools.var2mod.Vars":[[11,6,1,"","globals"],[11,6,1,"","locals"]],"padl.exceptions":[[12,5,1,"","WrongDeviceError"]],"padl.print_utils":[[13,2,1,"","combine_multi_line_strings"],[13,2,1,"","create_arrow"],[13,2,1,"","create_reverse_arrow"],[13,2,1,"","format_argument"],[13,2,1,"","make_bold"],[13,2,1,"","make_green"],[13,2,1,"","visible_len"]],"padl.transforms":[[14,1,1,"","AtomicTransform"],[14,1,1,"","Batchify"],[14,1,1,"","BuiltinTransform"],[14,1,1,"","ClassTransform"],[14,1,1,"","Compose"],[14,1,1,"","FunctionTransform"],[14,1,1,"","Identity"],[14,1,1,"","Map"],[14,1,1,"","Parallel"],[14,1,1,"","Pipeline"],[14,1,1,"","Rollout"],[14,1,1,"","TorchModuleTransform"],[14,1,1,"","Transform"],[14,1,1,"","Unbatchify"],[14,2,1,"","fulldump"],[14,2,1,"","group"],[14,2,1,"","importdump"],[14,2,1,"","load"],[14,2,1,"","save"]],"padl.transforms.ClassTransform":[[14,3,1,"","source"]],"padl.transforms.FunctionTransform":[[14,3,1,"","source"]],"padl.transforms.Pipeline":[[14,4,1,"","grouped"],[14,4,1,"","pd_forward_device_check"],[14,4,1,"","pd_to"]],"padl.transforms.TorchModuleTransform":[[14,4,1,"","post_load"],[14,4,1,"","pre_save"]],"padl.transforms.Transform":[[14,4,1,"","eval_apply"],[14,4,1,"","infer_apply"],[14,4,1,"","pd_call_in_mode"],[14,3,1,"","pd_device"],[14,3,1,"","pd_forward"],[14,4,1,"","pd_forward_device_check"],[14,4,1,"","pd_get_loader"],[14,3,1,"","pd_layers"],[14,3,1,"","pd_name"],[14,4,1,"","pd_parameters"],[14,4,1,"","pd_post_load"],[14,3,1,"","pd_postprocess"],[14,4,1,"","pd_pre_save"],[14,3,1,"","pd_preprocess"],[14,4,1,"","pd_save"],[14,3,1,"","pd_stages"],[14,4,1,"","pd_to"],[14,4,1,"","pd_varname"],[14,4,1,"","pd_zip_save"],[14,4,1,"","train_apply"]],"padl.util_transforms":[[15,1,1,"","IfEval"],[15,1,1,"","IfInMode"],[15,1,1,"","IfInfer"],[15,1,1,"","IfTrain"],[15,1,1,"","Try"]],"padl.utils":[[16,6,1,"","same"]],"padl.wrap":[[18,1,1,"","PatchedModule"],[18,2,1,"","transform"]],padl:[[3,1,1,"","Batchify"],[3,1,1,"","Identity"],[3,1,1,"","IfEval"],[3,1,1,"","IfInMode"],[3,1,1,"","IfInfer"],[3,1,1,"","IfTrain"],[3,1,1,"","Unbatchify"],[4,0,0,"-","dumptools"],[12,0,0,"-","exceptions"],[3,2,1,"","fulldump"],[3,2,1,"","group"],[3,2,1,"","importdump"],[3,2,1,"","load"],[3,2,1,"","param"],[13,0,0,"-","print_utils"],[3,2,1,"","save"],[3,2,1,"","transform"],[14,0,0,"-","transforms"],[3,7,1,"","unbatch"],[15,0,0,"-","util_transforms"],[16,0,0,"-","utils"],[3,2,1,"","value"],[17,0,0,"-","version"],[18,0,0,"-","wrap"]]},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","function","Python function"],"3":["py","property","Python property"],"4":["py","method","Python method"],"5":["py","exception","Python exception"],"6":["py","attribute","Python attribute"],"7":["py","data","Python data"]},objtypes:{"0":"py:module","1":"py:class","2":"py:function","3":"py:property","4":"py:method","5":"py:exception","6":"py:attribute","7":"py:data"},terms:{"0":[0,3,6,9,10,11,14,25,26,27],"0x":11,"1":[0,2,3,9,10,11,14,15,23,25,26,27,28],"10":[0,3,15,24,25],"100":[2,11,23,24,26,27],"1000":[2,24],"1001":2,"11":[3,6,15],"123":6,"13":9,"2":[0,3,9,10,11,14,23,25,26,27],"20":0,"200":26,"244":23,"3":[0,3,5,6,10,11,14,23,25,26],"300":26,"4":[11,25,26],"5":[9,25],"6":25,"7":[0,25],"8":[0,5,25],"9":[0,9,25],"99":[3,15],"abstract":[0,14,19,25,31],"case":[2,3,9,10,14,23],"catch":[15,21],"class":[2,3,5,6,8,9,10,11,14,15,18,24,25,30],"const":2,"default":[2,3,6,7,8,10,14,15,23],"do":[2,3,12,14,21,22,24],"final":[15,26],"function":[0,2,3,6,8,10,11,14,18,19,23,24,25,31],"import":[0,2,3,7,10,11,14,15,18,19,22,23,24,25,26,29,30],"int":[5,6,9,10,11,13,14],"new":[9,10],"return":[0,2,3,6,7,8,9,10,11,14,22,23,24,26,27,30],"switch":[2,3,14,25],"true":[3,7,8,9,10,11,13,14,18,23,25,27],"try":[3,6,9,14,15,18,21,26],"var":11,A:[3,6,9,10,11,14,31],As:[2,11,30],At:25,By:23,For:[2,23,24,25,26],If:[0,2,3,8,9,10,11,13,14,15],In:[3,9,10,14,23,24],It:[2,6,10,14,22,24,28],No:15,On:25,One:[2,14,23],The:[2,3,6,8,9,10,11,13,14,15,21,22,23,25,30,31],Then:25,These:[2,14],To:[2,3,9,14,22,23,30],With:31,_:2,____________:13,__call__:[2,24],__file__:2,__init__:[2,6,24],__main__:10,_ast:[10,11],_generatorwithlength:22,_pd_main:2,_thingfind:10,_trace_thi:6,a_transform:2,about:[6,14,25,28,31],abov:23,absolut:[2,25],accept:14,access:[10,27,30],ad:[3,10,14,22,31],adam:28,adapt:28,add:[2,3,9,14,24,26,27],add_n:2,addconst:2,addfirst:26,addit:9,advanc:19,after:[2,3,14,25,28],again:2,ai:[0,19],airplan:22,alia:11,all:[0,2,6,8,11,12,14,18,19,21,22,23,28,29],allow:[0,9,10,19,22,23,26],along:28,also:[2,3,8,14,22,24,26],alwai:14,am:25,an:[0,2,6,9,10,11,13,14,19,22,25,26,28,31],analog:26,analysi:0,ani:[3,8,13,14,15],anoth:13,anyth:[2,19],apach:0,api:19,append:[2,8],appli:[2,3,13,14,15,19,21,23,25,30],applic:26,ar:[2,3,8,10,11,14,21,22,23,24,25,28,29,30],arbitrari:[0,19,26],arg:[2,6,14,22,25,27],argument:[2,3,6,10,13,14,22],aris:23,arrai:[2,11,26],arrow:13,ascii:13,assign:[10,14],ast:[5,7,10,11],ast_nod:11,ast_util:[19,20],atom:14,atomictransform:[14,25],attribut:[6,9,16,25],augment:[23,26,28,30],automat:[2,3,14,22],avail:[6,22],awar:2,axxxxxxxxxxxxxxxxxxxx:9,b:[3,9,11,14,15],back:15,backward:28,bar:[11,22,23],base:[0,8,14,19],batch:[0,3,14,21,22,23,25,28,30,31],batch_siz:[22,25,28],batchifi:[3,10,14,21,25],baz:23,becaus:0,becom:[6,10,23,24],been:14,befor:[2,3,6,8,14,22],being:[3,14,26],below:[11,25],berlin:[0,19],between:[11,23],bia:25,big:2,bla:7,blip:7,blob:0,block:6,blop:7,blu:7,bodi:[2,6,7,10,11],boilerpl:31,bold:13,bool:[3,6,9,10,11,14],both:[2,9,28],build:[0,2,10,11,19,31],build_my_transform:2,builder:[0,19],built:28,builtin:[11,14],builtintransform:14,bup:7,c:[3,14],cach:9,call:[3,6,8,10,11,14,15,24,25,30],call_info:14,call_sourc:10,callabl:[3,6,8,14,18,24],caller:6,caller_fram:6,caller_modul:6,callinfo:[6,14],calling_scop:10,can:[0,2,3,6,8,9,10,14,15,19,22,23,24,25,26,27,28,29,30,31],canb:22,cannot:2,capabl:28,captur:16,carri:15,cat:22,catch_transform:15,caus:2,caveat:2,cell:9,central:31,chang:[2,6,15],charact:13,check:[14,25],checkpoint:29,child:[12,14],child_transform:12,children:14,classifi:[23,30],classmethod:[8,10,11],classtransform:14,claus:15,clean:2,close:26,co:25,code:[0,2,3,6,7,8,9,10,11,14,25,28,31],code_of_conduct:0,codegraph:[8,11],codenod:11,col:[6,9,11],col_offset:[5,11],collect:[9,14,21],column:6,com:0,combin:[13,14,19,21,24,31],combine_multi_line_str:13,come:[18,24],command:25,comment:6,common:23,complet:[6,15],complex:[2,14,27,31],compon:[0,19,23],compos:[14,25,27,30],composit:23,comprehens:0,compress:[3,14],concat_low:26,concis:[0,21],condit:[15,21],condition:23,conduct:0,conflict:2,consid:2,consist:2,consol:25,constant:[2,9],construct:14,contain:[2,6,8,9,10,12,13,14,28,29],content:11,context:[6,14],continu:[23,30],contrast:14,contribut:19,conveni:28,convert:[0,10,19,24,28,30],coor:13,coordin:13,correct:14,correspond:[5,10,11,30],could:[2,10,23],count:10,counter:[10,11],cpu:[3,14],creat:[0,2,6,8,10,11,13,14,19,21,22,23,28,29,31],create_arrow:13,create_reverse_arrow:13,crop:23,cuda:[14,28],current:[0,2,10,25],custom:[14,25,31],cut:9,d:25,data:[2,14,19,21,30,31],dataload:[14,22,31],datapoint:[14,23],dataset:2,debug:[11,19,21,31],debugg:25,decor:[3,14,18,24],deep:[0,2,19,23,30,31],deeper:25,def:[0,2,6,10,11,14,24,26,27,30],def_sourc:10,defin:[8,10,11,21,25,29,30],definit:2,depend:[2,11,29],descript:[2,3,8],detail:[6,14,23],determin:[3,6,9,11,14,18],develop:[0,19],devic:[3,12,14,22],di:31,diagnos:25,dict:9,dictionari:[2,14],differ:[2,3,8,9,22,25,30],dim:[3,14,25],dimens:[3,14,22,31],directli:14,directori:2,disabl:[3,13,14,22],displai:25,document:[6,14],doe:[14,22,25],doesn:[3,15],dog:22,don:[2,3,6,13,14,18],done:[14,22],down:[2,25],drop:[6,10],drop_n:[6,10],dump:[2,3,7,8,11,14],dump_packages_vers:7,dumptool:[14,19,20],dure:[3,14,23,26],e:[3,10,14],each:[2,14,22,25,30],easili:31,ecosystem:[0,19],edg:11,effect:2,either:[2,9],eleg:31,element:[14,23,25,30],elp:25,els:[3,11,15],else_:[3,15],else_transform:15,emb:25,embed:25,embedding_dim:25,empti:[6,10],enabl:[2,3,14,31],end:[3,11,13,14],end_col_offset:[5,11],end_lineno:[5,11],enter:[6,25],entir:[24,25],entiti:10,entri:2,enumer:2,epeat:25,equival:26,error:[15,25],escap:13,eval:[3,14,15,21,22,26],eval_appli:[3,14,15,22,25,26],evalu:30,even:23,event:6,everi:13,everyth:[11,21,23,24],exactli:23,exampl:[0,2,3,6,7,9,10,11,13,14,15,18,22,26,30],except:[10,15,19,20,21,25],execut:[0,2,6,23,25],exist:[3,11,14],expect:[2,3,9,14,22,25],explicit:[9,11],explicitli:14,extens:[3,14],extra:[15,19,21,28],extract:6,f1:14,f2:14,f:[2,9,10,11,14],factori:16,fail:[15,25],fall:15,fals:[2,3,6,10,11,13,14,18],few:2,field:11,file:[2,3,9,14,26,29],file_suffix:8,fileexistserror:[3,14],filenam:[2,9,14,26],filter:11,filter_builtin:11,finally_transform:15,find:[0,7,10,11],find_codenod:11,find_glob:11,find_in_ipython:10,find_in_modul:10,find_in_scop:10,find_in_sourc:10,finder:11,finish_right:13,first:[3,6,9,13,14,23],flat:23,flatten:[3,14,23],flexibl:31,folder:[2,3,14,29],follow:[2,6,10,11,21,25],foo:[7,11,14,23],forc:2,force_overwrit:[3,14],form:[10,14,24,31],formal:31,format:[7,13,30,31],format_argu:13,forward:[0,14,19,21,22,24,25],found:[6,10,11],four:10,frame:[6,9],frameinfo:6,from:[0,3,6,7,9,10,11,14,15,19,22,24,25,26,28,29,30],from_:11,from_col:9,from_level:10,from_lin:9,from_sourc:[10,11],front:6,full:[0,2,3,14],full_dump_module_nam:11,fulldump:[2,3,14],fulli:[3,14],functiontransform:14,fundament:14,futur:2,g:14,gener:[14,22],generic_visit:11,germani:[0,19],get:[2,5,6,7,9,10,11,13,14,16,19,21,23,25,26],get_module_sourc:9,get_packag:7,get_posit:5,get_segment_from_fram:6,get_sourc:9,get_source_seg:[5,11],get_stat:6,get_surrounding_block:6,get_vers:7,getitem:[6,27],github:0,give:9,given:[3,6,7,9,10,11,14],global:[2,10,11],global_:10,globals_:11,go:[0,11,25],good:14,got:25,gotten:9,gpu:[14,22,30,31],gradient:[14,22,31],graph:11,great:[0,19],green:13,group:[3,14,21],h:25,ha:[2,9,11,14,23,25,28,30],hacki:6,handl:22,happen:[15,30],have:[0,2,14,19,28],head:23,hello:26,help:[14,25],helper:[3,8],here:[2,6,25],hidden:24,hierarchi:10,histori:10,hood:22,how:[10,14,22,23,24,27,29,30,31],howev:2,http:0,i:[2,3,10,14,25],id:9,ident:[3,14,15,21,27],identifi:10,if_:[3,15],ifev:[3,15,21,26],iff:10,ifinf:[3,15,21,26],ifinmod:[3,15],iftrain:[3,15,21,23,26],ignor:14,ignore_grad:14,ignore_scop:[3,6,14,18],iim:[3,15],imag:[13,30],implement:[14,24],importdump:[2,3,14],in_featur:25,includ:[2,9,14,28,29],incorpor:25,increment:11,increment_same_name_var:11,indent:6,index:14,indic:[10,14],individu:23,infer:[3,14,15,21,22,26,28,30],infer_appli:[3,14,15,22,25,26],infer_pipelin:28,inform:[6,14,25],initi:[2,14,28],inlin:[6,14],innov:[0,19],input:[3,9,13,14,22,23,25,26],insert:9,insid:[15,25],inspect:[6,9,14,25,31],inspector:[14,19,20],instanc:[2,22,23,24,28],instead:[2,3,6,14,18],interact:[2,25,29,31],interest:0,intern:22,introduct:19,invers:[3,14],io:0,ipython:[2,9,10,27],is_glob:10,isinst:[9,11,18],issu:0,item:[0,3,10,14,16,22,26],iter:[14,22,28],its:[10,11,14,25],itself:6,jpg:22,json:[2,8],json_seri:8,just:[2,3,14],keep:23,kei:9,keyword:[0,2,3,14,19],know:21,kwarg:[3,6,14],l1:24,l2:24,lab:[0,19],lambda:[3,14,15,23,24,25,26],larg:2,larger:6,largest:6,last:[2,9,13,14],layer1:28,layer2:28,layer:[0,14,19,25],learn:[0,19,22,23,24,28,29,30,31],len:[2,22],length:[13,23],let:25,level:[2,6,10,23,25],lf1:[0,19],licens:19,like:[2,22,30],limit:2,lin:24,line:[6,9,10,13,25],linear:[0,24,25],lineno:[5,6,10,11],list:[2,3,7,9,10,11,13,14,15,22,25,26,28,29],liter:[3,6,14,15],live:11,load:[0,2,3,8,14,19,21,22,23,28,30],load_data:2,load_funct:8,load_imag:[23,30],load_json:8,loader:[8,14],loc:9,local:11,locat:[6,9],log10:24,longtensor:25,look:[0,2,6,10],lookup:[28,30],loop:[10,22,28],loss:[0,19,23,28],lower:26,lr:28,macro:23,made:[6,14],mai:[0,19],main:[0,10,12],maintain:9,make:[0,13,19,21,25,28],make_bold:13,make_green:13,manual:0,map:14,mark:[3,8,14],match:[3,6,12,14,15,25],math:24,md:0,mean:[2,3,14,23],messi:2,method:[6,14,21,26],might:[2,26],minim:31,minus100:24,minusx:[24,26,27],mlp:24,mml:24,mnist:0,mode:[3,14,15,22],model:[0,2,14,19,28,30],model_pass:23,modifi:9,modul:[3,6,7,8,9,10,11,14,18,19,21,23,24,27,29,30],module_nam:[6,10],more:[2,3,6,14,23,31],most:[10,23,30],mother:12,mother_transform:12,move:[3,14,23,25],mpiler:25,much:[2,31],multi:[6,13,31],multipl:[2,14,22,24,28],multiprocess:14,must:[2,6,14,23],my:2,my_classifi:[22,30],my_classifier_transform:[23,30],my_pipelin:[0,2,28,29],myfil:2,myfunct:6,mykei:9,myload:2,mypipelin:29,mypytorchlay:28,mysav:2,mytransform:2,n:[6,10,11,14],n_final_row:13,n_in:24,n_initial_row:13,n_out:24,n_to_add:2,name:[2,3,6,7,8,10,11,14,15,30],namenotfound:10,natur:22,need:[2,8,14,19],nest:[10,27,28],never:14,next:[22,23,24,27,28,29,30,31],nextmodul:6,nlp:0,nn:[0,14,24,25],node:[5,7,10,11],nodetyp:11,nodevisitor:11,non:9,non_init_caller_frameinfo:6,none:[3,6,8,10,11,14,15,18],normal:[2,9,14],not_found:2,note:[2,6],notebook:[2,31],noth:[3,14,21],now:2,np:[2,11,18,24,26],nput:25,npy:2,nth:23,num_embed:25,num_work:[22,25,28],number:[6,10,11,13],numpi:[2,18,24],o:11,object:[6,9,10,11,14,22,26],occur:15,offset:[6,11],often:26,one:[2,3,10,13,14,15,23,25,30],onli:[2,11,23,26],open:[2,23,26],open_fil:26,oper:23,optim:28,option:[3,6,8,11,14,15],order:14,ordereddict:14,origin:[6,9],other:[14,15],otherwis:[3,14,15],out:[6,9,10,11,15,18,23,24],out_featur:25,outer:6,outer_caller_frameinfo:6,output:[3,14,15,22,23,30],over:[13,14,23,28],overlap:9,overrid:[3,14],overridden:[2,3,8],overwrit:[3,14],own:[2,25],p:25,packag:[0,2,3,7,14,19,25,29],packagefind:[19,20],pad:13,padl:[2,20,23,24,25,26,27,29,30,31],padl_value_0:2,page:21,parallel:[3,14],param:[2,3,8,14],paramet:[3,6,7,8,9,10,11,12,13,14,15,18,29],parent:[2,18],parenthes:23,pars:[7,11],part:[9,14,21,22,25,30],parti:2,particular:24,pass:[0,2,3,14,19,22],patch:18,patchedmodul:18,path:[2,3,8,14,23,30],pathlib:[2,3,8,14],pd_call_in_mod:14,pd_debug:[21,25],pd_devic:14,pd_forward:[14,22,30],pd_forward_device_check:14,pd_get_load:14,pd_group:14,pd_layer:[14,28],pd_name:[14,15],pd_np:18,pd_paramet:[14,28],pd_post_load:14,pd_postprocess:[14,30],pd_pre_sav:14,pd_preprocess:[14,30],pd_save:14,pd_stage:14,pd_to:[14,28],pd_varnam:14,pd_zip_sav:14,perform:[3,14,15],pick:2,piec:[10,11],pil:23,piltotensor:23,pip:0,pipelin:[0,14,19,21,22,24,25,27,28,29,30],pleas:0,pluson:2,plustwo:2,posit:[5,9,11,25],possibl:[2,6,14,24,28],post:[0,14,19,30],post_load:14,postprocess:[3,14,19,21,22,23,25],potenti:[2,6],power:23,pre:[0,9,14,19,30],pre_sav:14,preced:13,predict:[23,28],prefer:0,prepar:0,preprocess:[3,14,19,21,22,23,25,28,31],preprocess_imag:23,pretti:27,prevent:[2,3,14],previous:2,print:[6,11,13,14,19,21,25,29],print_util:[19,20],process:[0,2,14,19,22,30,31],produc:25,progress:22,propag:14,properti:[6,8,10,14],provid:[2,23,25],pt:2,put:9,put_into_cach:9,py:[2,29],pypi:2,python:[0,2,5,6,10,11,19,23,24,29],pytorch:[0,14,19,21,22,23,24,27,29,30],q:25,quit:25,r:25,rais:[3,6,14,25],rand:18,random:18,randomresizedcrop:23,randomrot:23,rang:2,ransform:25,rather:[2,6,14],re:[0,19,23],reach:25,read:[2,21,22,26,27,31],read_from_path:26,readabl:30,recent:10,recreat:2,recurs:[3,14,25],ref:25,refer:21,regardless:15,relev:25,relu:24,rememb:28,remov:[3,6,14,22],renam:[2,11],rename_loc:11,repeat:[2,23,25],repl:9,replac:[9,10],replace_cach:9,replace_star_import:10,replacestr:9,repres:[10,11],reproduc:31,requir:[2,6],reshap:30,resiz:23,resnet18:[23,30],respect:[3,11,14,26],respons:[2,30],rest:6,result:[2,3,6,9,14,23],retriev:25,return_loc:6,return_parti:10,revers:2,roll:23,rollout:[3,14],row:6,rstring:9,run:25,runtimeerror:25,s:[3,6,7,8,9,10,14,15,21,22,24,28,29,30],same:[3,5,6,9,10,11,14,16,21,23,25,28],save:[1,3,8,14,19,21,22,31],save_al:8,save_funct:8,save_json:8,saver:8,scope:[3,6,10,11,14,18],scoped_nam:11,scopednam:[10,11],scopelist:10,search:[10,11,14],second:[2,3,10,14,23],section:[9,22,23,24,27,28,29,30,31],see:[0,2,3,6,8,14,22],segment:[5,6,10,11],segment_typ:6,self:[2,10,14,24],send:[14,22,28,31],sentiment:0,sequenc:[13,14,23],seri:14,serial:[3,14,19,20],session:[2,29],set:[2,8,11,14,22],settrac:6,shape:25,should:[2,3,6,8,14],show:[22,25],shown:25,similar:2,simpl:0,simpli:[2,14],sin:24,sinc:25,singl:[0,14,19,22,23],size:[22,25],slice:[19,21,29,31],slower:0,so:[10,23,25],some:[2,23,25,28],somemodul:11,someobject:2,someth:[2,26],sometim:2,soon:6,sourc:[5,6,7,9,10,11,14],sourceget:[19,20],space:[6,13],special:[23,26,30],specifi:[2,3,8,9,10,14,22],split:[2,10],split_cal:10,stack:6,stage:[14,19,21,22,23,25],stand:30,standard:[0,19],star:[2,10],start:[3,10,13,14,19,21,25],start_left:13,state_dict:28,statement:[2,3,6,10,14,15,25],step:[23,28],stop:31,store:[2,3,8,28,29],str:[2,3,6,8,9,10,11,13,14,15],string:[3,7,8,9,10,11,13,14],sub:[9,11,14,23,27],subclass:10,substr:9,subval:2,successfulli:15,suffix:2,suggest:30,superimpos:13,support:[0,2,22],surround:[6,10],sy:6,symbol:[2,10],symfind:[6,11,19,20],t1:[14,23,27],t2:[14,23,27],t3:[14,23,27],t4:27,t5:27,t:[2,3,6,13,14,15,18,23,25,26],take:[13,23],taken:[9,24],target:[6,23],target_mod:[3,15],tensor:[0,3,14,22],text:[0,2],textcorpu:2,than:2,them:[2,3,14,21,23,28],thereof:[3,14],thi:[2,3,6,9,10,11,13,14,15,22,23,24,25,27,28,29],thing:[2,3,8,9,10,11],third:2,those:[2,11,28,30],three:[22,23],through:[11,22,23],thu:[2,23],time:2,to_col:9,to_lin:9,to_tensor:25,toarrai:2,togeth:27,too:[24,27,29],top:[10,13,25],topic:19,topk:0,toplevel:[3,6,10,14,18],topolog:[0,19],torch:[0,14,24,25,28],torchmoduletransform:14,torchvis:[23,30],totensor:[23,30],tqdm:22,trace:6,trace_thi:6,tracefunc:6,track:2,train:[3,14,15,21,22,26,28,30],train_appli:[14,22,25,28],train_data:28,train_model:28,train_pipelin:28,training_pipelin:23,transform:[0,3,10,12,15,16,18,19,20,21,27,29,30],transform_or_modul:[3,14],transpar:[13,31],tree:[0,10,11],tupl:[2,3,6,10,11,14,15,23],turn:14,tvt:23,two:2,txt:[2,29],type:[6,11],typic:14,u:25,uit:25,unbatch:[0,3,21,23,30],unbatchifi:[3,14],under:[0,22],undo:2,unind:6,union:[3,14,15],uniqu:14,unscop:10,unsqueez:[3,14],until:25,up:[2,10,25],updat:22,us:[0,2,3,6,7,8,9,10,11,13,14,15,18,19,21,22,23,24,25,26,27,30,31],usag:[0,19],use_default:[2,3,8],use_replace_cach:9,user:[0,2,19,25],usual:[2,30],util:[6,7,13,14,19,20,23,28],util_transform:[19,20],v:13,val:[2,3,8],valu:[3,8,9,10,13,21],valueerror:6,var2mod:[19,20],var_nam:10,variabl:[10,11,14,25],variou:[9,10],varnam:[8,10],veri:2,version:[0,2,7,9,10,14,19,20,29],via:[2,14,27,28,29,30],view:23,visibl:13,visible_len:13,visitor:11,w:25,wa:[0,6,14,19,25],wai:[10,25],want:[2,26],we:[2,25,30],well:10,were:[2,10],what:[14,26,30],whatev:14,when:[2,3,8,14,15,24,25,28,29],where:[6,9,11,13,25],wherea:30,which:[2,3,6,9,10,11,14,22,23,29],whole:[14,31],whose:[3,14],wide:6,within:[6,9,10,14,28],without:[3,8,31],word:2,word_index:2,wordindex:2,work:[27,28,31],worker:22,workflow:[30,31],worri:31,would:[2,9,10,23],wrap:[2,3,14,19,20,24],wrap_typ:14,wrappe:[3,18],wrapper:[3,18,24],write:[0,2,3,14,19],written:10,wrongdeviceerror:12,x1:14,x2:14,x3:14,x:[0,2,3,9,10,11,13,14,15,23,24,25,26,27,30],xxxx:9,xxxxxaxxxxxxxxxxxxxxxxxxxx:9,xxxxxxxxxxx:9,xxxxxxxxxxxxxb:9,xxxxxxxxxxxxxbxxxx:9,y:[2,11,13,23,24,27],you:[0,2,19,23,26,31],your:[2,19,21,31],z:[11,23],zero_grad:28,zip:[3,14]},titles:["Introduction","Advanced Topics","Saving","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.dumptools</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.dumptools.ast_utils</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.dumptools.inspector</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.dumptools.packagefinder</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.dumptools.serialize</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.dumptools.sourceget</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.dumptools.symfinder</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.dumptools.var2mod</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.exceptions</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.print_utils</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.transforms</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.util_transforms</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.utils</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.version</span></code>","<code class=\"docutils literal notranslate\"><span class=\"pre\">padl.wrap</span></code>","Welcome to PADL\u2019s documentation!","API Documentation","Usage","Applying Transforms to Data","Combining Transforms into Pipelines","Creating Transforms","Debugging your Transforms","Extras","Printing and Slicing","Using PyTorch Modules with Transforms","Saving and Loading","Stages: Preprocess, Forward and Postprocess","<em>Transforms</em> and <em>Pipelines</em>"],titleterms:{"import":21,"try":0,The:26,access:28,advanc:1,an:23,anyth:21,api:20,appli:[22,26],ast_util:5,automat:28,block:2,build:23,colab:0,combin:23,compos:23,content:[1,19,20,21],contribut:0,convert:23,creat:24,custom:2,data:22,debug:25,defin:2,depend:26,devic:28,dict:28,dictionari:23,differ:23,document:[19,20],doe:2,dumptool:[4,5,6,7,8,9,10,11],exampl:[23,25],except:[12,26],extra:26,extract:23,first:0,forward:[23,30],from:[2,21,23],gener:23,get:0,group:23,handl:26,how:2,imag:23,inspector:6,instal:0,introduct:0,item:23,layer:28,licens:0,load:29,loop:2,map:23,mode:26,model:23,modul:[2,28],multipl:23,mutat:2,need:21,nest:2,notebook:0,object:2,other:2,out:0,packagefind:7,padl:[0,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,21,28],parallel:23,paramet:[2,28],pass:23,pipelin:[23,31],post:23,postprocess:30,pre:23,preprocess:30,print:27,print_util:13,process:23,program:0,pytorch:[2,28],resourc:0,rollout:23,s:19,same:26,sampl:23,save:[2,28,29],scope:2,serial:[2,8],share:28,slice:27,sourceget:9,stage:30,start:0,state:28,symfind:10,target:2,tensor:23,topic:1,train:23,transform:[2,14,22,23,24,25,26,28,31],us:28,usag:21,util:[16,26],util_transform:15,valu:2,var2mod:11,variabl:2,version:[17,23],weight:28,welcom:19,what:2,within:2,work:2,wrap:18,you:21,your:[0,25]}})
\ No newline at end of file
diff --git a/docs/unstable/usage.html b/docs/unstable/usage.html
index e998b340..b670ca00 100644
--- a/docs/unstable/usage.html
+++ b/docs/unstable/usage.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/usage/apply.html b/docs/unstable/usage/apply.html
index 935248c6..8246620d 100644
--- a/docs/unstable/usage/apply.html
+++ b/docs/unstable/usage/apply.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="../advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/usage/combining_transforms.html b/docs/unstable/usage/combining_transforms.html
index deb8a0bb..ad1e6057 100644
--- a/docs/unstable/usage/combining_transforms.html
+++ b/docs/unstable/usage/combining_transforms.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="../advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/usage/creating_transforms.html b/docs/unstable/usage/creating_transforms.html
index 29edb777..aaaebf31 100644
--- a/docs/unstable/usage/creating_transforms.html
+++ b/docs/unstable/usage/creating_transforms.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="../advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/usage/debugging_your_transforms.html b/docs/unstable/usage/debugging_your_transforms.html
index 7612eedf..43da9b88 100644
--- a/docs/unstable/usage/debugging_your_transforms.html
+++ b/docs/unstable/usage/debugging_your_transforms.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="../advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/usage/extras.html b/docs/unstable/usage/extras.html
index 43d2c68e..bce8a47c 100644
--- a/docs/unstable/usage/extras.html
+++ b/docs/unstable/usage/extras.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="../advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/usage/print_slice.html b/docs/unstable/usage/print_slice.html
index 4a0bf0cd..4a94465d 100644
--- a/docs/unstable/usage/print_slice.html
+++ b/docs/unstable/usage/print_slice.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="../advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/usage/pytorch.html b/docs/unstable/usage/pytorch.html
index cc36c2b9..38c06ab6 100644
--- a/docs/unstable/usage/pytorch.html
+++ b/docs/unstable/usage/pytorch.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="../advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/usage/saving.html b/docs/unstable/usage/saving.html
index 37750561..86d26377 100644
--- a/docs/unstable/usage/saving.html
+++ b/docs/unstable/usage/saving.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="../advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/usage/stages.html b/docs/unstable/usage/stages.html
index 7e8a0a32..db1192c0 100644
--- a/docs/unstable/usage/stages.html
+++ b/docs/unstable/usage/stages.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="../advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/docs/unstable/usage/transform.html b/docs/unstable/usage/transform.html
index 7db0889f..832bbaf3 100644
--- a/docs/unstable/usage/transform.html
+++ b/docs/unstable/usage/transform.html
@@ -116,6 +116,7 @@
 <li class="toctree-l4"><a class="reference internal" href="../advanced/saving.html#custom-serializers">Custom serializers</a></li>
 </ul>
 </li>
+<li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#parameters">Parameters</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-pytorch-modules">Saving pytorch modules</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#defining-transform-within-nested-scopes">Defining Transform within nested scopes</a></li>
 <li class="toctree-l3"><a class="reference internal" href="../advanced/saving.html#saving-transforms-from-other-modules">Saving Transforms from other modules</a></li>
diff --git a/padl/__init__.py b/padl/__init__.py
index a79608dc..c27837c5 100644
--- a/padl/__init__.py
+++ b/padl/__init__.py
@@ -3,7 +3,7 @@
     Batchify, Unbatchify, identity, Identity, group, load, save, fulldump,
     importdump
 )
-from padl.dumptools.serialize import value
+from padl.dumptools.serialize import value, param
 from padl.util_transforms import IfTrain, IfEval, IfInfer, IfInMode
 from padl.utils import pd_debug
 from padl.version import __version__
@@ -17,4 +17,4 @@
 
 __all__ = ['value', 'transform', 'Batchify', 'Unbatchify', 'Identity', 'group', 'load', 'save',
            'IfTrain', 'IfEval', 'IfInfer', 'IfInMode', 'identity', 'batch', 'unbatch', 'same',
-           '__version__', 'fulldump', 'importdump']
+           '__version__', 'fulldump', 'importdump', 'param']
diff --git a/padl/dumptools/serialize.py b/padl/dumptools/serialize.py
index d4fdbd22..0c676620 100644
--- a/padl/dumptools/serialize.py
+++ b/padl/dumptools/serialize.py
@@ -133,3 +133,43 @@ def value(val, serializer=None):
     sourceget.put_into_cache(caller_frameinfo.filename, sourceget.original(source),
                              _serialize(val, serializer=serializer), *locs)
     return val
+
+
+def param(val, name, description=None, use_default=True):
+    """Helper function for marking parameters.
+
+    Parameters can be overridden when loading. See also :func:`padl.load`.
+
+    :param val: The default value of the parameter / the value before saving.
+    :param name: The name of the parameter.
+    :param use_default: If True, will use *val* when loading without specifying a different value.
+    :returns: *val*
+    """
+    caller_frameinfo = inspector.outer_caller_frameinfo(__name__)
+    if not use_default and val is not None:
+        call, locs = inspector.get_segment_from_frame(caller_frameinfo.frame, 'call', True)
+        source = sourceget.get_source(caller_frameinfo.filename)
+        call, args = symfinder.split_call(call)
+        args = 'None, ' + args.split(',', 1)[1]
+        sourceget.put_into_cache(caller_frameinfo.filename, sourceget.original(source),
+                                 f'{call}({args})', *locs)
+
+    module = inspector._module(caller_frameinfo.frame)
+    if not getattr(module, '_pd_is_padl_file', False):
+        return val
+
+    module._pd_found_params[name] = val
+
+    try:
+        return module._pd_params[name]
+    except KeyError as exc:
+        if val is None and not use_default:
+            raise ValueError(f'Unfilled parameter *{name}*. \n\n'
+                             'When loading a transform, '
+                             f'provide *{name}* as a keyword '
+                             f'argument: padl.load(..., {name}=...).'
+                             + (description is not None
+                             and f'\n\nDescription: "{description}"'
+                             or '')
+                             ) from exc
+        return val
diff --git a/padl/dumptools/sourceget.py b/padl/dumptools/sourceget.py
index 5dbd2a9a..9fb570ff 100644
--- a/padl/dumptools/sourceget.py
+++ b/padl/dumptools/sourceget.py
@@ -161,7 +161,7 @@ class ReplaceString(str):
 
     def __new__(cls, string: str, repl: str, from_line: int, to_line: int, from_col: int,
                 to_col: int):
-        replaced = _replace(string, repl, from_line, to_line, from_col, to_col)
+        replaced = replace(string, repl, from_line, to_line, from_col, to_col)
         return super().__new__(cls, replaced)
 
     def __init__(self, string: str, repl: str, from_line: int, to_line: int, from_col: int,
@@ -223,8 +223,8 @@ def __new__(cls, rstrings: List[ReplaceString]):
         rstrings = sorted(rstrings, key=lambda x: (x.from_line, x.from_col), reverse=True)
         replaced = rstrings[0].original
         for rstring in rstrings:
-            replaced = _replace(replaced, rstring.repl, rstring.from_line, rstring.to_line,
-                                rstring.from_col, rstring.to_col)
+            replaced = replace(replaced, rstring.repl, rstring.from_line, rstring.to_line,
+                               rstring.from_col, rstring.to_col)
         return super().__new__(cls, replaced)
 
     def __init__(self, rstrings):
@@ -273,7 +273,7 @@ def _cut_string(string: str, from_line: int, to_line: int, from_col: int, to_col
     return '\n'.join(lines)
 
 
-def _replace(string, repl, from_line, to_line, from_col, to_col):
+def replace(string, repl, from_line, to_line, from_col, to_col):
     """Replace a substring in *string* with *repl*. """
     if from_line < 0 and to_line < 0:
         return string
diff --git a/padl/dumptools/symfinder.py b/padl/dumptools/symfinder.py
index 364a66cd..4a92875f 100644
--- a/padl/dumptools/symfinder.py
+++ b/padl/dumptools/symfinder.py
@@ -323,7 +323,6 @@ def visit_Assign(self, node):
                 self._result = node
                 return
 
-
     def visit_AnnAssign(self, node):
         if self._parse_target(node.target):
             self._result = node
diff --git a/padl/dumptools/var2mod.py b/padl/dumptools/var2mod.py
index 698aac45..c91dfa81 100644
--- a/padl/dumptools/var2mod.py
+++ b/padl/dumptools/var2mod.py
@@ -781,6 +781,8 @@ def _dumps_unscoped(unscoped_graph):
         here = unscoped_graph[name]
         if here in done:
             continue
+        if not here.source.strip():
+            continue
         done.add(here)
         res += here.source
         if i < len(sorted_) - 1:
diff --git a/padl/transforms.py b/padl/transforms.py
index b82c1c24..cf304b50 100644
--- a/padl/transforms.py
+++ b/padl/transforms.py
@@ -36,6 +36,8 @@
 from padl.dumptools.var2mod import CodeGraph, CodeNode, find_codenode
 from padl.dumptools.symfinder import ScopedName
 from padl.dumptools.serialize import Serializer
+from padl.dumptools.sourceget import replace
+from padl.dumptools.ast_utils import get_position
 
 from padl.dumptools.packagefinder import dump_packages_versions
 from padl.exceptions import WrongDeviceError
@@ -2540,8 +2542,11 @@ def save(transform: Transform, path: Union[Path, str], force_overwrite: bool = F
         transform.pd_save(path, force_overwrite)
 
 
-def load(path):
-    """Load a transform (as saved with padl.save) from *path*. """
+def load(path, **kwargs):
+    """Load a transform (as saved with padl.save) from *path*.
+
+    Use keyword arguments to override params (see :func:`padl.param`).
+    """
     if Path(path).is_file():
         return _zip_load(path)
     path = Path(path)
@@ -2555,19 +2560,40 @@ def create_module(self, spec):
     module_name = str(path).replace('/', '.').lstrip('.') + 'transform'
     spec = ModuleSpec(module_name, _EmptyLoader())
     module = module_from_spec(spec)
+
+    pd_found_params = {}
     module.__dict__.update({
+        '_pd_is_padl_file': True,
         '_pd_source': source,
         '_pd_module': module,
         '_pd_full_dump': True,
+        '_pd_params': kwargs,
+        '_pd_found_params': pd_found_params,
         '__file__': str(path / 'transform.py')
     })
-    code = compile(source, path/'transform.py', 'exec')
+
+    code = compile(source, path / 'transform.py', 'exec')
+
     # pylint: disable=exec-used
     exec(code, module.__dict__)
+
+    for k in kwargs:
+        if k not in pd_found_params:
+            msg = (
+                f'Parameter {k} does not exist.\n\n' +
+                'Available parameters:\n' +
+                '\n'.join(f'  {n} (default: {d})' if d is not None
+                          else 'f'
+                          for n, d in pd_found_params.items())
+            )
+            raise ValueError(msg)
+
     # pylint: disable=no-member,protected-access
+
     transform = module._pd_main
     for i, subtrans in enumerate(transform._pd_all_transforms()):
         subtrans.pd_post_load(path, i)
+
     return transform
 
 


Test patch:
diff --git a/tests/material/relative_import.py b/tests/material/relative_import.py
new file mode 100644
index 00000000..13fcb370
--- /dev/null
+++ b/tests/material/relative_import.py
@@ -0,0 +1,2 @@
+from . import transforms_in_module as tim
+from .transforms_in_module import function
diff --git a/tests/unittests/dumptools/test_sourceget.py b/tests/unittests/dumptools/test_sourceget.py
index eb0da4e1..7cb378bb 100644
--- a/tests/unittests/dumptools/test_sourceget.py
+++ b/tests/unittests/dumptools/test_sourceget.py
@@ -36,13 +36,13 @@
 
 class TestReplace:
     def test_a(self):
-        assert sourceget._replace(a, 'here', 2, 2, 2, 5) == a_r
+        assert sourceget.replace(a, 'here', 2, 2, 2, 5) == a_r
 
     def test_a1(self):
-        assert sourceget._replace(a, 'he\nre', 2, 2, 2, 8) == a_r1
+        assert sourceget.replace(a, 'he\nre', 2, 2, 2, 8) == a_r1
 
     def test_b(self):
-        assert sourceget._replace(b, 'here', 0, 0, 4, 6) == b_r
+        assert sourceget.replace(b, 'here', 0, 0, 4, 6) == b_r
 
 
 class TestCut:
diff --git a/tests/unittests/test_transforms.py b/tests/unittests/test_transforms.py
index ad01b24e..b28c56a1 100644
--- a/tests/unittests/test_transforms.py
+++ b/tests/unittests/test_transforms.py
@@ -1073,3 +1073,35 @@ def test_pd_trace(self):
 def test_identity_compose_saves(tmp_path):
     t = padl.identity >> padl.identity
     t.pd_save(tmp_path / 'test')
+
+
+class TestParam:
+    def test_param_works(self, tmp_path):
+        x = padl.param(1, 'x')
+        t = SimpleClassTransform(x)
+        assert t(1) == 2
+        t.pd_save(tmp_path / 'test.padl')
+        t_1 = padl.load(tmp_path / 'test.padl')
+        assert t_1(1) == 2
+        t_2 = padl.load(tmp_path / 'test.padl', x=2)
+        assert t_2(1) == 3
+
+    def test_no_default(self, tmp_path):
+        x = padl.param(1, 'x', use_default=False)
+        t = SimpleClassTransform(x)
+        assert t(1) == 2
+        t.pd_save(tmp_path / 'test.padl')
+        with pytest.raises(ValueError):
+            padl.load(tmp_path / 'test.padl')
+        t_2 = padl.load(tmp_path / 'test.padl', x=2)
+        assert t_2(1) == 3
+
+    def test_wrong_param(self, tmp_path):
+        x = padl.param(1, 'x')
+        t = SimpleClassTransform(x)
+        assert t(1) == 2
+        t.pd_save(tmp_path / 'test.padl')
+        with pytest.raises(ValueError):
+            padl.load(tmp_path / 'test.padl', y=1)
+        t_2 = padl.load(tmp_path / 'test.padl', x=2)
+        assert t_2(1) == 3