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

find_and_display_segmentation.ipynb => AttributeError #11

Closed
cteqeu opened this issue Jan 10, 2022 · 2 comments
Closed

find_and_display_segmentation.ipynb => AttributeError #11

cteqeu opened this issue Jan 10, 2022 · 2 comments

Comments

@cteqeu
Copy link

cteqeu commented Jan 10, 2022


AttributeError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_23316/310475324.py in
6 file_stem = step_file_stems[example_index]
7 print(f"Viewing example {file_stem}")
----> 8 viewer = JupyterSegmentationViewer(file_stem, step_folder, seg_folder=step_folder, logit_folder=logits_folder)

~\BRepNet\visualization\jupyter_segmentation_viewer.py in init(self, file_stem, step_folder, seg_folder, logit_folder)
76 assert len(solids) == 1, "Expect only 1 solid"
77 self.solid = solids[0]
---> 78 self.entity_mapper = EntityMapper(self.solid.topods_solid())
79
80 self.seg_folder = seg_folder

AttributeError: 'Solid' object has no attribute 'topods_solid'

@akashaero
Copy link

If it still helps,

replace 'topods_solid()' with 'topods_shape()' and try again. It worked for me

JoeLambourne added a commit that referenced this issue May 25, 2022
# Why?

In  #11 and #12 we see that updates to the occwl library introduced breaking changes which were not spotted in the example notebooks.   Thank you to @[cteqeu](https://github.com/cteqeu) for reporting the issues and @[akashaero](https://github.com/akashaero) for sharing the workaround.

This PR addresses the problems

# What?

- A new version of occwl is released [see here](https://github.com/AutodeskAILab/occwl/releases/tag/v1.0.0).  We now fix the version of occwl to this version to avoid further unexpected breakage.
- In [jupyter_segmentation_viewer.py](visualization/jupyter_segmentation_viewer.py) we remove the calls to the removed functions.
- All the notebooks are rerun and retested.
- Some warnings were firing in [pytorch-lightning](Lightning-AI/pytorch-lightning#10408).  To ensure that all metrics are computed correctly we pass the number of faces to the logger as the batch size.   Notice that the IoU and accuracy metrics reported in [the paper](https://arxiv.org/abs/2104.00706) are per-face  rather than per solid.
- In [scale_utils.py](utils/scale_utils.py) we make use of the scaling function in occwl rather than re-implementing it here.
@JoeLambourne
Copy link
Contributor

Hi @cteqeu and @akashaero,

Sorry for not spotting this earlier. I missed the notification for your questions.

In PR #13 I've updated everything to work with the latest version of the occwl library. You should be able to pull from master now and everything should be working again.

It's possible you might need to update your environment to occwl v1.0.0. I tested by deleting the environment and rebuilding it with

conda env create -f environment.yml

Let me know if you have any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants