Skip to content

Commit 475dbd3

Browse files
author
Grupa Wirtualna Polska
committed
Initial import
0 parents  commit 475dbd3

29 files changed

+3608
-0
lines changed

.coveragerc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[report]
2+
exclude_lines= def tar_filter

.github/workflows/main.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build and test
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-python@v2
16+
with:
17+
python-version: '3.x'
18+
- run: |
19+
python -m pip install --upgrade pip
20+
python -m pip install -r requirements.txt
21+
pip install setuptools wheel twine
22+
- run: |
23+
coverage run -m unittest discover -v -b
24+
coverage report tensorflow_deploy_utils/TFD.py
25+
- run: python setup.py sdist bdist_wheel
26+
- if: startsWith(github.ref, 'refs/tags')
27+
uses: pypa/gh-action-pypi-publish@master
28+
with:
29+
password: ${{ secrets.pypi_password }}

.gitignore

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.idea
2+
.vscode
3+
*.pyc
4+
tmp
5+
build
6+
dist
7+
*.egg-info
8+
*.tar
9+
.coverage
10+
.ropeproject
11+
venv

LICENSE

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright (C) 2020 Wirtualna Polska Media S.A.
2+
3+
Permission to use, copy, modify, and/or distribute this software for any
4+
purpose with or without fee is hereby granted, provided that the above
5+
copyright notice and this permission notice appear in all copies.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

README.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# TensorFlow Deploy Utils
2+
Utilities for communication and easy management of [TensorFlow Deploy](https://github.com/grupawp/tensorflow-deploy)
3+
4+
![build](https://github.com/grupawp/tensorflow-deploy-utils/workflows/Build%20and%20test/badge.svg)
5+
6+
*TensorFlow, the TensorFlow logo and any related marks are trademarks of Google Inc.*
7+
8+
## Installation
9+
```bash
10+
pip install tensorflow-deploy-utils
11+
```
12+
13+
## Usage
14+
```python
15+
import tensorflow_deploy_utils as tfd
16+
17+
tfd_cursor = tfd.TFD(YOUR_TEAM, YOUR_PROJECT, YOUR_MODEL_NAME)
18+
# now you can make some operations
19+
tfd_cursor.deploy_model("path/to/your/model")
20+
tfd_cursor.list_models()
21+
tfd_cursor.get_config()
22+
tfd_cursor.get_module("path/to/write/module")
23+
tfd_cursor.set_label(3, "my_label")
24+
tfd_cursor.set_stable(2)
25+
# and more
26+
```
27+
28+
## Building
29+
```bash
30+
python setup.py sdist bdist_wheel
31+
pip install dist/tensorflow_deploy_utils-X.X.X-py3-none-any.whl
32+
```

requirements.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pandas
2+
requests
3+
tensorflow
4+
tensorflow_text
5+
requests_mock
6+
coverage

setup.py

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import setuptools
2+
3+
4+
VERSION = "1.0.0"
5+
6+
7+
with open("README.md", "r") as fh:
8+
readme = fh.read().strip()
9+
10+
with open("requirements.txt", "r") as fh:
11+
requirements = fh.read().strip().split("\n")
12+
13+
with open("tensorflow_deploy_utils/version.py", "w") as fh:
14+
fh.write('VERSION="{v}"\n'.format(v=VERSION))
15+
16+
17+
setuptools.setup(
18+
name="tensorflow_deploy_utils",
19+
version=VERSION,
20+
author="Wirtualna Polska Media S.A.",
21+
author_email="[email protected]",
22+
description="Utils for managing and communication with TensorFlow Deploy",
23+
long_description=readme,
24+
long_description_content_type="text/markdown",
25+
url="https://github.com/grupawp/tensorflow-deploy-utils",
26+
packages=setuptools.find_packages(),
27+
install_requires=requirements,
28+
license="ISC",
29+
keywords="tensorflow ai ml machine learning production serving kubernetes deploy tf tfd tfs",
30+
entry_points={
31+
"console_scripts": [
32+
"tfd_create_archive=tensorflow_deploy_utils.scripts.create_archive:main",
33+
"tfd_delete_label=tensorflow_deploy_utils.scripts.delete_label:main",
34+
"tfd_delete_model=tensorflow_deploy_utils.scripts.delete_model:main",
35+
"tfd_delete_module=tensorflow_deploy_utils.scripts.delete_module:main",
36+
"tfd_deploy_model=tensorflow_deploy_utils.scripts.deploy_model:main",
37+
"tfd_get_config=tensorflow_deploy_utils.scripts.get_config:main",
38+
"tfd_get_model=tensorflow_deploy_utils.scripts.get_model:main",
39+
"tfd_get_module=tensorflow_deploy_utils.scripts.get_module:main",
40+
"tfd_list_models=tensorflow_deploy_utils.scripts.list_models:main",
41+
"tfd_list_modules=tensorflow_deploy_utils.scripts.list_modules:main",
42+
"tfd_reload_config=tensorflow_deploy_utils.scripts.reload_config:main",
43+
"tfd_set_label=tensorflow_deploy_utils.scripts.set_label:main",
44+
"tfd_set_stable=tensorflow_deploy_utils.scripts.set_stable:main",
45+
"tfd_upload_model=tensorflow_deploy_utils.scripts.upload_model:main",
46+
"tfd_upload_module=tensorflow_deploy_utils.scripts.upload_module:main",
47+
],
48+
},
49+
classifiers=[
50+
"Programming Language :: Python :: 3",
51+
"License :: OSI Approved :: ISC License (ISCL)",
52+
"Operating System :: OS Independent",
53+
],
54+
python_requires=">=3.6",
55+
project_urls={
56+
"Documentation": "https://github.com/grupawp/tensorflow-deploy-utils",
57+
"Source": "https://github.com/grupawp/tensorflow-deploy-utils",
58+
"Bug Report": "https://github.com/grupawp/tensorflow-deploy-utils/issues",
59+
},
60+
)

0 commit comments

Comments
 (0)