SenticGCNBert confi...
 
Notifications
Clear all

Question SenticGCNBert config file

20 Posts
4 Users
2 Likes
132 Views
Tristonchan
Posts: 3
Member
Topic starter
(@tristonchan)
Active Member
Joined: 2 weeks ago

Hi, for Sentic-GCN Bert config file, for evaluation, what does the "model_path" refer to? 

19 Replies
Raymond Ng
Posts: 23
AISG Staff
(@raymond_aisg)
Eminent Member
Joined: 4 months ago

Hi, the "model_path" configuration refers to either a local folder path that contains the model weights and model config file or a URL address pointing a folder to a cloud storage bucket folder containing the same items (e.g. the default path for "model_path" points to the pre-trained weights and config trained by AI Singapore).

For details, please refer to the code here where the "model_path" configuration is used.

https://github.com/aisingapore/sgnlp/blob/83fb17170ec06436f58cd2758b6824b0d8c160a8/sgnlp/models/sentic_gcn/eval.py#L182

Thank you.

Reply
Tristonchan
Posts: 3
Member
Topic starter
(@tristonchan)
Active Member
Joined: 2 weeks ago

Hi thank you for the prompt reply, the folder that contains the model weights and model config file is generated after training our model? and is the sample config file default "model_path" use-able or we will have to change it? Thank you!

Reply
1 Reply
Raymond Ng
AISG Staff
(@raymond_aisg)
Joined: 4 months ago

Eminent Member
Posts: 23

Hi,

That is correct, you can specify the 'save_model_path' configuration to specify the folder path to save the trained model weights and configuration after the training has been completed.

If the default 'save_model_path' configuration is used, a folder named 'senticgcnbert' will be created locally and the trained weights and configuration will be saved there.

https://github.com/aisingapore/sgnlp/blob/main/sgnlp/models/sentic_gcn/config/sentic_gcn_bert_config.json#L14

Thank you

Reply
Tristonchan
Posts: 3
Member
Topic starter
(@tristonchan)
Active Member
Joined: 2 weeks ago

Hi, what is the difference between "save_model_path" and "model_path" under eval_args?

Reply
1 Reply
Raymond Ng
AISG Staff
(@raymond_aisg)
Joined: 4 months ago

Eminent Member
Posts: 23

@tristonchan 

The `save_model_path` config denotes the folder path for saving the model weights, config, and metrics for the training stage used in `train.py`.

https://github.com/aisingapore/sgnlp/blob/main/sgnlp/models/sentic_gcn/train.py#L100

The `eval_args\model_path` config denotes the folder path where the trained model weights and model config are placed for the purpose of loading the model and running the evaluation used in `eval.py`
https://github.com/aisingapore/sgnlp/blob/main/sgnlp/models/sentic_gcn/eval.py#L230

Hope this helps.

Reply
Alon
Posts: 1
 Alon
Moderator
(@alon)
New Member
Joined: 4 months ago

Hi, 
The "save_model_path" is used as the folder path to save the trained model weights and configuration after the training has been completed (as mentioned), but those are not necessary the input you would like to use for future prediction removed link  
The "model_path" is where the code looks for the weights/config to be used for training removed link  
You should place there the weights/config you wish to use. 
If you wish to use a recently trained model (weights/config), then you will need to transfer those from the "save_model_path" to the "model_path" directory.

Reply
Page 1 / 3
Share: