From 2bb8db88f81fd96cf75e289317c567f1d8a3b927 Mon Sep 17 00:00:00 2001 From: thomashacker Date: Thu, 19 Jan 2023 13:33:49 +0100 Subject: [PATCH] Added more info to docs --- website/docs/api/language.mdx | 5 +++-- website/docs/api/pipe.mdx | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/website/docs/api/language.mdx b/website/docs/api/language.mdx index 45f64e346..aea8e51bd 100644 --- a/website/docs/api/language.mdx +++ b/website/docs/api/language.mdx @@ -346,13 +346,14 @@ and custom registered functions if needed. See the Perform a "rehearsal" update from a batch of data. Rehearsal updates teach the current model to make predictions similar to an initial model, to try to address -the "catastrophic forgetting" problem. Please note that this function needs to be used together with `Language.update`. This feature is experimental. +the "catastrophic forgetting" problem. Please note that `Language.rehearse` needs to be used together with `Language.update`. This feature is experimental. > #### Example > > ```python > optimizer = nlp.resume_training() -> losses = nlp.rehearse(examples, sgd=optimizer) +> update_losses = nlp.update(examples, sgd=optimizer) +> rehearse_losses = nlp.rehearse(examples, sgd=optimizer) > ``` | Name | Description | diff --git a/website/docs/api/pipe.mdx b/website/docs/api/pipe.mdx index 8004d4d76..e5b33e50d 100644 --- a/website/docs/api/pipe.mdx +++ b/website/docs/api/pipe.mdx @@ -244,14 +244,15 @@ predictions and gold-standard annotations, and update the component's model. Perform a "rehearsal" update from a batch of data. Rehearsal updates teach the current model to make predictions similar to an initial model, to try to address -the "catastrophic forgetting" problem. Please note that this function needs to be used together with `TrainablePipe.update`. This feature is experimental. +the "catastrophic forgetting" problem. Please note that `TrainablePipe.update` needs to be used together with `TrainablePipe.update`. This feature is experimental. > #### Example > > ```python > pipe = nlp.add_pipe("your_custom_pipe") > optimizer = nlp.resume_training() -> losses = pipe.rehearse(examples, sgd=optimizer) +> update_losses = pipe.update(examples, sgd=optimizer) +> rehearse_losses = pipe.rehearse(examples, sgd=optimizer) > ``` | Name | Description |