Skip to content

Commit a74b3b0

Browse files
committed
Fix cuda for ppo
1 parent d56cc7f commit a74b3b0

27 files changed

+316
-59
lines changed

diploma_thesis/agents/utils/rl/dqn.py

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def compute_loss():
7070
self.record_loss(loss)
7171
self.record_loss(td_error_mean, key='td_error')
7272
self.record_loss(entropy, key='entropy')
73+
self.record_loss(q_values.mean(), key='q_values')
7374

7475
print(f'loss: {loss}, td_error: {td_error_mean}, entropy: {entropy}')
7576

diploma_thesis/b.txt

-1
This file was deleted.

diploma_thesis/configuration/experiments/jsp/GRAPH-NN/experiments/2/0/experiment.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ppo_1: &ppo_1
3131
'__none__',
3232
]
3333
- [
34-
'__none__',
34+
'util/infrastructure/cuda.yml'
3535
]
3636
- [ 'util/train_schedule/on_stored_data_exclusively_3.yml']
3737

@@ -48,8 +48,7 @@ ppo_2: &ppo_2
4848
# 'agent/ppo/p3or.yml'
4949
]
5050
- [
51-
'__none__',
52-
# 'util/agent/multi_agent.yml'
51+
'util/infrastructure/cuda.yml'
5352
]
5453
- [ 'util/train_schedule/on_stored_data_exclusively_3.yml']
5554

diploma_thesis/configuration/experiments/jsp/GRAPH-NN/experiments/2/1/experiment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ppo_1: &ppo_1
3131
'__none__',
3232
]
3333
- [
34-
'__none__',
34+
'util/infrastructure/cuda.yml'
3535
]
3636
- [ 'util/train_schedule/on_stored_data_exclusively_3.yml']
3737

diploma_thesis/configuration/experiments/jsp/GRAPH-NN/experiments/2/2/experiment.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ppo_1: &ppo_1
3131
'__none__',
3232
]
3333
- [
34-
'__none__',
34+
'util/infrastructure/cuda.yml'
3535
]
3636
- [ 'util/train_schedule/on_stored_data_exclusively_3.yml']
3737

@@ -47,7 +47,7 @@ ppo_2: &ppo_2
4747
'__none__',
4848
]
4949
- [
50-
'__none__',
50+
'util/infrastructure/cuda.yml'
5151
]
5252
- [ 'util/train_schedule/on_stored_data_exclusively_3.yml']
5353

@@ -64,7 +64,7 @@ ppo_3: &ppo_3
6464
'__none__',
6565
]
6666
- [
67-
'__none__',
67+
'util/infrastructure/cuda.yml'
6868
]
6969
- [ 'util/train_schedule/on_stored_data_exclusively_3.yml']
7070

diploma_thesis/configuration/experiments/jsp/GRAPH-NN/experiments/2/3/experiment.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ppo_1: &ppo_1
3131
'__none__',
3232
]
3333
- [
34-
'__none__',
34+
'util/infrastructure/cuda.yml'
3535
]
3636
- [ 'util/train_schedule/on_stored_data_exclusively_3.yml']
3737

@@ -47,7 +47,7 @@ ppo_2: &ppo_2
4747
'__none__',
4848
]
4949
- [
50-
'__none__',
50+
'util/infrastructure/cuda.yml'
5151
]
5252
- [ 'util/train_schedule/on_stored_data_exclusively_3.yml']
5353

@@ -64,7 +64,7 @@ ppo_3: &ppo_3
6464
'__none__',
6565
]
6666
- [
67-
'__none__',
67+
'util/infrastructure/cuda.yml'
6868
]
6969
- [ 'util/train_schedule/on_stored_data_exclusively_3.yml']
7070

@@ -80,7 +80,7 @@ ppo_4: &ppo_4
8080
'__none__',
8181
]
8282
- [
83-
'__none__',
83+
'util/infrastructure/cuda.yml'
8484
]
8585
- [ 'util/train_schedule/on_stored_data_exclusively_3.yml']
8686

diploma_thesis/configuration/experiments/jsp/GRAPH-NN/experiments/2/4/experiment.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ppo_1: &ppo_1
3131
'__none__',
3232
]
3333
- [
34-
'__none__',
34+
'util/infrastructure/cuda.yml'
3535
]
3636
- [ 'util/train_schedule/on_stored_data_exclusively_3.yml']
3737

@@ -47,7 +47,7 @@ ppo_2: &ppo_2
4747
'__none__',
4848
]
4949
- [
50-
'__none__',
50+
'util/infrastructure/cuda.yml'
5151
]
5252
- [ 'util/train_schedule/on_stored_data_exclusively_3.yml']
5353

@@ -64,7 +64,7 @@ ppo_3: &ppo_3
6464
'__none__',
6565
]
6666
- [
67-
'__none__',
67+
'util/infrastructure/cuda.yml'
6868
]
6969
- [ 'util/train_schedule/on_stored_data_exclusively_3.yml']
7070

diploma_thesis/configuration/experiments/jsp/MARL-DQN/experiment/0/0/experiment.yml

