Cannot use load_from_checkpoint
in an offline environment
#225
Labels
enhancement
New feature or request
load_from_checkpoint
in an offline environment
#225
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: