示例#1
0
def run_optimize(args, logger):
    from lib.RLTrader import RLTrader

    trader = RLTrader(**vars(args),
                      logger=logger,
                      reward_strategy=reward_strategy)
    trader.optimize(n_trials=args.trials)
示例#2
0
def optimize_code(params):
    from lib.RLTrader import RLTrader

    trader = RLTrader(**params)
    trader.optimize()

    return ""
示例#3
0
import numpy as np

from lib.RLTrader import RLTrader
from lib.TraderArgs import TraderArgs
from lib.util.logger import init_logger

np.warnings.filterwarnings('ignore')
option_parser = TraderArgs()
args = option_parser.get_args()

if __name__ == '__main__':
    logger = init_logger(__name__, show_debug=args.debug)
    trader = RLTrader(**vars(args), logger=logger)

    if args.command == 'optimize':
        trader.optimize(n_trials=args.trials,
                        n_parallel_jobs=args.parallel_jobs)
    elif args.command == 'train':
        trader.train(n_epochs=args.epochs)
    elif args.command == 'test':
        trader.test(model_epoch=args.model_epoch, should_render=args.no_render)
    elif args.command == 'opt-train-test':
        trader.optimize(args.trials, args.parallel_jobs)
        trader.train(n_epochs=args.train_epochs,
                     test_trained_model=args.no_test,
                     render_trained_model=args.no_render)
示例#4
0
import numpy as np

from lib.RLTrader import RLTrader

np.warnings.filterwarnings('ignore')

if __name__ == '__main__':
    trader = RLTrader()

    trader.optimize()
    trader.train(test_trained_model=True, render_trained_model=True)
示例#5
0
def optimize_code(params):
    trader = RLTrader(**params)
    trader.optimize()
示例#6
0
def run_optimize(args, logger):
    from lib.RLTrader import RLTrader

    trader = RLTrader(**vars(args), logger=logger)
    trader.optimize(args.trials)
示例#7
0
def run_concurrent_optimize(trader: RLTrader, args):
    trader.optimize(args.trials, args.trials, args.parallel_jobs)
示例#8
0
def run_concurrent_optimize():
    trader = RLTrader(**vars(args))
    trader.optimize(args.trials)