-
Notifications
You must be signed in to change notification settings - Fork 651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: Calling df._repartition(axis=1) on updated df will raise IndexError #7170
Comments
@Taurus-Le, thank you for the detailed description of the issue. I was able to reproduce the problem on latest master. |
@Taurus-Le, I looked into the problem and am not sure if we will have a quick fix for it. As a workaround, could you set NPartitions to 1 before repartition? It works for me. ...
old_val = NPartitions.get()
new_val = 1
NPartitions.put(new_val)
df._repartition(axis=1)
NPartitions.put(old_val)
... |
@anmyachev, do you think we should add an additional parameter to repartition like |
…riable in remote context Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Hi @YarShev, it worked for me as well and far faster. Thanks for your help. |
…riable in remote context Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
…ote context (#7177) Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Modin version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest released version of Modin.
I have confirmed this bug exists on the main branch of Modin. (In order to do this you can follow this guide.)
Reproducible Example
Issue Description
I created a dataframe whose shape is (10000,101).
In order to make the df contain only 1 partition against columns, I followed instruction from @YarShev that setting MinPartitionSize would make it.
Then I scaled the df with RobustScaler from sklearn and tried to fit a DTC model.
Yet I found the updated df was partitioned against columns again which made the fitting take about twice as long.
So I tried repartitioning the df only against columns by calling
df = df._repartition(axis=1)
. Yet I got an IndexError.But I managed to solve the problem by calling
unwrap_partitions
andfrom_partitions
.Expected Behavior
df._repartition(axis=1)
will make the updated df contain only 1 partition against columns. And the repartitioned df could be feed into DTC.Error Logs
Installed Versions
INSTALLED VERSIONS
commit : 0c3746b
python : 3.8.10.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.22000
machine : AMD64
processor : Intel64 Family 6 Model 151 Stepping 2, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : Chinese (Simplified)_China.936
Modin dependencies
modin : 0.23.1.post0
ray : 2.10.0
dask : 2023.5.0
distributed : None
hdk : None
pandas dependencies
pandas : 2.0.3
numpy : 1.24.4
pytz : 2023.3.post1
dateutil : 2.8.2
setuptools : 68.2.0
pip : 24.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : 1.4.6
psycopg2 : None
jinja2 : 3.1.2
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
brotli : None
fastparquet : None
fsspec : 2023.10.0
gcsfs : None
matplotlib : 3.7.4
numba : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 15.0.0
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : 1.10.1
snappy : None
sqlalchemy : 2.0.25
tables : None
tabulate : None
xarray : None
xlrd : None
zstandard : None
tzdata : 2023.3
qtpy : None
pyqt5 : None
None
The text was updated successfully, but these errors were encountered: