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: remove out-dated clip specific documentation #491

Merged
merged 2 commits into from
Jul 14, 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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Use `uri` to represent image content in documentation creating training data code snippet. ([#484](https://github.com/jina-ai/finetuner/pull/484))

- Remove out-dated CLIP-specific documentation. ([#491](https://github.com/jina-ai/finetuner/pull/491))


## [0.5.0] - 2022-06-30

Expand Down
36 changes: 0 additions & 36 deletions docs/walkthrough/run-job.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,47 +66,11 @@ run = finetuner.fit(
scheduler_step='batch',
freeze=False, # If applied will freeze the embedding model, only train the MLP.
output_dim=512, # Attach a MLP on top of embedding model.
multi_modal=False, # CLIP specific.
image_modality=None, # CLIP specific.
text_modality=None, # CLIP specific.
cpu=False,
num_workers=4,
)
```

```{Important}
Please check the [developer reference](../../api/finetuner/#finetuner.fit) to get the available options for `loss`, `miner`, `optimizer` and `scheduler_step`.
```

```{Important}
CLIP specific parameters

`multi_modal`: Need to be set to True when you are fine-tuning CLIP since we are fine-tuning two models.
`image_modality` and `text_modality`: Need to be set to the corresponded value of the `modality` when you are creating training data.

For example:
```python
doc = Document(
chunks=[
Document(
content='this is the text chunk',
modality='text',
tags={'finetuner_label': 1}
),
Document(
content='https://...picture.png',
modality='image',
tags={'finetuner_label': 1}
),
]
)
# in this case, image_modality and text_modality should be set correspondingly
finetuner.fit(
...,
loss='CLIPLoss',
image_modality='image',
text_modality='text',
multi_modal=True,
...,
)
```