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

使用SPU实现两个accuracy函数 #726

Open
Yeekin-GYJ opened this issue Jun 11, 2024 · 9 comments
Open

使用SPU实现两个accuracy函数 #726

Yeekin-GYJ opened this issue Jun 11, 2024 · 9 comments
Assignees
Labels
good first issue Good for newcomers OSCP SecretFlow Open Source Contribution Plan

Comments

@Yeekin-GYJ
Copy link

Yeekin-GYJ commented Jun 11, 2024

此 ISSUE 为 隐语开源共建计划(SecretFlow Open Source Contribution Plan,简称 SF OSCP)任务 ISSUE,欢迎社区开发者参与共建~
若有感兴趣想要认领的任务,但还未报名,辛苦先完成报名进行哈~

任务介绍

  • 任务名称: 使用 SPU 实现两个 accuracy 函数
  • 技术方向: SPU/SML
  • 任务难度: 热身🌟
  • 任务期望时间: 2-3 周

详细要求

  • 安全性: 无 reveal
  • 功能性: 需要实现以下几个 sklearn 中的函数
    a. balanced_accuracy
    b. top_k_accuracy
  • 收敛性: 包含 simulator 跑出的实验数据并且证明收敛/正确性
  • 代码规范: Python 代码需要使用 black+isort 进行格式化(流水线包含代码规范检查卡点)
  • 提交说明: 关联该 isuue 并提交代码至 https://github.com/secretflow/spu/tree/main/sml (具体目录位置请与reviewer讨论)
  • 特殊说明: 若某个特性有特殊的限制,如需要 FM128,需要更多 fxp 等需要在注释文档中明确说明

能力要求

  • 熟悉经典的机器学习算法
  • 熟悉 JAX 或 NumPy,可以使用 NumPy 实现算法

操作说明

Copy link

Stale issue message. Please comment to remove stale tag. Otherwise this issue will be closed soon.

@Candicepan Candicepan added good first issue Good for newcomers OSCP SecretFlow Open Source Contribution Plan and removed no-issue-activity labels Jul 16, 2024
@1160300918
Copy link

1160300918 Give it to me

@1160300918
Copy link

在spu项目中执行bazel build //... -c dbg命令时报错信息如下,请问是否不支持mac的M系列芯片
image

@anakinxc
Copy link
Contributor

anakinxc commented Aug 9, 2024

在spu项目中执行bazel build //... -c dbg命令时报错信息如下,请问是否不支持mac的M系列芯片 image

支持,请确认你的 shell 和 bazel 等都是 arm64 的版本

@1160300918
Copy link

谢谢老师,这个问题已解决,但是编译过程中提示cmake找不到flatc导致错误,但是我的flatbuffer是安装了并且配置了PATH变量的,对bazel不是很熟悉,是否需要修改一些配置文件之类的,请老师指导
image
image

@anakinxc
Copy link
Contributor

anakinxc commented Aug 9, 2024

暂时先别用 -c dbg

@1160300918
Copy link

目前已写完accuracy的代码,simulator的单元测试已经跑通,但是emulator在跑的时候读不出example/python/conf下的配置文件,无法初始化emulator,请老师看下是否需要修改utils目录下的bazel文件,谢谢
image

@deadlywing
Copy link
Contributor

@1160300918
hi,,这个的正确性是没问题的,,(写这个FIXME主要是这个依赖到了sml和spu以外的地方)

我理解你读不出conf的配置,可能是因为你的那个程序bazel写的有问题,,如果你依赖到了外部配置文件,且使用了相对路径,是需要在bazel中指定data字段,如:(当然具体data里的路径取决于你到底使用了哪里的conf哈)

image

@deadlywing
Copy link
Contributor

BTW,如果你程序写好了,可以发起一个PR,这样代码问题更好讨论~

Best wishes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers OSCP SecretFlow Open Source Contribution Plan
Projects
Status: In Progress
Development

No branches or pull requests

5 participants