Snowflake-Labs / sfguide-intro-to-machine-learning-with-snowflake-ml-for-python

Apache License 2.0
54 stars 111 forks source link

3_snowpark regressor.fit(train_df) error: 002003 (02000): SQL compilation error: Stage 'xxxxx.ML_HOL_SCHEMA."SNOWML_TRANSFORM_3D2AD712_FBE0_4272_9DE3_488863673B73 MPLFB8PO49"' does not exist or not authorized. #4

Closed ShenShu2016 closed 1 year ago

ShenShu2016 commented 1 year ago

1_snowpark & 2_snowpark works good. When I run the 3_snowpark, there has an error at line: regressor.fit(train_df)

# Define the XGBRegressor
regressor = XGBRegressor(
    input_cols=CATEGORICAL_COLUMNS_OE+NUMERICAL_COLUMNS,
    label_cols=LABEL_COLUMNS,
    output_cols=OUTPUT_COLUMNS
)

# Train
regressor.fit(train_df) # error line------------------------------------#####

# Predict
result = regressor.predict(test_df)
SnowparkSQLException: (1304): 01aeb341-0406-9d49-0000-5f1d4d35e35e: 002003 (02000): SQL compilation error:
Stage 'XXXXXXX.ML_HOL_SCHEMA."SNOWML_TRANSFORM_3D2AD712_FBE0_4272_9DE3_488863673B73 MPLFB8PO49"' does not exist or not authorized.

Please help

Thanks

sfc-gh-asrivastava commented 1 year ago

Hi Shen , I tried this at my end and its not all reproducible. I walked through my set up as well and its all working good.Did you try doing all the steps from scratch ? that should help, i believe. Thanks!

ShenShu2016 commented 1 year ago

Thank you for your response. Here is more info: This line of code runs at the background succeed.

CREATE OR REPLACE TEMPORARY STAGE SNOWML_TRANSFORM_3E0B3A2D_E565_4964_8C17_FCBEB83293AA;

but the following query :

PUT 'file://C:/Users/xxxx/AppData/Local/Temp/tmpssektvw_' '@SNOWML_TRANSFORM_3E0B3A2D_E565_4964_8C17_FCBEB83293AA\tmpssektvw_' parallel = 4 source_compression = 'AUTO_DETECT' auto_compress = False overwrite = True

query id: 01aefbef-0606-ac58-0000-5f1d4dd1a0ae Got error:

SQL compilation error: Stage 'ML_HOL_DB.ML_HOL_SCHEMA."SNOWML_TRANSFORM_3E0B3A2D_E565_4964_8C17_FCBEB83293AA MPSSEKTVW_"' does not exist or not authorized.

We both run at Windows system.

Do you think it is because of the Windows system?

Could you explain why

@SNOWML_TRANSFORM_3E0B3A2D_E565_4964_8C17_FCBEB83293AA\tmpssektvw_ become this: SNOWML_TRANSFORM_3E0B3A2D_E565_4964_8C17_FCBEB83293AA MPSSEKTVW_ Missing dashline?

sfc-gh-asrivastava commented 1 year ago

@sfc-gh-sdas-1 @iamontheinet : Any pointers here ? Not reproducible issue in Mac environment.Could be related to some issue with snowflake-ml-python on Windows.

ShenShu2016 commented 1 year ago

For windows system. upgrade the snowflake-ml-python lib to 1.0.7 will fix the problem pip install snowflake-ml-python==1.0.7

Thanks