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

Alias th used without importing torch in utils.eval_utils.py #17

Open
sintijas opened this issue Jan 24, 2025 · 0 comments
Open

Alias th used without importing torch in utils.eval_utils.py #17

sintijas opened this issue Jan 24, 2025 · 0 comments

Comments

@sintijas
Copy link

sintijas commented Jan 24, 2025

Description

The code uses the alias th to refer to torch in utils.eval_utils.py, specifically in the aggregate() function, but torch is not imported in the script.

Reproducing the error

Train the model with config["aggregation"] set to either one of ['concat', 'max', 'min'].
Observe the error:
Error: name 'th' is not defined

Suggested Fix

Add the following line at the beginning of the script:
import torch as th

@sintijas sintijas changed the title Bug: Unresolved th used before importing torch as th in utils.eval_utils.py Alias th used without importing torch in utils.eval_utils.py Jan 24, 2025
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

1 participant