IvanaXu / iDeepRec

DeepRec For Me https://github.com/alibaba/DeepRec
https://deeprec.readthedocs.io/zh/latest/index.html
Apache License 2.0
3 stars 1 forks source link

part1 🌈 w0.3 storage_size=[1024*1024*1024, 10*1024*1024*1024] #36

Closed IvanaXu closed 1 year ago

IvanaXu commented 1 year ago

下面是EmbeddingVariable多级存储的接口定义:

@tf_export(v1=["StorageOption"]) class StorageOption(object): def init(self, storage_type=None, storage_path=None, storage_size=[102410241024]): self.storage_type = storage_type self.storage_path = storage_path self.storage_size = storage_size 参数解释:

stroage_type:使用的存储类型, 例如DRAM_SSD为使用DRAM和SSD作为embedding的存储,具体支持的存储类型会在第4节中给出 storage_path: 如果使用SSD存储,则需要配置该参数指定保存embedding数据的文件夹路径 storage_size: 指定每个层级可以使用的存储容量,单位是字节,例如对于DRAM+PMem要使用1GB DRAM和 10GB PMem,则配置为[102410241024, 1010241024*1024],默认是每级1GB,目前的实现中无法限制SSD的使用量