Jupiter Notebooks for pyDAAL tutorials and code samples available on Github!

Jupiter Notebooks for pyDAAL tutorials and code samples available on Github!

A Jupyter Notebook based tutorial series of using pyDAAL (the Python API for Intel DAAL) is now available on Github:

https://github.com/daaltces/pydaal-tutorials 

It is designed for new users to quickly ramp up understanding of the pyDAAL API and usage model. There are only a few examples at this time, but we will gradually grow to cover more DAAL algorithms. You are more than welcome to use, share, fork, and contribute. 

19 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Sergey,

It would be great if this thread is configured as a Sticky one. This way, anybody that enters the forum will know about these examples.

Hi Sergey,

I have followed the pyDAAL installation as:

  1. conda update conda
  2. conda config --add channels intel
  3. conda create -n idp intelpython3_core python=3
  4. activate idp
  5. conda install mkl-devel

The whole installation was good. I'm using Eclipse IDE/PyDev 64-bit, Below is the code:

from daal.data_management import HomogenNumericTable

from utils import *

import numpy as np
import matplotlib
import matplotlib.pyplot as plt

def main():
    print("Testting Intel pyDAAL Framework!")

if __name__ == '__main__':
    main()

And here is the error. Let me know if I missed something?

Traceback (most recent call last):
  File "C:\Users\ebonat\eclipse-workspace\python_test\src\test.py", line 2, in <module>
    from daal.data_management import HomogenNumericTable
ImportError: No module named 'daal'

Thanks for your time,

Ernest Bonat, Ph.D.
Senior Software Engineer
Senior Data Scientist

 

 

 

 

Hi Sergey,

I have followed the steps to install Intel pyDAAL:

  1. conda update conda
  2. conda config --add channels intel
  3. conda create -n idp intelpython3_core python=3
  4. activate idp
  5. conda install mkl-devel

There was no error at all in any of the deployment.

I created a new Python project in Eclipse IDE/PyDev and wrote the following simple code:

from daal.data_management import HomogenNumericTable

from utils import *

import numpy as np
import matplotlib
import matplotlib.pyplot as plt

def main():
    print("Testting Intel pyDAAL Framework!")

if __name__ == '__main__':
    main()

Run the program and got the error:

Traceback (most recent call last):
  File "C:\Users\ebonat\eclipse-workspace\python_test\src\test.py", line 2, in <module>
    from daal.data_management import HomogenNumericTable
ImportError: No module named 'daal'
 

Did I missed some thing?

Thank you,

Ernest Bonat, Ph.D.
Senior Software Engineer
Senior Data Scientist

 

 

Hi Sergey,

Any help with this issue? I'm very excited to test the Intel pyDAAL library this long coming weekend.

Thank you for your time,

Ernest Bonat, Ph.D.
Senior Software Engineer
Senior Data Scientist

 

Hi Ernest,

PyDAAL is not part of the intelpython3_core package, so you will have to install it separately.

conda install -c intel pydaal

You will also find that matplotlib is not part of the core package.  You can install it separately too.

conda install -c intel matplotlib

Alternatively, you can get an environment with the full Intel distribution like this:

conda create -n idp -c intel intelpython3_full

Chris

Hi Chris,

Thank you for your feedback. After:

conda create -n idp -c intel intelpython3_full

Do I need to activate the idp as:

activate idp

Thank you for your help,

Ernest Bonat, Ph.D.
Senior Software Engineer
Senior Data Scientist

 

 

 

 

 

 

 

Hi Ernest,

Yes, you will need to activate the environment before using it.

Chris

Hi Chris,

Is this one time setting only or I need to do it all the time after I turn my development laptop on to work on pyDAAL projects?

Thank

Ernest Bonat, Ph.D.
Senior Software Engineer
Senior Data Scientist

Ernest,

The "activate" script modifies your PATH for the current terminal session, so starting new sessions will reset your PATH to its default. 

Chris

Thank you, I go it!

Ernest Bonat, Ph.D.
Senior Software Engineer
Senior Data Scientist

Hi

I have reviewed the following class files:

kmeans.py – no errors appear!

pca.py – an error occurred: “Undefined variable: warnings”

24 warnings.warn(method + ' method is not supported. Default method is used', UserWarning) – I believe the import is missed!

regression.py – the following errors occurred:

“Undefined variable from import: Batch_Float64DefaultDense”

165 ridge_training_alg = ridge_training.Batch_Float64DefaultDense() – I believe the import is missed!

85 warnings.warn(method + ' method is not supported. Default method is used', UserWarning) – I believe the import is missed!

svm_multi_class.py – the following errors occurred:

“Undefined variable from import: Batch_Float64DefaultDense”

27 self._svm_training_alg = svm_training.Batch_Float64DefaultDense() – I believe the import is missed!

“Undefined variable from import: Batch_Float64DefaultDenseOneAgainstOne”

96  multiclass_prediction_alg = multiclass_prediction.Batch_Float64DefaultDenseOneAgainstOne() - I believe the import is missed!

utils.py – the following errors occurred:

“Undefined variable: BlockDescriptor”

6  bd = BlockDescriptor() - I believe the import is missed!

It should be:

bd = BlockDescriptor_Float64()

Let me know when theses syntax errors are fixed so I can the test the classes files.

Thank you for your time,

Ernest Bonat, Ph.D.
Senior Software Engineer
Senior Data Scientist

 

Hi Ernest,

We are currently reworking on the GitHub examples with the fix and adding new ones to sync with the upcoming pyDAAL 2018 version. These examples should be out end of next week or early week after.

Thanks

Preethi

Hi Preethi,

Thank you for letting me know. I'll be happy to test the upcoming pyDAAL 2018 version. Feel free to let me know when it's ready!

Thank you for your time,

Ernest Bonat, Ph.D.
Senior Software Engineer
Senior Data Scientist

Hi Sergey,

Two questions for you:

1. I have downloaded the pyDAAL 2018 library this morning. Do I need to uninstall the previous version or just install 2018 on top? Explain?

2. When will we have the GibHub Tutorials ready for testing 2018 initials release?

Thank you for your time,

Ernest Bonat, Ph.D.
Senior Software Engineer
Senior Data Scientist

 

Hi Ernest,

If you're using conda to manage your environments, I would recommend creating a new environment with our 2018 packages. 

conda create -n daal_2018 -c intel pydaal
. activate daal_2018

The other option is to use conda to update your current packages:

conda update -c intel --all

As for the Github tutorials, Preethi mentioned above that they would be ready by the end of this week or early next week.  She will let you know when they are posted.

Thanks,

Chris

Thanks Chris,

What's the simple way to check which version of pyDAAL am I using in Python now?

Ernest Bonat, Ph.D.
Senior Software Engineer
Senior Data Scientist

 

Ernest,

To see the package versions of your current environment, run

conda list

You could also run

 python -c 'import daal; print(daal.__version__)'

Also, if you decide to update your current environment as opposed to creating a new one, be aware that if you were using python 3.5, Intel Python 2018 only includes python 3.6, so you would have to explicitly install python 3.6:

conda install python=3.6 -c intel

That said, I would still recommend creating a separate environment to test pydaal 2018.

Chris

Thanks Chris,

I'll be creating a new separate environment to test pyDAAL 2018.

Ernest Bonat, Ph.D.
Senior Software Engineer
Senior Data Scientist

Leave a Comment

Please sign in to add a comment. Not a member? Join today