Skip to content

Commit 4aed77d

Browse files
committed
optimize for training
1 parent 49254c2 commit 4aed77d

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

cluster.jl

+5-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,11 @@ end
3636

3737
choose_index(wl::Workload) = rand(1:length(wl.jobs) - SLICE_SIZE)
3838

39+
# load all workloads into memory; about 3GB
40+
workloads = [Workload(wl) for wl in WORKLOADS]
41+
3942
function RLBase.reset!(env::ClusterEnv)
40-
workload = Workload(rand(WORKLOADS))
43+
workload = rand(workloads)
4144
env.workload = workload
4245
index = choose_index(workload)
4346
env.time = env.workload.jobs[1].submit_time
@@ -54,7 +57,7 @@ function RLBase.reset!(env::ClusterEnv)
5457
end
5558

5659
function ClusterEnv()
57-
workload = Workload(rand(WORKLOADS))
60+
workload = rand(workloads)
5861
index = choose_index(workload)
5962
time = workload.jobs[1].submit_time
6063
next_job_index = index + 1

data/HPC2N-2002-2.2-cln.swf

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
; sjf_average_wait: 12791.929f0
3434
; sjf_max_wait: 1631664
3535
; sjf_utilization: 0.39929992f0
36-
36+
3737
;
3838
;
3939
; Note: THIS IS A CLEANED VERSION OF THE LOG!

data/LANL-CM5-1994-4.1-cln.swf

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
; sjf_average_wait: 17167.924f0
5050
; sjf_max_wait: 7661244
5151
; sjf_utilization: 0.26229486f0
52-
52+
5353
;
5454
; Note: THIS IS A CLEANED VERSION OF THE LOG!
5555
; The filters used to produce it were

0 commit comments

Comments
 (0)