IBM / taxinomitis

Source code for Machine Learning for Kids site
https://machinelearningforkids.co.uk
Apache License 2.0
145 stars 139 forks source link

Admin text-models limit is wrong if Free tier is used #20

Closed dalelane closed 6 years ago

dalelane commented 6 years ago

The code is hard-coded based on the workspaces limit of the Standard tier

dalelane commented 6 years ago

There is an explanation of why the limits are wrong here https://github.com/IBM/taxinomitis/blob/0f30eed534d6fb0a97caffd3ab120e8a3df8e9ec/public/components/help/help.html#L343-L387

dalelane commented 6 years ago

The place where it is hard-coded is here: https://github.com/IBM/taxinomitis/blob/0f30eed534d6fb0a97caffd3ab120e8a3df8e9ec/src/lib/restapi/users.ts#L203-L204

The number of Watson Assistant credentials is multiplied by 20 (because each Standard tier service instance supports 20 workspaces) The number of Visual Recognition credentials is multiplied by 1 (because each Free tier service instance supported 1 classifier)

dalelane commented 6 years ago

I don't think there is an API that would let us query the tier / models-limit dynamically, so I suspect the only way to fix this is to start storing the tier with the service credentials https://github.com/IBM/taxinomitis/blob/0f30eed534d6fb0a97caffd3ab120e8a3df8e9ec/src/lib/training/training-types.ts#L5-L14