Skip to content

Commit

Permalink
Fix dataset doc (PaddlePaddle#540)
Browse files Browse the repository at this point in the history
  • Loading branch information
smallv0221 authored Jun 10, 2021
1 parent 14c3209 commit cd2bf83
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/data_prepare/dataset_load.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
>>> print(type(train_ds))
<class 'paddlenlp.datasets.dataset.IterDataset'>
关于 :class:`MapDataset` 和 :class:`IterDataset` 功能和异同可以参考***
关于 :class:`MapDataset` 和 :class:`IterDataset` 功能和异同可以参考API文档 :doc:`datasets <../source/paddlenlp.datasets.dataset>`

选择子数据集
^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
6 changes: 3 additions & 3 deletions docs/data_prepare/dataset_self_defined.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

从本地文件创建数据集时,我们 **推荐** 根据本地数据集的格式给出读取function并传入 :func:`load_dataset` 中创建数据集。

:obj:`waybill_ie` 快递单信息抽取任务中的数据为例:
以 `waybill_ie <https://github.com/PaddlePaddle/PaddleNLP/tree/develop/examples/information_extraction/waybill_ie>`__ 快递单信息抽取任务中的数据为例:

.. code-block::
Expand Down Expand Up @@ -71,8 +71,8 @@
def __len__(self):
return len(self.data)
ds = MyDataset(data_path) # paddle.io.Dataset
new_ds = MapDataset(MyDataset) # paddlenlp.datasets.MapDataset
ds = MyDataset(data_path) # paddle.io.Dataset
new_ds = MapDataset(ds) # paddlenlp.datasets.MapDataset
从其他python对象创建数据集
-------------------
Expand Down

0 comments on commit cd2bf83

Please sign in to comment.