It takes two parameters model_path and model_root:
[x] model_path indicates either the name of a model (e.g., elit_pos_flair_en_mixed_*) or the URL to a compressed file in the S3 bucket, and does not have a default value.
[x] model_root points to the root directory in the local machine where all models are saved, and has the default value of ~/.elit/models/.
If model_path points to a remote compressed file:
[x] It downloads and unzips the compressed file to model_root, which creates a directory with the same name as the remote file (e.g., ~/.elit/models/elit_pos_flair_en_mixed_*).
[x] If the downloaded model has dependencies to other models indicated in config.json (e.g., elit_lm_flair-bw_en_mixed_*), it downloads all dependent files and unzips them under model_root. This dependency resolution needs to be called recursively.
The
load
functions need to be updated as follows:model_path
andmodel_root
:model_path
indicates either the name of a model (e.g.,elit_pos_flair_en_mixed_*
) or the URL to a compressed file in the S3 bucket, and does not have a default value.model_root
points to the root directory in the local machine where all models are saved, and has the default value of~/.elit/models/
.model_path
points to a remote compressed file:model_root
, which creates a directory with the same name as the remote file (e.g.,~/.elit/models/elit_pos_flair_en_mixed_*
).config.json
(e.g.,elit_lm_flair-bw_en_mixed_*
), it downloads all dependent files and unzips them undermodel_root
. This dependency resolution needs to be called recursively.