Skip to content

Commit

Permalink
demo validate and __call__
Browse files Browse the repository at this point in the history
Co-authored-by: zsimjee <[email protected]>
  • Loading branch information
CalebCourier and zsimjee authored Aug 1, 2024
1 parent de26dd2 commit 8e97799
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/concepts/validators.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Each validator is a method that encodes some criteria, and checks if a given val

Occasionally, validators need additional metadata that is only available during runtime. Metadata could be data generated during the execution of a validator (*important if you're writing your own validators*), or could just be a container for runtime arguments.

As an example, the `ExtractedSummarySentencesMatch` validator accepts a `filepaths` property in the metadata dictionary to specify what source files to compare the summary against to ensure similarity. Unlike arguments which are specified at validator initialization, metadata is specified when calling `guard.validate`. For more information on how to use metadata, see [How to use Metadata](/docs/hub/how_to_guides/metadata.md).
As an example, the `ExtractedSummarySentencesMatch` validator accepts a `filepaths` property in the metadata dictionary to specify what source files to compare the summary against to ensure similarity. Unlike arguments which are specified at validator initialization, metadata is specified when calling `guard.validate` or `guard.__call__` (this is the `guard()` function). For more information on how to use metadata, see [How to use Metadata](/docs/hub/how_to_guides/metadata.md).

```python
guard = Guard.from_rail("my_railspec.rail")
Expand Down

0 comments on commit 8e97799

Please sign in to comment.