LBlend / mann-eller-kvinne

🤵 En nettside som bruker maskinlæring til å gjette om du er mann eller kvinne basert på hva du skriver 💃
https://mannellerkvinne.lblend.moe
GNU General Public License v3.0
1 stars 0 forks source link

Add config setup for hparam tuning #42

Closed marksverdhei closed 2 years ago

marksverdhei commented 3 years ago

This pull request includes an implementation of hyperparameter selection from config files. The configs are in yaml format, and should follow the pattern of rnn_default.yaml. This pr also includes tensorboard metrics for the model

Closes #41

LBlend commented 3 years ago

There's an error

File "/app/src/classifier.py", line 14, in <module>
    rnn_model = keras.models.load_model('bin/rnn')

ValueError: Unable to restore custom object of type _tf_keras_rnn_layer currently. Please make sure that the layer implements `get_config`and `from_config` when saving. In addition, please use the `custom_objects` arg when calling `load_model()`.

I've only tested using the current docker-compose configuration

marksverdhei commented 2 years ago

What version of tensorflow are you using in the docker container?

LBlend commented 2 years ago

What version of tensorflow are you using in the docker container?

It's too long time ago for me to remember but basing of the date of the pull request comment I'm guessing 2.6.0 or 2.4.2

marksverdhei commented 2 years ago

I see. I've been trying to reproduce the error but i'm having trouble setting up a docker configuration on my computer. Looking at the error, it looks like the problem might be a TF version discrepency which is why I asked for the version, given that it works ~fine when building it manually. This is another motivation for #45

LBlend commented 2 years ago

Ok, I'm assuming that it's fine then and that it'll fix itself when rewriting the backend. Since I'm not gonna update the server instance before completing the rewrite I'm just gonna go ahead and merge the pulll request. It's no big deal whether or not the build breaks for now

LBlend commented 2 years ago

Does that sound good to you?

marksverdhei commented 2 years ago

Yep

marksverdhei commented 2 years ago

Or well, whether it will fix itself might depend on the TF version we end up using. FYI i've been running TF Version: 2.4.1

marksverdhei commented 2 years ago

Just realized now that after running the black autoformatter, it replaced all single quotes with double quotes. Maybe this should be reverted. Oops

LBlend commented 2 years ago

No worries. We'll fix it later. I'm thinking of changing the requirements anyway so that black or some other formatter will do everything automatically for us