Skip to content

Commit

Permalink
refactor: update readme and add connect function (#532)
Browse files Browse the repository at this point in the history
  • Loading branch information
guenthermi committed Sep 9, 2022
1 parent 2e160d4 commit bade778
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
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

0 comments on commit bade778

Please sign in to comment.