Skip to content

Commit 30fbea8

Browse files
committed
Revert "src: raise log Dict capacity from 32 to 256"
This reverts commit 9396e79.
1 parent e7043c0 commit 30fbea8

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

src/bindings.cu

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@ pybind11::dict puf_eval_log(pybind11::object pufferl_obj) {
106106
pufferl.last_log_step = pufferl.global_step;
107107

108108
pybind11::dict env_dict;
109-
// Capacity must cover the largest env Log -- full Craftax writes 4 meta + 67 achievements + n = 72 items.
110-
Dict* env_out = create_dict(256);
109+
Dict* env_out = create_dict(32);
111110
static_vec_eval_log(pufferl.vec, env_out);
112111
for (int i = 0; i < env_out->size; i++) {
113112
env_dict[env_out->items[i].key] = env_out->items[i].value;
@@ -319,7 +318,7 @@ void cpu_vec_step_py(VecEnv& ve, long long actions_ptr) {
319318
}
320319

321320
py::dict vec_log(VecEnv& ve) {
322-
Dict* out = create_dict(256);
321+
Dict* out = create_dict(32);
323322
static_vec_log(ve.vec, out);
324323
py::dict result;
325324
for (int i = 0; i < out->size; i++) {

src/bindings_cpu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ static void cpu_vec_step_py(VecEnv& ve, long long actions_ptr) {
141141
}
142142

143143
static py::dict vec_log(VecEnv& ve) {
144-
Dict* out = create_dict(256);
144+
Dict* out = create_dict(32);
145145
static_vec_log(ve.vec, out);
146146
py::dict result;
147147
for (int i = 0; i < out->size; i++)

src/pufferlib.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ typedef struct {
330330
} PuffeRL;
331331

332332
Dict* log_environments_impl(PuffeRL& pufferl) {
333-
Dict* out = create_dict(256);
333+
Dict* out = create_dict(32);
334334
static_vec_log(pufferl.vec, out);
335335
return out;
336336
}

0 commit comments

Comments
 (0)