Skip to content

Conversation

BeachWang
Copy link
Collaborator

  1. Install OP dependency when they are executed: lazy import + check and install dependency before init function.
  2. Clean cuda for each test in unit tests.

@drcege
Copy link
Collaborator

drcege commented Sep 5, 2024

既然手动将所有 AvailabilityChecking 更改为 LazyLoader了,为什么不将 import 批量改为 local import 呢?

compute_statsprocess 内部使用时导入第三方库看起来就能实现 lazy import 的效果,对引入 LazyLoader 感到困惑 🤔️

@BeachWang
Copy link
Collaborator Author

既然手动将所有 AvailabilityChecking 更改为 LazyLoader了,为什么不将 import 批量改为 local import 呢?

compute_statsprocess 内部使用时导入第三方库看起来就能实现 lazy import 的效果,对引入 LazyLoader 感到困惑 🤔️

好像也可以。但是可能会出现多处地方需要import的情况,而且doc里面的样例也不是很好说明。

@BeachWang BeachWang self-assigned this Sep 6, 2024
@BeachWang BeachWang added the enhancement New feature or request label Sep 6, 2024
@BeachWang BeachWang linked an issue Sep 6, 2024 that may be closed by this pull request
@drcege drcege changed the title Dev/light dependency Add lazy import and auto-install dependencies Sep 6, 2024
@drcege drcege requested a review from zhijianma September 14, 2024 03:46
@BeachWang BeachWang merged commit 8e9b4c0 into main Sep 25, 2024
3 checks passed
@BeachWang BeachWang deleted the dev/light_dependency branch September 25, 2024 06:18
@BeachWang BeachWang restored the dev/light_dependency branch October 10, 2024 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Heavy dependency of Data-Juicer

2 participants