RoboticsClubIITJ / ML-DL-implementation

An implementation of ML and DL algorithms from scratch in python using nothing but NumPy and Matplotlib.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug report] Test error

agrawalshubham01 opened this issue · comments

Describe the bug
Import error to other files after updating the function of activations.py

----------- coverage: platform linux, python 3.6.9-final-0 -----------
Coverage HTML written to dir htmlcov

=========================== short test summary info ============================
ERROR Examples/gaussian_naive_bayes_example.py - ImportError: cannot import n...
ERROR Examples/k_means_clustering_example.py - ImportError: cannot import nam...
ERROR Examples/knn_example.py - ImportError: cannot import name 'sigmoid'
ERROR Examples/linear_example.py - ImportError: cannot import name 'sigmoid'
ERROR Examples/logistic_example.py - ImportError: cannot import name 'sigmoid'
ERROR Examples/naive_bayes_example.py - ImportError: cannot import name 'sigm...
ERROR MLlib/loss_func.py - ImportError: cannot import name 'sigmoid'
ERROR MLlib/models.py - ImportError: cannot import name 'sigmoid'
ERROR MLlib/optimizers.py - ImportError: cannot import name 'sigmoid'
!!!!!!!!!!!!!!!!!!! Interrupted: 9 errors during collection !!!!!!!!!!!!!!!!!!!!
============================== 9 errors in 0.56s ===============================

To Reproduce
Steps to reproduce the behavior:
1. python3 -m pytest --doctest-modules --cov=./ --cov-report=html

I would like to fix it.

The error is occurring as the earlier sigmoid method is changed into a Class. So for fixing it, all its import instances need to be changed according to that of a Class.

@parva-jain i guess like previously sigmoid was a function and now it is class so instead of importing function we would need to import class

The error is occurring as the earlier sigmoid method is changed into a Class. So for fixing it, all its import instances need to be changed according to that of a Class.

That's what I meant by this.