Mercurial > repos > goeckslab > ludwig_config_generator
comparison ludwig_autogenconfig.py @ 4:36c5fcc49286 draft default tip
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit 4dc221b2fa9717552787f0985ad3fc3df4460158
author | goeckslab |
---|---|
date | Sat, 21 Jun 2025 15:05:41 +0000 |
parents | 183adfc24076 |
children |
comparison
equal
deleted
inserted
replaced
3:11d3377511bb | 4:36c5fcc49286 |
---|---|
1 import argparse | 1 import argparse |
2 import logging | 2 import logging |
3 | 3 |
4 from ludwig import automl | 4 from ludwig import automl |
5 from ludwig.utils import defaults | 5 from ludwig.utils import defaults |
6 | |
7 from pandas import read_csv | 6 from pandas import read_csv |
8 | 7 |
9 logging.basicConfig(level=logging.DEBUG) | 8 logging.basicConfig(level=logging.DEBUG) |
10 LOG = logging.getLogger(__name__) | 9 LOG = logging.getLogger(__name__) |
11 | 10 |
37 args = parser.parse_args() | 36 args = parser.parse_args() |
38 | 37 |
39 # get the output feature name | 38 # get the output feature name |
40 df = read_csv(args.dataset, nrows=2, sep=None, engine='python') | 39 df = read_csv(args.dataset, nrows=2, sep=None, engine='python') |
41 names = df.columns.tolist() | 40 names = df.columns.tolist() |
42 target = names[args.output_feature-1] | 41 target = names[args.output_feature - 1] |
43 | 42 |
44 args_init = ["--dataset", args.dataset, | 43 args_init = ["--dataset", args.dataset, |
45 "--target", target, | 44 "--target", target, |
46 "--output", args.output] | 45 "--output", args.output] |
47 automl.cli_init_config(args_init) | 46 automl.cli_init_config(args_init) |