Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

s3_dataset_test.py 712 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  1. import unittest
  2. import os
  3. import shutil
  4. from super_gradients.training.datasets.dataset_interfaces.dataset_interface import ClassificationDatasetInterface
  5. class TestDataset(unittest.TestCase):
  6. def test_donwload_dataset(self):
  7. default_dataset_params = {"dataset_dir": os.path.expanduser("~/test_data/"),
  8. "s3_link": "s3://research-data1/data.zip"}
  9. dataset = ClassificationDatasetInterface(dataset_params=default_dataset_params)
  10. test_sample = dataset.get_test_sample()
  11. self.assertListEqual([3, 64, 64], list(test_sample[0].shape))
  12. shutil.rmtree(default_dataset_params["dataset_dir"])
  13. if __name__ == '__main__':
  14. unittest.main()
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...