-
Notifications
You must be signed in to change notification settings - Fork 12
JOSS review @tomelse #283
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
Open
tristan-deep
wants to merge
8
commits into
main
Choose a base branch
from
feature/review-tomelse
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+17
−10
Open
JOSS review @tomelse #283
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
19d9e4e
materialize jax computation notebook before last cell
tristan-deep ac20d22
TF install note in data example notebook
tristan-deep 6a4b9c0
fix type annotations (partly)
tristan-deep d5afdd3
Merge branch 'main' into feature/review-tomelse
tristan-deep 476d651
Merge remote-tracking branch 'origin/main' into feature/review-tomelse
tristan-deep b63d363
typos
tristan-deep 3fae77c
Merge branch 'main' into feature/review-tomelse
tristan-deep 2e5f99c
Merge branch 'main' into feature/review-tomelse
tristan-deep File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,7 @@ | |
| "\n", | ||
| "1. Loading data from single file with `zea.File`\n", | ||
| "2. Loading data from a group of files with `zea.Dataset`\n", | ||
| "3. Loading data in batches with dataloading utilities with `zea.backend.tensorflow.make_dataloader`" | ||
| "3. Loading data in batches with dataloading utilities via `zea.backend.tensorflow.make_dataloader`. This requires a working TensorFlow installation!" | ||
| ] | ||
| }, | ||
| { | ||
|
|
@@ -86,12 +86,12 @@ | |
| } | ||
| ], | ||
| "source": [ | ||
| "import keras\n", | ||
| "import matplotlib.pyplot as plt\n", | ||
| "\n", | ||
| "import zea\n", | ||
| "from zea import init_device, load_file\n", | ||
| "from zea.visualize import set_mpl_style\n", | ||
| "from zea.backend.tensorflow import make_dataloader" | ||
| "from zea.visualize import set_mpl_style" | ||
| ] | ||
| }, | ||
| { | ||
|
|
@@ -380,7 +380,11 @@ | |
| "source": [ | ||
| "## Loading data with `make_dataloader`\n", | ||
| "\n", | ||
| "In machine and deep learning workflows, we often want more features like batching, shuffling, and parallel data loading. The `zea.backend.tensorflow.make_dataloader` function provides a convenient way to create a TensorFlow data loader from a zea dataset. This does require a working TensorFlow installation, but does work in combination with any other backend as well. This dataloader is particularly useful for training models. It is important that there is some consistency in the dataset, which is not the case for [PICMUS](https://www.creatis.insa-lyon.fr/Challenge/IEEE_IUS_2016/home). Therefore in this example we will use a small part of the [CAMUS](https://www.creatis.insa-lyon.fr/Challenge/camus/) dataset." | ||
| "In machine and deep learning workflows, we often want more features like batching, shuffling, and parallel data loading. The `zea.backend.tensorflow.make_dataloader` function provides a convenient way to create a TensorFlow data loader from a zea dataset. \n", | ||
| "\n", | ||
| "🚨 Note! This does require a working TensorFlow installation, but does work in combination with any other backend as well. We are [working on migrating](https://github.com/tue-bmd/zea/pull/256) to [Grain](https://github.com/google/grain), which will provide a backend-agnostic dataloader in the near future.\n", | ||
| "\n", | ||
| "This dataloader is particularly useful for training models. It is important that there is some consistency in the dataset, which is not the case for [PICMUS](https://www.creatis.insa-lyon.fr/Challenge/IEEE_IUS_2016/home). Therefore in this example we will use a small part of the [CAMUS](https://www.creatis.insa-lyon.fr/Challenge/camus/) dataset." | ||
|
Comment on lines
+383
to
+387
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Polish wording in the dataloader section for readability. There’s a small double-space typo and slightly awkward phrasing in the warning line. ✏️ Suggested doc text cleanup- In machine and deep learning workflows, we often want more features like batching, shuffling, and parallel data loading. The `zea.backend.tensorflow.make_dataloader` function provides a convenient way to create a TensorFlow data loader from a zea dataset.
+ In machine and deep learning workflows, we often want more features like batching, shuffling, and parallel data loading. The `zea.backend.tensorflow.make_dataloader` function provides a convenient way to create a TensorFlow data loader from a zea dataset.
- 🚨 Note! This does require a working TensorFlow installation, but does work in combination with any other backend as well. We are [working on migrating](https://github.com/tue-bmd/zea/pull/256) to [Grain](https://github.com/google/grain), which will provide a backend-agnostic dataloader in the near future.
+ 🚨 Note: This requires a working TensorFlow installation, but it can be used in combination with other backends. We are [working on migrating](https://github.com/tue-bmd/zea/pull/256) to [Grain](https://github.com/google/grain), which will provide a backend-agnostic dataloader in the near future.🤖 Prompt for AI Agents |
||
| ] | ||
| }, | ||
| { | ||
|
|
@@ -459,6 +463,8 @@ | |
| } | ||
| ], | ||
| "source": [ | ||
| "from zea.backend.tensorflow import make_dataloader # needs TensorFlow to be installed\n", | ||
| "\n", | ||
| "dataset_path = \"hf://zeahub/camus-sample/val\"\n", | ||
| "dataloader = make_dataloader(\n", | ||
| " dataset_path,\n", | ||
|
|
@@ -556,7 +562,8 @@ | |
| "pipeline = zea.Pipeline.from_config(config)\n", | ||
| "parameters = pipeline.prepare_parameters(probe=probe, scan=scan)\n", | ||
| "\n", | ||
| "images = pipeline(data=data, **parameters)[\"data\"]" | ||
| "images = pipeline(data=data, **parameters)[\"data\"]\n", | ||
| "images = keras.ops.convert_to_numpy(images)" | ||
| ] | ||
| }, | ||
| { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.