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 #106, allow external samplers. #115

Merged
merged 2 commits into from
May 13, 2024

Conversation

zeyus
Copy link
Collaborator

@zeyus zeyus commented May 11, 2024

Added typing to fit_model and added test.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.05%. Comparing base (bb44028) to head (8fc13ee).

Additional details and impacted files
@@             Coverage Diff             @@
##              dev     #115       +/-   ##
===========================================
- Coverage   78.73%   68.05%   -10.68%     
===========================================
  Files          26       26               
  Lines         743      742        -1     
===========================================
- Hits          585      505       -80     
- Misses        158      237       +79     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@PTWaade PTWaade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a shared supertype for AbstractSampler and InferenceAlgorithm we can use..? Otherwise, this looks great

@zeyus
Copy link
Collaborator Author

zeyus commented May 11, 2024

Is there a shared supertype for AbstractSampler and InferenceAlgorithm we can use..? Otherwise, this looks great

Unfortunately I don't think there is, I had a look through the different function signatures for sample and I could see definitions for both. I checked the sulertypes and neither inherit from a common base...

The only thing I thought of is they need to implement the the step method and one other (but I couldn't find a way to say in Julia that it should fit this kind of interface?) if it's possible that would be better than the union type

@PTWaade PTWaade merged commit 41c57ac into ilabcode:dev May 13, 2024
3 checks passed
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.

Make the typing for fit_model allow for setting custom samplers (currently it doesn't)
3 participants