-
Notifications
You must be signed in to change notification settings - Fork 361
[OSPP 2022] DeepRec supports exporting models to key-value NoSQL databases -> The first feature submission #470
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: main
Are you sure you want to change the base?
Conversation
…here will be update submissions in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add unittest
void DumpEvWithGlobalStep(OpKernelContext* context, int variable_index, | ||
const string& tensor_name, BundleWriter& writer, | ||
DataType global_step_type) { | ||
void DumpEvWithGlobalStep(OpKernelContext* context, int variable_index, const string& tensor_name, BundleWriter& writer, DataType global_step_type) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
单行不要超过80字符,还原之前的写法
下同
|
||
const int kFixedInputs = 3; // Prefix, tensor names, shape_and_slices. | ||
const int num_tensors = static_cast<int>(tensor_names.NumElements()); | ||
const int num_tensors = static_cast<int>(tensor_names.NumElements()); //获取tensor个数 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
去掉中文注释
const string& prefix_string = prefix.scalar<tstring>()(); | ||
const auto& tensor_names_flat = tensor_names.flat<tstring>(); | ||
const auto& shape_and_slices_flat = shape_and_slices.flat<tstring>(); | ||
|
||
BundleWriter writer(Env::Default(), prefix_string); | ||
const int Nosql_Marker = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
统一变量命名规则,小写下划线
这个是不是逻辑未完成,需要传入参数控制
Status AppendSegmentData(char* content, int64 data_bytes_written); | ||
void EndSegmentData(int64 total_bytes_written, int64 end_bytes_written); | ||
// Partitioned variables support. | ||
// A slice of a full tensor is stored in two entries in the metadata table: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove useless code
issue #341 |
Complete the first feature submission, please do not merge for now, there will be update submissions in the future.