Skip to content

Conversation

@lukevs
Copy link

@lukevs lukevs commented Aug 6, 2023

The constructor for CVModel in TopicMembershipModel is incorrect and is causing adatest to throw errors when generating topics:

TypeError: CVModel.__init__() missing 2 required positional arguments: 'embeddings' and 'labels'

Removed the fit call because it happens internally in the __init__.

Also fixed the init to set class_weight to 1 for the passed in labels, instead of assuming labels are "pass" / "fail" (for TopicMembershipModel they are "on_topic" / "off_topic") - I think class_weight = 1 is the default behavior, but will keep for consistency

Now matches the other CVModel usage here: https://github.com/microsoft/adatest/blob/a77b5968dca69480aaf11af9a326bafab7c345a8/adatest/_topic_model.py#L93

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