cortexgrid 0.3.18__tar.gz → 0.3.20__tar.gz

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.
Files changed (31) hide show
  1. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/PKG-INFO +1 -1
  2. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/cortexgrid/serve.py +7 -4
  3. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/pyproject.toml +1 -1
  4. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/.gitignore +0 -0
  5. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/LICENSE +0 -0
  6. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/cortexgrid/__init__.py +0 -0
  7. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/cortexgrid/_bundle.py +0 -0
  8. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/cortexgrid/_model_scheduler.py +0 -0
  9. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/cortexgrid/_ray_job_driver.py +0 -0
  10. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/cortexgrid/_serve_entry.py +0 -0
  11. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/cortexgrid/checkpoint.py +0 -0
  12. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/cortexgrid/experiment.py +0 -0
  13. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/cortexgrid/infra.py +0 -0
  14. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/cortexgrid/jobs.py +0 -0
  15. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/cortexgrid/mlflow_util.py +0 -0
  16. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/cortexgrid/model_serving/__init__.py +0 -0
  17. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/cortexgrid/model_serving/application_spec.py +0 -0
  18. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/cortexgrid/model_serving/deployment_key.py +0 -0
  19. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/cortexgrid/model_serving/deployment_records.py +0 -0
  20. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/cortexgrid/model_serving/lifecycle.py +0 -0
  21. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/cortexgrid/model_serving/placement.py +0 -0
  22. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/cortexgrid/model_serving/registry_tags.py +0 -0
  23. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/cortexgrid/model_serving/serve_bundle.py +0 -0
  24. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/cortexgrid/model_serving/status.py +0 -0
  25. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/cortexgrid/model_storage.py +0 -0
  26. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/cortexgrid/py.typed +0 -0
  27. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/cortexgrid/ray_util.py +0 -0
  28. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/cortexgrid/s3_util.py +0 -0
  29. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/cortexgrid/secrets.py +0 -0
  30. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/cortexgrid/state.py +0 -0
  31. {cortexgrid-0.3.18 → cortexgrid-0.3.20}/docs/cortexgrid/README.md +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: cortexgrid
3
- Version: 0.3.18
3
+ Version: 0.3.20
4
4
  Summary: Connect your ML code to the RoboLab compute cluster — Ray, MLflow, and S3
5
5
  Project-URL: Homepage, https://github.com/robodatalab/cortexgrid
6
6
  Project-URL: Repository, https://github.com/robodatalab/cortexgrid
@@ -8,8 +8,8 @@
8
8
  async def predict(self, xs: list[float]) -> list[float]: ...
9
9
 
10
10
  Unlike `ray.serve.ingress`, it builds the FastAPI app from the class's
11
- `serve.endpoint` methods, and the class is left unwrapped: the FastAPI app
12
- and the client generated for it are only recorded on it, and
11
+ `serve.endpoint` methods, and the class is left unwrapped: the FastAPI app,
12
+ its routes and the client generated for it are only recorded on it, and
13
13
  `cortexgrid._serve_entry.build` applies Ray's ingress when it builds the Serve
14
14
  application on the cluster.
15
15
 
@@ -59,6 +59,10 @@ def ingress(cls: _T) -> _T:
59
59
  if getattr(method, _ENDPOINT_ATTR, False):
60
60
  marshalling = _EndpointMarshalling.of(method)
61
61
  route = _route_of(method, marshalling)
62
+ route_name = f"__cortexgrid_{name}_route__"
63
+ route.__module__ = cls.__module__
64
+ route.__qualname__ = f"{cls.__qualname__}.{route_name}"
65
+ setattr(cls, route_name, route)
62
66
  app.add_api_route(f"/{name}", route, methods=["POST"])
63
67
  calls[name] = _call_of(name, method, marshalling)
64
68
  client = type(f"{cls.__name__}Client", (_EndpointsClient,), calls)
@@ -89,7 +93,7 @@ class _EndpointMarshalling:
89
93
  parameter_values = signature.parameters.values()
90
94
  parameters_in_order = list(parameter_values)
91
95
  signature_without_self = signature.replace(parameters=parameters_in_order[1:])
92
- hints = get_type_hints(method)
96
+ hints = get_type_hints(method, include_extras=True)
93
97
  returned_hint = hints.pop("return")
94
98
  if inspect.isasyncgenfunction(method):
95
99
  streamed_hints = get_args(returned_hint)
@@ -157,7 +161,6 @@ def _route_of(
157
161
  return answered
158
162
 
159
163
  route.__name__ = method.__name__
160
- route.__qualname__ = method.__qualname__
161
164
  return route
162
165
 
163
166
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "cortexgrid"
3
- version = "0.3.18"
3
+ version = "0.3.20"
4
4
  description = "Connect your ML code to the RoboLab compute cluster — Ray, MLflow, and S3"
5
5
  readme = "docs/cortexgrid/README.md"
6
6
  license = "Apache-2.0"
File without changes
File without changes