Recommenders: [BUG] Error running test notebook surprise_svd_deep_dive on Windows DSVM

Created on 5 Mar 2019  路  4Comments  路  Source: microsoft/recommenders

Description

Ran this test:
pytest tests/unit/test_notebooks_python.py -k test_surprise_deep_dive_runs

See this error output:

E papermill.exceptions.PapermillExecutionError:
E ---------------------------------------------------------------------------
E Exception encountered at "In [10]":
E ---------------------------------------------------------------------------
E TypeError Traceback (most recent call last)
E in
E ----> 1 eval_rmse = rmse(test, predictions)
E 2 eval_mae = mae(test, predictions)
E 3 eval_rsquared = rsquared(test, predictions)
E 4 eval_exp_var = exp_var(test, predictions)
E 5
E
E ~\notebooks\Recommenders\reco_utils\evaluation\python_evaluation.py in check_column_dtypes_wrapper(rating_true, rating_pred, col_user, col_item, col_rating, col_prediction, args, *kwargs)
E 57 raise TypeError(
E 58 "data types of column {} are different in true and prediction".format(
E ---> 59 col_user
E 60 )
E 61 )
E
E TypeError: data types of column userID are different in true and prediction

In which platform does it happen?

Tested on a Windows CPU DSVM

How do we replicate the issue?

I created a Windows DSVM (Standard DS3 v2 - 4 vcpus, 14 GB memory). Don't know if this issue is specific to Windows (probably not).
Windows setup steps were (for now):

  1. login to DSVM
  2. cd notebooks
  3. git clone https://github.com/Microsoft/Recommenders
  4. git checkout staging
  5. conda update conda
  6. conda update --all
  7. cd Recommenders
  8. python scripts/generate_conda_file.py
  9. conda env create -f reco_base.yaml
  10. conda info --envs (list environments, verify "reco_base" is there)
  11. conda activate reco_base
  12. pytest tests/unit/test_notebooks_python.py -k test_surprise_deep_dive_runs

Expected behavior (i.e. solution)

The test should run successfully

Other Comments

bug evaluation test

Most helpful comment

there is a line in the notebook that converts the prediction datatypes to int, apparently on some windows machines that is interpreted as int32, vs int64. specifying int64 resolves the issue. I'll push a quick change to address this, thanks for testing this @roalexan !

All 4 comments

Hmmm it runs well on my environment. The issue was fixed in #553.

@roalexan Step 4 should happen after Step 7 as after git clone the current dir is not the cloned repository. Not sure if this is the cause but have you tried git branch and git status to make sure it is indeed staging branch?

I reran and hit the same error. Did you test on a Windows DSVM? My git status:
(reco_base) C:\Users\rba1\Recommenders>git status
On branch staging
You are right that the steps were not exactly right. Think these are the exact steps:

  1. login to DSVM
  2. open command prompt
  3. git clone https://github.com/Microsoft/Recommenders
  4. cd Recommenders
  5. git checkout staging
  6. git status (verify using "staging" branch)
  7. conda update conda
  8. conda update --all (not sure how to update just anaconda, "conda update anaconda" not working)
  9. python scripts/generate_conda_file.py
  10. conda env create -f reco_base.yaml
  11. conda info --envs (verify "reco_base" is listed)
  12. conda activate reco_base
  13. pip install papermill (need to manually install this!)
  14. pytest tests/unit/test_notebooks_python.py -k test_surprise_deep_dive_runs

there is a line in the notebook that converts the prediction datatypes to int, apparently on some windows machines that is interpreted as int32, vs int64. specifying int64 resolves the issue. I'll push a quick change to address this, thanks for testing this @roalexan !

addressed by #620

Was this page helpful?
0 / 5 - 0 ratings

Related issues

seancaodo picture seancaodo  路  3Comments

miguelgfierro picture miguelgfierro  路  4Comments

anargyri picture anargyri  路  4Comments

ngcferreira picture ngcferreira  路  4Comments

miguelgfierro picture miguelgfierro  路  7Comments