How to use the mlblocks.mlpipeline.MLPipeline._get_outputs function in mlblocks

To help you get started, we’ve selected a few mlblocks examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github HDI-Project / MLBlocks / tests / test_mlpipeline.py View on Github external
def test__get_outputs_additional(self):
        self_ = MagicMock(autospec=MLPipeline)

        pipeline = {
            'outputs': {
                'default': ['some', 'outputs'],
                'additional': ['other', 'outputs']
            }
        }
        outputs = None
        returned = MLPipeline._get_outputs(self_, pipeline, outputs)

        expected = {
            'default': ['some', 'outputs'],
            'additional': ['other', 'outputs']
        }
        assert returned == expected
        self_._get_block_outputs.assert_not_called()
github HDI-Project / MLBlocks / tests / test_mlpipeline.py View on Github external
def test__get_outputs_defaults(self):
        self_ = MagicMock(autospec=MLPipeline)

        pipeline = dict()
        outputs = {
            'default': ['some', 'outputs']
        }
        returned = MLPipeline._get_outputs(self_, pipeline, outputs)

        expected = {
            'default': ['some', 'outputs']
        }
        assert returned == expected
        self_._get_block_outputs.assert_not_called()
github HDI-Project / MLBlocks / tests / test_mlpipeline.py View on Github external
def test__get_outputs_no_outputs(self):
        self_ = MagicMock(autospec=MLPipeline)

        self_._last_block_name = 'last_block'
        self_._get_block_outputs.return_value = ['some', 'outputs']

        pipeline = dict()
        outputs = None
        returned = MLPipeline._get_outputs(self_, pipeline, outputs)

        expected = {
            'default': ['some', 'outputs']
        }
        assert returned == expected

        self_._get_block_outputs.assert_called_once_with('last_block')