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

Add autotune option #38

Open
alanault opened this issue Sep 19, 2019 · 11 comments
Open

Add autotune option #38

alanault opened this issue Sep 19, 2019 · 11 comments

Comments

@alanault
Copy link

Hi there,

I saw on the Fasttext page here they've added an autotune feature, which automatically optimizes the various hyperparameters.

Seems it can be activated with the -autotune-validation option, which isn't currently supported. Wondered if this could be added with the updates for CRAN?

https://fasttext.cc/docs/en/autotune.html

best

Alan

@pommedeterresautee
Copy link
Owner

Hi,

Will work on it since I need to fix something else to be back on Cran...
Hope next week I will have some time to work on it.

@alanault
Copy link
Author

Sounds great - intrigued to see the results of this output

@alanault
Copy link
Author

Hi there, just wondered how this was coming on?

I'm not familiar with Rcpp, but happy to help on any R-based areas if that's useful?

@pommedeterresautee
Copy link
Owner

Hello, I have updated the C++ code. Should work using command line. Do you think it would make sense to have a R API for this?

@alanault
Copy link
Author

Hi: that's fantastic!

Yes, I was thinking it could just be exactly the same as the other calls, just with the -autotune-validation passed as an option in the execute command, along with the validation file.

So, to use the supervised example:
execute(commands = c("supervised", "-input", train_tmp_file_txt, "-output", tmp_file_model, "-autotune-validation", valid_tmp_file_text))

That way everything is consistent within the execute command?

@pommedeterresautee
Copy link
Owner

I think so. Not yet tried. If you check, can you let me know if it works?

@alanault
Copy link
Author

Installed 0.3.4 So the call seems to work just fine... however each time I try it I get a C stack usage crash (is too close to the limit).

I'm only training on 100k short sentences and it crashes within seconds at (0.8% of completion), so wonder if something else is going on?

@pommedeterresautee
Copy link
Owner

does it crash in other situations?

@alanault
Copy link
Author

No - if I remove the -autotune-validation argument and just make the same call train, then it runs just fine on the same data, so must be related to the validation...

@alanault
Copy link
Author

Did a test using the command line version and this worked fine, so the issue must be somewhere inside the rcpp wrapper

@alanault
Copy link
Author

Any luck with this?

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

No branches or pull requests

2 participants