diff --git a/README.md b/README.md index 4d7c0a4a..7876a86e 100644 --- a/README.md +++ b/README.md @@ -204,11 +204,15 @@ _Notice: data shaping approach is under development, expect some changes. [7.01. - [ ] risk-sensitive agents implementation; - [x] sequential and sliding time-window sampling; - [x] multiply instruments trading; - - [x] docker image; - CPU version + - [x] docker image; - CPU version, `Signalprime` contribution, - [ ] TF serving model serialisation functionality; ### [News and updates:](#title) +- 10.01.2019: + - **docker CPU version** is now available, contributed by `Signalprime`, + (https://github.com/signalprime), see `btgym/docker/README.md` for details; + - 9.02.2019: - **Introduction to analytic data model** notebook added to [model_based_stat_arb](./examples/model_based_stat_arb/) examples folder. diff --git a/btgym/algorithms/worker.py b/btgym/algorithms/worker.py index 96803b07..5eec019a 100644 --- a/btgym/algorithms/worker.py +++ b/btgym/algorithms/worker.py @@ -214,8 +214,8 @@ def run(self): job_name='worker', task_index=self.task, config=tf.ConfigProto( - intra_op_parallelism_threads=1, # original was: 1 - inter_op_parallelism_threads=2 # original was: 2 + intra_op_parallelism_threads=4, # original was: 1 + inter_op_parallelism_threads=4, # original was: 2 ) ) self.log.debug('tf.server started.') diff --git a/btgym/research/model_based/model/rec.py b/btgym/research/model_based/model/rec.py index e8831314..643de6c6 100644 --- a/btgym/research/model_based/model/rec.py +++ b/btgym/research/model_based/model/rec.py @@ -177,7 +177,7 @@ def _update_embed(self, x, disjoint=False): if set to True - discards embedded trajectory already being kept. Returns: - embedded update + embedded update/home/muzikin/Repos/ml_serving """ assert len(x.shape) == 1, 'Expected 1d trajectory but got input shaped: {}'.format(x.shape) diff --git a/examples/unreal_stacked_lstm_strat_4_11.ipynb b/examples/unreal_stacked_lstm_strat_4_11.ipynb index 116c62ea..34225a4d 100644 --- a/examples/unreal_stacked_lstm_strat_4_11.ipynb +++ b/examples/unreal_stacked_lstm_strat_4_11.ipynb @@ -2,11 +2,25 @@ "cells": [ { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": { - "collapsed": true + "scrolled": false }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING: Logging before flag parsing goes to stderr.\n", + "W0501 12:37:55.281946 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/worker.py:19: The name tf.logging.set_verbosity is deprecated. Please use tf.compat.v1.logging.set_verbosity instead.\n", + "\n", + "W0501 12:37:55.282888 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/worker.py:19: The name tf.logging.INFO is deprecated. Please use tf.compat.v1.logging.INFO instead.\n", + "\n", + "W0501 12:37:55.283457 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/worker.py:22: The name tf.train.Saver is deprecated. Please use tf.compat.v1.train.Saver instead.\n", + "\n" + ] + } + ], "source": [ "import warnings\n", "warnings.filterwarnings(\"ignore\") # suppress h5py deprecation warning\n", @@ -54,11 +68,17 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": true - }, - "outputs": [], + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "BTgymDataset class is DEPRECATED, use btgym.datafeed.derivative.BTgymDataset2 instead.\n" + ] + } + ], "source": [ "# Set backtesting engine parameters:\n", "\n", @@ -161,11 +181,697 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": { - "scrolled": false + "scrolled": true }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " already exists. Override[y/n]? y\n", + "[2019-05-01 09:38:23.514035] NOTICE: LauncherShell: files in: /home/muzikin/tmp/test_4_11 purged.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "W0501 12:38:24.120093 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/worker.py:191: The name tf.reset_default_graph is deprecated. Please use tf.compat.v1.reset_default_graph instead.\n", + "\n", + "W0501 12:38:24.126140 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/worker.py:201: The name tf.train.Server is deprecated. Please use tf.distribute.Server instead.\n", + "W0501 12:38:24.126061 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/worker.py:191: The name tf.reset_default_graph is deprecated. Please use tf.compat.v1.reset_default_graph instead.\n", + "\n", + "\n", + "W0501 12:38:24.129139 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/worker.py:205: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.\n", + "\n", + "W0501 12:38:24.129642 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/worker.py:212: The name tf.train.Server is deprecated. Please use tf.distribute.Server instead.\n", + "\n", + "W0501 12:38:24.135105 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/worker.py:216: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.\n", + "\n", + "W0501 12:38:26.394120 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:221: The name tf.set_random_seed is deprecated. Please use tf.compat.v1.set_random_seed instead.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2019-05-01 09:38:26.406598] NOTICE: UNREAL_0: learn_rate: 0.000100, entropy_beta: 0.050000\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "W0501 12:38:26.408271 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:428: The name tf.train.replica_device_setter is deprecated. Please use tf.compat.v1.train.replica_device_setter instead.\n", + "\n", + "W0501 12:38:26.410790 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:860: The name tf.variable_scope is deprecated. Please use tf.compat.v1.variable_scope instead.\n", + "\n", + "W0501 12:38:26.415243 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/utils.py:52: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.\n", + "\n", + "W0501 12:38:26.479786 139801407391552 deprecation.py:506] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/networks.py:58: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.\n", + "W0501 12:38:26.620964 139801407391552 deprecation.py:323] From /home/muzikin/Repos/btgym/btgym/algorithms/policy/stacked_lstm.py:189: flatten (from tensorflow.python.layers.core) is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Use keras.layers.flatten instead.\n", + "W0501 12:38:27.009598 139801407391552 deprecation.py:323] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/layers.py:34: multinomial (from tensorflow.python.ops.random_ops) is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Use `tf.random.categorical` instead.\n", + "W0501 12:38:27.031301 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/networks.py:140: The name tf.nn.rnn_cell.DropoutWrapper is deprecated. Please use tf.compat.v1.nn.rnn_cell.DropoutWrapper instead.\n", + "\n", + "W0501 12:38:27.035575 139801407391552 deprecation.py:323] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/networks.py:144: MultiRNNCell.__init__ (from tensorflow.python.ops.rnn_cell_impl) is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "This class is equivalent as tf.keras.layers.StackedRNNCells, and will be replaced by that in Tensorflow 2.0.\n", + "W0501 12:38:27.068239 139801407391552 deprecation.py:323] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/networks.py:159: static_rnn (from tensorflow.python.ops.rnn) is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Please use `keras.layers.RNN(cell, unroll=True)`, which is equivalent to this API\n", + "W0501 12:38:27.583704 139801407391552 deprecation.py:506] From /home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/tensorflow/python/ops/init_ops.py:1251: calling VarianceScaling.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Call initializer instance with the dtype argument instead of passing it to the constructor\n", + "W0501 12:38:28.853516 139801407391552 deprecation.py:506] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:827: calling Constant.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Call initializer instance with the dtype argument instead of passing it to the constructor\n", + "W0501 12:38:29.136342 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/worker.py:191: The name tf.reset_default_graph is deprecated. Please use tf.compat.v1.reset_default_graph instead.\n", + "\n", + "W0501 12:38:29.142140 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/worker.py:212: The name tf.train.Server is deprecated. Please use tf.distribute.Server instead.\n", + "\n", + "W0501 12:38:29.142348 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/worker.py:191: The name tf.reset_default_graph is deprecated. Please use tf.compat.v1.reset_default_graph instead.\n", + "W0501 12:38:29.149414 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/worker.py:216: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.\n", + "\n", + "\n", + "W0501 12:38:29.150807 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/worker.py:191: The name tf.reset_default_graph is deprecated. Please use tf.compat.v1.reset_default_graph instead.\n", + "W0501 12:38:29.153527 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/worker.py:212: The name tf.train.Server is deprecated. Please use tf.distribute.Server instead.\n", + "\n", + "\n", + "W0501 12:38:29.159186 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/worker.py:212: The name tf.train.Server is deprecated. Please use tf.distribute.Server instead.\n", + "\n", + "W0501 12:38:29.157516 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/worker.py:216: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.\n", + "W0501 12:38:29.161225 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/worker.py:216: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.\n", + "\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "********************************************************************************************\n", + "** Press `Ctrl-C` or jupyter:[Kernel]->[Interrupt] to stop training and close launcher. **\n", + "********************************************************************************************\n", + "\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "W0501 12:38:30.301744 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:221: The name tf.set_random_seed is deprecated. Please use tf.compat.v1.set_random_seed instead.\n", + "\n", + "W0501 12:38:30.305003 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:221: The name tf.set_random_seed is deprecated. Please use tf.compat.v1.set_random_seed instead.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2019-05-01 09:38:30.307060] NOTICE: UNREAL_1: learn_rate: 0.000100, entropy_beta: 0.050000\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "W0501 12:38:30.308536 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:428: The name tf.train.replica_device_setter is deprecated. Please use tf.compat.v1.train.replica_device_setter instead.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2019-05-01 09:38:30.310888] NOTICE: UNREAL_2: learn_rate: 0.000100, entropy_beta: 0.050000\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "W0501 12:38:30.312513 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:428: The name tf.train.replica_device_setter is deprecated. Please use tf.compat.v1.train.replica_device_setter instead.\n", + "W0501 12:38:30.312589 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:860: The name tf.variable_scope is deprecated. Please use tf.compat.v1.variable_scope instead.\n", + "\n", + "W0501 12:38:30.315204 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:860: The name tf.variable_scope is deprecated. Please use tf.compat.v1.variable_scope instead.\n", + "\n", + "W0501 12:38:30.315888 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:221: The name tf.set_random_seed is deprecated. Please use tf.compat.v1.set_random_seed instead.\n", + "W0501 12:38:30.317957 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/utils.py:52: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.\n", + "\n", + "\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2019-05-01 09:38:30.321333] NOTICE: UNREAL_3: learn_rate: 0.000100, entropy_beta: 0.050000\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "W0501 12:38:30.323216 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:428: The name tf.train.replica_device_setter is deprecated. Please use tf.compat.v1.train.replica_device_setter instead.\n", + "W0501 12:38:30.333499 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/utils.py:52: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.\n", + "\n", + "\n", + "W0501 12:38:30.338224 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:860: The name tf.variable_scope is deprecated. Please use tf.compat.v1.variable_scope instead.\n", + "\n", + "W0501 12:38:30.341470 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/utils.py:52: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.\n", + "\n", + "W0501 12:38:30.414032 139801407391552 deprecation.py:506] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/networks.py:58: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.W0501 12:38:30.414503 139801407391552 deprecation.py:506] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/networks.py:58: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.\n", + "\n", + "W0501 12:38:30.431789 139801407391552 deprecation.py:506] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/networks.py:58: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.\n", + "W0501 12:38:30.532077 139801407391552 deprecation.py:323] From /home/muzikin/Repos/btgym/btgym/algorithms/policy/stacked_lstm.py:189: flatten (from tensorflow.python.layers.core) is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Use keras.layers.flatten instead.\n", + "W0501 12:38:30.566405 139801407391552 deprecation.py:323] From /home/muzikin/Repos/btgym/btgym/algorithms/policy/stacked_lstm.py:189: flatten (from tensorflow.python.layers.core) is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Use keras.layers.flatten instead.\n", + "W0501 12:38:30.589377 139801407391552 deprecation.py:323] From /home/muzikin/Repos/btgym/btgym/algorithms/policy/stacked_lstm.py:189: flatten (from tensorflow.python.layers.core) is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Use keras.layers.flatten instead.\n", + "W0501 12:38:30.806571 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:463: The name tf.train.polynomial_decay is deprecated. Please use tf.compat.v1.train.polynomial_decay instead.\n", + "\n", + "W0501 12:38:30.817833 139801407391552 deprecation.py:323] From /home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/tensorflow/python/keras/optimizer_v2/learning_rate_schedule.py:417: div (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Deprecated in favor of operator or tf.math.divide.\n", + "W0501 12:38:30.859029 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/losses.py:34: The name tf.losses.mean_squared_error is deprecated. Please use tf.compat.v1.losses.mean_squared_error instead.\n", + "\n", + "W0501 12:38:30.923352 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/losses.py:43: The name tf.summary.scalar is deprecated. Please use tf.compat.v1.summary.scalar instead.\n", + "\n", + "W0501 12:38:30.945428 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:636: The name tf.train.AdamOptimizer is deprecated. Please use tf.compat.v1.train.AdamOptimizer instead.\n", + "\n", + "W0501 12:38:31.039243 139801407391552 deprecation.py:323] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/layers.py:34: multinomial (from tensorflow.python.ops.random_ops) is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Use `tf.random.categorical` instead.\n", + "W0501 12:38:31.079536 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/networks.py:140: The name tf.nn.rnn_cell.DropoutWrapper is deprecated. Please use tf.compat.v1.nn.rnn_cell.DropoutWrapper instead.\n", + "\n", + "W0501 12:38:31.083827 139801407391552 deprecation.py:323] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/networks.py:144: MultiRNNCell.__init__ (from tensorflow.python.ops.rnn_cell_impl) is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "This class is equivalent as tf.keras.layers.StackedRNNCells, and will be replaced by that in Tensorflow 2.0.\n", + "W0501 12:38:31.117558 139801407391552 deprecation.py:323] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/layers.py:34: multinomial (from tensorflow.python.ops.random_ops) is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Use `tf.random.categorical` instead.\n", + "W0501 12:38:31.128330 139801407391552 deprecation.py:323] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/networks.py:159: static_rnn (from tensorflow.python.ops.rnn) is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Please use `keras.layers.RNN(cell, unroll=True)`, which is equivalent to this API\n", + "W0501 12:38:31.141059 139801407391552 deprecation.py:323] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/layers.py:34: multinomial (from tensorflow.python.ops.random_ops) is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Use `tf.random.categorical` instead.\n", + "W0501 12:38:31.158703 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/networks.py:140: The name tf.nn.rnn_cell.DropoutWrapper is deprecated. Please use tf.compat.v1.nn.rnn_cell.DropoutWrapper instead.\n", + "\n", + "W0501 12:38:31.170001 139801407391552 deprecation.py:323] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/networks.py:144: MultiRNNCell.__init__ (from tensorflow.python.ops.rnn_cell_impl) is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "This class is equivalent as tf.keras.layers.StackedRNNCells, and will be replaced by that in Tensorflow 2.0.\n", + "W0501 12:38:31.203523 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/networks.py:140: The name tf.nn.rnn_cell.DropoutWrapper is deprecated. Please use tf.compat.v1.nn.rnn_cell.DropoutWrapper instead.\n", + "\n", + "W0501 12:38:31.211045 139801407391552 deprecation.py:323] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/networks.py:144: MultiRNNCell.__init__ (from tensorflow.python.ops.rnn_cell_impl) is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "This class is equivalent as tf.keras.layers.StackedRNNCells, and will be replaced by that in Tensorflow 2.0.\n", + "W0501 12:38:31.234858 139801407391552 deprecation.py:323] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/networks.py:159: static_rnn (from tensorflow.python.ops.rnn) is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Please use `keras.layers.RNN(cell, unroll=True)`, which is equivalent to this API\n", + "W0501 12:38:31.284226 139801407391552 deprecation.py:323] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/networks.py:159: static_rnn (from tensorflow.python.ops.rnn) is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Please use `keras.layers.RNN(cell, unroll=True)`, which is equivalent to this API\n", + "W0501 12:38:31.757507 139801407391552 deprecation.py:506] From /home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/tensorflow/python/ops/init_ops.py:1251: calling VarianceScaling.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Call initializer instance with the dtype argument instead of passing it to the constructor\n", + "W0501 12:38:31.885086 139801407391552 deprecation.py:506] From /home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/tensorflow/python/ops/init_ops.py:1251: calling VarianceScaling.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Call initializer instance with the dtype argument instead of passing it to the constructor\n", + "W0501 12:38:31.947027 139801407391552 deprecation.py:506] From /home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/tensorflow/python/ops/init_ops.py:1251: calling VarianceScaling.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Call initializer instance with the dtype argument instead of passing it to the constructor\n", + "W0501 12:38:33.218857 139801407391552 deprecation.py:506] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:827: calling Constant.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Call initializer instance with the dtype argument instead of passing it to the constructor\n", + "W0501 12:38:33.296944 139801407391552 deprecation.py:506] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:827: calling Constant.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Call initializer instance with the dtype argument instead of passing it to the constructor\n", + "W0501 12:38:33.465772 139801407391552 deprecation.py:506] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:827: calling Constant.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Call initializer instance with the dtype argument instead of passing it to the constructor\n", + "W0501 12:38:34.013138 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:704: The name tf.summary.merge is deprecated. Please use tf.compat.v1.summary.merge instead.\n", + "\n", + "W0501 12:38:34.018737 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:729: The name tf.summary.image is deprecated. Please use tf.compat.v1.summary.image instead.\n", + "\n", + "W0501 12:38:34.044258 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/worker.py:313: The name tf.initializers.variables is deprecated. Please use tf.compat.v1.initializers.variables instead.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2019-05-01 09:38:34.843608] NOTICE: Worker_0: initializing all parameters...\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "W0501 12:38:35.161447 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:463: The name tf.train.polynomial_decay is deprecated. Please use tf.compat.v1.train.polynomial_decay instead.\n", + "\n", + "W0501 12:38:35.174301 139801407391552 deprecation.py:323] From /home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/tensorflow/python/keras/optimizer_v2/learning_rate_schedule.py:417: div (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Deprecated in favor of operator or tf.math.divide.\n", + "W0501 12:38:35.218007 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/losses.py:34: The name tf.losses.mean_squared_error is deprecated. Please use tf.compat.v1.losses.mean_squared_error instead.\n", + "\n", + "W0501 12:38:35.244060 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:463: The name tf.train.polynomial_decay is deprecated. Please use tf.compat.v1.train.polynomial_decay instead.\n", + "\n", + "W0501 12:38:35.256249 139801407391552 deprecation.py:323] From /home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/tensorflow/python/keras/optimizer_v2/learning_rate_schedule.py:417: div (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Deprecated in favor of operator or tf.math.divide.\n", + "W0501 12:38:35.264313 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/losses.py:43: The name tf.summary.scalar is deprecated. Please use tf.compat.v1.summary.scalar instead.\n", + "\n", + "W0501 12:38:35.277047 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:636: The name tf.train.AdamOptimizer is deprecated. Please use tf.compat.v1.train.AdamOptimizer instead.\n", + "\n", + "W0501 12:38:35.307018 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/losses.py:34: The name tf.losses.mean_squared_error is deprecated. Please use tf.compat.v1.losses.mean_squared_error instead.\n", + "\n", + "W0501 12:38:35.350171 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/losses.py:43: The name tf.summary.scalar is deprecated. Please use tf.compat.v1.summary.scalar instead.\n", + "\n", + "W0501 12:38:35.361384 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:636: The name tf.train.AdamOptimizer is deprecated. Please use tf.compat.v1.train.AdamOptimizer instead.\n", + "\n", + "W0501 12:38:35.498770 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:463: The name tf.train.polynomial_decay is deprecated. Please use tf.compat.v1.train.polynomial_decay instead.\n", + "\n", + "W0501 12:38:35.508708 139801407391552 deprecation.py:323] From /home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/tensorflow/python/keras/optimizer_v2/learning_rate_schedule.py:417: div (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Deprecated in favor of operator or tf.math.divide.\n", + "W0501 12:38:35.559430 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/losses.py:34: The name tf.losses.mean_squared_error is deprecated. Please use tf.compat.v1.losses.mean_squared_error instead.\n", + "\n", + "W0501 12:38:35.602700 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/nn/losses.py:43: The name tf.summary.scalar is deprecated. Please use tf.compat.v1.summary.scalar instead.\n", + "\n", + "I0501 12:38:35.605363 139801407391552 session_manager.py:500] Running local_init_op.\n", + "W0501 12:38:35.618116 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:636: The name tf.train.AdamOptimizer is deprecated. Please use tf.compat.v1.train.AdamOptimizer instead.\n", + "\n", + "I0501 12:38:35.811869 139801407391552 session_manager.py:502] Done running local_init_op.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2019-05-01 09:38:35.813111] NOTICE: Worker_0: no saved model parameters found in:\n", + "/home/muzikin/tmp/pre_trained_model/test_4_11\n", + "[2019-05-01 09:38:35.927841] NOTICE: Worker_0: no saved model parameters found in:\n", + "/home/muzikin/tmp/test_4_11/current_train_checkpoint\n", + "[2019-05-01 09:38:35.928963] NOTICE: Worker_0: training from scratch...\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "W0501 12:38:35.930952 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/worker.py:367: The name tf.summary.FileWriter is deprecated. Please use tf.compat.v1.summary.FileWriter instead.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2019-05-01 09:38:37.420617] NOTICE: BTgymDataServer_0: Initial global_time set to: 2017-01-01 03:00:00 / stamp: 1483228800.0\n", + "[2019-05-01 09:38:37.572177] NOTICE: Worker_0: started training at step: 0\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "W0501 12:38:38.438426 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:704: The name tf.summary.merge is deprecated. Please use tf.compat.v1.summary.merge instead.\n", + "\n", + "W0501 12:38:38.448212 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:729: The name tf.summary.image is deprecated. Please use tf.compat.v1.summary.image instead.\n", + "\n", + "W0501 12:38:38.470903 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/worker.py:313: The name tf.initializers.variables is deprecated. Please use tf.compat.v1.initializers.variables instead.\n", + "\n", + "W0501 12:38:38.486378 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:704: The name tf.summary.merge is deprecated. Please use tf.compat.v1.summary.merge instead.\n", + "\n", + "W0501 12:38:38.497119 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:729: The name tf.summary.image is deprecated. Please use tf.compat.v1.summary.image instead.\n", + "\n", + "W0501 12:38:38.521061 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/worker.py:313: The name tf.initializers.variables is deprecated. Please use tf.compat.v1.initializers.variables instead.\n", + "\n", + "W0501 12:38:38.806043 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:704: The name tf.summary.merge is deprecated. Please use tf.compat.v1.summary.merge instead.\n", + "\n", + "W0501 12:38:38.812782 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/aac.py:729: The name tf.summary.image is deprecated. Please use tf.compat.v1.summary.image instead.\n", + "\n", + "W0501 12:38:38.836258 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/worker.py:313: The name tf.initializers.variables is deprecated. Please use tf.compat.v1.initializers.variables instead.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2019-05-01 09:38:39.408251] NOTICE: Worker_2: initializing all parameters...\n", + "[2019-05-01 09:38:39.470794] NOTICE: Worker_1: initializing all parameters...\n", + "[2019-05-01 09:38:39.857457] NOTICE: Worker_3: initializing all parameters...\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "I0501 12:38:40.195459 139801407391552 session_manager.py:500] Running local_init_op.\n", + "I0501 12:38:40.255829 139801407391552 session_manager.py:500] Running local_init_op.\n", + "I0501 12:38:40.448325 139801407391552 session_manager.py:502] Done running local_init_op.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2019-05-01 09:38:40.449941] NOTICE: Worker_2: no saved model parameters found in:\n", + "/home/muzikin/tmp/pre_trained_model/test_4_11\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "I0501 12:38:40.544522 139801407391552 session_manager.py:502] Done running local_init_op.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2019-05-01 09:38:40.545895] NOTICE: Worker_1: no saved model parameters found in:\n", + "/home/muzikin/tmp/pre_trained_model/test_4_11\n", + "[2019-05-01 09:38:40.605498] NOTICE: Worker_2: no saved model parameters found in:\n", + "/home/muzikin/tmp/test_4_11/current_train_checkpoint\n", + "[2019-05-01 09:38:40.606864] NOTICE: Worker_2: training from scratch...\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "W0501 12:38:40.609505 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/worker.py:367: The name tf.summary.FileWriter is deprecated. Please use tf.compat.v1.summary.FileWriter instead.\n", + "\n", + "I0501 12:38:40.731080 139801407391552 session_manager.py:500] Running local_init_op.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2019-05-01 09:38:40.737775] NOTICE: Worker_1: no saved model parameters found in:\n", + "/home/muzikin/tmp/test_4_11/current_train_checkpoint\n", + "[2019-05-01 09:38:40.745865] NOTICE: Worker_1: training from scratch...\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "W0501 12:38:40.749837 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/worker.py:367: The name tf.summary.FileWriter is deprecated. Please use tf.compat.v1.summary.FileWriter instead.\n", + "\n", + "I0501 12:38:40.983467 139801407391552 session_manager.py:502] Done running local_init_op.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2019-05-01 09:38:40.985029] NOTICE: Worker_3: no saved model parameters found in:\n", + "/home/muzikin/tmp/pre_trained_model/test_4_11\n", + "[2019-05-01 09:38:41.111817] NOTICE: Worker_3: no saved model parameters found in:\n", + "/home/muzikin/tmp/test_4_11/current_train_checkpoint\n", + "[2019-05-01 09:38:41.112857] NOTICE: Worker_3: training from scratch...\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "W0501 12:38:41.114001 139801407391552 deprecation_wrapper.py:119] From /home/muzikin/Repos/btgym/btgym/algorithms/worker.py:367: The name tf.summary.FileWriter is deprecated. Please use tf.compat.v1.summary.FileWriter instead.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2019-05-01 09:38:42.189233] NOTICE: Worker_2: started training at step: 0\n", + "[2019-05-01 09:38:42.270320] NOTICE: Worker_1: started training at step: 0\n", + "[2019-05-01 09:38:42.632287] NOTICE: Worker_3: started training at step: 0\n", + "[2019-05-01 09:43:38.028686] NOTICE: Worker_0: env. step: 66070; cluster speed: 219 step/sec; checkpoint saved.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "W0501 12:48:38.232499 139801407391552 deprecation.py:323] From /home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/tensorflow/python/training/saver.py:960: remove_checkpoint (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "Use standard file APIs to delete files with this prefix.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2019-05-01 09:48:38.251251] NOTICE: Worker_0: env. step: 134321; cluster speed: 227 step/sec; checkpoint saved.\n", + "[2019-05-01 09:53:38.568674] NOTICE: Worker_0: env. step: 202690; cluster speed: 227 step/sec; checkpoint saved.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Process BTgymServer-3:1:\n", + "Process BTgymServer-5:1:\n", + "Process BTgymDataFeedServer-2:1:\n", + "Process BTgymServer-4:1:\n", + "Traceback (most recent call last):\n", + "Traceback (most recent call last):\n", + "Traceback (most recent call last):\n", + "Traceback (most recent call last):\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/multiprocessing/process.py\", line 258, in _bootstrap\n", + " self.run()\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/multiprocessing/process.py\", line 258, in _bootstrap\n", + " self.run()\n", + " File \"/home/muzikin/Repos/btgym/btgym/server.py\", line 713, in run\n", + " episode = cerebro.run(stdstats=True, preload=False, oldbuysell=True)[0]\n", + " File \"/home/muzikin/Repos/btgym/btgym/server.py\", line 713, in run\n", + " episode = cerebro.run(stdstats=True, preload=False, oldbuysell=True)[0]\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/backtrader/cerebro.py\", line 1127, in run\n", + " runstrat = self.runstrategies(iterstrat)\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/backtrader/cerebro.py\", line 1127, in run\n", + " runstrat = self.runstrategies(iterstrat)\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/multiprocessing/process.py\", line 258, in _bootstrap\n", + " self.run()\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/multiprocessing/process.py\", line 258, in _bootstrap\n", + " self.run()\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/backtrader/cerebro.py\", line 1298, in runstrategies\n", + " self._runnext(runstrats)\n", + " File \"/home/muzikin/Repos/btgym/btgym/server.py\", line 713, in run\n", + " episode = cerebro.run(stdstats=True, preload=False, oldbuysell=True)[0]\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/backtrader/cerebro.py\", line 1127, in run\n", + " runstrat = self.runstrategies(iterstrat)\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/backtrader/cerebro.py\", line 1561, in _runnext\n", + " self._dtmaster = dmaster.num2date(dt0)\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/backtrader/cerebro.py\", line 1298, in runstrategies\n", + " self._runnext(runstrats)\n", + " File \"/home/muzikin/Repos/btgym/btgym/dataserver.py\", line 136, in run\n", + " service_input = socket.recv_pyobj()\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/backtrader/cerebro.py\", line 1298, in runstrategies\n", + " self._runnext(runstrats)\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/backtrader/cerebro.py\", line 1630, in _runnext\n", + " strat._next()\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/backtrader/feed.py\", line 256, in num2date\n", + " return num2date(dt, tz or self._tz, naive)\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/backtrader/strategy.py\", line 347, in _next\n", + " super(Strategy, self)._next()\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/backtrader/cerebro.py\", line 1623, in _runnext\n", + " self._brokernotify()\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/backtrader/lineiterator.py\", line 263, in _next\n", + " indicator._next()\n", + " File \"/home/muzikin/.local/lib/python3.6/site-packages/zmq/sugar/socket.py\", line 626, in recv_pyobj\n", + " msg = self.recv(flags)\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/backtrader/cerebro.py\", line 1370, in _brokernotify\n", + " owner._addnotification(order, quicknotify=self.p.quicknotify)\n", + " File \"zmq/backend/cython/socket.pyx\", line 788, in zmq.backend.cython.socket.Socket.recv\n", + "Process DrawCerebro-2:2:177:\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/backtrader/utils/dateintern.py\", line 189, in num2date\n", + " dt += datetime.timedelta(microseconds=1e6 - microsecond)\n", + " File \"zmq/backend/cython/socket.pyx\", line 824, in zmq.backend.cython.socket.Socket.recv\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/backtrader/lineiterator.py\", line 260, in _next\n", + " clock_len = self._clk_update()\n", + "KeyboardInterrupt\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/backtrader/lineiterator.py\", line 289, in _clk_update\n", + " self.forward()\n", + " File \"zmq/backend/cython/socket.pyx\", line 186, in zmq.backend.cython.socket._recv_copy\n", + "Traceback (most recent call last):\n", + " File \"zmq/backend/cython/checkrc.pxd\", line 12, in zmq.backend.cython.checkrc._check_rc\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2019-05-01 09:55:56.864915] NOTICE: LauncherShell: worker_1 has joined.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/multiprocessing/process.py\", line 258, in _bootstrap\n", + " self.run()\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/backtrader/lineseries.py\", line 554, in forward\n", + " self.lines.forward(value, size)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2019-05-01 09:55:56.867504] NOTICE: LauncherShell: worker_2 has joined.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/backtrader/strategy.py\", line 559, in _addnotification\n", + " comminfo=order.comminfo)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2019-05-01 09:55:56.868895] NOTICE: LauncherShell: worker_3 has joined.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + " File \"/home/muzikin/Repos/btgym/btgym/rendering/plotter.py\", line 76, in run\n", + " figfilename='_tmp_btgym_render.png',\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/backtrader/lineseries.py\", line 254, in forward\n", + " line.forward(value, size=size)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2019-05-01 09:55:56.870204] NOTICE: LauncherShell: chief_worker_0 has joined.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/backtrader/cerebro.py\", line 991, in plot\n", + " start=start, end=end, use=use)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2019-05-01 09:55:56.871413] NOTICE: LauncherShell: parameter_server_0 has joined.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/backtrader/linebuffer.py\", line 254, in forward\n", + " self.idx += size\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2019-05-01 09:55:56.872689] NOTICE: LauncherShell: Launcher closed.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/backtrader/linebuffer.py\", line 98, in set_idx\n", + " self._idx = idx\n", + "KeyboardInterrupt\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/backtrader/trade.py\", line 213, in update\n", + " def update(self, order, size, price, value, commission, pnl,\n", + "KeyboardInterrupt\n", + "KeyboardInterrupt\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/backtrader/plot/plot.py\", line 189, in plot\n", + " self.plotind(None, ptop, subinds=self.dplotsover[ptop])\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/backtrader/plot/plot.py\", line 392, in plotind\n", + " ax = masterax or self.newaxis(ind, rowspan=self.pinf.sch.rowsminor)\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/backtrader/plot/plot.py\", line 358, in newaxis\n", + " rowspan=rowspan, sharex=self.pinf.sharex)\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/matplotlib/pyplot.py\", line 1292, in subplot2grid\n", + " a = fig.add_subplot(subplotspec, **kwargs)\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/matplotlib/figure.py\", line 1021, in add_subplot\n", + " a = subplot_class_factory(projection_class)(self, *args, **kwargs)\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/matplotlib/axes/_subplots.py\", line 73, in __init__\n", + " self._axes_class.__init__(self, fig, self.figbox, **kwargs)\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/matplotlib/axes/_base.py\", line 551, in __init__\n", + " self.cla()\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/matplotlib/axes/_base.py\", line 984, in cla\n", + " spine.cla()\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/matplotlib/spines.py\", line 170, in cla\n", + " self.axis.cla()\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/matplotlib/axis.py\", line 760, in cla\n", + " self.reset_ticks()\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/matplotlib/axis.py\", line 775, in reset_ticks\n", + " self.minorTicks.extend([self._get_tick(major=False)])\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/matplotlib/axis.py\", line 1729, in _get_tick\n", + " return XTick(self.axes, 0, '', major=major, **tick_kw)\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/matplotlib/axis.py\", line 151, in __init__\n", + " self.tick2line = self._get_tick2line()\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/matplotlib/axis.py\", line 434, in _get_tick2line\n", + " zorder=self._zorder)\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/matplotlib/lines.py\", line 425, in __init__\n", + " self.set_fillstyle(fillstyle)\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/matplotlib/lines.py\", line 555, in set_fillstyle\n", + " self._marker.set_fillstyle(fs)\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/matplotlib/markers.py\", line 237, in set_fillstyle\n", + " self._recache()\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/matplotlib/markers.py\", line 208, in _recache\n", + " self._marker_function()\n", + " File \"/home/muzikin/anaconda3/envs/tf/lib/python3.6/site-packages/matplotlib/markers.py\", line 716, in _set_tickup\n", + " self._transform = Affine2D().scale(1.0, 1.0)\n", + "KeyboardInterrupt\n" + ] + } + ], "source": [ "launcher = Launcher(\n", " cluster_config=cluster_config,\n", @@ -176,7 +882,6 @@ " max_env_steps=100*10**6,\n", " save_secs=300, # save checkpoint every N seconds (default is 600)\n", " root_random_seed=0,\n", - " purge_previous=1, # ask to override previously saved model and logs\n", " verbose=0\n", ")\n", "\n", @@ -187,9 +892,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [ "# Save, restore or resume:\n", @@ -201,7 +904,8 @@ "# 1. when loading pre-trained model, training is started at global_step=0 unlike\n", "# restoring from current checkpoint, when training resumes from last saved global_step value;\n", "# 2. answering Yes to Launcher's `Override[y/n]?` affects log_dir content only;\n", - "# 3. launcher now got 'save_secs' arg, cpecifying how often checkpoints should be written. Default value is 600;\n", + "# 3. launcher now got 'save_secs' arg, cpecifying how often checkpoints\n", + "should be written. Default value is 600;\n", "# 4. exporting checkpoint overrides content of destination folder.\n", "#\n", "# Launcher starting routine:\n", @@ -215,18 +919,16 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": true - }, + "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "tf", "language": "python", - "name": "python3" + "name": "tf" }, "language_info": { "codemirror_mode": { @@ -238,7 +940,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.0" + "version": "3.6.8" } }, "nbformat": 4,