Skip to content

Commit

Permalink
Document the convention for filepath related attributes in custom dat…
Browse files Browse the repository at this point in the history
…aset creation (#4403)

* Document the magic behaviour of filepath attributes

Signed-off-by: Ankita Katiyar <[email protected]>

* pin vale

Signed-off-by: Ankita Katiyar <[email protected]>

---------

Signed-off-by: Ankita Katiyar <[email protected]>
  • Loading branch information
ankatiyar authored Jan 9, 2025
1 parent 0bb470d commit 847c433
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docs-language-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ jobs:
- uses: errata-ai/vale-action@reviewdog
with:
reporter: github-pr-check
version: 3.9.2 # temp
4 changes: 4 additions & 0 deletions docs/source/data/how_to_create_a_custom_dataset.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ This typing is optional however, and defaults to `Any` type.

The `_EPHEMERAL` boolean attribute in `AbstractDataset` indicates if a dataset is persistent. For example, in the case of {py:class}`~kedro.io.MemoryDataset`, which is not persistent, it is set to True. By default, `_EPHEMERAL` is set to False.

```{note}
The parameter to specify the location of the data file/folder must be called either `filename`, `filepath`, or `path` in the constructor function of the custom dataset class to comply with the Kedro convention.
```

Here is an example skeleton for `ImageDataset`:

<details>
Expand Down

0 comments on commit 847c433

Please sign in to comment.