Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe Your Changes
Pull Request Summary: Add Process Status Check for PythonEngine Model Management
Overview
This pull request introduces a utility to check if a process is running and integrates this functionality into the
PythonEngine
class for enhanced model management. The primary focus is to ensure that model processes are effectively monitored, improving reliability and debuggability.Key Changes
Process Status Check Utility:
process_status_utils.h
, a utility header to determine if a process is currently running.Integration with PythonEngine:
GetModelStatus
method to utilize the newIsProcessRunning
utility.Code Refactoring:
process_status_utils.h
inpython_engine.h
to leverage the process status utility.Error Handling Improvements:
GetModelStatus
function. It now correctly identifies when a model process is loading versus when it has encountered an error.Detailed Modifications:
engine/extensions/python-engine/python_engine.cc
:IsProcessRunning
.engine/extensions/python-engine/python_engine.h
:process_status_utils.h
for process management.New File:
engine/utils/process_status_utils.h
:IsProcessRunning
.This update focuses on enhancing the robustness of model lifecycle management within the
PythonEngine
, providing better feedback on the status of running models, and improving the system's overall reliability.