hopsworks.execution #
Execution #
For backwards compatibility hopsworks.execution.Execution is still available as hsfs.core.execution.Execution. The use of this alias is discouraged as it is to be deprecated.
Returned by
app_id property #
Application id for the execution.
app_url property #
app_url: str | None
URL to the Python App UI (Streamlit) if the execution is running.
Returns the full URL to access the Streamlit application through the Hopsworks proxy, or None if the execution is not running or the app URL is not available.
args property #
Arguments set for the execution.
duration property #
Duration in milliseconds the execution ran.
final_status property #
Final status of the execution. Can be UNDEFINED, SUCCEEDED, FAILED or KILLED.
hdfs_user property #
Filesystem user for the execution.
id property #
Id of the execution.
job_name property #
Name of the job the execution belongs to.
job_type property #
Type of the job the execution belongs to.
progress property #
Progress of the execution.
state property #
Current state of the execution.
Can be: INITIALIZING, INITIALIZATION_FAILED, FINISHED, RUNNING, ACCEPTED, FAILED, KILLED, NEW, NEW_SAVING, SUBMITTED, AGGREGATING_LOGS, FRAMEWORK_FAILURE, STARTING_APP_MASTER, APP_MASTER_START_FAILED, GENERATING_SECURITY_MATERIAL, or CONVERTING_NOTEBOOK.
stderr_path property #
Path in Hopsworks Filesystem to stderr log file.
stdout_path property #
Path in Hopsworks Filesystem to stdout log file.
submission_time property #
Timestamp when the execution was submitted.
success property #
success: bool | None
Boolean to indicate if execution ran successfully or failed.
user property #
User that submitted the execution.
await_termination #
await_termination(timeout: float | None = None)
Wait until execution terminates.
| PARAMETER | DESCRIPTION |
|---|---|
timeout | The maximum waiting time in seconds. If TYPE: |
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request. |
hopsworks.client.exceptions.JobExecutionException | If the execution finished with a failure status. |
delete #
delete()
Delete the execution.
Potentially dangerous operation
This operation deletes the execution.
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request. |
download_logs #
Download stdout and stderr logs for the execution.
Downloading and printing the logs
# Download logs
out_log_path, err_log_path = execution.download_logs()
out_fd = open(out_log_path, "r")
print(out_fd.read())
err_fd = open(err_log_path, "r")
print(err_fd.read())
| PARAMETER | DESCRIPTION |
|---|---|
path | Path to download the logs. TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
stdout | Path to downloaded log for stdout. TYPE: |
stderr | Path to downloaded log for stderr. TYPE: |
stop #
stop()
Stop the execution.
Potentially dangerous operation
This operation stops the execution.
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request. |