Skip to content

Commit e2259e7

Browse files
committed
feat: vae
1 parent e0a0d34 commit e2259e7

4 files changed

Lines changed: 125 additions & 258 deletions

File tree

minecraft_copilot_ml/data_loader.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"10220.schematic",
4848
"5096.schematic",
4949
"14191.schematic",
50-
"10188.schematic"
50+
"10188.schematic",
5151
]
5252

5353

@@ -188,8 +188,10 @@ class MinecraftSchematicsDataset(Dataset):
188188
def __init__(
189189
self,
190190
schematics_list_files: List[str],
191+
unique_blocks_dict: Dict[str, int],
191192
) -> None:
192193
self.schematics_list_files = schematics_list_files
194+
self.unique_blocks_dict = unique_blocks_dict
193195

194196
def __len__(self) -> int:
195197
return len(self.schematics_list_files)
@@ -211,7 +213,8 @@ def __getitem__(self, idx: int) -> MinecraftSchematicsDatasetItemType:
211213
random_y_height_value : random_y_height_value + minimum_height,
212214
random_roll_z_value : random_roll_z_value + minimum_depth,
213215
] = True
214-
return block_map, block_map_mask
216+
block_map_int = np.vectorize(self.unique_blocks_dict.get)(block_map)
217+
return block_map_int, block_map_mask
215218

216219

217220
def list_schematic_files_in_folder(path_to_schematics: str) -> list[str]:

minecraft_copilot_ml/metrics_graph.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@
344344
"name": "python",
345345
"nbconvert_exporter": "python",
346346
"pygments_lexer": "ipython3",
347-
"version": "3.12.3"
347+
"version": "3.8.19"
348348
}
349349
},
350350
"nbformat": 4,

minecraft_copilot_ml/notebook.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@
219219
"name": "python",
220220
"nbconvert_exporter": "python",
221221
"pygments_lexer": "ipython3",
222-
"version": "3.10.6"
222+
"version": "3.10.12"
223223
}
224224
},
225225
"nbformat": 4,

0 commit comments

Comments
 (0)