class Inputs: train_data = Input('训练数据(Train Data)', DataLoader, default=True, replaces=['Data']) test_data = Input('测试数据(Test Data)', DataLoader, replaces=['Data']) model = Input('模型(Model)', nn.Module, replaces=['Model'])
def test_init(self): with patch("Orange.widgets.utils.signals._Signal.get_flags", return_value=42) as getflags: signal = Input("a name", int, "an id", "a doc", ["x"]) self.assertEqual(signal.name, "a name") self.assertEqual(signal.type, int) self.assertEqual(signal.id, "an id") self.assertEqual(signal.doc, "a doc") self.assertEqual(signal.replaces, ["x"]) self.assertEqual(signal.flags, 42) getflags.assert_called_with(False, False, False, False) Input("a name", int, "an id", "a doc", ["x"], multiple=True) getflags.assert_called_with(True, False, False, False) Input("a name", int, "an id", "a doc", ["x"], default=True) getflags.assert_called_with(False, True, False, False) Input("a name", int, "an id", "a doc", ["x"], explicit=True) getflags.assert_called_with(False, False, True, False)
def test_decorate(self): input = Input("a name", int) self.assertEqual(input.handler, "") @input def foo(): pass self.assertEqual(input.handler, "foo") with self.assertRaises(ValueError): @input def bar(): pass
class Inputs: tree = Input("Tree", TreeModel)
class Inputs: data = Input("Data", Table)
class Inputs: # Had different input names before merging from # Classification/Regression tree variants tree = Input("Tree", TreeModel, replaces=["Classification Tree", "Regression Tree"])
class Inputs(_OWGeneSets.OWGeneSets.Inputs): reference = Input("Reference Genes", Table)
class Inputs: data = Input("数据(Data)", Table, replaces=['Data']) reference = Input("参考(Reference)", Table, replaces=['Reference'])
class Inputs: data_table = Input('Data', Table) custom_sets = Input('Custom Gene Sets', Table)
class Inputs: data = Input("Epoch data", mne.Epochs)
class Inputs: data = Input("数据(Data)", Table, replaces=["Data"]) preprocessor = Input("预处理器(Preprocessor)", Preprocess, replaces=["Preprocessor"])
class Inputs: random_forest = Input("Random Forest", RandomForestModel, replaces=["Random forest"])
class Inputs: graph = Input("Graph", nx.Graph)
class Inputs: markers = Input("EEG Markers", EEGMarker, multiple=True) data = Input("Epoch data", mne.Epochs)
class Inputs: data = Input("数据(Data)", Table, replaces=['Data'])
class Inputs: data = Input('数据(Data)', Table, default=True, replaces=['Data'])
class Inputs: data = Input("数据", Table)
class Inputs: corpus = Input("Corpus", Corpus)
class Inputs: data = Input("Data", Table) reference = Input("Reference", Table)
class Inputs: genes = Input("Genes", Table)
class Inputs: tree = Input("树(Tree)", TreeModel, replaces=['Tree'])
class Inputs: data = Input("Data", Table, default=True)
class Inputs: data_table = Input("Data", Table)
class Inputs: network = Input("Network", network.Graph)
class Inputs: random_forest = Input("随机森林(Random forest)", RandomForestModel, replaces=['Data'])
class Inputs: data = Input("Data", Table, default=True) genes = Input("Genes", Table)
class Inputs: data = Input("Data", Table) preprocessor = Input("Preprocessor", Preprocess)
class Inputs: data = Input('Data', ImageDataBunch, default=True)
class Inputs: data = Input('Data', Table, default=True)
class Inputs: random_forest = Input("Random forest", RandomForestModel)