-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Cannot use load_from_checkpoint
in an offline environment
#225
Comments
yep, this seems good to me! |
I made a PR for this issue, please check it :) Additionally, I think it is also needed to add |
Hi @zzaebok thanks for the PR! I am on vocations and going to ACL next week so it might take me some time but I will look at it ASAP. |
any updates? |
i need this update as well :) |
do i simply place the downloaded (eg. xlm-roberta-large) and place it on the parent folder? |
I modified the local comet configs |
@vergilus appreciate your feedback 👍 working now :) |
Motivation
Due to the policy of my company, I cannot access to an online server (e.g., huggingface).
So I tried to use
load_from_checkpoint
function after I manually downloadedwmt22-comet-da
checkpoint.However, it makes an SSL error "SSLError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded".
This error is raised because of missing
local_files_only
param to each model'sfrom_pretrained
method.🚀 Feature
I think COMET needs to support
local_files_only
parameter toload_from_checkpoint
function not to raise http connection error.Below is my current solution to the problem.
local_files_only
param toload_from_checkpoint
.load_from_checkpoint
(https://github.com/Unbabel/COMET/blob/master/comet/models/__init__.py#L88)LightningModule
'sload_from_checkpoint
usingkwargs
.local_files_only
param toCometModel.__init__()
(https://github.com/Unbabel/COMET/blob/master/comet/models/base.py#L94)from_pretrained
(https://github.com/Unbabel/COMET/blob/master/comet/models/base.py#L119)local_files_only
param to each encoder classes'__init__
such asCan I make a PR?
Please let me know if there is better way.
The text was updated successfully, but these errors were encountered: