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

Static vision model #1525

Merged
merged 7 commits into from May 29, 2022
Merged

Static vision model #1525

merged 7 commits into from May 29, 2022

Conversation

JKL98ISR
Copy link
Member

@JKL98ISR JKL98ISR commented May 29, 2022

closes #1364
also fixed batch length bug

@JKL98ISR JKL98ISR requested review from a team as code owners May 29, 2022 08:44
@JKL98ISR JKL98ISR self-assigned this May 29, 2022
@JKL98ISR JKL98ISR added the feature Feature update or code change to the package label May 29, 2022
@JKL98ISR JKL98ISR added the vision Affects deepchecks.vision package label May 29, 2022
deepchecks/vision/batch_wrapper.py Show resolved Hide resolved
@@ -75,13 +89,19 @@ def __getitem__(self, index: int):

def __len__(self):
"""Return length of batch."""
return len(self._batch)
dataset = self._context.get_data_by_kind(self._dataset_kind)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure this is the best way to get batch length, maybe we should use len(batch_to_images(batch))
@noamzbr WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

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

batch_to_images not always implemented.
fixed case of sampled data

@JKL98ISR JKL98ISR enabled auto-merge (squash) May 29, 2022 13:04
@JKL98ISR JKL98ISR merged commit f76ba17 into main May 29, 2022
@delete-merged-branch delete-merged-branch bot deleted the static_vision_model branch May 29, 2022 13:17
@@ -75,13 +90,19 @@ def __getitem__(self, index: int):

def __len__(self):
"""Return length of batch."""
return len(self._batch)
dataset = self._context.get_data_by_kind(self._dataset_kind)
Copy link
Collaborator

Choose a reason for hiding this comment

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

@JKL98ISR Can you explain the logic of this code? Possible also in comments.
Seems to me like this returns the number of batches in the dataset.

Copy link
Member Author

Choose a reason for hiding this comment

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

it returns the length of the batch.
dataloader_len is the amount of batches the dataloader has

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature update or code change to the package vision Affects deepchecks.vision package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] support a df of predictions instead of providing a model
4 participants