fhswf / MLPro

MLPro - The Integrative Middleware Framework for Standardized Machine Learning in Python
https://mlpro.readthedocs.io/
Apache License 2.0
12 stars 3 forks source link

Bug: ValueError occurs while trying to read string values from csv files #1028

Closed syamrajsatheesh closed 2 months ago

syamrajsatheesh commented 2 months ago

1 Describe the bug While trying to read csv files, if they contain string values, a ValueError is raised.

.../MLPro/MLPro/src/mlpro/bf/streams/streams/csv_file.py", line 203, in _init_dataset self._dataset[:,x] = np.array(extended_data[ft_name])


ValueError: could not convert string to float: '10.0.0.17'

**2 To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**3 Expected behavior**
..

**4 Screenshots**
..

**5 Additional Informations**

5.1 Operating System
   - [ ] Linux
   - [ ] Windows
   - [ ] Mac OS
steveyuwono commented 2 months ago

Hi @syamrajsatheesh , I have updated the related source to allow retrieving strings from csv file and pushed them into your branch "oa/streams/cbad". To validate the result, I was using "howto_bf_streams_002_accessing_data_from_csv_files.py" by changing line 56 to "mem.memorize("action",ep_id,"abc")". Could you test it once again on your implementation? Let me know whether the error remains occur. If everything is fine, I will close this issue.

syamrajsatheesh commented 2 months ago

@steveyuwono I tested it. It is now working perfectly fine. You can close this issue. Thank you, Steve.