modbot.environment.BaseConfig
- class modbot.environment.BaseConfig(file_name=None, args=None)[source]
 Bases:
objectBase config class
Methods
get_config([file_name, config])Get configuration from file
save(outpath)Save config to json file
update_config(args)Update config with args
Attributes
Threshold probability for moderation
Path to bert encoder
Path to bert preprocess model
Channel to moderate
Path to Chatty data for training
Threshold probability to check for new classification
Directory where training data and model is stored
config file path
file for training
Log level.
Directory to write logs
Get default log file name
Path to ML model
Type of model to use for moderation
Bot username
Whether to allow links in chat or not
Ratio of ones to total number of samples for training data
Whether to send message in chat when probability is exceeded
Whether to write chat messages to log file
Config attributes info
Get public attributes
- ACT_PMIN = 0.6
 Threshold probability for moderation
- BERT_ENCODER = 'https://tfhub.dev/tensorflow/small_bert/bert_en_uncased_L-2_H-128_A-2/2'
 Path to bert encoder
- BERT_PREPROCESS = 'https://tfhub.dev/tensorflow/bert_en_uncased_preprocess/3'
 Path to bert preprocess model
- CHANNEL = None
 Channel to moderate
- CHATTY_DIR = None
 Path to Chatty data for training
- CHECK_PMIN = 0.4
 Threshold probability to check for new classification
- DATA_DIR = '/home/runner/work/modbot/modbot/data'
 Directory where training data and model is stored
- FILE_NAME = None
 config file path
- INFILE = None
 file for training
- LOGGER_LEVEL = 'VERBOSE'
 Log level.
- LOG_DIR = '/home/runner/work/modbot/modbot/data/logs'
 Directory to write logs
- property LOG_PATH
 Get default log file name
- MODEL_PATH = None
 Path to ML model
- MODEL_TYPE = 'SVM'
 Type of model to use for moderation
- NICKNAME = None
 Bot username
- NOLINKS = False
 Whether to allow links in chat or not
- OFFENSIVE_WEIGHT = 0.01
 Ratio of ones to total number of samples for training data
- PMSG_ON = False
 Whether to send message in chat when probability is exceeded
- WRITE_LOG = True
 Whether to write chat messages to log file
- property attrs
 Config attributes info
- property public_attrs
 Get public attributes
- Returns
 Dictionary of public global attributes
- Return type
 dict