-
Notifications
You must be signed in to change notification settings - Fork 116
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
Offline installation #52
Comments
Download all the files from the hub. I think the following code should then work:
|
@nreimers this works a treat but I hit another issue with fasttext being called by the script:-
I actually have separate code in my script using fasttext successfully and it is installed. I think the issue lies in the fact that as this is an offline system, the lid.176.ftz_ file isn't in the correct path neither for where the easynmt.py script is looking for it. Looking at the easyNMT.py, the relevant segment appears to be:-
So it would appear that _cache_folder is where the file should be stored. I can't work out where this _cache_folder is though? I did find the below but couldn't work out where this related to:-
Any ideas @nreimers where I can store the lid.176.ftz on a Windows system manually? |
You can set the environment variable EASYNMT_CACHE to point to any folder you like. Otherwise, when you call translate and pass the source_lang, then no automatic language detection happens. So you could wrap your translate function, that you do the language detection (if needed) and pass it to model.translate |
Further to the above, I managed to address this by using the cache_folder parameter:-
|
Is there the way to download all models one time from hub by any CLI? to specific path= ? |
@Tortoise17 You can use standard git checkout to get the model files:
will download all files from https://huggingface.co/facebook/m2m100_1.2B |
Thank you. I hope that it has no limitations in terms of usage of text (except the size of the text chunk per input cli). |
Sadly I don't understand what you mean |
Is there any limit in the use of the model for translation when the transformer is used with the use of internet?? Limit means the characters per month or per day or CLI use per day limit? |
No, there is no such limit |
Thank you. and how to get all |
You have to download each individually |
I am trying to keep the model downloaded in the local disk as I have no space in native cache. I cloned and git-lfs installed. than
First it demaded the If you can guide once for I am confused where is the mistake. |
Hi, I was getting the same issue, you can store the ftz file in the same cache folder, after which there would be two outcomes,
for me it was completely random so what I did was, model_path = os.path.join(self._cache_folder, 'lid.176.ftz'), I harded the path, which is obviously not the right way but I also had a restricted machine and I couldn't find a work-around with my limited knowledge. Hope this helps |
I am trying to install easyNMT on a semi-offline system. Python libraries are permitted to be installed but accessing other URLs is not permitted from this system. Therefore, can you advise on a way of how to manually install the Facebook (m2m_100_418M and m2m_100_1.2B) models so that easyNMT can see them? I can see they can be manually downloaded from Huggingface.co. If I were to download these on a second system, where should I then save them on the semi-offline Windows system on which I intend to test eastNMT? Thanks
The text was updated successfully, but these errors were encountered: