pytorch-ai/TicTacToe_AI/Net/wandb/run-20200128_142211-yiw34nau/diff.patch
2020-01-28 15:23:25 +01:00

111 lines
7.7 KiB
Diff

diff --git a/TicTacToe_AI/Net/pytorch_ai.py b/TicTacToe_AI/Net/pytorch_ai.py
index c10ea0e..1136f83 100644
--- a/TicTacToe_AI/Net/pytorch_ai.py
+++ b/TicTacToe_AI/Net/pytorch_ai.py
@@ -8,7 +8,7 @@ import wandb
wandb.init(project="tictactoe")
-BATCH_SIZE = 3
+BATCH_SIZE = 400
def to_set(raw_list):
@@ -85,17 +85,19 @@ def buildsets():
testset = to_batched_set(alllines[0:10000])
print('Generating trainset...')
- trainset = to_batched_set(alllines[10001:20000])
+ trainset = to_batched_set(alllines[10001:])
return trainset, testset
-def testnet(net, testset):
+def testnet(net, testset, device):
correct = 0
total = 0
with torch.no_grad():
for X, label in testset:
+ X = X.to(device)
output = net(X)
+ output = output.cpu()
if torch.argmax(output) == label[0]:
correct += 1
total += 1
@@ -134,18 +136,20 @@ loss_function = nn.CrossEntropyLoss()
trainset, testset = buildsets()
-for epoch in range(100):
+for epoch in range(300):
print('Epoch: ' + str(epoch))
wandb.log({'epoch': epoch})
for X, label in tqdm(trainset):
net.zero_grad()
- X.to(device)
+ X = X.to(device)
output = net(X)
- output.cpu()
+ output = output.cpu()
loss = loss_function(output.view(-1, 10), label)
loss.backward()
optimizer.step()
wandb.log({'loss': loss})
+ net = net.cpu()
torch.save(net, './nets/gpunets/net_' + str(epoch) + '.pt')
- testnet(net, testset)
+ net = net.to(device)
+ testnet(net, testset, device)
diff --git a/TicTacToe_AI/Net/wandb/debug.log b/TicTacToe_AI/Net/wandb/debug.log
index 51ac5d0..0b55a6f 100644
--- a/TicTacToe_AI/Net/wandb/debug.log
+++ b/TicTacToe_AI/Net/wandb/debug.log
@@ -1,18 +1,18 @@
-2020-01-28 14:43:14,846 DEBUG MainThread:32731 [wandb_config.py:_load_defaults():111] no defaults not found in config-defaults.yaml
-2020-01-28 14:43:14,864 DEBUG MainThread:32731 [cmd.py:execute():728] Popen(['git', 'cat-file', '--batch-check'], cwd=/home/clemens/repositorys/pytorch-ai, universal_newlines=False, shell=None, istream=<valid stream>)
-2020-01-28 14:43:14,877 DEBUG MainThread:32731 [cmd.py:execute():728] Popen(['git', 'rev-parse', '--show-toplevel'], cwd=/home/clemens/repositorys/pytorch-ai, universal_newlines=False, shell=None, istream=None)
-2020-01-28 14:43:14,887 DEBUG MainThread:32731 [cmd.py:execute():728] Popen(['git', 'status', '--porcelain', '--untracked-files'], cwd=/home/clemens/repositorys/pytorch-ai, universal_newlines=False, shell=None, istream=None)
-2020-01-28 14:43:14,906 DEBUG MainThread:32731 [run_manager.py:__init__():535] Initialized sync for tictactoe/mvx4evw0
-2020-01-28 14:43:14,912 INFO MainThread:32731 [run_manager.py:wrap_existing_process():1133] wrapping existing process 32725
-2020-01-28 14:43:14,913 WARNING MainThread:32731 [io_wrap.py:register():104] SIGWINCH handler was not None: <Handlers.SIG_DFL: 0>
-2020-01-28 14:43:14,919 DEBUG MainThread:32731 [connectionpool.py:_new_conn():815] Starting new HTTPS connection (1): pypi.org:443
-2020-01-28 14:43:15,060 DEBUG MainThread:32731 [connectionpool.py:_make_request():393] https://pypi.org:443 "GET /pypi/wandb/json HTTP/1.1" 200 39767
-2020-01-28 14:43:15,179 INFO MainThread:32731 [run_manager.py:init_run():918] system metrics and metadata threads started
-2020-01-28 14:43:15,181 INFO MainThread:32731 [run_manager.py:wrap_existing_process():1150] informing user process we are ready to proceed
-2020-01-28 14:43:15,183 INFO MainThread:32731 [run_manager.py:_sync_etc():1257] entering loop for messages from user process
-2020-01-28 14:43:15,862 INFO Thread-3 :32731 [run_manager.py:_on_file_modified():682] file/dir modified: /home/clemens/repositorys/pytorch-ai/TicTacToe_AI/Net/wandb/dryrun-20200128_134313-mvx4evw0/config.yaml
-2020-01-28 14:43:32,850 INFO MainThread:32731 [run_manager.py:_sync_etc():1313] process received interrupt signal, shutting down
-2020-01-28 14:43:32,850 INFO MainThread:32731 [run_manager.py:_sync_etc():1366] closing log streams and sending exitcode to W&B
-2020-01-28 14:43:32,851 INFO MainThread:32731 [run_manager.py:shutdown():1057] shutting down system stats and metadata service
- MainThread:32731 [mvx4evw0:run_manager.py:_sync_etc():1366] closing log streams and sending exitcode to W&B
-2020-01-28 14:43:32,851 INFO MainThread:32731 [mvx4evw0:run_manager.py:shutdown():1057] shutting down system stats and metadata service
+2020-01-28 15:22:12,035 DEBUG MainThread:25522 [wandb_config.py:_load_defaults():111] no defaults not found in config-defaults.yaml
+2020-01-28 15:22:12,045 DEBUG MainThread:25522 [cmd.py:execute():728] Popen(['git', 'cat-file', '--batch-check'], cwd=/home/clemens/Dokumente/repos/pytorch-ai, universal_newlines=False, shell=None, istream=<valid stream>)
+2020-01-28 15:22:12,051 DEBUG MainThread:25522 [cmd.py:execute():728] Popen(['git', 'rev-parse', '--show-toplevel'], cwd=/home/clemens/Dokumente/repos/pytorch-ai, universal_newlines=False, shell=None, istream=None)
+2020-01-28 15:22:12,058 DEBUG MainThread:25522 [cmd.py:execute():728] Popen(['git', 'status', '--porcelain', '--untracked-files'], cwd=/home/clemens/Dokumente/repos/pytorch-ai, universal_newlines=False, shell=None, istream=None)
+2020-01-28 15:22:12,077 DEBUG MainThread:25522 [run_manager.py:__init__():535] Initialized sync for tictactoe/yiw34nau
+2020-01-28 15:22:12,083 INFO MainThread:25522 [run_manager.py:wrap_existing_process():1133] wrapping existing process 25512
+2020-01-28 15:22:12,083 WARNING MainThread:25522 [io_wrap.py:register():104] SIGWINCH handler was not None: <Handlers.SIG_DFL: 0>
+2020-01-28 15:22:12,088 DEBUG MainThread:25522 [connectionpool.py:_new_conn():824] Starting new HTTPS connection (1): pypi.org
+2020-01-28 15:22:12,198 DEBUG MainThread:25522 [connectionpool.py:_make_request():396] https://pypi.org:443 "GET /pypi/wandb/json HTTP/1.1" 200 39767
+2020-01-28 15:22:12,243 INFO MainThread:25522 [run_manager.py:init_run():918] system metrics and metadata threads started
+2020-01-28 15:22:12,244 INFO MainThread:25522 [run_manager.py:init_run():952] upserting run before process can begin, waiting at most 10 seconds
+2020-01-28 15:22:12,253 DEBUG Thread-14 :25522 [connectionpool.py:_new_conn():824] Starting new HTTPS connection (1): api.wandb.ai
+2020-01-28 15:22:12,539 DEBUG Thread-14 :25522 [connectionpool.py:_make_request():396] https://api.wandb.ai:443 "POST /graphql HTTP/1.1" 200 535
+2020-01-28 15:22:12,554 INFO Thread-14 :25522 [run_manager.py:_upsert_run():1037] saving patches
+2020-01-28 15:22:12,554 DEBUG Thread-14 :25522 [cmd.py:execute():728] Popen(['git', 'rev-parse', '--show-toplevel'], cwd=/home/clemens/Dokumente/repos/pytorch-ai, universal_newlines=False, shell=None, istream=None)
+2020-01-28 15:22:12,561 DEBUG Thread-14 :25522 [cmd.py:execute():728] Popen(['git', 'diff', '--cached', '--abbrev=40', '--full-index', '--raw'], cwd=/home/clemens/Dokumente/repos/pytorch-ai, universal_newlines=False, shell=None, istream=None)
+2020-01-28 15:22:12,568 DEBUG Thread-14 :25522 [cmd.py:execute():728] Popen(['git', 'diff', '--abbrev=40', '--full-index', '--raw'], cwd=/home/clemens/Dokumente/repos/pytorch-ai, universal_newlines=False, shell=None, istream=None)
+2020-01-28 15:22:12,576 DEBUG Thread-14 :25522 [cmd.py:execute():728] Popen(['git', 'version'], cwd=/home/clemens/Dokumente/repos/pytorch-ai, universal_newlines=False, shell=None, istream=None)
diff --git a/TicTacToe_AI/Net/wandb/settings b/TicTacToe_AI/Net/wandb/settings
index 26efadd..a700e2e 100644
--- a/TicTacToe_AI/Net/wandb/settings
+++ b/TicTacToe_AI/Net/wandb/settings
@@ -1,5 +1,4 @@
[default]
project = tictactoe
entity = cdautermann
-disabled = true