Open MostafaBouzari opened 2 months ago
@MostafaBouzari Is it possible to provide a minimal reproducible code snippet, or a full notebook with data files? We'd be happy to investigate this, and a bit more information would help.
@bdice i have attached 2 python files. First version of ML file works perfectly fine in Ubuntu Environment. The second Version works in Google Colab Environment.
you will notice that i had to in some cases convert my Dataframe to Pandas from Cuda, due to unavailability of some methods, which can be find in Pandas like pd.qcut and pd.Timestamp.
I managed to overcome the mentioned error:
evaluate=cpd.DataFrame(evaluate)
train=cpd.DataFrame(train)
I hope this helps with further investigation. Many Thanks Google Colab Bug.zip
@bdice Unfortunately that wasn't the only error that i came across. If you upload the first version of my file on google Colab and try to run it you'll face multiple bugs and issues, answers (Work arounds) of which can be fined in the second version of my code.
Hey @MostafaBouzari, I wasn't able to reproduce with your first notebook. I get the following... Do you have an example notebook that reproduces the error?
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-5-68ef0eb15efb>](https://localhost:8080/#) in <cell line: 47>()
47 for _interval in list(range(0,26)):
48 print(_interval)
---> 49 train,capm_1,capm_3,capm_12,to_be_predicted_df,evaluate,test=adjust_dates_by_month(dax_df,df,True,1,2015,3,interval=_interval)
50 # df.drop(['PrefStock_w', 'PrefDiv_w'], axis=1, inplace=True)
51 train['Date'] = train['Date'].astype('str')
4 frames
[/usr/local/lib/python3.10/dist-packages/pandas/core/reshape/merge.py](https://localhost:8080/#) in _maybe_coerce_merge_keys(self)
1399 inferred_right in string_types and inferred_left not in string_types
1400 ):
-> 1401 raise ValueError(msg)
1402
1403 # datetimelikes must match exactly
ValueError: You are trying to merge on int32 and object columns. If you wish to proceed you should use pd.concat
cpd.from_dataframe
I see from skimming your notebook that you're dealing with pandas DataFrames exclusively correct? If so we recommend you use from_pandas
instead.
from_dataframe
is better suited when you have a dataframe library that's not pandas but implements __dataframe__
I have tried to use my code, which works perfectly fine offline, on Google Colab. In an attempt to convert data from CPU to GPU for ML training using cuML i get an Error.
Here is the part of my code:
last two lines cause this error message: