Jina Versions Save

☁️ Build multimodal AI applications with cloud-native stack

v3.22.4

6 months ago

Release Note (3.22.4)

Release time: 2023-10-31 14:33:21

This release contains 1 bug fix.

🐞 Bug Fixes

Add option to use body for streaming instead of params (#6098)

In order to allow complex nested documents to pass through streaming endpoints, the GET endpoint can now get the data from the body or the parameters of the HTTP request.

🀟 Contributors

We would like to thank all contributors to this release:

  • Narek Amirbekian (@NarekA )

v3.22.3

6 months ago

Release Note (3.22.3)

Release time: 2023-10-25 12:03:58

This release contains 1 bug fix.

🐞 Bug Fixes

Add and use POST endpoint for streaming (#6093)

HTTP streaming when using a GET endpoint only allows Documents whose schemas contain only str, int, and float fields.

By adding a POST endpoint and modifying the Jina Client to use it, it is now possible to send Documents with complex nested document schemas over streaming HTTP.

🀟 Contributors

We would like to thank all contributors to this release:

  • Peter Willemsen (@peterwilli )
  • Narek Amirbekian (@NarekA )

v3.22.2

6 months ago

Release Note (3.22.2)

Release time: 2023-10-20 14:42:15

This release contains 1 bug fix and 5 documentation improvements.

🐞 Bug Fixes

Fix check graph compatibility nested types (#6085)

A bug was found that prevented Flows from starting when they had Executors with different but compatible schemas. This is now fixed.

πŸ“— Documentation Improvements

  • Add Jina deployment docs (#6079)
  • Fix typos inside docs/cloud-nativeness (#6080)
  • Fix typos inside docs/concepts directory (#6082)
  • Fix typo inside docs/tutorials (#6083)
  • Fix readme code (#6075)

🀟 Contributors

We would like to thank all contributors to this release:

  • Deepankar Mahapatro (@deepankarm )
  • Joan Fontanals (@JoanFM )
  • Parikshit Adhikari (@parikshitadhikari )
  • Subba Reddy Veeramreddy (@subbuv26 )
  • Антон (@BouFFaNTCRiB )
  • Abhijit (@AbhiGaunker)

v3.22.1

7 months ago

Release Note (3.22.1)

Release time: 2023-10-06 13:52:45

This release contains 1 bug fix.

🐞 Bug Fixes

Fix timeout issue with dynamic batching (#6071)

When using dynamic batching (either with the @dynamic_batching decorator on an Executor endpoint or by setting the uses_dynamic_batching parameter on a Deployment, timeouts were not being properly taken into account because the timer might not be triggered until a previous batch finished. This has been fixed.

🀟 Contributors

We would like to thank all contributors to this release:

  • Joan Fontanals (@JoanFM )

v3.22.0

7 months ago

Release Note (3.22.0)

Release time: 2023-10-04 12:16:53

This release contains 1 new feature and 2 documentation improvements.

πŸ†• Features

Change the way dynamic batching is handled (#6066)

This release implements some changes in the way we handle dynamic batching:

  • Jina guarantees that all the batches passed to Executors contain no more than preferred_batch_size documents.
  • Requests are returned to the client as they are processed without waiting for other requests to be ready.

πŸ“— Documentation Improvements

  • Fix dynamic batching documentation (#6068)
  • Fix line explaining dynamic batching in YAML (#6065)

🀟 Contributors

We would like to thank all contributors to this release:

  • Joan Fontanals (@JoanFM)
  • Johannes Messner (@JohannesMessner )

v3.21.1

7 months ago

Release Note (3.21.1)

Release time: 2023-09-29 10:45:55

This release contains 1 bug fix.

🐞 Bug Fixes

Fix issue with same doc type in different containerized Executors (#6062)

When multiple Executors inside a Flow had the same model name and they were used as docker containers or had set the environment variable JINA_MP_START_METHOD=spawn, there was a problem serving them via HTTP. This has been fixed by making sure that only one model instance is served for each model name.

🀟 Contributors

We would like to thank all contributors to this release:

  • Joan Fontanals (@JoanFM )

v3.21.0

7 months ago

Release Note (3.21.0)

Release time: 2023-09-26 15:54:28

This release contains 1 new feature, 4 bug fixes, and 1 documentation improvement.

πŸ†• Features

Add return_type parameter to gateway streamer methods (#6027)

By default, GatewayStreamer will fetch executor input and output schemas and reconstruct docarray models dynamically. The output schemas will be used to cast the responses at the gateway level.

Although the cast responses are nearly identical to the original schemas defined at the executor level, they might fail some checks. For example, if the gateway receives a document doc from an executor with output MyDoc, the following check will fail:

assert isinstance(doc, MyDoc)

Similarly, adding doc to a DocList[MyDoc] will fail the type checks.

To prevent this, the user of a GatewayStreamer can now use the return_type parameter to explicitly specify the type that will be used to cast the response. Output responses received from gateway streamer methods will always match the specified return type.

🐞 Bug Fixes

Fix topology schema validation (#6057)

Previously, if the endpoint model schemas of different Executors in a Flow did not match exactly, the Flow would fail to start, Even if the difference was as small as a different default value, it would still give rise to this error.

We have fixed this bug by relaxing the model schema checking to only verify that the types of properties match.

Fix consensus module memory leak (#6054)

In the consensus golang module, some allocated strings were not being properly released. We have repaired this.

Document casting in Flow gateway (#6032)

This bug is related to #6027. We now use the return_type parameter in GatewayStreamer to ensure that Documents received at the gateway level are properly cast to the correct schema. This prevents validation and serialization errors that previously occurred.

Remove sandbox (#6047)

Remove support for deploying Executors in the Jina Cloud sandbox, since the sandbox has been deprecated.

πŸ“— Documentation Improvements

  • Make example copy-pastable (#6052)

🀟 Contributors

We would like to thank all contributors to this release:

  • Joan Fontanals (@JoanFM )
  • Naymul Islam (@ai-naymul )
  • Deepankar Mahapatro (@deepankarm )
  • AlaeddineAbdessalem (@alaeddine-13 )
  • Han Xiao (@hanxiao )
  • XXIV (@thechampagne )

v3.20.3

8 months ago

Release Note (3.20.3)

Release time: 2023-09-07 08:46:43

This release contains 1 bug fix.

🐞 Bug Fixes

Skip doc attributes in annotations but not in fields (#6035)

When deploying an Executor inside a Flow with a BaseDoc model that has any attribute with a ClassVar value, the service would fail to initialize because the Gateway could not properly create the schemas. We have fixed this by securing access to __fields__ when dynamically creating these pydantic models.

🀟 Contributors

We would like to thank all contributors to this release:

  • Narek Amirbekian (@NarekA )

v3.20.2

8 months ago

Release Note (3.20.2)

Release time: 2023-09-06 07:37:25

This release contains 1 bug fix and 1 refactoring.

🐞 Bug Fixes

Fix install issue (#6037)

Fix an installation issue that appeared because a new release of opentelemetry-sdk prevented pip from finding compatible libraries.

βš™ Refactoring

Refactor the setup.py file (#6038)

Some hard-coded strings were replaced with constants to improve code readability.

🀟 Contributors

We would like to thank all contributors to this release:

  • Joan Fontanals (@JoanFM )
  • Naymul Islam (@ai-naymul )

v3.20.1

9 months ago

Release Note (3.20.1)

Release time: 2023-08-10 15:49:12

This release contains 2 bug fixes and 2 documentation improvements.

🐞 Bug Fixes

Make Gateway load balancer stream results (#6024)

Streaming endpoints in Executors can be deployed behind a Gateway (when using include_gateway=True in Deployment).

In this case, the Gateway acts as a load balancer. However, prior to this release, when the HTTP protocol is used, the Gateway would wait until all chunks of the responses had been streamed from the Executor.

Only when all the chunks were received would it send them back to the client. This resulted in delays and suppressed the desired behavior of a streaming endpoint (namely, displaying tokens streamed from an LLM with a typewriter effect). This release fixes this issue by making the Gateway stream chunks of responses from the forwarded request as soon as they are received from the Executor.

No matter whether you are setting include_gateway to True or False in Deployment, streaming endpoints should give the same desired behavior.

Fix deeply nested Schemas support in Executors and Flows(#6021)

When a deeply nested schema (DocArray schema with 2+ levels of nesting) was specified as an input or output of an Executor endpoint, and the Executor was deployed in a Flow, the Gateway would fail to fetch information about the endpoints and their input/output schemas:

from typing import List, Optional
from docarray import BaseDoc, DocList
from jina import Executor, Flow, requests

class Nested2Doc(BaseDoc):
    value: str


class Nested1Doc(BaseDoc):
    nested: Nested2Doc


class RootDoc(BaseDoc):
    nested: Optional[Nested1Doc]
    
class NestedSchemaExecutor(Executor):
    @requests(on='/endpoint')
    async def endpoint(self, docs: DocList[RootDoc], **kwargs) -> DocList[RootDoc]:
        rets = DocList[RootDoc]()
        rets.append(
            RootDoc(
                text='hello world', nested=Nested1Doc(nested=Nested2Doc(value='test'))
            )
        )
        return rets
    
flow = Flow().add(uses=NestedSchemaExecutor)
with flow:
    res = flow.post(
        on='/endpoint', inputs=RootDoc(text='hello'), return_type=DocList[RootDoc]
    )
...
2023-08-07 02:49:32,529 topology_graph.py[608] WARNING Getting endpoints failed: 'definitions'. Waiting for another trial

This was due to an internal utility function failing to convert such deeply nested JSON schemas to DocArray models. This release fixes the issue by propagating global schema definitions when generating models for nested schemas.

πŸ“— Documentation Improvements

  • Remove extra backtick in create-app.md (#6023)
  • Fix streaming endpoint reference in README (#6017)

🀟 Contributors

We would like to thank all contributors to this release:

  • Saba Sturua (@jupyterjazz)
  • AlaeddineAbdessalem (@alaeddine-13)
  • Joan Fontanals (@JoanFM)
  • Naymul Islam (@ai-naymul)