How can I load models from any remote url
Hi,I want to set up a http file server (simples case would be http localhost) that will contain my models or simply fork a github repository with pretrained models. I see that when loading a pretrained model atransformersorsentence-transformerslibraries try to get files fromhuggingface.coby default. Is there a way to change it and load e.g. fromhttp://localhost:8000without modifying the insides of the library? E.g. i tried to simply put the url inpt_model = AutoModelForSequenceClassification.from_pretrained('http://localhost:8000'), but it failed to work. I also tried to usemirrorparameter with adding my address toPRESET_MIRROR_DICTin configuration_utils.py, but that is already modification that I want to avoid. It didn’t work besides.Is there any proper way to do so?
2021-08-25T01:28:31Z
you can try to paas yourhttp serveras  param like this:proxies = {"http": "http://localhost:8000"}
mode = AutoModelForSequenceClassification.from_pretrained(proxies)
2021-08-25T06:34:23Z
This seems to work just fine, thank you!
2021-08-26T11:56:15Z
Well, not really. Sorry for the false alert, but this doesn’t work. It worked for a while, since the path on the server was the same as the path to model locally, so it just read it from my disk.
2021-08-27T02:55:55Z
sorry, i misunderstood your question, the transformers library currently  dose not seem to support private host, you can look thisissuefor reference,  and there is aworkround you can try