Skip to content

Conversation

@aditya0by0
Copy link
Member

@aditya0by0 aditya0by0 commented Nov 1, 2025

Fixes #131

Changes

  • Argument Linking for Weighted BCE Loss,
  • Raise error if no weights given for Weighted BCE loss
  • Another Class for Unweighted BCE Loss
  • Update MLP test for Unweighted BCE Loss

@aditya0by0 aditya0by0 self-assigned this Nov 1, 2025
@aditya0by0
Copy link
Member Author

The below were changes deleted for weighted bce link. But I am just reverting only the first argument linking as the second one serves no purpose.

        parser.link_arguments(
            "data", "model.init_args.criterion.init_args.data_extractor"
        )
        parser.link_arguments(
            "data.init_args.chebi_version",
            "model.init_args.criterion.init_args.data_extractor.init_args.chebi_version",
        )

https://github.com/ChEB-AI/python-chebai/pull/71/files

@aditya0by0 aditya0by0 requested a review from sfluegel05 November 9, 2025 12:09
@aditya0by0 aditya0by0 marked this pull request as ready for review November 9, 2025 12:10
@sfluegel05
Copy link
Collaborator

I like the separation of weighted / unweighted into separate classes. If we force the user to use the beta parameter, why not do that in the signature? So instead of having beta: Optional[float] = None, we could have beta: float = 0.99. In my experience, 0.99 is the only value I have ever used there so it would be a sensible default.

@sfluegel05
Copy link
Collaborator

Thanks for implementing this.

@sfluegel05 sfluegel05 merged commit 678ae19 into dev Nov 17, 2025
5 checks passed
@sfluegel05 sfluegel05 deleted the fix/weighted_bce_loss branch November 17, 2025 14:29
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.

Linking data module to BCELoss is broken

3 participants