Mercurial > repos > goeckslab > ludwig_predict
comparison ludwig_autogenconfig.py @ 4:afb22d7a0757 draft
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit 4dc221b2fa9717552787f0985ad3fc3df4460158
| author | goeckslab |
|---|---|
| date | Sat, 21 Jun 2025 15:05:04 +0000 |
| parents | 0a7b83ddda17 |
| children |
comparison
equal
deleted
inserted
replaced
| 3:11b1f328f312 | 4:afb22d7a0757 |
|---|---|
| 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) |
