MantisAI/hugie

Add random suffix to endpoint name

Closed this issue · 4 comments

It would be nice if we can add a random suffix to the endpoint name so that we don't need to delete an existing endpoint when we create a new one from the same config (we can't have two endpoints with the same name).

Things to note:

  • There seems to be a character limit on endpoint names. Too many, and the request will fail (we don't handle that error very gracefully)
  • If we append a suffix do we want to add the suffix into the config file?
  • If we do, then the next time we just that config, a new suffix will get appended to the old suffix. Not ideal.
  • if we don't, the config file will be out of sync with the deployed endpoint. This will be a problem if we try to run hugie endpoint update.

This is currently only an issue because endpoint update does not let us update the revision of the model deployed on the instance, but HF have said that this may come.

Maybe a solution to this is to add a --name-suffix option which allows the user to specify a custom suffix (e.g. a version number). The instance would get deployed with this suffix, but it would not change the config file.

This would mean that

  1. The config file does not reflect 100% the deployed endpoint
  2. It would not prevent a new endpoint being deployed if one exists with the same name as specified in the config.
  3. Rather than a version number, it could be the ref. This would be a branch, git tag, or commit hash from the HF repo. A commit hash would need to be truncated, endpoints with too long names fail to deploy.

Is this still relevant since we have update the revision of an endpoint now?

Nope, we can bin this.