Skip to content

Commit

Permalink
Don't validate API in server.py (#509)
Browse files Browse the repository at this point in the history
* Don't validate validate_api_ids in server.py

* VERSION 11.1.1

* update changelogs

* Default CLARIFAI_API_BASE value in dockerfile

* update changelogs
  • Loading branch information
luv-bansal authored Feb 6, 2025
1 parent a4cbfde commit 70fb5ad
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [[11.1.1]](https://github.com/Clarifai/clarifai-python/releases/tag/11.1.1) - [PyPI](https://pypi.org/project/clarifai/11.1.1/) - 2025-02-06

### Changed

- Don't validate API in server.py [(#509)] (https://github.com/Clarifai/clarifai-python/pull/509)

## [[11.1.0]](https://github.com/Clarifai/clarifai-python/releases/tag/11.1.0) - [PyPI](https://pypi.org/project/clarifai/11.1.0/) - 2025-02-05

### Changed
Expand Down
2 changes: 1 addition & 1 deletion clarifai/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "11.1.0"
__version__ = "11.1.1"
2 changes: 1 addition & 1 deletion clarifai/runners/dockerfile_template/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ ENV PYTHONPATH=${PYTHONPATH}:/home/nonroot/main \
CLARIFAI_RUNNER_ID=${CLARIFAI_RUNNER_ID} \
CLARIFAI_NODEPOOL_ID=${CLARIFAI_NODEPOOL_ID} \
CLARIFAI_COMPUTE_CLUSTER_ID=${CLARIFAI_COMPUTE_CLUSTER_ID} \
CLARIFAI_API_BASE=${CLARIFAI_API_BASE}
CLARIFAI_API_BASE=${CLARIFAI_API_BASE:-https://api.clarifai.com}

# Finally run the clarifai entrypoint to start the runner loop and local dev server.
# Note(zeiler): we may want to make this a clarifai CLI call.
Expand Down
4 changes: 2 additions & 2 deletions clarifai/runners/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def main():

parsed_args = parser.parse_args()

builder = ModelBuilder(parsed_args.model_path)
builder = ModelBuilder(parsed_args.model_path, download_validation_only=True)

model = builder.create_model_instance()

Expand Down Expand Up @@ -101,7 +101,7 @@ def main():
runner_id=os.environ["CLARIFAI_RUNNER_ID"],
nodepool_id=os.environ["CLARIFAI_NODEPOOL_ID"],
compute_cluster_id=os.environ["CLARIFAI_COMPUTE_CLUSTER_ID"],
base_url=os.environ["CLARIFAI_API_BASE"],
base_url=os.environ.get("CLARIFAI_API_BASE", "https://api.clarifai.com"),
num_parallel_polls=int(os.environ.get("CLARIFAI_NUM_THREADS", 1)),
)
runner.start() # start the runner to fetch work from the API.
Expand Down

0 comments on commit 70fb5ad

Please sign in to comment.