If your code does not run as expected, you must locate the cause. To locate the cause, you can carefully check the code. You can also enable the debug logging feature and use an online debugging tool to check the variables and logic of the code based on debug logs. This topic describes how to use WebIDE of Data Science Workshop (DSW) to debug the Python code in the sample notebook that is provided by DSW of Machine Learning Platform for AI (PAI).
Background information
DSW provides a few examples to demonstrate how to tune hyperparameters by using AutoML.
The code in the example "Quick start to hyperparameter tuning by using AutoML" is
often stuck at the
The error logs do not provide enough information for you to locate the cause. You
can check the code of tuner and debug the code. To check the code of tuner, perform the following steps:
tuner.fit()
method. The following figure shows the error logs in an output cell of the sample
notebook.
- Find the location where the class of tuner is defined.
The class of tuner is AutoTuner and is defined in the pai.automl.hpo Python package, as shown in the following figure.
- Search for the AutoTuner class to obtain the path of the AutoTuner class in DSW. In this example, the path is /home/admin/.local/lib/python3.6/site-packages/pai/automl. Open the file of the AutoTuner class in WebIDE as a project, as shown in the following figure.