IBM/simulai

Unnecessary Dependencies ? Long Installation Time ๐Ÿ‘€

Closed this issue ยท 3 comments

Unnecessary Dependencies ? ๐Ÿ‘€


I recommend a thorough review of dependencies and removing those that are not essential to the functionality of the library. This will help improve the performance and usability of the library for users.

Steps to reproduce:

  • Review the dependencies of the library
  • Identify any dependencies that are not essential to the library's

Expected outcome:

  • Removal of unnecessary dependencies will improve the performance and usability of the library for users.

Actual outcome:

  • Unnecessary dependencies are included in the library, increasing the size of the library and the time required for installation.

@snitramodranoel @Joao-L-S-Almeida Please share the list of dependencies you think are unnecessary for the library functionality and also explain why you think so. (We have noticed that the library, simulai-toolkit, takes a significant amount of time to install. This may be caused by the presence of multiple dependencies, which increase the size of the library and the time required for installation. We recommend conducting a review of the library's dependencies and package size to identify any possible optimization opportunities. I did not notice an unnecessary dependency, please take a look at projcet.)

Need to be downloaded and installed, dependencies such as: numba, torch, netCDF4, pyDOE, optuna, and imageio. Additionally, torch which is 133.8 MB.

I agree the review is necessary, @TarikKaanKoc. Some dependencies are not always used, as imageio, and could be included in a conditional list. Others dependencies, as six, are probably installed in the shadow by some major package.

I think the most basic filtering is done. Dependencies removed from requirements.txt and pyproject.toml:

  • nose
  • pyDOE
  • imageio
  • imageio-ffmpeg

These dependencies represent approximatelly 76.8 MB of disk space.

Others dependencies, as netCDF4, are used just for the examples, so, I think the better approach is to create a dedicated requirements.txt for that directory.

Removing unnecessary dependencies used in our project and creating a separate requirements file for them is a good way to further reduce disk space. We can also use tools like pipenv or pipenv to manage our project's dependencies and keep track of which dependencies are necessary for our project and which are not. @Joao-L-S-Almeida