Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: common args inheritence from Flow API #5535

Merged
merged 7 commits into from Dec 19, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/concepts/flow/basics.md
Expand Up @@ -18,6 +18,13 @@ f = Flow()
```
````

```{important}
All arguments received by `Flow()` API will be propagated to other entities (gateway, executor) with the following exceptions:
AnneYang720 marked this conversation as resolved.
Show resolved Hide resolved

- `uses` and `uses_with` won't be passed to gateway
AnneYang720 marked this conversation as resolved.
Show resolved Hide resolved
- `port`, `port_monitoring`, `uses` and `uses_with` won't be passed to executor
AnneYang720 marked this conversation as resolved.
Show resolved Hide resolved
```

`````{tab} YAML
```yaml
jtype: Flow
Expand Down
5 changes: 5 additions & 0 deletions jina/orchestrate/flow/base.py
Expand Up @@ -366,6 +366,11 @@ def __init__(
f = Flow.load_config('flow.yml') # load Flow from YAML config
with f:
f.bock() # serve Flow

All arguments received by `Flow()` API will be propagated to other entities (gateway, executor) with the following exceptions:

- `uses` and `uses_with` won't be passed to gateway
AnneYang720 marked this conversation as resolved.
Show resolved Hide resolved
- `port`, `port_monitoring`, `uses` and `uses_with` won't be passed to executor
AnneYang720 marked this conversation as resolved.
Show resolved Hide resolved

:param asyncio: If set, then the input and output of this Client work in an asynchronous manner.
:param host: The host of the Gateway, which the client should connect to, by default it is 0.0.0.0.
Expand Down