question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Description

I followed the description to create a custom dataset here This one does not seem to be up to date.

Context

So that others avoids this problem by following the above example.

Possible Implementation

I needed to run the init of the inherrited class AbstractVersionedDataSet to get this working:

def __init__(self, filepath: str, version: Version = None):
        """Creates a new instance of SimulationDataSet to load / save simulation results (hff5-files) from Seaman at the given filepath.

        Args:
            filepath: The location of the simulation file to load / save data.
        """

        super().__init__(
            filepath=PurePosixPath(filepath),
            version=version,
        )

Possible Alternatives

I or someone else could perhaps update the example similar to the suggestion above?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
martinlarsalbertcommented, Dec 2, 2021

Aha then I guess that it works, if you say so, thanks! By the way if I want to install “latest” instead of “stable” can I do that from pypi or should I get it from GitHub instead?

1reaction
AntonyMilneQBcommented, Dec 2, 2021

@martinlarsalbert the difference is that in the latest documentation the dataset inherits from AbstractDataSet rather than AbstractVersionedDataSet. AbstractDataSet doesn’t define an __init__, so no need to do super().__init__.

Don’t worry about the commit, it’s not related - the notification is just an artefact of the way we sync between different repositories.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Writing Custom Datasets, DataLoaders and Transforms
utils.data.Dataset is an abstract class representing a dataset. Your custom dataset should inherit Dataset and override the following methods:.
Read more >
Creating a custom Dataset and Dataloader in Pytorch - Medium
Creating a custom Dataset and Dataloader in Pytorch · The Torch Dataset class is basically an abstract class representing the dataset. · The...
Read more >
04. PyTorch Custom Datasets
PyTorch has many built-in datasets used for a wide number of machine learning benchmarks, however, you'll often want to use your own custom...
Read more >
Custom dataset in Pytorch —Part 1. Images | by Utkarsh Garg
In this walkthrough, we'll learn how to load a custom image dataset for classification. The code for this walkthrough can also be found...
Read more >
How You can EASILY create Custom Datasets and Loaders!
Pytorch has some of the best tools to load your data and create datasets on the fly. We will cover examples of creating...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found