-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
How would you create custom models using typescript #679
Comments
@philihp I'm running into the same thing. I'd like to test out the other models, but they're not exported. The readme incorrectly shows importing a private path inside the module, which we obviously can't do: I'm pretty new to node.js so correct me if I'm missing something, but this seems like a miss, and all of those models SHOULD be exported in the main index.js? Thanks @vivekjoshy I don't think this is a question, this is a bug. EDITOK, seems like
does work, despite this not working
not working, which is odd when os.rate and os.rating work. The docs need to be updated to give a proper example rather than importing a private folder, and the names of all the other model classes should be listed in the documentation as nothing autocompletes for this so we're just left guessing or have to go digging through the github source still. |
@thinkong your issue should be resolved with #690 @EklipZgit i think your issue is different, but it should be solved by #687, thank you @eddyfidel! i'll push out a new version in a moment. |
Should be fixed in 4.1.0, please let me know if anything is wonky! |
@philihp so the actual models you can pick from aren't exported still (plackettLuce for example).
and that type is still unknown, even though this works. It would also be great to have examples of how to pass custom parameters to the models (for example the python impl How would I run with plackettLuce with limit_sigma, or tweaked beta, etc? EDIT, actually,
worked before but no longer works after the update (bradleyTerryFull is now undefined). I can't even select one of the other models now, as without them exported and the change you made to the way you were pulling in types, I guess this now prevents those from being pulled out of the module at all. So, I think you need to explicitly export those, too. |
@EklipZgit it seems you're facing an issue with importing models and passing custom parameters in the latest version of the
This should allow you to customize the parameters you're interested in, such as |
Noted! I'll reopen this and see if I can do better on the next iteration, but if you'd like to submit a PR to add this doc I'd love to include it. |
Hi,
I am trying to implement some kind of custom model that would work with my game.
I am currently using typescript and was trying to import 'Model' but it seems that 'types' is not actually exported.
Is there a recommended way to create a custom model?
Also.. I can't find how I can use the other models via typescript. It seems the models folder is not actually exported to to use.
The text was updated successfully, but these errors were encountered: