clarifai 11.1.6rc1__py3-none-any.whl → 11.1.7rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- clarifai/__init__.py +1 -1
- clarifai/cli/__pycache__/model.cpython-310.pyc +0 -0
- clarifai/cli/model.py +25 -0
- clarifai/client/model.py +158 -393
- clarifai/client/model_client.py +4 -2
- clarifai/runners/__init__.py +2 -7
- clarifai/runners/__pycache__/__init__.cpython-310.pyc +0 -0
- clarifai/runners/__pycache__/server.cpython-310.pyc +0 -0
- clarifai/runners/dockerfile_template/Dockerfile.template +3 -0
- clarifai/runners/models/__pycache__/model_builder.cpython-310.pyc +0 -0
- clarifai/runners/models/__pycache__/model_class.cpython-310.pyc +0 -0
- clarifai/runners/models/__pycache__/model_run_locally.cpython-310.pyc +0 -0
- clarifai/runners/models/__pycache__/model_runner.cpython-310.pyc +0 -0
- clarifai/runners/models/__pycache__/model_servicer.cpython-310.pyc +0 -0
- clarifai/runners/models/model_builder.py +24 -7
- clarifai/runners/models/model_class.py +256 -28
- clarifai/runners/models/model_run_locally.py +3 -78
- clarifai/runners/models/model_runner.py +2 -0
- clarifai/runners/models/model_servicer.py +11 -2
- clarifai/runners/utils/__pycache__/data_types.cpython-310.pyc +0 -0
- clarifai/runners/utils/__pycache__/method_signatures.cpython-310.pyc +0 -0
- clarifai/runners/utils/__pycache__/serializers.cpython-310.pyc +0 -0
- clarifai/runners/utils/data_types.py +46 -5
- clarifai/runners/utils/method_signatures.py +104 -39
- clarifai/runners/utils/serializers.py +19 -5
- {clarifai-11.1.6rc1.dist-info → clarifai-11.1.7rc1.dist-info}/METADATA +2 -1
- {clarifai-11.1.6rc1.dist-info → clarifai-11.1.7rc1.dist-info}/RECORD +31 -31
- {clarifai-11.1.6rc1.dist-info → clarifai-11.1.7rc1.dist-info}/LICENSE +0 -0
- {clarifai-11.1.6rc1.dist-info → clarifai-11.1.7rc1.dist-info}/WHEEL +0 -0
- {clarifai-11.1.6rc1.dist-info → clarifai-11.1.7rc1.dist-info}/entry_points.txt +0 -0
- {clarifai-11.1.6rc1.dist-info → clarifai-11.1.7rc1.dist-info}/top_level.txt +0 -0
clarifai/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "11.1.
|
1
|
+
__version__ = "11.1.7rc1"
|
Binary file
|
clarifai/cli/model.py
CHANGED
@@ -76,6 +76,31 @@ def download_checkpoints(model_path, out_path, stage):
|
|
76
76
|
required=False,
|
77
77
|
default=".",
|
78
78
|
)
|
79
|
+
@click.option(
|
80
|
+
'--out_path',
|
81
|
+
type=click.Path(exists=False),
|
82
|
+
required=False,
|
83
|
+
default=None,
|
84
|
+
help='Path to write the method signature defitions to. If not provided, use stdout.')
|
85
|
+
def signatures(model_path, out_path):
|
86
|
+
"""Generate method signatures for the model."""
|
87
|
+
|
88
|
+
from clarifai.runners.models.model_builder import ModelBuilder
|
89
|
+
builder = ModelBuilder(model_path, download_validation_only=True)
|
90
|
+
signatures = builder.method_signatures_yaml()
|
91
|
+
if out_path:
|
92
|
+
with open(out_path, 'w') as f:
|
93
|
+
f.write(signatures)
|
94
|
+
else:
|
95
|
+
click.echo(signatures)
|
96
|
+
|
97
|
+
|
98
|
+
@model.command()
|
99
|
+
@click.option(
|
100
|
+
'--model_path',
|
101
|
+
type=click.Path(exists=True),
|
102
|
+
required=True,
|
103
|
+
help='Path to the model directory.')
|
79
104
|
@click.option(
|
80
105
|
'--mode',
|
81
106
|
type=click.Choice(['env', 'container'], case_sensitive=False),
|