5ca1c6991afd941dd93a4052
7 years ago
| 0 | {"cells": [{"cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": ["# You can use other public modules via our Client object with module's identifier\n", "# and parameters.\n", "# For more detailes, please see our online document - https://momodel.github.io/docs/#\n", "import os\n", "import sys\n", "# Define root path\n", "sys.path.append('../')\n", "# Import necessary packages\n", "from modules import json_parser\n", "from modules import Client\n", "# Initialise Client object\n", "client = Client(api_key='996c5ec910a35bc0813ba5f12f4ba667ba10af41ecd4c9dd0ff9aa5cbfc0439a',\n", " project_id='5cd04ee51afd94639a492b8e', user_ID='5ca1c6991afd941dd93a4052',\n", " project_type='app', source_file_path='Untitled.ipynb')\n", "# Make run/train/predict command alias for further use\n", "run = client.run\n", "train = client.train\n", "predict = client.predict\n", "# Make controller alias for further use\n", "controller = client.controller\n"]}, {"cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": []}], "metadata": {"kernelspec": {"display_name": "Python 3", "language": "python", "name": "python3"}, "language_info": {"codemirror_mode": {"name": "ipython", "version": 3}, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.5.2"}}, "nbformat": 4, "nbformat_minor": 2}⏎ | |
| 0 | { | |
| 1 | "cells": [ | |
| 2 | { | |
| 3 | "cell_type": "code", | |
| 4 | "execution_count": 1, | |
| 5 | "metadata": {}, | |
| 6 | "outputs": [], | |
| 7 | "source": [ | |
| 8 | "# You can use other public modules via our Client object with module's identifier\n", | |
| 9 | "# and parameters.\n", | |
| 10 | "# For more detailes, please see our online document - https://momodel.github.io/docs/#\n", | |
| 11 | "import os\n", | |
| 12 | "import sys\n", | |
| 13 | "# Define root path\n", | |
| 14 | "sys.path.append('../')\n", | |
| 15 | "# Import necessary packages\n", | |
| 16 | "from modules import json_parser\n", | |
| 17 | "from modules import Client\n", | |
| 18 | "# Initialise Client object\n", | |
| 19 | "client = Client(api_key='996c5ec910a35bc0813ba5f12f4ba667ba10af41ecd4c9dd0ff9aa5cbfc0439a',\n", | |
| 20 | " project_id='5cd04ee51afd94639a492b8e', user_ID='5ca1c6991afd941dd93a4052',\n", | |
| 21 | " project_type='app', source_file_path='Untitled.ipynb')\n", | |
| 22 | "# Make run/train/predict command alias for further use\n", | |
| 23 | "run = client.run\n", | |
| 24 | "train = client.train\n", | |
| 25 | "predict = client.predict\n", | |
| 26 | "# Make controller alias for further use\n", | |
| 27 | "controller = client.controller\n" | |
| 28 | ] | |
| 29 | }, | |
| 30 | { | |
| 31 | "cell_type": "code", | |
| 32 | "execution_count": null, | |
| 33 | "metadata": {}, | |
| 34 | "outputs": [], | |
| 35 | "source": [] | |
| 36 | }, | |
| 37 | { | |
| 38 | "cell_type": "code", | |
| 39 | "execution_count": null, | |
| 40 | "metadata": {}, | |
| 41 | "outputs": [], | |
| 42 | "source": [ | |
| 43 | "def handle(conf): \n", | |
| 44 | " \"\"\"\n", | |
| 45 | " 该方法是部署之后,其他人调用你的服务时候的处理方法。\n", | |
| 46 | " 请按规范填写参数结构,这样我们就能替你自动生成配置文件,方便其他人的调用。\n", | |
| 47 | " 范例:\n", | |
| 48 | " params['key'] = value # value_type: str # description: some description\n", | |
| 49 | " 参数请放到params字典中,我们会自动解析该变量。\n", | |
| 50 | " \"\"\"\n", | |
| 51 | " \n", | |
| 52 | " param1 = conf['param1'] # value_type: str # description: some description\n", | |
| 53 | " param2 = conf['param2'] # value_type: str # description: some description\n", | |
| 54 | " # add your code\n", | |
| 55 | " return {'ret1': 'cat', 'ret2': 'dog'}\n", | |
| 56 | " " | |
| 57 | ] | |
| 58 | } | |
| 59 | ], | |
| 60 | "metadata": { | |
| 61 | "kernelspec": { | |
| 62 | "display_name": "Python 3", | |
| 63 | "language": "python", | |
| 64 | "name": "python3" | |
| 65 | }, | |
| 66 | "language_info": { | |
| 67 | "codemirror_mode": { | |
| 68 | "name": "ipython", | |
| 69 | "version": 3 | |
| 70 | }, | |
| 71 | "file_extension": ".py", | |
| 72 | "mimetype": "text/x-python", | |
| 73 | "name": "python", | |
| 74 | "nbconvert_exporter": "python", | |
| 75 | "pygments_lexer": "ipython3", | |
| 76 | "version": "3.5.2" | |
| 77 | } | |
| 78 | }, | |
| 79 | "nbformat": 4, | |
| 80 | "nbformat_minor": 2 | |
| 81 | } |
| 0 | absl-py==0.7.0 | |
| 1 | alembic==1.0.8 | |
| 2 | astor==0.7.1 | |
| 3 | astroid==2.2.5 | |
| 4 | attrs==19.1.0 | |
| 5 | autopep8==1.4.3 | |
| 6 | backcall==0.1.0 | |
| 7 | beautifulsoup4==4.7.1 | |
| 8 | bleach==3.1.0 | |
| 9 | bs4==0.0.1 | |
| 10 | certifi==2019.3.9 | |
| 11 | chardet==3.0.4 | |
| 12 | cloudpickle==0.8.0 | |
| 13 | cycler==0.10.0 | |
| 14 | Cython==0.29.6 | |
| 15 | dask==1.1.4 | |
| 16 | decorator==4.4.0 | |
| 17 | defusedxml==0.5.0 | |
| 18 | entrypoints==0.3 | |
| 19 | future==0.17.1 | |
| 20 | gast==0.2.2 | |
| 21 | grpcio==1.19.0 | |
| 22 | h5py==2.9.0 | |
| 23 | idna==2.8 | |
| 24 | imageio==2.5.0 | |
| 25 | imgaug==0.2.8 | |
| 26 | ipykernel==5.1.0 | |
| 27 | ipython==7.4.0 | |
| 28 | ipython-genutils==0.2.0 | |
| 29 | isort==4.3.15 | |
| 30 | jedi==0.13.3 | |
| 31 | jieba==0.39 | |
| 32 | Jinja2==2.10 | |
| 33 | jsonschema==3.0.1 | |
| 34 | jupyter-client==5.2.4 | |
| 35 | jupyter-core==4.4.0 | |
| 36 | jupyterhub==0.8.1 | |
| 37 | jupyterlab==1.0.0a1 | |
| 38 | jupyterlab-server==0.2.0 | |
| 39 | Keras==2.2.4 | |
| 40 | Keras-Applications==1.0.7 | |
| 41 | Keras-Preprocessing==1.0.9 | |
| 42 | kiwisolver==1.0.1 | |
| 43 | lazy-object-proxy==1.3.1 | |
| 44 | Mako==1.0.8 | |
| 45 | Markdown==3.0.1 | |
| 46 | MarkupSafe==1.1.1 | |
| 47 | matplotlib==3.0.3 | |
| 48 | mccabe==0.6.1 | |
| 49 | mistune==0.8.4 | |
| 50 | mock==2.0.0 | |
| 51 | nbconvert==5.4.1 | |
| 52 | nbformat==4.4.0 | |
| 53 | networkx==2.2 | |
| 54 | nltk==3.4 | |
| 55 | notebook==5.7.6 | |
| 56 | numpy==1.16.2 | |
| 57 | opencv-python==4.0.0.21 | |
| 58 | pamela==1.0.0 | |
| 59 | pandas==0.24.2 | |
| 60 | pandocfilters==1.4.2 | |
| 61 | parso==0.3.4 | |
| 62 | pbr==5.1.2 | |
| 63 | pexpect==4.6.0 | |
| 64 | pickleshare==0.7.5 | |
| 65 | Pillow==5.4.1 | |
| 66 | pluggy==0.9.0 | |
| 67 | prometheus-client==0.6.0 | |
| 68 | prompt-toolkit==2.0.9 | |
| 69 | protobuf==3.6.1 | |
| 70 | ptyprocess==0.6.0 | |
| 71 | pycodestyle==2.5.0 | |
| 72 | pydocstyle==3.0.0 | |
| 73 | pydot==1.4.1 | |
| 74 | pyflakes==2.1.1 | |
| 75 | Pygments==2.3.1 | |
| 76 | pylint==2.3.1 | |
| 77 | pyparsing==2.3.1 | |
| 78 | pyrsistent==0.14.11 | |
| 79 | python-dateutil==2.8.0 | |
| 80 | python-editor==1.0.4 | |
| 81 | python-jsonrpc-server==0.1.2 | |
| 82 | python-language-server==0.25.0 | |
| 83 | python-oauth2==1.1.0 | |
| 84 | pytz==2018.9 | |
| 85 | PyWavelets==1.0.2 | |
| 86 | PyYAML==5.1 | |
| 87 | pyzmq==18.0.1 | |
| 88 | requests==2.21.0 | |
| 89 | rope==0.12.0 | |
| 90 | scikit-image==0.14.2 | |
| 91 | scikit-learn==0.20.3 | |
| 92 | scipy==1.2.1 | |
| 93 | seaborn==0.9.0 | |
| 94 | Send2Trash==1.5.0 | |
| 95 | Shapely==1.6.4.post2 | |
| 96 | singledispatch==3.4.0.3 | |
| 97 | six==1.12.0 | |
| 98 | snowballstemmer==1.2.1 | |
| 99 | soupsieve==1.9.1 | |
| 100 | SQLAlchemy==1.3.1 | |
| 101 | stevedore==1.30.1 | |
| 102 | tensorboard==1.13.0 | |
| 103 | tensorflow==1.13.1 | |
| 104 | tensorflow-estimator==1.13.0 | |
| 105 | termcolor==1.1.0 | |
| 106 | terminado==0.8.1 | |
| 107 | testpath==0.4.2 | |
| 108 | toolz==0.9.0 | |
| 109 | torch==1.0.1.post2 | |
| 110 | torchvision==0.2.2.post3 | |
| 111 | tornado==6.0.2 | |
| 112 | tqdm==4.31.1 | |
| 113 | traitlets==4.3.2 | |
| 114 | typed-ast==1.3.1 | |
| 115 | urllib3==1.24.1 | |
| 116 | virtualenv==16.4.3 | |
| 117 | virtualenv-clone==0.5.1 | |
| 118 | virtualenvwrapper==4.8.4 | |
| 119 | wcwidth==0.1.7 | |
| 120 | webencodings==0.5.1 | |
| 121 | Werkzeug==0.14.1 | |
| 122 | word2vec==0.10.2 | |
| 123 | wrapt==1.11.1 | |
| 124 | xlrd==1.2.0 | |
| 125 | yapf==0.26.0 |
| 0 | lazy-object-proxy==1.3.1 | |
| 1 | pylint==2.3.1 | |
| 2 | dask==1.1.4 | |
| 0 | soupsieve==1.9.1 | |
| 3 | 1 | PyWavelets==1.0.2 |
| 4 | 2 | astroid==2.2.5 |
| 3 | cloudpickle==0.8.0 | |
| 4 | torchvision==0.2.2.post3 | |
| 5 | nltk==3.4 | |
| 6 | pydot==1.4.1 | |
| 7 | xlrd==1.2.0 | |
| 8 | jupyterlab-server==0.2.0 | |
| 9 | python-jsonrpc-server==0.1.2 | |
| 5 | 10 | beautifulsoup4==4.7.1 |
| 11 | dask==1.1.4 | |
| 12 | isort==4.3.15 | |
| 13 | Shapely==1.6.4.post2 | |
| 14 | bs4==0.0.1 | |
| 15 | jieba==0.39 | |
| 16 | attrs==19.1.0 | |
| 17 | networkx==2.2 | |
| 18 | wrapt==1.11.1 | |
| 19 | imageio==2.5.0 | |
| 20 | pylint==2.3.1 | |
| 21 | tensorflow-estimator==1.13.0 | |
| 6 | 22 | pyrsistent==0.14.11 |
| 23 | toolz==0.9.0 | |
| 24 | torch==1.0.1.post2 | |
| 25 | mock==2.0.0 | |
| 26 | Cython==0.29.6 | |
| 27 | word2vec==0.10.2 | |
| 28 | scikit-image==0.14.2 | |
| 29 | tqdm==4.31.1 | |
| 30 | defusedxml==0.5.0 | |
| 31 | singledispatch==3.4.0.3 | |
| 32 | typed-ast==1.3.1 | |
| 7 | 33 | imgaug==0.2.8 |
| 8 | nltk==3.4 | |
| 9 | word2vec==0.10.2 | |
| 10 | wrapt==1.11.1 | |
| 11 | tensorflow-estimator==1.13.0 | |
| 12 | torch==1.0.1.post2 | |
| 13 | defusedxml==0.5.0 | |
| 14 | typed-ast==1.3.1 | |
| 15 | bs4==0.0.1 | |
| 16 | imageio==2.5.0 | |
| 17 | Cython==0.29.6 | |
| 18 | cloudpickle==0.8.0 | |
| 19 | soupsieve==1.9.1 | |
| 20 | singledispatch==3.4.0.3 | |
| 21 | pydot==1.4.1 | |
| 22 | jupyterlab-server==0.2.0 | |
| 23 | jieba==0.39 | |
| 24 | Shapely==1.6.4.post2 | |
| 25 | python-jsonrpc-server==0.1.2 | |
| 26 | isort==4.3.15 | |
| 27 | attrs==19.1.0 | |
| 28 | tqdm==4.31.1 | |
| 29 | networkx==2.2 | |
| 30 | mock==2.0.0 | |
| 31 | torchvision==0.2.2.post3 | |
| 32 | scikit-image==0.14.2 | |
| 33 | toolz==0.9.0 | |
| 34 | xlrd==1.2.0 | |
| 34 | lazy-object-proxy==1.3.1 |