Troubleshooting
Problem
Cause
From Cloud Pak for Data 4.5, it hides the UI to download the log file under data asset directly.
Version to be impacted:
Health and Predict - Utilities 8.6+ (on top of MAS 8.8.x + ) with Cloud Pak for Data 4.5
Resolving The Problem
From MAS 8.8, when the debug mode is enabled, Healthlib compresses the debug verbose logs in to a file, so the verbose logs will not be shown on UI directly. This change is to avoid the Notebook runtime container stuck by the huge log file.
The log file is saved under the same Watson Studio project as the data asset. There are 2 options to access the log.
Option 1:
1. Add a blank cell in the Notebook and input the following command:
!ls -lrth /project_data/data_asset/joblog/
This command lists all the log files generated so far in time ascending order.
2. Find the log file with the timestamp of the last run. (If user cannot find the time when the run ran, delete all the job log files and rerun the job.)
Use the following command to extract the job log file.
!unzip /project_data/data_asset/joblog/Job_Log_2022_11_22-09:36:15_AM.log.zip
Note: If the job log file is less than 1MB, user can extract the file in the Notebook container directly. If it is larger than 1MB, it is recommended to download it to local.
3. Then, user can use cat command to view the log file content on UI, for example:
cat project_data/data_asset/joblog/Job_Log_2022_11_22-09:36:15_AM.log
Option 2.
To download the log file from Cloud Pak for Data 4.5, the log file must be registered as data asset in Watson Studio. Then, the file is displayed as data asset in asset tab. Then, the log file can be downloaded from UI. Create a new cell and input the following code. After updating the necessary log file name and data asset name, run the cell.
from ibm_watson_studio_lib import access_project_or_space
from pathlib import Path
current_working_ws_project = access_project_or_space()
log_file = "/project_data/data_asset/joblog/Job_Log_2022_11_22-09:36:15_AM.log.zip"
log_file_name = "Job_Log_2022_11_22.log.zip"
with open(log_file, 'rb') as f:
current_working_ws_project.save_data(asset_name_or_item=log_file_name, data=f.read(), overwrite=True)
After the execution, user can see the Job_Log_2022_11_22.log.zip file listed as data asset on UI.
Note: the log_file_name that will be registered as data asset name has some naming rules. It can only contain an invalid character. Allowed characters are letters, numbers, underscore, space, and period
Then, user is able to download it from data asset to local for further analysis.
Document Location
Worldwide
Was this topic helpful?
Document Information
Modified date:
30 November 2022
UID
ibm16842103