PennLINC / babs

BIDS App Bootstrap (BABS)
https://pennlinc-babs.readthedocs.io
MIT License
5 stars 5 forks source link

FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. #140

Open Michael-Sun opened 9 months ago

Michael-Sun commented 9 months ago

babs-status --project-root $PWD floods my screen with FutureWarnings:

(/dartfs-hpc/rc/home/j/f003z4j/miniconda3/envs/physio/babs) [f003z4j@n09 my_BABS_project]$ babs-status --project-root $PWD Did not request resubmit based on job states (no --resubmit). /dartfs-hpc/rc/home/j/f003z4j/miniconda3/envs/physio/babs/lib/python3.9/site-packages/babs/babs.py:1182: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. Value 'I'm in /dartfs-hpc/rc/home/j/f003z4j/babs_demo2/my_BABS_project/analysis using /dartfs-hpc/rc/home/j/f003z4j/miniconda3/bin/python' has dtype incompatible with float64, please explicitly cast to a compatible dtype first. df_job_updated.at[i_job, "last_line_stdout_file"] = \ /dartfs-hpc/rc/home/j/f003z4j/miniconda3/envs/physio/babs/lib/python3.9/site-packages/babs/babs.py:1261: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. Value 'running' has dtype incompatible with float64, please explicitly cast to a compatible dtype first. df_job_updated.at[i_job, "job_state_category"] = state_category /dartfs-hpc/rc/home/j/f003z4j/miniconda3/envs/physio/babs/lib/python3.9/site-packages/babs/babs.py:1262: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. Value 'r' has dtype incompatible with float64, please explicitly cast to a compatible dtype first. df_job_updated.at[i_job, "job_state_code"] = state_code /dartfs-hpc/rc/home/j/f003z4j/miniconda3/envs/physio/babs/lib/python3.9/site-packages/babs/babs.py:1274: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. Value '0:19' has dtype incompatible with float64, please explicitly cast to a compatible dtype first. df_job_updated.at[i_job, "duration"] = duration

Job status: There are in total of 6 jobs to complete. 1 job(s) have been submitted; 5 job(s) haven't been submitted. Among submitted jobs, 0 job(s) are successfully finished; 0 job(s) are pending; 1 job(s) are running; 0 job(s) are failed.

All log files are located in folder: /dartfs-hpc/rc/home/j/f003z4j/babs_demo2/my_BABS_project/analysis/logs

zhao-cy commented 9 months ago

Hi Michael! Could you please let me know which version of pandas package you're using?

zhao-cy commented 7 months ago

Shreya from Alexander-Bloch's lab also has similar issue. Her pandas version is: 2.1.2.

zhao-cy commented 7 months ago

TODO: set the upper boundary of pandas package version in the settings when installing.

asmacdo commented 5 months ago

As @yarikoptic mentioned in my duplicate issue, https://github.com/PennLINC/babs/issues/168#issuecomment-1888370496

we probably ought not to set a max version of pandas since that will eventually limit babs compatibility.

Instead, I think we should leave the pandas requirement as-is, with the ambition to refactor for the new pandas. If pandas creates a new release that drops that functionality and breaks babs, then we can add then max version as a stop-gap.