Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OSPP 2022] DeepRec supports exporting models to key-value NoSQL databases -> The first feature submission #470

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

MrRobotsAA
Copy link

Complete the first feature submission, please do not merge for now, there will be update submissions in the future.

…here will be update submissions in the future.
@CLAassistant
Copy link

CLAassistant commented Sep 29, 2022

CLA assistant check
All committers have signed the CLA.

@MrRobotsAA MrRobotsAA changed the title The first feature submission [OSPP 2022] DeepRec supports exporting models to key-value NoSQL databases -> The first feature submission Sep 29, 2022
Copy link
Collaborator

@candyzone candyzone left a 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) {
Copy link
Collaborator

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个数
Copy link
Collaborator

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;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

统一变量命名规则,小写下划线
这个是不是逻辑未完成,需要传入参数控制

tensorflow/core/kernels/save_restore_v2_ops.cc Outdated Show resolved Hide resolved
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:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove useless code

@candyzone
Copy link
Collaborator

issue #341

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants