-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathcallback.neptune.html
125 lines (83 loc) · 4.07 KB
/
callback.neptune.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
---
title: Neptune.ai
keywords: fastai
sidebar: home_sidebar
summary: "Integration with <a href='https://www.neptune.ai'>neptune.ai</a>."
description: "Integration with <a href='https://www.neptune.ai'>neptune.ai</a>."
nb_path: "nbs/72_callback.neptune.ipynb"
---
<!--
#################################################
### THIS FILE WAS AUTOGENERATED! DO NOT EDIT! ###
#################################################
# file to edit: nbs/72_callback.neptune.ipynb
# command to build the docs after a change: nbdev_build_docs
-->
<div class="container" id="notebook-container">
{% raw %}
<div class="cell border-box-sizing code_cell rendered">
</div>
{% endraw %}
{% raw %}
<div class="cell border-box-sizing code_cell rendered">
</div>
{% endraw %}
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Registration">Registration<a class="anchor-link" href="#Registration"> </a></h2><ol>
<li>Create <strong>free</strong> account: <a href="https://neptune.ai/register">neptune.ai/register</a>.</li>
<li>Export API token to the environment variable (more help <a href="https://docs.neptune.ai/python-api/tutorials/get-started.html#copy-api-token">here</a>). In your terminal run:</li>
</ol>
<pre><code>export NEPTUNE_API_TOKEN='YOUR_LONG_API_TOKEN'</code></pre>
<p>or append the command above to your <code>~/.bashrc</code> or <code>~/.bash_profile</code> files (<strong>recommended</strong>). More help is <a href="https://docs.neptune.ai/python-api/tutorials/get-started.html#copy-api-token">here</a>.</p>
<h2 id="Installation">Installation<a class="anchor-link" href="#Installation"> </a></h2><ol>
<li>You need to install neptune-client. In your terminal run:</li>
</ol>
<pre><code>pip install neptune-client</code></pre>
<p>or (alternative installation using conda). In your terminal run:</p>
<pre><code>conda install neptune-client -c conda-forge</code></pre>
<ol>
<li>Install <a href="https://psutil.readthedocs.io/en/latest/">psutil</a> to see hardware monitoring charts:</li>
</ol>
<pre><code>pip install psutil</code></pre>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="How-to-use?">How to use?<a class="anchor-link" href="#How-to-use?"> </a></h2><p>Key is to call <code>neptune.init()</code> before you create <code>Learner()</code> and call <code>neptune_create_experiment()</code>, before you fit the model.</p>
<p>Use <a href="/callback.neptune.html#NeptuneCallback"><code>NeptuneCallback</code></a> in your <a href="/learner.html#Learner"><code>Learner</code></a>, like this:</p>
<pre><code>from fastai.callback.neptune import NeptuneCallback
neptune.init('USERNAME/PROJECT_NAME') # specify project
learn = Learner(dls, model,
cbs=NeptuneCallback()
)
neptune.create_experiment() # start experiment
learn.fit_one_cycle(1)</code></pre>
</div>
</div>
</div>
{% raw %}
<div class="cell border-box-sizing code_cell rendered">
</div>
{% endraw %}
{% raw %}
<div class="cell border-box-sizing code_cell rendered">
</div>
{% endraw %}
{% raw %}
<div class="cell border-box-sizing code_cell rendered">
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_markdown rendered_html output_subarea ">
<h2 id="NeptuneCallback" class="doc_header"><code>class</code> <code>NeptuneCallback</code><a href="https://github.com/fastai/fastai/tree/master/fastai/callback/neptune.py#L14" class="source_link" style="float:right">[source]</a></h2><blockquote><p><code>NeptuneCallback</code>(<strong><code>log_model_weights</code></strong>=<em><code>True</code></em>, <strong><code>keep_experiment_running</code></strong>=<em><code>False</code></em>) :: <a href="/callback.core.html#Callback"><code>Callback</code></a></p>
</blockquote>
<p>Log losses, metrics, model weights, model architecture summary to neptune</p>
</div>
</div>
</div>
</div>
</div>
{% endraw %}
</div>