Skip to content

Commit b1d9c18

Browse files
committed
Annihilating bugs
1 parent 33bab80 commit b1d9c18

File tree

3 files changed

+34
-34
lines changed

3 files changed

+34
-34
lines changed

examples/sentiment-analysis/sentiment-unbox.ipynb

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,27 @@
3636
"execution_count": 2,
3737
"id": "precise-vatican",
3838
"metadata": {},
39-
"outputs": [],
39+
"outputs": [
40+
{
41+
"name": "stdout",
42+
"output_type": "stream",
43+
"text": [
44+
"Archive: ./data/trainingandtestdata.zip\n"
45+
]
46+
}
47+
],
4048
"source": [
4149
"%%bash\n",
4250
"\n",
51+
"if [ ! -d ./data ]; then\n",
52+
" mkdir ./data\n",
53+
"fi\n",
54+
"\n",
4355
"if [ ! -f ./data/trainingandtestdata.zip ]; then\n",
44-
" wget -q http://cs.stanford.edu/people/alecmgo/trainingandtestdata.zip\n",
45-
" unzip -n ./data/trainingandtestdata.zip\n",
46-
"fi"
56+
" wget -q -O ./data/trainingandtestdata.zip http://cs.stanford.edu/people/alecmgo/trainingandtestdata.zip\n",
57+
"fi\n",
58+
"\n",
59+
"unzip -n ./data/trainingandtestdata.zip -d ./data"
4760
]
4861
},
4962
{
@@ -74,7 +87,7 @@
7487
"name": "stderr",
7588
"output_type": "stream",
7689
"text": [
77-
"/Users/rishabramanathan/opt/miniconda3/envs/unbox_demo/lib/python3.7/site-packages/sklearn/linear_model/_logistic.py:765: ConvergenceWarning: lbfgs failed to converge (status=1):\n",
90+
"/usr/local/lib/python3.7/site-packages/sklearn/linear_model/_logistic.py:765: ConvergenceWarning: lbfgs failed to converge (status=1):\n",
7891
"STOP: TOTAL NO. of ITERATIONS REACHED LIMIT.\n",
7992
"\n",
8093
"Increase the number of iterations (max_iter) or scale the data as shown in:\n",
@@ -194,8 +207,7 @@
194207
"name": "stdout",
195208
"output_type": "stream",
196209
"text": [
197-
"[2021-02-28 18:11:54,475] WARNING - Using BentoML installed in `editable` model, the local BentoML repository including all code changes will be packaged together with saved bundle created, under the './bundled_pip_dependencies' directory of the saved bundle.\n",
198-
"What is your Unbox email?rishramanathan@gmail.com\n",
210+
"What is your Unbox email?me@vikasnair.com\n",
199211
"What is your Unbox password?········\n"
200212
]
201213
}
@@ -258,7 +270,7 @@
258270
},
259271
{
260272
"cell_type": "code",
261-
"execution_count": 11,
273+
"execution_count": 14,
262274
"id": "present-seating",
263275
"metadata": {
264276
"scrolled": true
@@ -268,30 +280,8 @@
268280
"name": "stdout",
269281
"output_type": "stream",
270282
"text": [
271-
"[2021-02-28 18:14:00,704] INFO - Detected non-PyPI-released BentoML installed, copying local BentoML modulefiles to target saved bundle path..\n"
272-
]
273-
},
274-
{
275-
"name": "stderr",
276-
"output_type": "stream",
277-
"text": [
278-
"warning: no previously-included files matching '*~' found anywhere in distribution\n",
279-
"warning: no previously-included files matching '*.pyo' found anywhere in distribution\n",
280-
"warning: no previously-included files matching '.git' found anywhere in distribution\n",
281-
"warning: no previously-included files matching '.ipynb_checkpoints' found anywhere in distribution\n",
282-
"warning: no previously-included files matching '__pycache__' found anywhere in distribution\n",
283-
"warning: no directories found matching 'bentoml/yatai/web/dist'\n",
284-
"no previously-included directories found matching 'e2e_tests'\n",
285-
"no previously-included directories found matching 'tests'\n",
286-
"no previously-included directories found matching 'benchmark'\n"
287-
]
288-
},
289-
{
290-
"name": "stdout",
291-
"output_type": "stream",
292-
"text": [
293-
"UPDATING BentoML-0.11.0+33.g7e83376/bentoml/_version.py\n",
294-
"set BentoML-0.11.0+33.g7e83376/bentoml/_version.py to '0.11.0+33.g7e83376'\n"
283+
"[2021-03-01 04:47:41,045] WARNING - pip package requirement pandas already exist\n",
284+
"[2021-03-01 04:47:41,052] WARNING - pip package requirement scikit-learn already exist\n"
295285
]
296286
}
297287
],
@@ -301,6 +291,14 @@
301291
" model=sentiment_lr\n",
302292
")"
303293
]
294+
},
295+
{
296+
"cell_type": "code",
297+
"execution_count": null,
298+
"id": "covered-grace",
299+
"metadata": {},
300+
"outputs": [],
301+
"source": []
304302
}
305303
],
306304
"metadata": {
@@ -319,7 +317,7 @@
319317
"name": "python",
320318
"nbconvert_exporter": "python",
321319
"pygments_lexer": "ipython3",
322-
"version": "3.7.9"
320+
"version": "3.7.1"
323321
}
324322
},
325323
"nbformat": 4,

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ py-zipkin==0.20.1
8585
pycparser==2.20
8686
Pygments==2.8.0
8787
pyparsing==2.4.7
88+
pyrebase
8889
pyrsistent==0.17.3
8990
python-dateutil==2.8.0
9091
python-editor==1.0.4

unboxapi/template.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
def create_template_model(model_type, input_type):
1313
# return TemplateModel([modelTypes[model_type]('model'), PickleArtifact('function')])
1414
with open('template_model.py', 'w') as python_file:
15-
file_contents = f"""from typing import List
15+
file_contents = f"""\
16+
from typing import List
1617
from bentoml import env, artifacts, api, BentoService
1718
from bentoml.frameworks.{model_type} import {modelTypes[model_type]}
1819
from bentoml.service.artifacts.common import PickleArtifact

0 commit comments

Comments
 (0)