secretflow / secretflow

A unified framework for privacy-preserving data analysis and machine learning
https://www.secretflow.org.cn/docs/secretflow/en/
Apache License 2.0
2.34k stars 386 forks source link

新增官方算法compare组件后报错 #1534

Open Afive233 opened 1 week ago

Afive233 commented 1 week ago

Issue Type

Bug

Source

binary

Secretflow Version

0.10.0b0

OS Platform and Distribution

ubantu 18.04

Python version

3.10.13

Bazel version

No response

GCC/Compiler version

No response

What happend and What you expected to happen.

output_uris: \"fvrk-adoityup-node-33-output-0\"
output_uris: \"fvrk-adoityup-node-33-output-1\"
checkpoint_uri: \"ckfvrk-adoityup-node-33-output-0\"
 failed, error <'CompEvalContext' object has no attribute 'local_fs_wd'>
2024-10-11 07:17:35.524 INFO api.py:342 [bob] -- [Anonymous_job] Shutdowning rayfed intendedly...
2024-10-11 07:17:35.524 INFO api.py:356 [bob] -- [Anonymous_job] No wait for data sending.
2024-10-11 07:17:35.526 INFO message_queue.py:72 [bob] -- [Anonymous_job] Notify message polling thread[DataSendingQueueThread] to exit.
2024-10-11 07:17:35.526 INFO message_queue.py:72 [bob] -- [Anonymous_job] Notify message polling thread[ErrorSendingQueueThread] to exit.
2024-10-11 07:17:35.526 INFO api.py:384 [bob] -- [Anonymous_job] Shutdowned rayfed.
Traceback (most recent call last):
  File \"/usr/local/lib/python3.10/runpy.py\", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File \"/usr/local/lib/python3.10/runpy.py\", line 86, in _run_code
    exec(code, run_globals)
  File \"/usr/local/lib/python3.10/site-packages/secretflow/kuscia/entry.py\", line 551, in <module>
    main()
  File \"/usr/local/lib/python3.10/site-packages/click/core.py\", line 1157, in __call__
    return self.main(*args, **kwargs)
  File \"/usr/local/lib/python3.10/site-packages/click/core.py\", line 1078, in main
    rv = self.invoke(ctx)
  File \"/usr/local/lib/python3.10/site-packages/click/core.py\", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File \"/usr/local/lib/python3.10/site-packages/click/core.py\", line 783, in invoke
    return __callback(*args, **kwargs)
  File \"/usr/local/lib/python3.10/site-packages/secretflow/kuscia/entry.py\", line 531, in main
    res = comp_eval(sf_node_eval_param, storage_config, sf_cluster_config)
  File \"/usr/local/lib/python3.10/site-packages/secretflow/component/entry.py\", line 179, in comp_eval
    res = comp.eval(
  File \"/usr/local/lib/python3.10/site-packages/secretflow/component/component.py\", line 1195, in eval
    raise e from None
  File \"/usr/local/lib/python3.10/site-packages/secretflow/component/component.py\", line 1190, in eval
    ret = self.__eval_callback(ctx=ctx, **kwargs)
  File \"/usr/local/lib/python3.10/site-packages/secretflow/component/compare.py\", line 97, in ss_compare_eval_fn
AttributeError: 'CompEvalContext' object has no attribute 'local_fs_wd'
['__annotations__', '__class__', '__dataclass_fields__', '__dataclass_params__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__match_args__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'cluster_config', 'comp_checkpoint', 'comp_storage', 'data_dir', 'heu_config', 'initiator_party', 'spu_configs', 'tracer']

Reproduction code to reproduce the issue.

/
wangzul commented 1 week ago

我们已经发现文档中部分代码和最新版本不匹配,请耐心等待一下,修复更新后会尽快告知。

wangzul commented 6 days ago

你这边参考的注册组件文档是那个版本的。

Afive233 commented 6 days ago

你这边参考的注册组件文档是那个版本的。

1.8.0b0 当时改了改update_component的脚本,compare组件内容没有动

wangzul commented 6 days ago

你这边参考的注册组件文档是那个版本的。

1.8.0b0 当时改了改update_component的脚本,compare组件内容没有动

辛苦参照allinone1.9.0b2文档中修改隐语代码这部分secretflow组件代码部分做一下替换然后在次尝试一下

Afive233 commented 6 days ago

你这边参考的注册组件文档是那个版本的。

1.8.0b0 当时改了改update_component的脚本,compare组件内容没有动

辛苦参照allinone1.9.0b2文档中修改隐语代码这部分secretflow组件代码部分做一下替换然后在次尝试一下

好的,我部署在自己的虚拟机,能否直接分别进到alice和bob容器的本地持久化目录下把相应secretflow下的文件做替换 呢

wangzul commented 5 days ago

你这边使用的sf版本是0.10的吗?secretflow目前最新版本为1.9.0b2.