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

Generalize the base class signature. #17

Open
dhruvdcoder opened this issue Jun 10, 2021 · 0 comments
Open

Generalize the base class signature. #17

dhruvdcoder opened this issue Jun 10, 2021 · 0 comments

Comments

@dhruvdcoder
Copy link
Collaborator

dhruvdcoder commented Jun 10, 2021

https://github.com/dhruvdcoder/structured_prediction_baselines/blob/cf7dbf23439c9cc817eebe25545c25b0cf7dfd9f/structured_prediction_baselines/modules/loss/dvn.py#L184-L186

https://github.com/dhruvdcoder/structured_prediction_baselines/blob/cf7dbf23439c9cc817eebe25545c25b0cf7dfd9f/structured_prediction_baselines/modules/loss/dvn.py#L322

This violates the base-class return type-- the caller has to implement an if condition.

The solution is to generalize the base-class function signature.

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