Skip to content

Commit 70faf84

Browse files
committed
fix docs
1 parent 4dc9884 commit 70faf84

4 files changed

Lines changed: 30 additions & 20 deletions

File tree

luxonis_train/__main__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,15 @@ def quantize(
490490
config: str | None = None,
491491
weights: str | None = None,
492492
):
493+
"""Quantize the model using AIMET.
494+
495+
@type config: str
496+
@param config: Path to the configuration file.
497+
@type weights: str
498+
@param weights: Path to the model weights.
499+
@type opts: list[str]
500+
@param opts: A list of optional CLI overrides of the config file.
501+
"""
493502
model = create_model(
494503
config, opts, weights=weights, allow_empty_dataset=True
495504
)

luxonis_train/callbacks/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,15 @@ A callback that maintains an exponential moving average (EMA) of the model's par
188188

189189
## `AIMETCallback`
190190

191-
# Callback to perform AIMET quantization at the end of the training.
191+
Callback to perform AIMET quantization at the end of the training.
192+
193+
This callback runs AIMET post-training static quantization using the best checkpoint (by default based on the main metric) at the end of training.
194+
195+
**Parameters:**
196+
197+
| Key | Type | Default value | Description |
198+
| ---------------------- | --------------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
199+
| `preferred_checkpoint` | `Literal["metric", "loss"]` | `"metric"` | Which checkpoint should the callback use. If the preferred checkpoint is not available, the other option is used. If none is available, the callback is skipped |
192200

193201
## `TrainingProgressCallback`
194202

luxonis_train/callbacks/luxonis_progress_bar.py

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ def print_table(
7070
7171
@type title: str
7272
@param title: Title of the table
73-
@type table: Mapping[str, int | str | float]
74-
@param table: Table to print
73+
@type table: Iterable[tuple[str | int | float, ...]]
74+
@param table: Table to print as an iterable of rows, where each row is a tuple of values.
7575
@type column_names: list[str]
7676
@param column_names: Names of the columns in the table
7777
"""
@@ -181,13 +181,10 @@ def print_table(
181181
182182
@type title: str
183183
@param title: Title of the table
184-
@type table: Mapping[str, int | str | float]
185-
@param table: Table to print
186-
@type key_name: str
187-
@param key_name: Name of the key column. Defaults to C{"Name"}.
188-
@type value_name: str
189-
@param value_name: Name of the value column. Defaults to
190-
C{"Value"}.
184+
@type table: Iterable[tuple[str | int | float, ...]]
185+
@param table: Table to print as an iterable of rows, where each row is a tuple of values.
186+
@type column_names: list[str]
187+
@param column_names: Names of the columns in the table
191188
"""
192189
self._rule(title)
193190
formatted = tabulate(
@@ -332,13 +329,10 @@ def print_table(
332329
333330
@type title: str
334331
@param title: Title of the table
335-
@type table: Mapping[str, int | str | float]
336-
@param table: Table to print
337-
@type key_name: str
338-
@param key_name: Name of the key column. Defaults to C{"Name"}.
339-
@type value_name: str
340-
@param value_name: Name of the value column. Defaults to
341-
C{"Value"}.
332+
@type table: Iterable[tuple[str | int | float, ...]]
333+
@param table: Table to print as an iterable of rows, where each row is a tuple of values.
334+
@type column_names: list[str]
335+
@param column_names: Names of the columns in the table
342336
@param console: Console instance to use, if None use default
343337
console. Defaults to None.
344338
@type console: Console | None

luxonis_train/utils/dataset_metadata.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,8 @@ def n_keypoints(self, task_name: str | None = None) -> int:
122122
@type task_name: str | None
123123
@param task_name: Task to get the number of keypoints for.
124124
@rtype: int
125-
@return: Number of keypoints for the specified task type.
126-
@raises ValueError: If the C{task} is not present in the
127-
dataset.
125+
@return: Number of keypoints for the specified task type or 0 if
126+
the task does not involve keypoints.
128127
@raises RuntimeError: If the C{task} was not provided and the
129128
dataset contains different number of keypoints for different
130129
task types.

0 commit comments

Comments
 (0)