+9-10
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ dqn_1: &dqn_1
1313
mods:
1414
- 'agent/dqn/ddqn.yml'
1515
# - 'agent/dqn/prioritized.yml'
16-
- 'util/agent/multi_agent.yml'
1716
- *default_mods
1817

1918
###############################################################################################
@@ -71,7 +70,7 @@ task:
7170
n_threads: 3
7271
debug: False
7372
store_run_statistics: False
74-
output_dir: 'results/jsp/experiments/0 (MARL.)/NN/model/'
73+
output_dir: 'results/jsp/experiments/0 (MARL)/NN/model/'
7574

7675
tasks:
7776
- kind: 'multi_value'
@@ -140,14 +139,14 @@ task:
140139
machine_agent:
141140
parameters:
142141
- *dqn_1
143-
# - output_dir: 'Relu'
144-
# machine_agent:
145-
# parameters:
146-
# - *dqn_2
147-
# - output_dir: 'Tanh'
148-
# machine_agent:
149-
# parameters:
150-
# - *dqn_3
142+
- output_dir: 'Relu'
143+
machine_agent:
144+
parameters:
145+
- *dqn_2
146+
- output_dir: 'Tanh'
147+
machine_agent:
148+
parameters:
149+
- *dqn_3
151150

152151
tape:
153152
machine_reward:

diploma_thesis/configuration/experiments/jsp/MARL-DQN/experiment/0/1/experiment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ task:
9393
n_threads: 6
9494
debug: False
9595
store_run_statistics: False
96-
output_dir: 'results/jsp/experiments/0 (MARL.)/Optimizer/model/'
96+
output_dir: 'results/jsp/experiments/0 (MARL)/Optimizer/model/'
9797

9898
tasks:
9999
- kind: 'multi_value'

diploma_thesis/configuration/experiments/jsp/MARL-DQN/experiment/0/2/experiment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ task:
5555
n_threads: 10
5656
debug: False
5757
store_run_statistics: False
58-
output_dir: 'results/jsp/experiments/0 (MARL.)/Initialization/model/'
58+
output_dir: 'results/jsp/experiments/0 (MARL)/Initialization/model/'
5959

6060
tasks:
6161
- kind: 'multi_value'

diploma_thesis/configuration/experiments/jsp/MARL-DQN/experiment/0/3/experiment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ task:
9292
n_threads: 8
9393
debug: False
9494
store_run_statistics: False
95-
output_dir: 'results/jsp/experiments/0 (MARL.)/Train Schedule/model/'
95+
output_dir: 'results/jsp/experiments/0 (MARL)/Train Schedule/model/'
9696

9797
tasks:
9898
- kind: 'multi_value'

diploma_thesis/configuration/experiments/jsp/MARL-DQN/experiment/1/0/experiment.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Evaluate the effectivenes of basic DQNs on the JSP environment
22

33
template: &template 'baseline'
4-
base_model: &base_model 'configuration/experiments/jsp/MARL-DQN/machine.yml'
5-
marl_model: &marl_model 'configuration/experiments/jsp/MARL-DQN/marl_machine.yml'
4+
base_model: &base_model 'configuration/experiments/jsp/MARL-DQN/experiment/1/machine.yml'
5+
marl_model: &marl_model 'configuration/experiments/jsp/MARL-DQN/experiment/1/marl_machine.yml'
66

77
default_mods: &default_mods []
88
###############################################################################################
@@ -223,7 +223,7 @@ task:
223223
n_threads: 8
224224
debug: False
225225
store_run_statistics: False
226-
output_dir: 'results/jsp/experiments/1. MARL-DQN/1. DQN Variants/model/'
226+
output_dir: 'results/jsp/experiments/1 (MARL)/Rainbow/model/'
227227

228228
tasks:
229229
- kind: 'multi_value'
@@ -268,7 +268,7 @@ task:
268268
run:
269269
kind: 'mod'
270270
parameters:
271-
base_path: 'configuration/experiments/jsp/MARL-DQN/run.yml'
271+
base_path: 'configuration/experiments/jsp/MARL-DQN/experiment/1/run.yml'
272272
mod_dirs:
273273
- 'configuration/mods/run/mods'
274274
mods: []
@@ -281,7 +281,7 @@ task:
281281
base:
282282
kind: 'mod'
283283
parameters:
284-
base_path: 'configuration/experiments/jsp/MARL-DQN/simulation.yml'
284+
base_path: 'configuration/experiments/jsp/MARL-DQN/experiment/1/simulation.yml'
285285
mod_dirs:
286286
- 'configuration/mods/simulation/mods'
287287
mods: [ ]

diploma_thesis/configuration/experiments/jsp/MARL-DQN/experiment/1/1/experiment.yml

+11-9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Evaluate the effectivenes of basic DQNs on the JSP environment
22

33
template: &template 'baseline'
4-
base_model: &base_model 'configuration/experiments/jsp/MARL-DQN/machine.yml'
5-
marl_model: &marl_model 'configuration/experiments/jsp/MARL-DQN/marl_machine.yml'
4+
base_model: &base_model 'configuration/experiments/jsp/MARL-DQN/experiment/1/machine.yml'
5+
marl_model: &marl_model 'configuration/experiments/jsp/MARL-DQN/experiment/1/marl_machine.yml'
66

