Remove the __init__.py file from the root folder to avoid "amazon-sagemaker-clarify is not a valid Python package name" error. (The new mypy version changed the behavior of scanning Python packages, in the old version, if the input is a relative path like "src" then it only scans the folder and its subfolders. But in the new version, it expand the relative path to absolute path and try to crawl up. I guess the behavioral change is to fix the infamous ". is not a valid Python package name" problem but it happens to expose the invalid init file issue of our package)
Replace invalid type np.array by correct types np.ndarray or List to fix other mypy errors
Add pytest.approx to unit test code to avoid test failures due to floating number precision. (I submitted an issue report to numpy project https://github.com/numpy/numpy/issues/18371 to confirm if it is an expected precision change or a bug of numpy.log, but the unit test fix is valid anyway because we are not supposed to compare floating numbers directly.)
Issue #, if available:
No recent code change but master branch code started to fail the build, see https://github.com/xgchena/amazon-sagemaker-clarify/actions/runs/549041577
There are two types of errors,
They are exposed by dependency version upgrade
Description of changes:
The PR fixes the build errors,
Build passed: https://github.com/xgchena/amazon-sagemaker-clarify/actions/runs/549150380
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.