Kinds-of-Intelligence-CFI / animal-ai-python

Animal-AI Python
https://github.com/Kinds-of-Intelligence-CFI/animal-ai
MIT License
2 stars 0 forks source link

Remove non-essential dependencies #1

Closed wschella closed 9 months ago

wschella commented 9 months ago

I'm not sure about protobuf, I assume its imported by ml-agents, but maybe the builds have specific versions? In that case we should document it. I left it in for now.

We need a numpy (any), as we currently use it ourselves (but not for anything complicated).

We of course need ml-agents.

We don't need any of the others right?

We need a gym (we use the spaces), but ml-agents provides the requirement, and it's a dangerous one to specify ourselves due to the big API changes.

kozzy97 commented 9 months ago

Thanks @wschella.

From what I recall, we specified the numpy version because ml-agents was quite specific on it being a certain version. Did you not get a dependency error?

And yes, we included some other packages for utility, since other scripts in the Animal-AI repo require them. But perhaps that is something to put elsewhere and we were just trying to micromanage!

We should check all dependencies if we want to update to the newest ml-agents version.

wschella commented 9 months ago

ml-agents does indeed require a very specific numpy version, but since we have ml-agents as a dependency, that version should be automatically selected by pip and other install tools. I don't mind specifying it for explicit reasons tho, feel free to add it back in.

The thing with the utility deps is, that even if you don't use the examples, you pull these big dependencies in now. I agree the examples not being plug-and-play is not ideal, but this is not a sustainable solution.

wschella commented 9 months ago

PS: A new ml-agents version should definitely be tested indeed, and a new PR in any case.

alhasacademy96 commented 9 months ago

The new release of mlagents is a big change not just on the python side of things. We will probably not upgrade to this new release until at least January 2024. Im currently reviewing your changes @wschella. Protobuf is needed by mlagents with a specific version so it needs to be left alone, with numpy version too (1.21.2)

alhasacademy96 commented 9 months ago

I will test these changes today and let you know so there are no dependency issues like last time popping up on new users.