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

refactor: update readme and add connect function #532

Merged
merged 2 commits into from
Sep 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Add `get_model` and `encode` method to encode docarray. ([#522](https://github.com/jina-ai/finetuner/pull/522))

- Add connect function to package ([#532](https://github.com/jina-ai/finetuner/pull/532))

### Removed

### Changed
Expand All @@ -22,6 +24,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Improve `describe_models` with open-clip models. ([#528](https://github.com/jina-ai/finetuner/pull/528))

- Use stream logging in the README example ([#532](https://github.com/jina-ai/finetuner/pull/532))

### Fixed

- Print logs before run status is `STARTED`. ([#531](https://github.com/jina-ai/finetuner/pull/531))
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,9 @@ import finetuner
finetuner.login()

run = finetuner.get_run('resnet50-tll-run')
print(run.status())
print(run.logs())

for msg in run.stream_logs():
print(msg)

run.save_artifact('resnet-tll')
```
Expand All @@ -173,10 +174,9 @@ Finally, you can use the model to encode images:
import finetuner
from docarray import Document, DocumentArray

model = finetuner.get_model('resnet-tll')

da = DocumentArray([Document(uri='~/Pictures/your_img.png')])

model = finetuner.get_model('resnet-tll')
finetuner.encode(model=model, data=da)

da.summary()
Expand Down
4 changes: 4 additions & 0 deletions finetuner/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ def login():
ft.login()


def connect():
ft.connect()


def list_callbacks() -> Dict[str, callback.CallbackStubType]:
"""List available callbacks."""
return {
Expand Down