diff --git a/Untitled.ipynb b/Untitled.ipynb index e11042a..c91431b 100644 --- a/Untitled.ipynb +++ b/Untitled.ipynb @@ -1 +1,82 @@ -{"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} \ No newline at end of file +{ + "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": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def handle(conf): \n", + " \"\"\"\n", + " 该方法是部署之后,其他人调用你的服务时候的处理方法。\n", + " 请按规范填写参数结构,这样我们就能替你自动生成配置文件,方便其他人的调用。\n", + " 范例:\n", + " params['key'] = value # value_type: str # description: some description\n", + " 参数请放到params字典中,我们会自动解析该变量。\n", + " \"\"\"\n", + " \n", + " param1 = conf['param1'] # value_type: str # description: some description\n", + " param2 = conf['param2'] # value_type: str # description: some description\n", + " # add your code\n", + " return {'ret1': 'cat', 'ret2': 'dog'}\n", + " " + ] + } + ], + "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 +} diff --git a/faas_requirements.txt b/faas_requirements.txt new file mode 100644 index 0000000..9474b75 --- /dev/null +++ b/faas_requirements.txt @@ -0,0 +1,126 @@ +absl-py==0.7.0 +alembic==1.0.8 +astor==0.7.1 +astroid==2.2.5 +attrs==19.1.0 +autopep8==1.4.3 +backcall==0.1.0 +beautifulsoup4==4.7.1 +bleach==3.1.0 +bs4==0.0.1 +certifi==2019.3.9 +chardet==3.0.4 +cloudpickle==0.8.0 +cycler==0.10.0 +Cython==0.29.6 +dask==1.1.4 +decorator==4.4.0 +defusedxml==0.5.0 +entrypoints==0.3 +future==0.17.1 +gast==0.2.2 +grpcio==1.19.0 +h5py==2.9.0 +idna==2.8 +imageio==2.5.0 +imgaug==0.2.8 +ipykernel==5.1.0 +ipython==7.4.0 +ipython-genutils==0.2.0 +isort==4.3.15 +jedi==0.13.3 +jieba==0.39 +Jinja2==2.10 +jsonschema==3.0.1 +jupyter-client==5.2.4 +jupyter-core==4.4.0 +jupyterhub==0.8.1 +jupyterlab==1.0.0a1 +jupyterlab-server==0.2.0 +Keras==2.2.4 +Keras-Applications==1.0.7 +Keras-Preprocessing==1.0.9 +kiwisolver==1.0.1 +lazy-object-proxy==1.3.1 +Mako==1.0.8 +Markdown==3.0.1 +MarkupSafe==1.1.1 +matplotlib==3.0.3 +mccabe==0.6.1 +mistune==0.8.4 +mock==2.0.0 +nbconvert==5.4.1 +nbformat==4.4.0 +networkx==2.2 +nltk==3.4 +notebook==5.7.6 +numpy==1.16.2 +opencv-python==4.0.0.21 +pamela==1.0.0 +pandas==0.24.2 +pandocfilters==1.4.2 +parso==0.3.4 +pbr==5.1.2 +pexpect==4.6.0 +pickleshare==0.7.5 +Pillow==5.4.1 +pluggy==0.9.0 +prometheus-client==0.6.0 +prompt-toolkit==2.0.9 +protobuf==3.6.1 +ptyprocess==0.6.0 +pycodestyle==2.5.0 +pydocstyle==3.0.0 +pydot==1.4.1 +pyflakes==2.1.1 +Pygments==2.3.1 +pylint==2.3.1 +pyparsing==2.3.1 +pyrsistent==0.14.11 +python-dateutil==2.8.0 +python-editor==1.0.4 +python-jsonrpc-server==0.1.2 +python-language-server==0.25.0 +python-oauth2==1.1.0 +pytz==2018.9 +PyWavelets==1.0.2 +PyYAML==5.1 +pyzmq==18.0.1 +requests==2.21.0 +rope==0.12.0 +scikit-image==0.14.2 +scikit-learn==0.20.3 +scipy==1.2.1 +seaborn==0.9.0 +Send2Trash==1.5.0 +Shapely==1.6.4.post2 +singledispatch==3.4.0.3 +six==1.12.0 +snowballstemmer==1.2.1 +soupsieve==1.9.1 +SQLAlchemy==1.3.1 +stevedore==1.30.1 +tensorboard==1.13.0 +tensorflow==1.13.1 +tensorflow-estimator==1.13.0 +termcolor==1.1.0 +terminado==0.8.1 +testpath==0.4.2 +toolz==0.9.0 +torch==1.0.1.post2 +torchvision==0.2.2.post3 +tornado==6.0.2 +tqdm==4.31.1 +traitlets==4.3.2 +typed-ast==1.3.1 +urllib3==1.24.1 +virtualenv==16.4.3 +virtualenv-clone==0.5.1 +virtualenvwrapper==4.8.4 +wcwidth==0.1.7 +webencodings==0.5.1 +Werkzeug==0.14.1 +word2vec==0.10.2 +wrapt==1.11.1 +xlrd==1.2.0 +yapf==0.26.0 diff --git a/project_requirements.txt b/project_requirements.txt index 1af04d4..f9c823c 100644 --- a/project_requirements.txt +++ b/project_requirements.txt @@ -1,35 +1,35 @@ -lazy-object-proxy==1.3.1 -pylint==2.3.1 -dask==1.1.4 +soupsieve==1.9.1 PyWavelets==1.0.2 astroid==2.2.5 +cloudpickle==0.8.0 +torchvision==0.2.2.post3 +nltk==3.4 +pydot==1.4.1 +xlrd==1.2.0 +jupyterlab-server==0.2.0 +python-jsonrpc-server==0.1.2 beautifulsoup4==4.7.1 +dask==1.1.4 +isort==4.3.15 +Shapely==1.6.4.post2 +bs4==0.0.1 +jieba==0.39 +attrs==19.1.0 +networkx==2.2 +wrapt==1.11.1 +imageio==2.5.0 +pylint==2.3.1 +tensorflow-estimator==1.13.0 pyrsistent==0.14.11 +toolz==0.9.0 +torch==1.0.1.post2 +mock==2.0.0 +Cython==0.29.6 +word2vec==0.10.2 +scikit-image==0.14.2 +tqdm==4.31.1 +defusedxml==0.5.0 +singledispatch==3.4.0.3 +typed-ast==1.3.1 imgaug==0.2.8 -nltk==3.4 -word2vec==0.10.2 -wrapt==1.11.1 -tensorflow-estimator==1.13.0 -torch==1.0.1.post2 -defusedxml==0.5.0 -typed-ast==1.3.1 -bs4==0.0.1 -imageio==2.5.0 -Cython==0.29.6 -cloudpickle==0.8.0 -soupsieve==1.9.1 -singledispatch==3.4.0.3 -pydot==1.4.1 -jupyterlab-server==0.2.0 -jieba==0.39 -Shapely==1.6.4.post2 -python-jsonrpc-server==0.1.2 -isort==4.3.15 -attrs==19.1.0 -tqdm==4.31.1 -networkx==2.2 -mock==2.0.0 -torchvision==0.2.2.post3 -scikit-image==0.14.2 -toolz==0.9.0 -xlrd==1.2.0 +lazy-object-proxy==1.3.1