-
Notifications
You must be signed in to change notification settings - Fork 8
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
新增DAG时,算子设置PSI同样的字段属性,但前端选择框不一致 #20
Comments
收到 我们内部看下哈~ |
有结论是什么原因了吗?我怎么才能使用类似于PSI key的那种DAG风格呢? |
xx.io( |
|
补充一个情况,我将psi.py只修改名字的情况下拷贝成psi2.py。然后生成的dag变成了 |
{ |
您好,经过排查,需要麻烦补充一下注册的逻辑即可。 // component-config-protocol.ts
export const codeNameRenderKey = {
'read_data/datatable': 'DATA_TABLE_SELECT',
'data_prep/psi': 'UNION_KEY_SELECT',
'data_prep/anony_psi': 'UNION_KEY_SELECT', // 👈 您需要补充的
'preprocessing/psi': 'UNION_KEY_SELECT',
'preprocessing/sqlite': 'SQL',
}; 注册了这个组件之后,才会走进相应的渲染规则: // config-render-contribution.ts
{
canHandle: (node: AtomicConfigNode, renderKey?: string) => {
return renderKey === 'UNION_KEY_SELECT' && node.type === 'AT_SF_TABLE_COL'
? 3
: false;
},
component: DefaultColSelection,
}, |
需要修改前端代码指定下拉框风格是吗? |
并非单纯的下拉框风格,建议根据具体的组件类型、数据结构,选择对应的渲染组件; export const codeNameRenderKey = {
//...
'data_prep/psi': 'UNION_KEY_SELECT',
//...
}; 上述约定的意思是:如果遇到 psi (codeName: data_prep/psi)组件,会注册特殊的 renderKey:UNION_KEY_SELECT,并结合 AT_SF_TABLE_COL 类型,把 [输入桩] 在配置面板中渲染成下拉式的、可选择多关联键的配置项组件:DefaultColSelection |
好的,明白了,感谢解答 |
Issue Type
Others
Source
binary
Secretflow Version
v1.5.0.dev240319
OS Platform and Distribution
centos
Python version
3.10.14
Bazel version
No response
GCC/Compiler version
No response
What happend and What you expected to happen.
Reproduction code to reproduce the issue.
The text was updated successfully, but these errors were encountered: