Пример #1
0
def pipeline_generator():
    sys.path.append(os.getcwd())
    import learn_ml.generators.python_generators as python_generators
    pygen = python_generators.PipelineGenerator(
        pipeline_config="./tests/files/test_pipeline.json",
        map_config="./tests/files/test_pipeline_map.json",
        out="./tests/files/test_pipeline_generator.txt")
    return pygen
Пример #2
0
    def test_init(self):
        sys.path.append(os.getcwd())
        import learn_ml.generators.python_generators as python_generators

        pipeline_generator = python_generators.PipelineGenerator(
            pipeline_config="./tests/files/test_pipeline.json",
            map_config="./tests/files/test_pipeline_map.json",
            out="./tests/files/test_pipeline_generator.txt")

        assert pipeline_generator.pipeline["dataset"]["label"] == "mnist"
        assert isinstance(pipeline_generator.pipeline["operations"]["train"],
                          list)
        assert isinstance(pipeline_generator.pipeline["operations"]["test"],
                          list)
Пример #3
0
def create_pipeline():
    pipe_gen = python_generators.PipelineGenerator(pipeline_config="project/pipeline.json",
                                                   map_config="learn_ml/generators/pipeline_map.json",
                                                   out="./project/pipelines/pipeline_1.py")
    pipe_gen.gen_pipeline()