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

Fixes bug with optional features encoder #220

Merged
merged 2 commits into from
Jul 30, 2024

Conversation

kylebgorman
Copy link
Contributor

The logic in train.py was to use a separate features encoder module if:

  • features are present in the datamodule
  • the model requires features to be separate from source (e.g., pointer-generators)
  • and a separate features encoder module is requested.

This is incorrect; the logic should read:

  • features are present in the datamodule, and
    - a separate features encoder module is requested, or
    - the model requires features to be separate from source.

In the case where the model requires it but a specific features encoder module is not specified, we use the same module as the source encoder; e.g., a pointer-generator LSTM will have an LSTM source encoder and an LSTM features encoder.

The README was also out of date: the flags are --source_encoder_arch and --features_encoder_arch (was missing the _arch part).

The logic in `train.py` was to use a separate features encoder module if:

- features are present in the datamodule
- the model requires features to be separate from source (e.g., pointer-generators)
- and a separate features encoder module is requested.

This is incorrect; the logic should read:

- features are present in the datamodule, and
    - a separate features encoder module is requested, or
    - the model requires features to be separate from source

In the case where the model requires it but a specific features encoder module is not specified, we use the same module as the source encoder; e.g., a pointer-generator LSTM will have an LSTM source encoder and an LSTM features encoder.

The README was also out of date: the flags are `--source_encoder_arch` and `--features_encoder_arch` (was missing the `_arch` part).
@kylebgorman kylebgorman marked this pull request as ready for review July 30, 2024 03:53
@kylebgorman
Copy link
Contributor Author

This is now thoroughly tested so I'm submitting.

@kylebgorman kylebgorman merged commit e2beeda into CUNY-CL:master Jul 30, 2024
7 checks passed
@kylebgorman kylebgorman deleted the disjunction branch July 30, 2024 13:33
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

Successfully merging this pull request may close these issues.

1 participant