Mercurial > repos > goeckslab > ludwig_render_config
annotate ludwig_train.py @ 0:ed8a9ea5bc73 draft default tip
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
author | goeckslab |
---|---|
date | Tue, 07 Jan 2025 22:45:58 +0000 |
parents | |
children |
rev | line source |
---|---|
0
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
1 import logging |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
2 import pickle |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
3 import sys |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
4 |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
5 from ludwig.train import cli |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
6 |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
7 from ludwig_experiment import ( |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
8 convert_parquet_to_csv, |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
9 generate_html_report, |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
10 make_visualizations |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
11 ) |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
12 |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
13 from model_unpickler import SafeUnpickler |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
14 |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
15 |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
16 logging.basicConfig(level=logging.DEBUG) |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
17 |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
18 setattr(pickle, 'Unpickler', SafeUnpickler) |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
19 |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
20 cli(sys.argv[1:]) |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
21 |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
22 ludwig_output_directory_name = "experiment_run" |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
23 |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
24 make_visualizations(ludwig_output_directory_name) |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
25 convert_parquet_to_csv( |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
26 ludwig_output_directory_name |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
27 ) |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
28 title = "Ludwig Train" |
ed8a9ea5bc73
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
goeckslab
parents:
diff
changeset
|
29 generate_html_report(title, ludwig_output_directory_name) |