Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions minecraft_copilot_ml/data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"10220.schematic",
"5096.schematic",
"14191.schematic",
"10188.schematic"
"10188.schematic",
]


Expand Down Expand Up @@ -188,8 +188,10 @@ class MinecraftSchematicsDataset(Dataset):
def __init__(
self,
schematics_list_files: List[str],
unique_blocks_dict: Dict[str, int],
) -> None:
self.schematics_list_files = schematics_list_files
self.unique_blocks_dict = unique_blocks_dict

def __len__(self) -> int:
return len(self.schematics_list_files)
Expand All @@ -211,7 +213,8 @@ def __getitem__(self, idx: int) -> MinecraftSchematicsDatasetItemType:
random_y_height_value : random_y_height_value + minimum_height,
random_roll_z_value : random_roll_z_value + minimum_depth,
] = True
return block_map, block_map_mask
block_map_int = np.vectorize(self.unique_blocks_dict.get)(block_map)
return block_map_int, block_map_mask


def list_schematic_files_in_folder(path_to_schematics: str) -> list[str]:
Expand Down
2 changes: 1 addition & 1 deletion minecraft_copilot_ml/metrics_graph.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
"version": "3.8.19"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion minecraft_copilot_ml/notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.6"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
Loading
Loading