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

#288 Add linter (flake8) check in CI

Merged
GitHub User merged 1 commits into Deci-AI:master from deci-ai:feature/SG-79-add-flake_8_linter
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  1. from unittest import TestCase
  2. from super_gradients.training.datasets.all_datasets import SgLibraryDatasets, DatasetInterface
  3. class TestSgLibraryDatasets(TestCase):
  4. def setUp(self) -> None:
  5. self.sg_library_datasets = SgLibraryDatasets
  6. def test_get_all_datasets(self):
  7. all_datasets = self.sg_library_datasets.get_all_available_datasets()
  8. self.assertIsInstance(all_datasets, dict)
  9. def test_get_dateset(self):
  10. cifar_100 = self.sg_library_datasets.get_dataset('classification', 'cifar_100')
  11. self.assertTrue(issubclass(cifar_100, DatasetInterface))
  12. def test_get_dateset_with_invalid_dataset_name_raises_exception(self):
  13. with self.assertRaises(ValueError):
  14. self.sg_library_datasets.get_dataset('classification', 'cifar_1000000')
  15. def test_get_dateset_with_invalid_dl_task_raises_exception(self):
  16. with self.assertRaises(ValueError):
  17. self.sg_library_datasets.get_dataset('classification_of_something_that_deci_does_not_support', 'cifar_100')
Discard
Tip!

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