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

Circular reference caused by the load_from_ultralytics() #368

Closed
zhiqwang opened this issue Mar 16, 2022 · 0 comments · Fixed by #369
Closed

Circular reference caused by the load_from_ultralytics() #368

zhiqwang opened this issue Mar 16, 2022 · 0 comments · Fixed by #369
Labels
bug / fix Something isn't working code quality Code format and unit tests dependencies Pull requests that update a dependency file

Comments

@zhiqwang
Copy link
Owner

Let me know if you have any thoughts/suggestions on how to fix that circular reference... I didn't look into it too closely yet.

Hi @mattpopovich , that's my bad, I mistakenly put the following two functions in the current position, and these two dependencies will cause the circular reference calls. I think it should be better to move load_from_ultralytics() into "yolort/models/_utils.py" and move contains_any_tensor into "yolort/utils/__init__.py" to solve this problem entirely.

https://github.com/zhiqwang/yolov5-rt-stack/blob/9a27b916da21a0143eb5497ee7ec6dced69f2358/yolort/utils/update_module_state.py#L40

https://github.com/zhiqwang/yolov5-rt-stack/blob/9a27b916da21a0143eb5497ee7ec6dced69f2358/yolort/data/_helper.py#L52

I'll submit a PR to resolve this issue.

Originally posted by @zhiqwang in #367 (comment)

@zhiqwang zhiqwang added code quality Code format and unit tests dependencies Pull requests that update a dependency file bug / fix Something isn't working labels Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug / fix Something isn't working code quality Code format and unit tests dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant