Mercurial > repos > bgruening > keras_model_builder
comparison train_test_eval.py @ 5:ed7c222e47e3 draft
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 5b2ac730ec6d3b762faa9034eddd19ad1b347476"
author | bgruening |
---|---|
date | Mon, 16 Dec 2019 05:45:49 -0500 |
parents | 5f39cff2a372 |
children | 449a757be9c9 |
comparison
equal
deleted
inserted
replaced
4:65571555c486 | 5:ed7c222e47e3 |
---|---|
1 import argparse | 1 import argparse |
2 import joblib | 2 import joblib |
3 import json | 3 import json |
4 import numpy as np | 4 import numpy as np |
5 import os | |
5 import pandas as pd | 6 import pandas as pd |
6 import pickle | 7 import pickle |
7 import warnings | 8 import warnings |
8 from itertools import chain | 9 from itertools import chain |
9 from scipy.io import mmread | 10 from scipy.io import mmread |
27 | 28 |
28 _fit_and_score = try_get_attr('galaxy_ml.model_validations', '_fit_and_score') | 29 _fit_and_score = try_get_attr('galaxy_ml.model_validations', '_fit_and_score') |
29 setattr(_search, '_fit_and_score', _fit_and_score) | 30 setattr(_search, '_fit_and_score', _fit_and_score) |
30 setattr(_validation, '_fit_and_score', _fit_and_score) | 31 setattr(_validation, '_fit_and_score', _fit_and_score) |
31 | 32 |
32 N_JOBS = int(__import__('os').environ.get('GALAXY_SLOTS', 1)) | 33 N_JOBS = int(os.environ.get('GALAXY_SLOTS', 1)) |
33 CACHE_DIR = './cached' | 34 CACHE_DIR = os.path.join(os.getcwd(), 'cached') |
35 del os | |
34 NON_SEARCHABLE = ('n_jobs', 'pre_dispatch', 'memory', '_path', | 36 NON_SEARCHABLE = ('n_jobs', 'pre_dispatch', 'memory', '_path', |
35 'nthread', 'callbacks') | 37 'nthread', 'callbacks') |
36 ALLOWED_CALLBACKS = ('EarlyStopping', 'TerminateOnNaN', 'ReduceLROnPlateau', | 38 ALLOWED_CALLBACKS = ('EarlyStopping', 'TerminateOnNaN', 'ReduceLROnPlateau', |
37 'CSVLogger', 'None') | 39 'CSVLogger', 'None') |
38 | 40 |