PufferLib icon indicating copy to clipboard operation
PufferLib copied to clipboard

environment.py lazy_import() Seems to be Unused

Open Kinvert opened this issue 4 months ago • 3 comments

https://github.com/PufferAI/PufferLib/blob/6b2cbb995d27b9b7fda30a0f376c4e85e59d5f44/pufferlib/ocean/environment.py#L4

https://github.com/search?q=repo%3APufferAI%2FPufferLib%20lazy_import&type=code

Kinvert avatar Oct 06 '25 06:10 Kinvert

There must be a reason why this was there.

nadzhou avatar Oct 16 '25 15:10 nadzhou

Yeah but the question is if it's a reason that still exists.

Kinvert avatar Oct 16 '25 17:10 Kinvert

Seems like it is needed as you can see here in this commit message:

removed stupid warning by only importing the necessary ocean env

https://github.com/PufferAI/PufferLib/commit/4bcb316d838f1d378503a16cada82268631ee4f2

Is there any reason you think it should be unused when there's an explicit commit to make the import load lazily?

nadzhou avatar Oct 19 '25 19:10 nadzhou