mindsdb 有一个permanent_storage 的配置,目前包含了三种模式,absent 不进行持久化,local 使用本地的,s3使用对象存储
配置参考
{
"permanent_storage": {
"location": "local"
"bucket": "s3_bucket_name" # optional
},
s3 模式简单说明
对于local 以及absent 比较简单,就是读写本地的,对于s3的配置,目前官方缺少比较完整的说明,结合源码我们可以看到一些信息
- 参考配置
{
"permanent_storage": {
"location": "s3"
"bucket": "s3_bucket_name" # optional,
"s3_credentials": {
"endpoint_url":"",
"aws_access_key_id":"",
"aws_secret_access_key":""
}
},
permanent_storage的使用
从源码看目前主要是mindsdb 内部的lightwood需要使用,实际写入会结合资源组,公司,以及相关id 处理,lightwood 是一个机器学习的处理框架
- 参考路径格式
fs = FileStorage(
resource_group=RESOURCE_GROUP.PREDICTOR, resource_id=predictor_id, sync=True
)
说明
从源码上看部分信息实际与官方文档的并不是一致的,最好还是结合源码学习,会清晰不少
参考资料
https://docs.mindsdb.com/setup/custom-config
https://github.com/mindsdb/mindsdb/blob/125dc1be20253cfba2854c91c8c3efdbae36dd7d/mindsdb/interfaces/storage/fs.py
https://github.com/mindsdb/mindsdb/blob/19e6d222fdd26ac6e882f89f2cbd3a11076c1967/mindsdb/integrations/handlers/lightwood_handler/functions.py