Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

171 space bar #184

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
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
17 changes: 12 additions & 5 deletions nndt/space2/space_preloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,18 @@ def __init__(
def preload(self, space: Space, verbose=True):

# Stage 1. Initialization of FileSources
for node in PostOrderIter(space):
iter_tmp = [node for node in PostOrderIter(space)]
if verbose:
iter_tmp = tqdm(iter_tmp, desc="Initialization of FileSources")

for node in iter_tmp:
if isinstance(node, FileSource):
self._init_FileSource(node)

# Stage 2. Initialization of Object3D
iter_tmp = [node for node in PostOrderIter(space)]
if verbose:
iter_tmp = tqdm(PostOrderIter(space))
else:
iter_tmp = PostOrderIter(space)
iter_tmp = tqdm(iter_tmp, desc="Initialization of Object3D")

for node in iter_tmp:
if isinstance(node, Object3D):
Expand All @@ -64,7 +67,11 @@ def preload(self, space: Space, verbose=True):
node2._loader.unload_data()

# Stage 3. Initialization of Group
for node in PostOrderIter(space):
iter_tmp = [node for node in PostOrderIter(space)]
if verbose:
iter_tmp = tqdm(iter_tmp, desc="Initialization of Group")

for node in iter_tmp:
if isinstance(node, Group):
self._init_Group(node)

Expand Down