pplonski / my_ml_service

My Machine Learning Web Service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Project dependencies may have API risk issues

PyDeps opened this issue · comments

Hi, In my_ml_service, inappropriate dependency versioning constraints can cause risks.

Below are the dependencies and version constraints that the project is using

Django==2.2.13
django-filter==2.2.0
djangorestframework==3.10.3
joblib==0.14.0
Markdown==3.1.1
numpy==1.17.3
pandas==0.25.2
requests==2.22.0
scikit-learn==0.21.3

The version constraint == will introduce the risk of dependency conflicts because the scope of dependencies is too strict.
The version constraint No Upper Bound and * will introduce the risk of the missing API Error because the latest version of the dependencies may remove some APIs.

After further analysis, in this project,
The version constraint of dependency djangorestframework can be changed to >=3.7.0,<=3.13.1.
The version constraint of dependency joblib can be changed to >=0.3.2d.dev,<=0.7.0d.
The version constraint of dependency joblib can be changed to >=0.3a.dev,<=1.1.0.
The version constraint of dependency pandas can be changed to >=0.20.0,<=0.24.2.
The version constraint of dependency scikit-learn can be changed to >=0.9,<=0.20.4.

The above modification suggestions can reduce the dependency conflicts as much as possible,
and introduce the latest version as much as possible without calling Error in the projects.

The invocation of the current project includes all the following methods.

The calling methods from the djangorestframework
json.dumps
rest_framework.serializers.SerializerMethodField
rest_framework.routers.DefaultRouter
rest_framework.response.Response
The calling methods from the joblib
joblib.load
The calling methods from the pandas
json.dumps
The calling methods from the scikit-learn
joblib.load
The calling methods from the all methods
float
date_now.ab_test.created_at.ab_test.parent_mlalgorithm_1.MLRequest.objects.filter.count
self.preprocessing.fillna
self.model.predict_proba
algorithm_object.compute_prediction
rest_framework.routers.DefaultRouter.register
django.db.models.ForeignKey
django.db.models.BooleanField
apps.endpoints.models.MLRequest.objects.filter
apps.endpoints.models.Endpoint.objects.get_or_create
self.predict
numpy.random.rand
django.urls.path
apps.endpoints.models.MLRequest.save
django.db.models.DateTimeField
self.preprocessing
os.path.dirname
django.core.management.execute_from_command_line
self.postprocessing
django.db.models.AutoField
django.conf.urls.url
json.dumps
apps.endpoints.models.Endpoint.objects.all
apps.endpoints.models.MLAlgorithm.objects.all
django.db.models.F
len
apps.endpoints.views.StopABTestView.as_view
range
apps.ml.registry.MLRegistry.add_algorithm
date_now.ab_test.created_at.ab_test.parent_mlalgorithm_2.MLRequest.objects.filter.count
categorical_convert.transform
ImportError
self.request.query_params.get
django.db.migrations.CreateModel
os.path.join
apps.endpoints.models.ABTest.objects.get.save
apps.endpoints.views.PredictView.as_view
joblib.load
rest_framework.response.Response
apps.endpoints.models.MLAlgorithmStatus
apps.ml.income_classifier.random_forest.RandomForestClassifier
django.db.models.CharField
deactivate_other_statuses
django.conf.urls.include
main
algs.filter.filter
django.db.models.F.date_now.ab_test.created_at.ab_test.parent_mlalgorithm_1.MLRequest.objects.filter.count
format
mlalgorithm.MLAlgorithmStatus.objects.filter.latest
django.db.models.F.date_now.ab_test.created_at.ab_test.parent_mlalgorithm_2.MLRequest.objects.filter.count
os.environ.setdefault
APIException
apps.endpoints.models.ABTest.objects.get
rest_framework.serializers.SerializerMethodField
apps.endpoints.models.MLAlgorithm.objects.filter
datetime.datetime.now
pandas.DataFrame
os.path.abspath
apps.endpoints.models.MLAlgorithmStatus.save
apps.endpoints.models.MLAlgorithmStatus.objects.bulk_update
apps.endpoints.models.MLAlgorithm.objects.get_or_create
apps.endpoints.models.MLAlgorithmStatus.objects.all
django.core.wsgi.get_wsgi_application
apps.endpoints.models.ABTest.objects.all
inspect.getsource
print
apps.endpoints.models.MLRequest
serializer.save
rest_framework.routers.DefaultRouter
apps.ml.registry.MLRegistry
apps.endpoints.models.MLRequest.objects.all
str
apps.endpoints.models.MLAlgorithmStatus.objects.filter
apps.ml.income_classifier.extra_trees.ExtraTreesClassifier
django.db.transaction.atomic

@developer
Could please help me check this issue?
May I pull a request to fix it?
Thank you very much.