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

Adjust examples to new readers module #2721

Merged
merged 3 commits into from
Feb 25, 2021
Merged

Conversation

klecki
Copy link
Contributor

@klecki klecki commented Feb 24, 2021

Why we need this PR?

Refactor examples to use new readers module.

What happened in this PR?

  • What solution was applied:
    Find & replace
  • Affected modules and functionalities:
    IPython notebooks
  • Key points relevant for the review:
    N/a
  • Validation and testing:
    👀
  • Documentation (including examples):
    This is refactoring of examples.

JIRA TASK: [DALI-1866]

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@@ -34,7 +34,7 @@
"source": [
"used `batch_size` is `1`, to keep things simple.\n",
"\n",
"2. Next, let's implement the pipeline. Firstly, we need to load data from disk (or any other source). FileReader is able to load data, as well as it's labels. For more information, refer to FileReader docs. Furthermore, similarly to image data, you can use Reader operators that are specific for a given dataset or a dataset format (see [CaffeReader](https://docs.nvidia.com/deeplearning/sdk/dali-developer-guide/docs/supported_ops.html#nvidia.dali.ops.CaffeReader)). After loading the input data, the pipeline decodes the audio data. As stated above, the AudioDecoder operator is able to decode most of the well-known audio formats.\n",
"2. Next, let's implement the pipeline. Firstly, we need to load data from disk (or any other source). readers.File is able to load data, as well as it's labels. For more information, refer to readers.File docs. Furthermore, similarly to image data, you can use Reader operators that are specific for a given dataset or a dataset format (see [readers.Caffe](https://docs.nvidia.com/deeplearning/sdk/dali-developer-guide/docs/supported_ops_legacy.html#nvidia.dali.ops.readers.Caffe)). After loading the input data, the pipeline decodes the audio data. As stated above, the AudioDecoder operator is able to decode most of the well-known audio formats.\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI: We are going to rewrite this with the functional API. It can stay like this for now, but most likely we are going to change it very soon.

@@ -189,7 +189,7 @@
"source": [
"## Using Dali\n",
"### Define the Pipeline. \n",
"For advanced usage, refer to SequenceReader and VideoReader docs."
"For advanced usage, refer to readers.Sequence and readers.Video docs."
Copy link
Contributor

Choose a reason for hiding this comment

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

perhaps out of scope but I'll write it here for the record. We should probably add links to the operator documentation when mentioning operators in the examples.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Certainly out of scope. There is a lot of those mentions, it would be a really tedious task. (not like this isn't). Nonetheless good idea.

@@ -47,7 +47,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"We need some video containers to process. We can use [Sintel](https://en.wikipedia.org/wiki/Sintel) trailer, which is an mp4 container containing an h264 video and distributed under the Create Common license. Let's split it into 10s clips in order to check how `VideoReader` handles mutliple video files. This can be done easily with the `ffmpeg` standalone tool. `DALI_EXTRA_PATH` environment variable should point to the place where data from [DALI extra repository](https://github.com/NVIDIA/DALI_extra) is downloaded. Please make sure that the proper release tag is checked out. The snippet below verifies, that you have defined `DALI_extra` path as an environment variable."
"We need some video containers to process. We can use [Sintel](https://en.wikipedia.org/wiki/Sintel) trailer, which is an mp4 container containing an h264 video and distributed under the Create Common license. Let's split it into 10s clips in order to check how `readers.Video` handles mutliple video files. This can be done easily with the `ffmpeg` standalone tool. `DALI_EXTRA_PATH` environment variable should point to the place where data from [DALI extra repository](https://github.com/NVIDIA/DALI_extra) is downloaded. Please make sure that the proper release tag is checked out. The snippet below verifies, that you have defined `DALI_extra` path as an environment variable."
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"We need some video containers to process. We can use [Sintel](https://en.wikipedia.org/wiki/Sintel) trailer, which is an mp4 container containing an h264 video and distributed under the Create Common license. Let's split it into 10s clips in order to check how `readers.Video` handles mutliple video files. This can be done easily with the `ffmpeg` standalone tool. `DALI_EXTRA_PATH` environment variable should point to the place where data from [DALI extra repository](https://github.com/NVIDIA/DALI_extra) is downloaded. Please make sure that the proper release tag is checked out. The snippet below verifies, that you have defined `DALI_extra` path as an environment variable."
"We need some video containers to process. We can use [Sintel](https://en.wikipedia.org/wiki/Sintel) trailer, which is an mp4 container containing an h264 video and distributed under the Create Common license. Let's split it into 10s clips in order to check how `readers.Video` handles multiple video files. This can be done easily with the `ffmpeg` standalone tool. `DALI_EXTRA_PATH` environment variable should point to the place where data from [DALI extra repository](https://github.com/NVIDIA/DALI_extra) is downloaded. Please make sure that the proper release tag is checked out. The snippet below verifies, that you have defined `DALI_extra` path as an environment variable."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Signed-off-by: Krzysztof Lecki <[email protected]>
Signed-off-by: Krzysztof Lecki <[email protected]>
Signed-off-by: Krzysztof Lecki <[email protected]>
@jantonguirao
Copy link
Contributor

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2109185]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2109185]: BUILD PASSED

@klecki klecki merged commit 7fefb6b into NVIDIA:master Feb 25, 2021
@JanuszL JanuszL mentioned this pull request May 19, 2021
@JanuszL JanuszL mentioned this pull request Oct 26, 2021
23 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants