core.services.utils.local_context¶
local_context
¶
Functions:
Name | Description |
---|---|
create_local_processing_context |
Create a local processing context for running a processing pipeline outside of Picsellia. |
create_local_training_context |
Create a local training context for testing model training logic locally. |
create_local_processing_context(processing_parameters_cls, api_token, organization_name, job_type, input_dataset_version_id, output_dataset_version_name=None, model_version_id=None, processing_parameters=None, working_dir=None, host=None)
¶
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. |
required |
|
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 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
|
Returns:
Type | Description |
---|---|
LocalProcessingContext
|
LocalProcessingContext[TParameters]: A fully initialized local processing context. |
create_local_training_context(hyperparameters_cls, augmentation_parameters_cls, export_parameters_cls, api_token, organization_name, experiment_id, working_dir=None, host=None)
¶
Create a local training context for testing model training logic locally.
This context allows for local execution of training steps with parameters pulled from experiment logs.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
type
|
Class defining training hyperparameters. |
required |
|
type
|
Class defining augmentation strategy parameters. |
required |
|
type
|
Class defining model export configuration. |
required |
|
str
|
API token to authenticate with Picsellia. |
required |
|
str
|
Name of the organization linked to the experiment. |
required |
|
str
|
Experiment ID from which parameter logs are retrieved. |
required |
|
str | None
|
Optional local working directory. |
None
|
|
str | None
|
Optional Picsellia host override. |
None
|
Returns:
Name | Type | Description |
---|---|---|
LocalTrainingContext |
LocalTrainingContext
|
Fully initialized context for local model training. |