ROCm / rocprofiler-compute

Advanced Profiling and Analytics for AMD Hardware
https://rocm.docs.amd.com/projects/omniperf/en/latest/
MIT License
135 stars 49 forks source link

updated approach for runtime dependency check #368

Closed koomie closed 5 months ago

coleramos425 commented 5 months ago

Thanks for the submission, Karl. I loaded your branch and am still seeing the deprecation warning with my fresh Python env image

Based on what I've found online it looks like text_file module is scheduled for deprecation in Python 3.12. Could we replace this https://github.com/ROCm/omniperf/blob/307eabc28d4848a25c6556e7a074c8ba427e04c5/src/omniperf#L68-L69

with

with open(checkFile, "r") as file_in:
    dependencies = file_in.readlines()

which would remove our usage of text_file module.

koomie commented 5 months ago

Thanks for testing this. I have updated as you suggest to remove the use of distutils entirely. With a similar environment as what you tried, I no longer get the warning:

radha:~/repos/omniperf/src$ python3 --version
Python 3.11.9

radha:~/repos/omniperf/src$ ./omniperf
[ERROR] The 'astunparse==1.6.2' package was not found in the current execution environment.
[ERROR] The 'colorlover' package was not found in the current execution environment.
[ERROR] The 'dash>=1.12.0' package was not found in the current execution environment.
[ERROR] The 'matplotlib' package was not found in the current execution environment.
[ERROR] The 'numpy>=1.17.5' package was not found in the current execution environment.
[ERROR] The 'pandas>=1.4.3' package was not found in the current execution environment.
[ERROR] The 'pymongo' package was not found in the current execution environment.
[ERROR] The 'pyyaml' package was not found in the current execution environment.
[ERROR] The 'tabulate' package was not found in the current execution environment.
[ERROR] The 'tqdm' package was not found in the current execution environment.
[ERROR] The 'dash-svg' package was not found in the current execution environment.
[ERROR] The 'dash-bootstrap-components' package was not found in the current execution environment.
[ERROR] The 'kaleido' package was not found in the current execution environment.
[ERROR] The 'plotille' package was not found in the current execution environment.

Please verify all of the python dependencies called out in the requirements file
are installed locally prior to running omniperf.