def execute(self):
     super().execute()
     Collector.collect(
         self.get_int_value(Key.AMOUNT),
         self.get_int_value(Key.SIZE),
         self.arguments.get(Key.NAME),
         self.arguments.get(Key.PATH),
     )
 def execute(self):
     super().execute()
     Collector.collect(
         amount=self.get_int_value(Key.AMOUNT),
         size=self.get_int_value(Key.SIZE),
         name=self.arguments.get(Key.NAME),
         path=self.arguments.get(Key.PATH),
     )
Example #3
0
def test_collect():
    data = Collector.collect(5, 128, 'unlabeled_matrices',
                             'modules/shared/data/')
    assert len(data) == 5
    for matrix in data:
        plt.spy(matrix.todense())
        plt.show()
    created_file = h5py.File('modules/shared/data/unlabeled_matrices.hdf5',
                             'r')
    print(created_file['dense_matrices'])
Example #4
0
 def __register_output_service(self):
     Collector.set_output_service(self.__output_service)
     LabelingModule.set_output_service(self.__output_service)
     TrainingModule.set_output_service(self.__output_service)
     Classifier.set_output_service(self.__output_service)
Example #5
0
def test_saver_has_calls(mocked_saver):
    Collector.collect(5, 128, "name", " path")
    mocked_saver.assert_called_once()
Example #6
0
def test_collector_raises_exception_when_not_on_linux():
    with pytest.raises(InvalidOSException):
        Collector.collect(0, 0, "", "")
Example #7
0
def test_collect():
    data = Collector.collect(5, 128, 'unlabeled_matrices', 'data/')
    assert len(data) == 5
    created_file = h5py.File('data/unlabeled_matrices.hdf5', 'r')
    print(created_file['dense_matrices'])