SOLVED: Module 'numpy' has no attribute 'object'. `np.object` was a deprecated alias for the builtin `object`. for train_dataset.map(tokenize, batched=True) in notebook
Hey everyone, the title pretty much says it all. I am using a SageMaker notebook and my kernel is conda_pytorch_p310. When ever I run train_dataset.map(tokenize, batched=True) I get the error message below. I tried trouble shooting this on my own and pip installing an older version of numpy but I’m still not able to resolve this. Any input is appreciated.AttributeError: module 'numpy' has no attribute 'object'.
`np.object` was a deprecated alias for the builtin `object`. To avoid this error in existing code, use `object` by itself. Doing this will not modify any behavior and is safe. 
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecationsedit: i read through the discord, the solution is to pip install datasets=2.15
2024-01-18T17:59:12Z
It looks like you’ve encountered an issue related to the version of thedatasetslibrary and its compatibility with the version ofnumpy. The error message is indicating that there’s a problem with thenp.objectattribute.The suggested solution you mentioned is to install version 2.15 of thedatasetslibrary. You can do this using the following command in your SageMaker notebook:bashCopy code!pip install datasets==2.15This will install the specifiedversionof thedatasetslibrary, and it should help resolve the issue you’re facing. After installing the correct version, you can try running your code again.Keep in mind that library versions can sometimes introduce breaking changes or incompatibilities with other libraries, so specifying a version that is known to work with your current environment can be crucial. If you encounter any further issues or have specific requirements for library versions, you may need to check the documentation of the libraries you are using or seek further assistance from the community or support channels related to the specific libraries involved.