Example #1
0
def dbnd_on_pre_init_context(ctx):
    # register configs
    from dbnd_examples.pipelines.wine_quality import wine_quality_decorators
    from dbnd_examples import feature_data

    str([wine_quality_decorators, feature_data])
    config.set_from_config_file(dbnd_examples_data_path("examples_config.cfg"))
Example #2
0
def dbnd_setup_plugin():
    # register configs
    from dbnd_examples.pipelines.wine_quality import wine_quality_decorators
    from dbnd_examples import feature_data

    str([wine_quality_decorators, feature_data])
    config.set_from_config_file(dbnd_examples_data_path("examples_config.cfg"))
Example #3
0
class BeamWordCount(ApacheBeamPythonTask):
    py_file = dbnd_examples_data_path(
        "dbnd_gcp/tool_dataflow/pybeam/wordcount.py")

    input = beam_input
    output = beam_output

    def get_beam_task_options(self):
        self.output.mkdir()
        return {"input": self.input, "output": self.output}
Example #4
0
def dbnd_setup_plugin():
    # register configs
    from dbnd_examples.orchestration.examples import wine_quality

    str([wine_quality])
    try:
        config.set_from_config_file(dbnd_examples_data_path("examples_config.cfg"))
    except Exception:
        logger.warning(
            "Could not load examples_config.cfg! Automatic data loading for dbnd-examples is disabled!"
        )
Example #5
0
def dbnd_setup_plugin():
    # register configs
    from dbnd_examples.pipelines.wine_quality import wine_quality_decorators
    from dbnd_examples import feature_data

    str([wine_quality_decorators, feature_data])
    try:
        config.set_from_config_file(
            dbnd_examples_data_path("examples_config.cfg"))
    except Exception as e:
        logger.warning(
            "Could not load examples_config.cfg! Automatic data loading for dbnd-examples is disabled!"
        )
Example #6
0
 def test_prepare_data(self):
     task = wine_quality_decorators.prepare_data.t(
         raw_data=dbnd_examples_data_path("wine_quality.csv.gz"))
     assert_run_task(task)
Example #7
0
 def test_wine_quality_gz(self):
     task = PredictWineQuality(
         data=dbnd_examples_data_path("wine_quality.csv.gz"))
     assert_run_task(task)