libcity.utils.utils¶
-
libcity.utils.utils.ensure_dir(dir_path)[源代码]¶ Make sure the directory exists, if it does not exist, create it.
- 参数
dir_path (str) – directory path
-
libcity.utils.utils.get_evaluator(config)[源代码]¶ according the config[‘evaluator’] to create the evaluator
- 参数
config (ConfigParser) – config
- 返回
the loaded evaluator
- 返回类型
-
libcity.utils.utils.get_executor(config, model, data_feature)[源代码]¶ according the config[‘executor’] to create the executor
- 参数
config (ConfigParser) – config
model (AbstractModel) – model
- 返回
the loaded executor
- 返回类型
AbstractExecutor
-
libcity.utils.utils.get_logger(config, name=None)[源代码]¶ 获取Logger对象
- 参数
config (ConfigParser) – config
name – specified name
- 返回
logger
- 返回类型
Logger
-
libcity.utils.utils.get_model(config, data_feature)[源代码]¶ according the config[‘model’] to create the model
- 参数
config (ConfigParser) – config
data_feature (dict) – feature of the data
- 返回
the loaded model
- 返回类型