You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This API server is provided as a method of testing and debugging your worker locally.
27
-
Additionally, you can use this to test code that will be making requests to your worker.
28
+
The Development Worker API facilitates testing and debugging of your RunPod workers.
29
+
It offers a sandbox environment for executing code and simulating interactions with your worker, ensuring your applications can seamlessly transition to production on RunPod serverless platform.
30
+
Use this API for comprehensive testing of request submissions and result retrieval, mimicking the behavior of RunPod's operational environment.
31
+
---
32
+
*Note: This API serves as a local testing tool and will not be utilized once your worker is operational on the RunPod platform.*
33
+
"""
28
34
29
-
### Endpoints
35
+
# Add CLI tool suggestion if RUNPOD_PROJECT_ID is not set.
The URLs provided are named to match the endpoints that you will be provided when running on RunPod.
39
+
ℹ️ | Consider developing with our CLI tool to streamline your worker development process.
32
40
33
-
---
41
+
>_ wget -qO- cli.runpod.net | sudo bash
42
+
>_ runpodctl project create
43
+
"""
44
+
45
+
RUN_DESCRIPTION="""
46
+
Initiates processing jobs, returning a unique job ID.
47
+
48
+
**Parameters:**
49
+
- **input** (string): The data to be processed by the worker. This could be a string, JSON object, etc., depending on the worker's requirements.
50
+
- **webhook** (string, optional): A callback URL for result notification upon completion. If specified, the server will send a POST request to this URL with the job's result once it's available.
34
51
35
-
*Note: When running your worker on the RunPod platform, this API server will not be used.*
52
+
**Returns:**
53
+
- **job_id** (string): A unique identifier for the job, used with the `/stream` and `/status` endpoints for monitoring progress and checking job status.
36
54
"""
37
55
38
-
job_list=Jobs()
56
+
RUNSYNC_DESCRIPTION="""
57
+
Executes processing jobs synchronously, returning the job's output directly.
58
+
59
+
This endpoint is ideal for tasks where immediate result retrieval is necessary,
60
+
streamlining the execution process by eliminating the need for subsequent
61
+
status or result checks.
62
+
63
+
**Parameters:**
64
+
- **input** (string): The data to be processed by the worker. This should be in a format that the worker can understand (e.g., JSON, text, etc.).
65
+
- **webhook** (string, optional): A callback URL to which the result will be posted. While direct result retrieval is the primary operation mode for this endpoint, specifying a webhook allows for asynchronous result notification if needed.
66
+
67
+
**Returns:**
68
+
- **output** (Any): The direct output from the processing job, formatted according to the job's nature and the expected response structure. This could be a JSON object, plain text, or any data structure depending on the processing logic.
69
+
"""
70
+
71
+
STREAM_DESCRIPTION="""
72
+
Continuously aggregates the output of a processing job, returning the full output once the job is complete.
39
73
74
+
This endpoint is especially useful for jobs where the complete output needs to be accessed at once. It provides a consolidated view of the results post-completion, ensuring that users can retrieve the entire output without the need to poll multiple times or manage partial results.
75
+
76
+
**Parameters:**
77
+
- **job_id** (string): The unique identifier of the job for which output is being requested. This ID is used to track the job's progress and aggregate its output.
78
+
79
+
**Returns:**
80
+
- **output** (Any): The aggregated output from the job, returned as a single entity once the job has concluded. The format of the output will depend on the nature of the job and how its results are structured.
81
+
"""
82
+
83
+
STATUS_DESCRIPTION="""
84
+
Checks the completion status of a processing job and returns its output if the job is complete.
85
+
86
+
This endpoint is invaluable for monitoring the progress of a job and obtaining the output only after the job has fully completed. It simplifies the process of querying job completion and retrieving results, eliminating the need for continuous polling or result aggregation.
87
+
88
+
**Parameters:**
89
+
- **job_id** (string): The unique identifier for the job being queried. This ID is used to track and assess the status of the job.
90
+
91
+
**Returns:**
92
+
- **status** (string): The completion status of the job, typically 'complete' or 'in progress'. This status indicates whether the job has finished processing and if the output is ready for retrieval.
93
+
- **output** (Any, optional): The final output of the job, provided if the job is complete. The format and structure of the output depend on the job's nature and the data processing involved.
94
+
95
+
**Note:** The availability of the `output` field is contingent on the job's completion status. If the job is still in progress, this field may be omitted or contain partial results, depending on the implementation.
0 commit comments