Repository: georgian-io/Multimodal-Toolkit (language: python)

Issue:
Failed to import transformers.trainer because of the following error (look up to see its traceback): module 'numpy.linalg._umath_linalg' has no attribute '_ilp64'
I think the latest version of numpy cause this bug since downgrading numpy to version 1.24.1 seem to fix the issue. 


Discussion / hints:
Hi @hugoquintel, thanks for flagging this. What version of numpy were you using prior to downgrading?
@akashsaravanan-georgian The default version on google colab i believe
Thanks! I'll look into this and fix it for our next release.
Hi @hugoquintel it seems like this is an issue with Google CoLab. I was able to recreate the issue you faced. For some reason the version installed does not match the version that shows up when we run `np.__version__`. 

Upon further investigation, if you restart the kernel (Runtime -> Restart Session in the menu), this issue goes away. I'll add a line to the notebook mentioning this, but I don't think there's any other changes required to the library itself. 

Closing this issue but happy to re-open if the above steps don't solve it for you!

Fix patch:
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..327e458
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+.DS_Store
+.vscode/
+__pycache__/
+tests/*/
\ No newline at end of file
diff --git a/notebooks/text_w_tabular_classification.ipynb b/notebooks/text_w_tabular_classification.ipynb
index 1000780..a85ebed 100644
--- a/notebooks/text_w_tabular_classification.ipynb
+++ b/notebooks/text_w_tabular_classification.ipynb
@@ -165,6 +165,13 @@
     "os.environ[\"COMET_MODE\"] = \"DISABLED\""
    ]
   },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "**Important Note:** If you run this notebook on Google Colab and face any issue with numpy, please restart the kernel once and try again. Refer to this [issue](https://github.com/georgian-io/Multimodal-Toolkit/issues/71) for more information."
+   ]
+  },
   {
    "attachments": {},
    "cell_type": "markdown",
diff --git a/setup.py b/setup.py
index c8128b1..b591325 100644
--- a/setup.py
+++ b/setup.py
@@ -24,17 +24,18 @@ def get_version(rel_path: str) -> str:
 url = "https://github.com/georgianpartners/Multimodal-Toolkit"
 
 install_requires = [
-    "transformers>=4.34.1",
-    "accelerate>=0.24.1",
-    "torch>=2.0.1",
-    "sacremoses~=0.0.53",
+    "accelerate>=0.29.3",
+    "importlib-metadata~=7.1.0",
     "networkx~=2.6.3",
-    "scikit-learn~=1.0.2",
-    "scipy~=1.11.3",
-    "pandas~=1.3.5",
-    "numpy~=1.26.1",
-    "tqdm~=4.64.1",
+    "numpy~=1.26.4",
+    "pandas~=2.2.2",
     "pytest~=7.2.2",
+    "sacremoses~=0.0.53",
+    "scikit-learn~=1.4.2",
+    "scipy~=1.13.0",
+    "torch>=2.0.1",
+    "tqdm~=4.64.1",
+    "transformers>=4.40.1",
 ]
 
 setup(


Test patch:
diff --git a/tests/test_airbnb.json b/tests/test_airbnb.json
index be7d6a0..6c46103 100644
--- a/tests/test_airbnb.json
+++ b/tests/test_airbnb.json
@@ -15,6 +15,7 @@
     "per_device_eval_batch_size": 2,
     "eval_steps": 500,
     "data_path": "./datasets/Melbourne_Airbnb_Open_Data",
-    "column_info_path":  "./datasets/Melbourne_Airbnb_Open_Data/column_info.json"
+    "column_info_path":  "./datasets/Melbourne_Airbnb_Open_Data/column_info.json",
+    "max_token_length": 128
   }
   
\ No newline at end of file
diff --git a/tests/test_clothing.json b/tests/test_clothing.json
index 0693070..16c9b22 100644
--- a/tests/test_clothing.json
+++ b/tests/test_clothing.json
@@ -15,5 +15,6 @@
     "per_device_eval_batch_size": 2,
     "eval_steps": 500,
     "data_path": "./datasets/Womens_Clothing_E-Commerce_Reviews",
-    "column_info_path":  "./datasets/Womens_Clothing_E-Commerce_Reviews/column_info_all_text.json"
+    "column_info_path":  "./datasets/Womens_Clothing_E-Commerce_Reviews/column_info_all_text.json",
+    "max_token_length": 128
   }
\ No newline at end of file
diff --git a/tests/test_petfinder.json b/tests/test_petfinder.json
index 84204b3..13219d6 100644
--- a/tests/test_petfinder.json
+++ b/tests/test_petfinder.json
@@ -15,7 +15,8 @@
     "per_device_eval_batch_size": 2,
     "eval_steps": 500,
     "data_path": "./datasets/PetFindermy_Adoption_Prediction",
-    "column_info_path":  "./datasets/PetFindermy_Adoption_Prediction/column_info_all_text.json"
+    "column_info_path":  "./datasets/PetFindermy_Adoption_Prediction/column_info_all_text.json",
+    "max_token_length": 128
   }