-
Notifications
You must be signed in to change notification settings - Fork 0
/
floydhub-documentation.html
327 lines (258 loc) · 12.3 KB
/
floydhub-documentation.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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>The CodeCx Blog</title>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-105143107-1', 'auto');
ga('send', 'pageview');
</script>
<!-- Bootstrap Core CSS -->
<link href="/theme/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="/theme/css/clean-blog.min.css" rel="stylesheet">
<!-- Code highlight color scheme -->
<link href="/theme/css/code_blocks/darkly.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<meta name="tags" contents="floyd" />
<meta property="og:locale" content="en">
<meta property="og:site_name" content="The CodeCx Blog">
<meta property="og:type" content="article">
<meta property="article:author" content="">
<meta property="og:url" content="/floydhub-documentation.html">
<meta property="og:title" content="Floydhub Documentation">
<meta property="og:description" content="">
<meta property="og:image" content="/">
<meta property="article:published_time" content="2017-08-20 00:00:00+05:30">
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-default navbar-custom navbar-fixed-top">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header page-scroll">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">The CodeCx Blog</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<!-- Page Header -->
<header class="intro-header" style="background-image: url('/theme/images/post-bg.jpg')">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<div class="post-heading">
<h1>Floydhub Documentation</h1>
<span class="meta">Posted by
<a href="/author/aditya-arora.html">Aditya Arora</a>
<a href="/author/piyush-jha.html">Piyush Jha</a>
<a href="/author/akshita-gupta.html">Akshita Gupta</a>
<br/>
On Sun 20 August 2017 | Updated Tue 22 August 2017
</span>
</div>
</div>
</div>
</div>
</header>
<!-- Main Content -->
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<!-- Post Content -->
<article>
<h6></h6>
<p>Floyd is a great cloud computing platform.I have used it for running a lot of my deep learning models. The main advantage of using Floyd is that you don't require a <strong>Credit Card</strong> and that is the main reason for giving a try to Floyd. </p>
<p>Floyd has a pretty handy <em>documentation</em> at
<a href="http://docs.floydhub.com/" title="Floyd's Documentation">Floydhub</a> which is updated at regular intervals.</p>
<p>Initiallly I wrote this blog when there were a lot of confusions but now it is a very crisp and easy to use docs page.
This post contains steps to Get up and running with Floyd on Windows.</p>
<h2>Python Machine Learning Setting up floyd</h2>
<p>Setting up floyd for using on Windows.</p>
<h2>Account</h2>
<p>Make your account at
<a href="https://www.floydhub.com/" title="Floyd's Homepage">Floydhub</a>.</p>
<p>You can get a free account which gives 10GB of storage and 20 hours of CPU time and 2 hours of GPU time.
You can upgrade to any of their paid plans if you want to continue using their services.</p>
<h2>Installation</h2>
<div class="highlight"><pre><span></span>$ pip install -U floyd-cli
</pre></div>
<h2>Login</h2>
<div class="highlight"><pre><span></span>$ floyd login
</pre></div>
<p>Copy and paste your authentication token in your terminal</p>
<h2>Run project</h2>
<p><strong>Make a project folder</strong></p>
<div class="highlight"><pre><span></span>$ mkdir myproject
</pre></div>
<p><strong>Change to project folder</strong></p>
<div class="highlight"><pre><span></span>$ <span class="nb">cd</span> myproject
</pre></div>
<p><strong>Make a folder for data</strong></p>
<div class="highlight"><pre><span></span>$ mkdir mydata
</pre></div>
<p><strong>Make a folder for code</strong></p>
<div class="highlight"><pre><span></span>$ mkdir mycode
</pre></div>
<p>Paste all your data in <code>mydata</code></p>
<p>Paste all your code in <code>mycode</code></p>
<p><strong>Change to data directory</strong></p>
<div class="highlight"><pre><span></span>$ <span class="nb">cd</span> mydata
</pre></div>
<h1>Initialise data</h1>
<div class="highlight"><pre><span></span>$ floyd data init sent-data
</pre></div>
<p>Then you can upload your dataset to Floyd.</p>
<div class="highlight"><pre><span></span>$ floyd data upload
</pre></div>
<p>Floyd will generate a data id for the uploaded dataset. This uploaded dataset can be used in your future experiments, if needed, using this data id.</p>
<p><strong>Output</strong></p>
<div class="highlight"><pre><span></span>Creating data source. Uploading files ...
DATA ID NAME VERSION
---------------------- -------------------- ---------
GY3QRFFUA8KpbnqvroTPPW alice/sent-data:1 1
</pre></div>
<p><strong>Change to main directory</strong></p>
<div class="highlight"><pre><span></span>$ <span class="nb">cd</span> ..
</pre></div>
<p><strong>Change to code directory</strong></p>
<div class="highlight"><pre><span></span>$ <span class="nb">cd</span> mycode
</pre></div>
<p><strong>Run the code</strong></p>
<div class="highlight"><pre><span></span>$ floyd run --data <DATA_KEY>:<MOUNT> --env theano-0.9:py2 <span class="s2">"python filename.py"</span>
</pre></div>
<p><strong>Example code</strong></p>
<div class="highlight"><pre><span></span>$ floyd run --data GY3QRFFUA8KpbnqvroTPPW:mydata --env theano-0.9:py2 <span class="s2">"python mlp.py"</span>
</pre></div>
<p><strong>Check the status of code</strong></p>
<div class="highlight"><pre><span></span>$ floyd logs <RUN_ID>
</pre></div>
<h1>Some common problems:</h1>
<ul>
<li>Should I put my code and data in separate folders</li>
</ul>
<p>NOTE: Adding the codes in a separate folder prevents re-loading of data in the memory of floyd server.
Floyd server synchronizes the WHOLE FOLDER in which the code is located when you run the code using the above command, which is actually a waste of (upload) time and a problem of data redundancy as you have already uploaded the data on the server.</p>
<ul>
<li>How to link data in my script</li>
</ul>
<div class="highlight"><pre><span></span>x_data = np.load('/nfiles/fileone.npy')
y_data = np.load('/nfiles/filetwo.npy')
</pre></div>
<p>Here, nfiles is my MOUNT point.</p>
<ul>
<li>If you are using Anaconda prompt and you come across the following error after running the command: "pip install -U floyd-cli": scandir could not be installed</li>
</ul>
<div class="highlight"><pre><span></span>$ conda install -c conda-forge <span class="nv">scandir</span><span class="o">=</span><span class="m">1</span>.5
</pre></div>
<p><em>Contributors:</em></p>
<ul>
<li>Aditya Arora</li>
<li>Piyush Jha</li>
<li>Akshita Gupta</li>
</ul>
</article>
<hr>
<h2>Comments</h2>
</div>
<hr>
<!--Disqus-->
<div id="disqus_thread"></div>
<script>
/**
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/
/*
var disqus_config = function () {
this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
*/
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = 'https://code4cx-github-io.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</div>
</div>
<!-- Footer -->
<footer>
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<ul class="list-inline text-center">
<a href="http://deeplearn.school.blog">Deep Learn Blog</a>
<a href="http://www.codecx.in">CodeCx User Porrtfolio</a>
<!--
<li>
<a href="">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-twitter fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<li>
<a href="">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-facebook fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<li>
<a href="">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-github fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
-->
</ul>
<p class="copyright text-muted">Blog powered by <a href="http://getpelican.com">Pelican</a>,
which takes great advantage of <a href="http://python.org">Python</a>.</p>
</div>
</div>
</div>
</footer>
<!-- jQuery -->
<script src="/theme/js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="/theme/js/bootstrap.min.js"></script>
<!-- Custom Theme JavaScript -->
<script src="/theme/js/clean-blog.min.js"></script>
</body>
</html>