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
Copy file name to clipboardExpand all lines: docs/concepts/style_guide.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -162,7 +162,7 @@ Many classes contain standardized prefixes, suffixes, or identifiers within thei
162
162
- For example, methods which are known to rely on external resources (e.g., network calls, file I/O) should document the exceptions that may be raised in the event of a failure.
163
163
- It is**not** expected that every conceivable exception raised from a particular call hierarchy is documented, but rather those that are most likely to occur and can be reasonably anticipated.
164
164
- A method that opens a file should document `FileNotFoundError`and`IOError`in its `Raises` section, while network-related methods should document `ConnectionError`, `TimeoutError`, and other relevant exceptions.
165
-
165
+
166
166
### API Model Specific Documentation
167
167
168
168
Many docstrings in the SDK have additional requirements when they are related to API models or requests/responses. While these rules would be difficult to remember, they are luckily enforced by CIand the `horde_sdk.meta` module has helper functions to assist in generating the required docstrings. The correct docstrings will also be emitted by the `object_verify` tests. Be sure to run the tests with`-s` to see the output.
Copy file name to clipboardExpand all lines: docs/worker/generation_states_flow.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ flowchart TD
14
14
15
15
NOT_STARTED@{shape: subproc}
16
16
PRELOADING@{shape: subproc}
17
-
PRELOADING_COMPLETE@{shape: subproc}
17
+
PRELOADING_COMPLETE@{shape: subproc}
18
18
PENDING_POST_PROCESSING@{ shape: subproc}
19
19
POST_PROCESSING@{ shape: subproc}
20
20
GENERATING@{ shape: subproc}
@@ -119,7 +119,7 @@ Good:
119
119
- Here, the worker encountered an error during preloading, attempted to recover, but failed again and then aborted the job. Note that you can set the intended number of retries in worker job configuration. See the `HordeWorkerJobConfig` class and the `state_error_limits` arg in a generation class constructor for more details.
Copy file name to clipboardExpand all lines: docs/worker/generations.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,7 +85,7 @@ These functions return the transitioned to state.
85
85
#### Important Notes on State Transitions
86
86
87
87
-**Strict Order:** You must call state transition methods in the correct sequence. For example, you cannot call `on_generating()` before `on_preloading_complete()`. This strictness helps catch workflow errors early. Out-of-order calls almost always indicate a problem in your logic or resource handling.
88
-
-**Error Handling:** If an error occurs at any step, use `on_error(failed_message="...")` to move the generation into the `ERROR` state. This lets you handle errors gracefully and, if needed, recover. To continue after an error, you must return to the most recent valid state before proceeding.
88
+
-**Error Handling:** If an error occurs at any step, use `on_error(failed_message="...")` to move the generation into the `ERROR` state. This lets you handle errors gracefully and, if needed, recover. To continue after an error, you must return to the most recent valid state before proceeding.
89
89
- For example, if you are in the `GENERATING` state and an error occurs, call `on_error()` to enter `ERROR`, then call `on_generating()` again to retry.
90
90
-**Dynamic States:** Some transition methods, such as `on_generation_work_complete()`, may lead to different next states depending on context (e.g., whether post-processing is required). The class handles these decisions internally, so you don’t need to manually select the next state.
91
91
-**Manual States:** You can use the generic `step(state)` or `on_state(state)` methods to transition to a specific state. However, you are responsible for ensuring the transition is valid—these methods bypass some of the built-in checks.
@@ -346,7 +346,7 @@ flowchart TD
346
346
347
347
NOT_STARTED@{shape: subproc}
348
348
PRELOADING@{shape: subproc}
349
-
PRELOADING_COMPLETE@{shape: subproc}
349
+
PRELOADING_COMPLETE@{shape: subproc}
350
350
PENDING_POST_PROCESSING@{ shape: subproc}
351
351
POST_PROCESSING@{ shape: subproc}
352
352
GENERATING@{ shape: subproc}
@@ -451,7 +451,7 @@ Good:
451
451
- Here, the worker encountered an error during preloading, attempted to recover, but failed again and then aborted the job. Note that you can set the intended number of retries in worker job configuration. See the `HordeWorkerJobConfig` class and the `state_error_limits` arg in a generation class constructor for more details.
0 commit comments