77
default_mods: &default_mods []
88
###############################################################################################
@@ -12,6 +12,7 @@ dqn_1: &dqn_1
1212
template: *template
1313
mod_dirs:
1414
- 'agent/dqn/ddqn.yml'
15+
- 'agent/dqn/prioritized.yml'
1516
- 'configuration/mods/machine/mods'
1617
mods:
1718
*default_mods
@@ -23,6 +24,7 @@ marl_dqn_1: &marl_dqn_1
2324
- 'configuration/mods/machine/mods'
2425
mods:
2526
- 'agent/dqn/ddqn.yml'
27+
- 'agent/dqn/prioritized.yml'
2628
- 'util/agent/multi_agent.yml'
2729
- *default_mods
2830

@@ -35,8 +37,8 @@ dqn_7: &dqn_7
3537
- 'configuration/mods/machine/mods'
3638
mods:
3739
- 'agent/dqn/ddqn.yml'
38-
# - 'agent/dqn/prioritized.yml'
39-
# - 'agent/dqn/dueling.yml'
40+
- 'agent/dqn/prioritized.yml'
41+
- 'agent/dqn/dueling.yml'
4042
- *default_mods
4143

4244
marl_dqn_7: &marl_dqn_7
@@ -46,8 +48,8 @@ marl_dqn_7: &marl_dqn_7
4648
- 'configuration/mods/machine/mods'
4749
mods:
4850
- 'agent/dqn/ddqn.yml'
49-
# - 'agent/dqn/prioritized.yml'
50-
# - 'agent/dqn/dueling.yml'
51+
- 'agent/dqn/prioritized.yml'
52+
- 'agent/dqn/dueling.yml'
5153
- 'util/agent/multi_agent.yml'
5254
- *default_mods
5355

@@ -75,7 +77,7 @@ task:
7577
n_threads: 8
7678
debug: False
7779
store_run_statistics: False
78-
output_dir: 'results/jsp/experiments/1. MARL-DQN/3. Reward Function/model/'
80+
output_dir: 'results/jsp/experiments/1 (MARL)/Reward/model/'
7981

8082
tasks:
8183
- kind: 'multi_value'
@@ -120,7 +122,7 @@ task:
120122
run:
121123
kind: 'mod'
122124
parameters:
123-
base_path: 'configuration/experiments/jsp/MARL-DQN/run.yml'
125+
base_path: 'configuration/experiments/jsp/MARL-DQN/experiment/1/run.yml'
124126
mod_dirs:
125127
- 'configuration/mods/run/mods'
126128
mods: []
@@ -133,7 +135,7 @@ task:
133135
base:
134136
kind: 'mod'
135137
parameters:
136-
base_path: 'configuration/experiments/jsp/MARL-DQN/simulation.yml'
138+
base_path: 'configuration/experiments/jsp/MARL-DQN/experiment/1/simulation.yml'
137139
mod_dirs:
138140
- 'configuration/mods/simulation/mods'
139141
mods: [ ]

diploma_thesis/configuration/experiments/jsp/MARL-DQN/experiment/1/2/experiment.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Evaluate the effectivenes of basic DQNs on the JSP environment
22

33
template: &template 'baseline'
4-
base_model: &base_model 'configuration/experiments/jsp/MARL-DQN/machine.yml'
5-
marl_model: &marl_model 'configuration/experiments/jsp/MARL-DQN/marl_machine.yml'
4+
base_model: &base_model 'configuration/experiments/jsp/MARL-DQN/experiment/1/machine.yml'
5+
marl_model: &marl_model 'configuration/experiments/jsp/MARL-DQN/experiment/1/marl_machine.yml'
66

77
default_mods: &default_mods
88
- 'agent/dqn/ddqn.yml'
@@ -88,7 +88,7 @@ task:
8888
n_threads: 10
8989
debug: False
9090
store_run_statistics: False
91-
output_dir: 'results/jsp/experiments/1. MARL-DQN/6. Discount Factor/model/'
91+
output_dir: 'results/jsp/experiments/1 (MARL)/Discount Rate/model/'
9292

9393
tasks:
9494
- kind: 'multi_value'
@@ -133,7 +133,7 @@ task:
133133
run:
134134
kind: 'mod'
135135
parameters:
136-
base_path: 'configuration/experiments/jsp/MARL-DQN/run.yml'
136+
base_path: 'configuration/experiments/jsp/MARL-DQN/experiment/1/run.yml'
137137
mod_dirs:
138138
- 'configuration/mods/run/mods'
139139
mods: []
@@ -146,7 +146,7 @@ task:
146146
base:
147147
kind: 'mod'
148148
parameters:
149-
base_path: 'configuration/experiments/jsp/MARL-DQN/simulation.yml'
149+
base_path: 'configuration/experiments/jsp/MARL-DQN/experiment/1/simulation.yml'
150150
mod_dirs:
151151
- 'configuration/mods/simulation/mods'
152152
mods: [ ]

0 commit comments

Comments
 (0)