core.services.context.local_context¶
local_context
¶
Functions:
| Name | Description |
|---|---|
create_local_dataset_processing_context |
Create a local processing context for running a processing pipeline outside of Picsellia. |
create_local_datalake_processing_context |
Create a local context for datalake processing pipelines. |
create_local_model_processing_context |
|
create_local_training_context |
Create a local training context for running a training pipeline outside of Picsellia. |
create_local_dataset_processing_context(processing_parameters_cls, organization_name, job_type, input_dataset_version_id, target_version_name=None, output_dataset_version_id=None, target_id=None, model_version_id=None, processing_parameters=None, working_dir=None, api_token=None, host=None, inputs=None, use_id=True, download_annotations=True)
¶
Create a local processing context for running a processing pipeline outside of Picsellia.
This is typically used for development and testing, with full local control over input/output paths and parameter overrides.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
type[TParameters]
|
A subclass of |
required |
|
str
|
API token for authentication with Picsellia. |
None
|
|
str
|
Name of the Picsellia organization. |
required |
|
ProcessingType
|
Type of processing job (e.g., |
required |
|
str
|
ID of the dataset version used as input. |
required |
|
str | None
|
Optional name for the output dataset version. |
None
|
|
str | None
|
Optional ID of an existing dataset version to use as output. |
None
|
|
str | None
|
Optional ID of the processing target. |
None
|
|
str | None
|
Optional ID of a model version to include in the context. |
None
|
|
dict[str, Any] | None
|
Raw values to override defaults in the processing parameters. |
None
|
|
str | None
|
Optional working directory for local file operations. |
None
|
|
str | None
|
Optional Picsellia API host override. |
None
|
|
dict[str, Any] | None
|
Optional dictionary of additional inputs to include in the context. |
None
|
|
bool
|
Whether to use asset IDs or paths in output annotations. |
True
|
|
bool
|
Whether to download annotations for the input dataset version. |
True
|
Returns:
| Type | Description |
|---|---|
LocalDatasetProcessingContext
|
LocalDatasetProcessingContext[TParameters]: A fully initialized local processing context. |
create_local_datalake_processing_context(processing_parameters_cls, organization_name, job_type, input_datalake_id, output_datalake_id=None, model_version_id=None, target_id=None, inputs=None, offset=0, limit=100, use_id=True, processing_parameters=None, working_dir=None, api_token=None, host=None)
¶
Create a local context for datalake processing pipelines.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
type[TParameters]
|
Class used to parse processing parameters. |
required |
|
str | None
|
Your Picsellia API token. |
None
|
|
str
|
Name of your organization. |
required |
|
ProcessingType
|
Type of processing job. |
required |
|
str
|
ID of the input datalake. |
required |
|
str | None
|
Optional ID of the output datalake. |
None
|
|
str | None
|
Optional ID of the model version. |
None
|
|
str | None
|
Optional ID of the processing target. |
None
|
|
dict[str, Any] | None
|
Optional dictionary of additional inputs to include in the context. |
None
|
|
int
|
Data offset for datalake slicing. |
0
|
|
int
|
Max number of samples to fetch. |
100
|
|
bool
|
Whether to use asset ID or path in output annotations. |
True
|
|
dict[str, Any] | None
|
Raw values to override defaults in the processing parameters. |
None
|
|
str | None
|
Optional working directory. |
None
|
|
str | None
|
Optional custom API host. |
None
|
Returns:
| Type | Description |
|---|---|
LocalDatalakeProcessingContext
|
LocalDatalakeProcessingContext |
create_local_model_processing_context(processing_parameters_cls, organization_name, job_type, input_model_version_id, target_id=None, inputs=None, processing_parameters=None, working_dir=None, api_token=None, host=None)
¶
create_local_training_context(hyperparameters_cls, augmentation_parameters_cls, export_parameters_cls, organization_name, experiment_id, hyperparameters=None, augmentation_parameters=None, export_parameters=None, working_dir=None, api_token=None, host=None)
¶
Create a local training context for running a training pipeline outside of Picsellia.
This is typically used for development and debugging, with full local control over hyperparameters, augmentation strategies, and export configuration. Parameters can be pulled from the experiment logs or overridden manually.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
type[HyperParameters]
|
Class defining the training hyperparameters. |
required |
|
type[AugmentationParameters]
|
Class defining data augmentation parameters. |
required |
|
type[ExportParameters]
|
Class defining model export parameters. |
required |
|
str
|
API token for authentication with Picsellia. |
None
|
|
str
|
Name of the Picsellia organization. |
required |
|
str
|
ID of the experiment from which to load parameter logs. |
required |
|
dict[str, Any] | None
|
Optional overrides for training hyperparameters. |
None
|
|
dict[str, Any] | None
|
Optional overrides for augmentation parameters. |
None
|
|
dict[str, Any] | None
|
Optional overrides for export parameters. |
None
|
|
str | None
|
Optional working directory for local file operations. |
None
|
|
str | None
|
Optional Picsellia API host override. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
LocalTrainingContext |
LocalTrainingContext
|
A fully initialized local training context. |