Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ MODULES := $(wildcard $(PACKAGE)/*.py)
all: doctor format check test mkdocs ## Run all tasks that determine CI status

.PHONY: dev
dev: install .clean-test ## Continuously run CI tasks when files chanage
dev: install .clean-test ## Continuously run CI tasks when files change
poetry run sniffer

# SYSTEM DEPENDENCIES #########################################################
Expand All @@ -34,7 +34,7 @@ $(DEPENDENCIES): poetry.lock

ifndef CI
poetry.lock: pyproject.toml
poetry lock --no-update
poetry lock
@ touch $@
endif

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Let's get started!

### Import packages

To Form a pipeine, it required a `start` operator and a `end` operator, we have helper functions to create both
To Form a pipeline, it required a `start` operator and a `end` operator, we have helper functions to create both

```python
from instill.clients import InstillClient
Expand Down
3 changes: 0 additions & 3 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
mkdocs==1.3.1 ; python_full_version > "3.9.1" and python_version < "3.12"
pygments==2.18.0 ; python_full_version > "3.9.1" and python_version < "3.12"
jinja2==3.1.6 ; python_full_version > "3.9.1" and python_version < "3.12"
6 changes: 2 additions & 4 deletions instill/helpers/ray_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,9 @@ def _update_target_ongoing_requests(self, target_ongoing_requests: int):
autoscaling_config=self._autoscaling_config
)

def _update_max_concurrent_requests(self, max_concurrent_requests: int):
def _update_max_concurrent_requests(self, max_ongoing_requests: int):
self._deployment = self._deployment.options(
max_concurrent_queries=max_concurrent_requests,
max_ongoing_requests=max_concurrent_requests,
max_ongoing_requests=max_ongoing_requests,
)

def _update_upscale_delay(self, upscale_delay_s: int):
Expand All @@ -230,6 +229,5 @@ def instill_deployment(
ray_actor_options=DEFAULT_RAY_ACTOR_OPTIONS,
autoscaling_config=DEFAULT_AUTOSCALING_CONFIG,
max_ongoing_requests=DEFAULT_MAX_ONGOING_REQUESTS,
max_concurrent_queries=DEFAULT_MAX_ONGOING_REQUESTS,
max_queued_requests=DEFAULT_MAX_QUEUED_REQUESTS,
)
1,373 changes: 282 additions & 1,091 deletions poetry.lock

Large diffs are not rendered by default.

128 changes: 66 additions & 62 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,99 +1,59 @@
[tool.poetry]

description = "python sdk for Instill AI products"
name = "instill-sdk"
version = "0.16.2"
description = "python sdk for Instill AI products"

packages = [{ include = "instill" }]
packages = [{include = "instill"}]

license = "MIT"
authors = ["instill-ai <drop@instill.tech>"]
license = "MIT"

readme = "README.md"
homepage = "https://pypi.org/project/instill-sdk"
documentation = "https://instill-sdk.readthedocs.io"
homepage = "https://pypi.org/project/instill-sdk"
readme = "README.md"
repository = "https://github.com/instill-ai/python-sdk"

maintainers = ["Heiru Wu <heiru.wu@instill.tech>"]

keywords = []
classifiers = [
"Development Status :: 1 - Planning",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
]
keywords = []

[tool.poetry.dependencies]

python = ">3.9.1,<3.12"
fastapi = "^0.115.12"
google-api-core = "^2.11.1"
googleapis-common-protos = "^1.60.0"
grpcio = "^1.59.0"
pyyaml = "^6.0.1"
jsonschema = "^4.20.0"
numpy = "^1.21.0"
pillow = "^10.1.0"
protobuf = "^4.24.2"
requests = "^2.32.3"
fastapi = "^0.109.2"
google-api-core = "^2.11.1"
googleapis-common-protos = "^1.60.0"
protoc-gen-openapiv2 = "^0.0.1"
pydantic = ">=1.10.13"
pillow = "^10.1.0"
ray = { version = "2.21.0", extras = ["serve"] }
jsonschema = "^4.20.0"
types-requests = "^2.32.0.20240712"
python = ">3.9.1,<3.12"
pyyaml = "^6.0.1"
ray = "^2.44.1"
requests = "^2.32.3"
starlette = "^0.46.1"
types-protobuf = "^4.24.0.1"
types-pyyaml = "^6.0.12.11"

[tool.poetry.dev-dependencies]

# Formatters
black = "^24.3"
tomli = "*" # missing 'black' dependency
isort = "^5.10"

# Linters
mypy = "^1.0"
pydocstyle = "^6.1"
pylint = "~2.15"
wrapt = "*" # missing 'pylint' dependency

# Testing
pytest = "^7.3"
pytest-describe = "^2.0"
pytest-expecter = "^3.0"
pytest-random = "*"
pytest-cov = "^4.1"
freezegun = "*"

# Reports
coveragespace = "^6.0"

# Documentation
mkdocs = "~1.3"
pygments = "^2.11.1"

# Tooling
pyinstaller = "5.13.1"
sniffer = "*"
MacFSEvents = { version = "*", platform = "darwin" }
pync = { version = "*", platform = "darwin" }
ipython = "^8.10.0"
ipykernel = "^6.28.0"
mypy-protobuf = "^3.5.0"
grpcio-tools = "^1.54.2"
datamodel-code-generator = "^0.25.2"
jsonref = "^1.1.0"

# Publish
twine = "^4.0.2"
types-requests = "^2.32.0.20240712"
virtualenv = "^20.30.0"
pkginfo = "^1.12.1.2"
uvicorn = "^0.34.0"

[tool.poetry.scripts]
instill = "instill.helpers.cli:cli"

[tool.black]

quiet = true
exclude = '''
(
/(
Expand All @@ -115,17 +75,18 @@ exclude = '''
# the root of the project
)
'''
quiet = true

[tool.isort]

profile = "black"
skip_glob = ["**/protogen/*", "**/protobufs/*"]

[tool.mypy]
check_untyped_defs = true
exclude = ['instill/resources/schema']
ignore_missing_imports = true
no_implicit_optional = true
check_untyped_defs = true

cache_dir = ".cache/mypy/"

Expand All @@ -150,5 +111,48 @@ markers = []

[build-system]

requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core>=1.0.0"]

[tool.poetry.group.dev.dependencies]

# Formatters
black = "^24.3"
isort = "^5.10"
tomli = "*" # missing 'black' dependency

# Linters
mypy = "^1.0"
pydocstyle = "^6.1"
pylint = "~2.15"
wrapt = "*" # missing 'pylint' dependency

# Testing
freezegun = "*"
pytest = "^7.3"
pytest-cov = "^4.1"
pytest-describe = "^2.0"
pytest-expecter = "^3.0"
pytest-random = "*"

# Reports
coveragespace = "^6.0"

# Documentation
mkdocs = "~1.3"
pygments = "^2.11.1"

# Tooling
MacFSEvents = {version = "*", platform = "darwin"}
datamodel-code-generator = "^0.25.2"
grpcio-tools = "^1.54.2"
ipykernel = "^6.28.0"
ipython = "^8.10.0"
jsonref = "^1.1.0"
mypy-protobuf = "^3.5.0"
pyinstaller = "5.13.1"
pync = {version = "*", platform = "darwin"}
sniffer = "*"

# Publish
twine = "^4.0.2"
8 changes: 4 additions & 4 deletions scent.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class Options:
group = int(time.time()) # unique per run
show_coverage = False
rerun_args = None
rerun_args = (None, None, None)

targets = [
(("make", "test-unit", "DISABLE_COVERAGE=true"), "Unit Tests", True),
Expand Down Expand Up @@ -65,15 +65,15 @@ def run_targets(*args):

def call(command, title, retry):
"""Run a command-line program and display the result."""
if Options.rerun_args:
if Options.rerun_args[0] is not None:
command, title, retry = Options.rerun_args
Options.rerun_args = None
Options.rerun_args = (None, None, None)
success = call(command, title, retry)
if not success:
return False

print("")
print("$ %s" % " ".join(command))
print(f"$ {' '.join(command)}")
failure = subprocess.call(command)

if failure and retry:
Expand Down