graphstorm icon indicating copy to clipboard operation
graphstorm copied to clipboard

Naming a module `sagemaker` confuses pylint

Open thvasilo opened this issue 1 year ago • 3 comments

Because we include a graphstorm.sagemaker module, we can false positives in pylint such as

************* Module python.graphstorm.sagemaker.sagemaker_partition
[2024-06-17T22:04:35.164Z] python/graphstorm/sagemaker/sagemaker_partition.py:33:0: C0411: third party import "from joblib import Parallel, delayed" should be placed before "import sagemaker" (wrong-import-order)`

We should rename our graphstorm.sagemaker module to something like graphstorm.gs_sagemaker to avoid such issues and ambivalence about whether we are importing the sagemaker lib or local module.

thvasilo avatar Jun 17 '24 22:06 thvasilo

Can we close it?

classicsong avatar Jul 25 '24 20:07 classicsong

We can either close as won't fix, or rename the module to something like gsf_sagemaker which should get rid of the error. This should be easy enough to do using an IDE.

thvasilo avatar Jul 25 '24 20:07 thvasilo

Another paper cut /UX issue is the naming of the graphstorm/sagemaker directory. If we clone graphstorm and do

cd graphstorm
pip install .
python
>>> import sagemaker

it will try to import the local graphstorm/sagemaker directory which is not our intent here, what we want is to import the sagemaker sdk.

thvasilo avatar Dec 12 '24 00:12 thvasilo