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: add docs for eval callbacks for clip models #615

Merged
merged 6 commits into from
Nov 24, 2022

Conversation

guenthermi
Copy link
Member

@guenthermi guenthermi commented Nov 24, 2022

  • This adds documentation on how to use the evaluation callback for CLIP
  • Add an EvaluationCallback to the clip fine-tuning examples
  • Add a log output from the evaluation callback to the clip example

  • This PR references an open issue
  • I have added a line about this change to CHANGELOG

Copy link
Member

@bwanglzu bwanglzu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor comments

Comment on lines 62 to 63
eval_queries = DocumentArray.pull('fashion-eval-data-queries', show_progress=True)
eval_index = DocumentArray.pull('fashion-eval-data-index', show_progress=True)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we unify this to query_data and index_data?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes this makes sense

The evaluation callback is triggered at the end of each epoch, in which the model is evaluated using the `query_data` and `index_data` datasets that were provided when the callback was created.
These datasets can be provided in the same way the `train_data` and `eval_data` parameters of the {meth}`~finetuner.fit` method; either as a path to a CSV file, a {class}`~docarray.array.document.DocumentArray` or the name of a {class}`~docarray.array.document.DocumentArray` that has been pushed on the Jina AI Cloud. See {doc}`/walkthrough/create-training-data` for more information about how to prepare your data.

It is worth noting that the evaluation callback and the `eval_data` parameter of the fit method do not do the same thing.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EvaluationCallback

Copy link
Member

@bwanglzu bwanglzu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@@ -41,7 +41,8 @@ For each product the dataset contains a title and images of multiple variants of
<!-- #region id="EVBez7dHwIye" -->
## Data
Our journey starts locally. We have to [prepare the data and push it to the Jina AI Cloud](https://finetuner.jina.ai/walkthrough/create-training-data/) and Finetuner will be able to get the dataset by its name. For this example,
we already prepared the data, and we'll provide the names of training and evaluation data (`fashion-train-data-clip` and `fashion-eval-data-clip`) directly to Finetuner.
we already prepared the data, and we'll provide the names of traning and evaluation data (`fashion-train-data-clip` and `fashion-eval-data-clip`) directly to Finetuner.
In addition, we
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this incomplete?

docs/walkthrough/using-callbacks.md Outdated Show resolved Hide resolved
guenthermi and others added 2 commits November 24, 2022 15:40
Co-authored-by: George Mastrapas <32414777+gmastrapas@users.noreply.github.com>
@github-actions
Copy link

📝 Docs are deployed on https://ft-docs-clip-eval-callback--jina-docs.netlify.app 🎉

Copy link
Member

@gmastrapas gmastrapas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@guenthermi guenthermi merged commit f42e523 into main Nov 24, 2022
@guenthermi guenthermi deleted the docs-clip-eval-callback branch November 24, 2022 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants