Data Models#

The hastegeo.core.models package contains Pydantic data models used throughout the HASTE platform for validation, serialization, and type safety.

Projects (hastegeo.core.models.projects)#

Core domain models for HASTE projects:

  • PrimaryClass — Damage/feature classification definition

  • Geometry — GeoJSON-style geometry (point, polygon, linestring, etc.)

  • Properties — Feature properties with classification and metadata

  • Label — Individual annotation for imagery

  • LabelingImagery — Imagery display configuration for the labeling tool

  • Feature — Geographic feature for labeling tasks

  • LabelProject — Complete labeling project with features, labels, and imagery config

  • TrainingJob — ML training job metadata (status, epochs, timing)

  • InferenceJob — Model inference job execution metadata

  • Checkpoint — Model checkpoint state persistence

  • ModelRequest — Request to create/configure a model

  • Model — Complete ML model configuration and lifecycle

  • ZipTypeEnum — Enum for zip job types (TRAINING, INFERENCE)

  • ZipJob — File archiving job for model artifacts

  • ModelArtifacts — Model artifact management and packaging state

class hastegeo.core.models.projects.BuildingValidation(*, imageLayerId=None, projectId=None, labels=<factory>, dependsOn=('ImageLayer', 'imageLayerId'))[source]#

Bases: BaseModel

Stores building-footprint validation results for an image layer.

Labels are shared across all users for a given image layer (last-write-wins). The labels dict maps each Overture building ID to its ValidationLabel.

Parameters:
  • imageLayerId (Optional[str]) – Reference to the imagery layer being validated

  • projectId (Optional[str]) – Reference to the parent project

  • labels (Optional[dict]) – Mapping of Overture building ID to ValidationLabel

  • dependsOn (Optional[tuple[str, str]]) – Dependency tuple specifying parent resource type and ID

dependsOn: Optional[tuple[str, str]]#
imageLayerId: Optional[str]#
labels: Optional[dict]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

projectId: Optional[str]#
class hastegeo.core.models.projects.Checkpoint(*, checkpointId=None, checkpointUrl=None, checkpointPath=None, modelId=None, projectId=None, creationDate=None, dependsOn=('Model', 'modelId'))[source]#

Bases: BaseModel

Represents a model checkpoint saved during training in the HASTE system.

This model captures checkpoint metadata for model state persistence during training processes. Checkpoints enable training resumption and provide access to intermediate model states for evaluation and deployment.

Parameters:
  • checkpointId (Optional[str]) – Unique identifier for the checkpoint instance

  • checkpointUrl (Optional[str]) – URL location of the checkpoint file in storage

  • checkpointPath (Optional[str]) – File system path to the checkpoint data

  • modelId (Optional[str]) – Reference to the model that generated this checkpoint

  • projectId (Optional[str]) – Reference to the parent project containing the model

  • creationDate (Optional[str]) – ISO formatted timestamp when checkpoint was created

  • dependsOn (Optional[tuple[str, str]]) – Dependency tuple specifying parent resource type and ID

Note

Checkpoints may be stored as directories containing multiple files rather than single checkpoint files, depending on the model framework.

Example

```python checkpoint = Checkpoint(

checkpointId=”ckpt_123”, modelId=”model_456”, checkpointPath=”/models/checkpoint_epoch_10.pth”

checkpointId: Optional[str]#
checkpointPath: Optional[str]#
checkpointUrl: Optional[str]#
creationDate: Optional[str]#
dependsOn: Optional[tuple[str, str]]#
modelId: Optional[str]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

projectId: Optional[str]#
class hastegeo.core.models.projects.Feature(*, type='Feature', featureId=None, geometry=None, bbox=None, assignedCount=0)[source]#

Bases: BaseModel

Geographic feature definition for labeling tasks.

Represents a geographic feature that can be assigned to labeling tasks, typically corresponding to areas or regions of interest within imagery.

type#

Feature type, defaults to ‘Feature’ (GeoJSON standard).

Type:

str, optional

featureId#

Unique identifier for the feature.

Type:

str, optional

geometry#

Spatial geometry of the feature.

Type:

Geometry, optional

bbox#

Bounding box [minLon, minLat, maxLon, maxLat].

Type:

List[float], optional

assignedCount#

Number of times this feature has been assigned.

Type:

int, optional

assignedCount: Optional[int]#
bbox: Optional[List[float]]#
featureId: Optional[str]#
geometry: Optional[Geometry]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

type: Optional[str]#
class hastegeo.core.models.projects.Geometry(*, type=None, coordinates=None)[source]#

Bases: BaseModel

GeoJSON-style geometry definition.

Represents spatial geometry data following GeoJSON specification. Used for defining geographic features and regions of interest.

type#

Geometry type (‘Point’, ‘Polygon’, ‘LineString’, etc.).

Type:

str, optional

coordinates#

Coordinate array structure depends on geometry type.

Type:

List, optional

coordinates: Optional[List]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

type: Optional[str]#
class hastegeo.core.models.projects.ImageLayer(*, imageLayerId=None, projectId=None, labelProjectId=None, name=None, description=None, workflowType='standard', format=None, sourceType=None, sourceTypePreEvent=None, sourceTypePostEvent=None, imageryCaptureDatePreEvent=None, imageryCaptureDatePostEvent=None, normalizationFactor=None, imageryCaptureDate=None, preEventImageryUrls=None, preEventPreviewUrls=<factory>, preEventMosaicCogImageryUrl=None, preEventProcessedImageryUrl=None, postEventImageryUrls=None, postEventPreviewUrls=<factory>, postEventMosaicCogImageryUrl=None, postEventProcessedImageryUrl=None, processedImageryUrls=None, rawImageryUrls=None, previewSourceImageryUrls=None, preprocessJob=None, imageryPath=None, userId=None, status=None, statusMessage='', currentStep=0, totalSteps=0, progressPct=0.0, creationDate=None, modelCount=0, labelProjectCount=0, autoFineTune=False, models=None, normalizationMeans=<factory>, normalizationStds=<factory>, labelProject=None, labelsUrl=None, buildingFootprintsUrl=None, userBuildingFootprintsUrl=None, validAreaMaskUrl=None, dependsOn=('Project', 'projectId'))[source]#

Bases: BaseModel

Represents an imagery layer containing satellite or aerial imagery data in the HASTE system.

This comprehensive model manages imagery datasets including pre-event and post-event imagery for damage assessment, along with processing state, normalization parameters, and associated analysis models. Supports multiple imagery sources and formats.

Parameters:
  • imageLayerId (Optional[str]) – Unique identifier for the imagery layer

  • projectId (Optional[str]) – Reference to the parent project containing this layer

  • labelProjectId (Optional[str]) – Reference to associated labeling project for ground truth

  • name (Optional[str]) – Human-readable name for the imagery layer

  • description (Optional[str]) – Detailed description of the imagery content and purpose

  • format (Optional[str]) – Imagery file format (e.g., ‘GeoTIFF’, ‘COG’)

  • sourceType (Optional[str]) – Legacy field for imagery source type (deprecated)

  • sourceTypePreEvent (Optional[str]) – Source type for pre-event imagery (e.g., ‘Sentinel-2’, ‘WorldView’)

  • sourceTypePostEvent (Optional[str]) – Source type for post-event imagery

  • imageryCaptureDatePreEvent (Optional[str]) – ISO formatted capture date for pre-event imagery

  • imageryCaptureDatePostEvent (Optional[str]) – ISO formatted capture date for post-event imagery

  • normalizationFactor (Optional[float]) – Scaling factor for pixel value normalization

  • imageryCaptureDate (Optional[str]) – Legacy field for capture date (deprecated)

  • preEventImageryUrls (Optional[list[str]]) – List of URLs to pre-event imagery files

  • preEventPreviewUrls (Optional[list[str]]) – List of URLs to pre-event preview/thumbnail images

  • preEventMosaicCogImageryUrl (Optional[str]) – URL to pre-event mosaic Cloud Optimized GeoTIFF

  • preEventProcessedImageryUrl (Optional[str]) – URL to preprocessed pre-event imagery

  • postEventImageryUrls (Optional[list[str]]) – List of URLs to post-event imagery files

  • postEventPreviewUrls (Optional[list[str]]) – List of URLs to post-event preview/thumbnail images

  • postEventMosaicCogImageryUrl (Optional[str]) – URL to post-event mosaic Cloud Optimized GeoTIFF

  • postEventProcessedImageryUrl (Optional[str]) – URL to preprocessed post-event imagery

  • processedImageryUrls (Optional[list[str]]) – Legacy field for processed imagery URLs (deprecated)

  • rawImageryUrls (Optional[list[str]]) – Legacy field for raw imagery URLs (deprecated)

  • previewSourceImageryUrls (Optional[list[str]]) – Legacy field for preview URLs (deprecated)

  • preprocessJob (Optional[ImageryPreprocessJob]) – Associated preprocessing job for this imagery layer

  • imageryPath (Optional[str]) – File system path to imagery data

  • userId (Optional[str]) – Identifier of the user who created the layer

  • status (Optional[str]) – Current processing status (e.g., ‘processing’, ‘ready’, ‘failed’)

  • statusMessage (Optional[str]) – Detailed status message for current processing state

  • currentStep (Optional[int]) – Current processing step number for progress tracking

  • totalSteps (Optional[int]) – Total number of processing steps expected

  • progressPct (Optional[float]) – Processing progress percentage (0.0 to 100.0)

  • creationDate (Optional[str]) – ISO formatted timestamp when layer was created

  • modelCount (Optional[int]) – Number of models trained on this imagery layer

  • labelProjectCount (Optional[int]) – Number of labeling projects using this layer

  • autoFineTune (Optional[bool]) – Whether to automatically fine-tune models with this imagery

  • models (Optional[List[Model]]) – List of models associated with this imagery layer

  • normalizationMeans (Optional[List[int]]) – Mean values for each spectral band for normalization

  • normalizationStds (Optional[List[int]]) – Standard deviation values for each spectral band

  • labelProject (Optional[LabelProject]) – Associated labeling project providing ground truth data

  • labelsUrl (Optional[str]) – URL to labels file for the imagery layer

  • buildingFootprintsUrl (Optional[str]) – URL to the cached building-footprint GeoPackage scoped to this layer’s AOI. Populated by the imageryprep workflow from either Overture Maps (default) or from the user-supplied userBuildingFootprintsUrl (when set). Consumed by inference instead of re-downloading on every model run.

  • userBuildingFootprintsUrl (Optional[str]) – Optional user-supplied URL pointing to a GeoPackage of building footprints. When set, the imageryprep workflow skips the Overture download and instead downloads this file, reprojects it to EPSG:4326, clips it to the layer’s AOI, and writes the result to buildingFootprintsUrl. The URL must satisfy validate_footprint_url (same allowlist as imagery URLs plus the configured local upload host).

  • validAreaMaskUrl (Optional[str]) – URL to a single-feature GeoJSON FeatureCollection containing the valid-data polygon (EPSG:4326) derived from the post-event mosaic, i.e. the imagery’s actual AOI excluding nodata. Populated by the imageryprep workflow; surfaced as a downloadable artifact in the UI.

  • dependsOn (Optional[tuple[str, str]]) – Dependency tuple specifying parent resource type and ID

Example

```python imagery_layer = ImageLayer(

imageLayerId=”layer_123”, name=”Hurricane Harvey - Houston”, sourceTypePreEvent=”Sentinel-2”, sourceTypePostEvent=”WorldView-3”, imageryCaptureDatePreEvent=”2017-08-20T00:00:00Z”, imageryCaptureDatePostEvent=”2017-08-30T00:00:00Z”

autoFineTune: Optional[bool]#
buildingFootprintsUrl: Optional[str]#
creationDate: Optional[str]#
currentStep: Optional[int]#
dependsOn: Optional[tuple[str, str]]#
description: Optional[str]#
format: Optional[str]#
imageLayerId: Optional[str]#
imageryCaptureDate: Optional[str]#
imageryCaptureDatePostEvent: Optional[str]#
imageryCaptureDatePreEvent: Optional[str]#
imageryPath: Optional[str]#
labelProject: Optional[LabelProject]#
labelProjectCount: Optional[int]#
labelProjectId: Optional[str]#
labelsUrl: Optional[str]#
modelCount: Optional[int]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

models: Optional[List[Model]]#
name: Optional[str]#
normalizationFactor: Optional[float]#
normalizationMeans: Optional[List[int]]#
normalizationStds: Optional[List[int]]#
postEventImageryUrls: Optional[list[str]]#
postEventMosaicCogImageryUrl: Optional[str]#
postEventPreviewUrls: Optional[list[str]]#
postEventProcessedImageryUrl: Optional[str]#
preEventImageryUrls: Optional[list[str]]#
preEventMosaicCogImageryUrl: Optional[str]#
preEventPreviewUrls: Optional[list[str]]#
preEventProcessedImageryUrl: Optional[str]#
preprocessJob: Optional[ImageryPreprocessJob]#
previewSourceImageryUrls: Optional[list[str]]#
processedImageryUrls: Optional[list[str]]#
progressPct: Optional[float]#
projectId: Optional[str]#
rawImageryUrls: Optional[list[str]]#
sourceType: Optional[str]#
sourceTypePostEvent: Optional[str]#
sourceTypePreEvent: Optional[str]#
status: Optional[str]#
statusMessage: Optional[str]#
totalSteps: Optional[int]#
userBuildingFootprintsUrl: Optional[str]#
userId: Optional[str]#
validAreaMaskUrl: Optional[str]#
workflowType: Optional[str]#
class hastegeo.core.models.projects.ImageryPreprocessJob(*, projectId=None, imageLayerId=None, jobId=None, taskId=None, status=None, logs=None, creationDate=None, completedDate=None, dependsOn=('ImageLayer', 'imageLayerId'))[source]#

Bases: BaseModel

Represents an imagery preprocessing job in the HASTE system.

This model captures preprocessing job execution details for preparing raw imagery data for analysis and machine learning workflows. Preprocessing jobs run on Azure Batch services to handle large imagery datasets.

Parameters:
  • projectId (Optional[str]) – Reference to the parent project containing the imagery

  • imageLayerId (Optional[str]) – Reference to the imagery layer being processed

  • jobId (Optional[str]) – Azure Batch job identifier for job management and monitoring

  • taskId (Optional[str]) – Azure Batch task identifier within the job

  • status (Optional[str]) – Current execution status (e.g., ‘running’, ‘completed’, ‘failed’)

  • logs (Optional[str]) – Processing logs and output messages from the job execution

  • creationDate (Optional[str]) – ISO formatted timestamp when job was created

  • completedDate (Optional[str]) – ISO formatted timestamp when job finished

  • dependsOn (Optional[tuple[str, str]]) – Dependency tuple specifying parent resource type and ID

Example

```python preprocess_job = ImageryPreprocessJob(

projectId=”proj_123”, imageLayerId=”layer_456”, status=”processing”

completedDate: Optional[str]#
creationDate: Optional[str]#
dependsOn: Optional[tuple[str, str]]#
imageLayerId: Optional[str]#
jobId: Optional[str]#
logs: Optional[str]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

projectId: Optional[str]#
status: Optional[str]#
taskId: Optional[str]#
class hastegeo.core.models.projects.InferenceJob(*, uid=None, jobId=None, taskId=None, modelId=None, projectId=None, status=None, creationDate=None, completedDate=None, logs='', artifactZipJobUid=None, dependsOn=('Model', 'modelId'))[source]#

Bases: BaseModel

Represents a machine learning model inference job in the HASTE system.

This model captures inference job execution metadata for applying trained models to new imagery data. Inference jobs run on Azure Batch services and generate prediction outputs for analysis and visualization.

Parameters:
  • uid (Optional[str]) – Unique identifier for the inference job instance, DEPRECATED

  • jobId (Optional[str]) – Azure Batch job identifier for job management and monitoring

  • taskId (Optional[str]) – Azure Batch task identifier within the job

  • modelId (Optional[str]) – Reference to the trained model used for inference

  • projectId (Optional[str]) – Reference to the parent project containing input imagery

  • status (Optional[str]) – Current execution status (e.g., ‘running’, ‘completed’, ‘failed’)

  • creationDate (Optional[str]) – ISO formatted timestamp when job was created

  • completedDate (Optional[str]) – ISO formatted timestamp when job finished

  • logs (Optional[str]) – Inference logs and output messages from the job execution

  • artifactZipJobUid (Optional[str]) – Reference to zip job for packaging inference results

  • dependsOn (Optional[tuple[str, str]]) – Dependency tuple specifying parent resource type and ID

Example

```python inference_job = InferenceJob(

uid=”inf_123”, modelId=”model_456”, projectId=”proj_789”, status=”queued”

artifactZipJobUid: Optional[str]#
completedDate: Optional[str]#
creationDate: Optional[str]#
dependsOn: Optional[tuple[str, str]]#
jobId: Optional[str]#
logs: Optional[str]#
modelId: Optional[str]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

projectId: Optional[str]#
status: Optional[str]#
taskId: Optional[str]#
uid: Optional[str]#
class hastegeo.core.models.projects.Label(*, type=None, properties=None, id=None, geometry=None)[source]#

Bases: BaseModel

Individual label annotation for imagery analysis.

Represents a single labeled feature within an image, containing both geometric and semantic information about identified objects or areas.

type#

Label type identifier.

Type:

str, optional

properties#

Feature properties and classification.

Type:

Properties, optional

id#

Unique identifier for the label.

Type:

str, optional

geometry#

Spatial geometry of the labeled feature.

Type:

Geometry, optional

geometry: Optional[Geometry]#
id: Optional[str]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

properties: Optional[Properties]#
type: Optional[str]#
class hastegeo.core.models.projects.LabelProject(*, projectId=None, labelprojectId=None, imageLayerId=None, name=None, creationDate=None, labels=<factory>, imagery=None, features=None, dependsOn=('ImageLayer', 'imageLayerId'))[source]#

Bases: BaseModel

Labeling project containing features, labels, and imagery configuration.

Represents a complete labeling project that groups together imagery, features to be labeled, existing labels, and configuration for the labeling interface.

projectId#

Parent project identifier.

Type:

str, optional

labelprojectId#

Unique labeling project identifier.

Type:

str, optional

imageLayerId#

Associated image layer identifier.

Type:

str, optional

name#

Human-readable project name.

Type:

str, optional

creationDate#

ISO format creation timestamp.

Type:

str, optional

labels#

Collection of existing labels.

Type:

List[Label], optional

imagery#

Imagery display configuration.

Type:

LabelingImagery, optional

features#

Features available for labeling.

Type:

List[Feature], optional

dependsOn#

Dependency specification for data relationships.

Type:

tuple, optional

creationDate: Optional[str]#
dependsOn: Optional[tuple[str, str]]#
features: Optional[List[Feature]]#
imageLayerId: Optional[str]#
imagery: Optional[LabelingImagery]#
labelprojectId: Optional[str]#
labels: Optional[List[Label]]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: Optional[str]#
projectId: Optional[str]#
class hastegeo.core.models.projects.LabelingImagery(*, enabled=None, type=None, tileSize=None, tileUrl=None, preEventTileUrl=None, postEventTileUrl=None, bounds=None)[source]#

Bases: BaseModel

Configuration for imagery display in the labeling tool.

Defines how imagery should be displayed and accessed within the labeling interface, including tile server configurations and display parameters.

enabled#

Whether imagery display is enabled.

Type:

bool, optional

type#

Type of imagery service or format.

Type:

str, optional

tileSize#

Size of image tiles in pixels.

Type:

int, optional

tileUrl#

Base URL for tile service (deprecated).

Type:

str, optional

preEventTileUrl#

URL for pre-event imagery tiles.

Type:

str, optional

postEventTileUrl#

URL for post-event imagery tiles.

Type:

str, optional

bounds#

Geographic bounds [minLon, minLat, maxLon, maxLat].

Type:

List[float], optional

bounds: Optional[List[float]]#
enabled: Optional[bool]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

postEventTileUrl: Optional[str]#
preEventTileUrl: Optional[str]#
tileSize: Optional[int]#
tileUrl: Optional[str]#
type: Optional[str]#
class hastegeo.core.models.projects.Model(*, modelId=None, projectId=None, imageLayerId=None, labelprojectId=None, name=None, labelsCount=0, baseModel=None, baseModelWeightsUrl=None, initialWeightsUrl=None, outputModelWeightsUrl=None, learningRate=None, batchSize=None, maxEpochs=None, userId=None, creationDate=None, trainDate=None, status=None, currentStep=0, progressPct=0.0, totalSteps=0, statusMessage='', autoRunInference=True, checkpointPath=None, trainingOutputPath=None, inferenceOutputPath=None, trainingJob=None, inferenceJobs=<factory>, inferenceStatus=None, inferenceCurrentStep=0, inferenceProgressPct=0.0, inferenceTotalSteps=0, inferenceUid=None, currentInferenceTaskId=None, inferenceStatusMessage='', predictedDamageLayerUrl=None, gpkgUrl=None, labelsUrl=None, modelType='trained', embeddingModel=None, resizeFactor=None, numFeatures=None, embeddingJob=None, embeddingsGeoJSONUrl=None, pmtilesUrl=None, featuresSidecarUrl=None, dependsOn=('ImageLayer', 'imageLayerId'))[source]#

Bases: BaseModel

Represents a machine learning model configuration and state in the HASTE system.

This comprehensive model captures all aspects of ML model lifecycle including training configuration, execution state, inference results, and output artifacts. Models are trained on labeled imagery data and deployed for damage detection.

Parameters:
  • modelId (Optional[str]) – Unique identifier for the model instance

  • projectId (Optional[str]) – Reference to the parent project containing model data

  • imageLayerId (Optional[str]) – Reference to the imagery layer used for training

  • labelprojectId (Optional[str]) – Reference to the labeling project providing ground truth data

  • name (Optional[str]) – Human-readable name for the model

  • labelsCount (Optional[int]) – Number of training labels available for the model

  • baseModel (Optional[str]) – Base model architecture (e.g., ‘ResNet50’, ‘EfficientNet’)

  • baseModelWeightsUrl (Optional[str]) – URL to pre-trained base model weights

  • outputModelWeightsUrl (Optional[str]) – URL to trained model weights after completion

  • learningRate (Optional[str]) – Training learning rate parameter as string

  • batchSize (Optional[str]) – Training batch size parameter as string

  • maxEpochs (Optional[str]) – Maximum training epochs parameter as string

  • userId (Optional[str]) – Identifier of the user who created the model

  • creationDate (Optional[str]) – ISO formatted timestamp when model was created

  • trainDate (Optional[str]) – ISO formatted timestamp when training began

  • status (Optional[str]) – Current model status (e.g., ‘training’, ‘completed’, ‘failed’)

  • currentStep (Optional[int]) – Current training step number for progress tracking

  • progressPct (Optional[float]) – Training progress percentage (0.0 to 100.0)

  • totalSteps (Optional[int]) – Total number of training steps expected

  • statusMessage (Optional[str]) – Detailed status message for current model state

  • autoRunInference (Optional[bool]) – Whether to automatically run inference after training

  • checkpointPath (Optional[str]) – File path to saved model checkpoint

  • initialWeightsUrl (Optional[str]) – URL to initial weights file for model initialization

  • trainingOutputPath (Optional[str]) – Directory path for training output artifacts

  • inferenceOutputPath (Optional[str]) – Directory path for inference output artifacts

  • trainingJob (Optional[TrainingJob]) – Associated training job execution details

  • inferenceJobs (Optional[List[InferenceJob]]) – List of inference jobs run with this model

  • inferenceStatus (Optional[str]) – Current status of inference execution

  • inferenceCurrentStep (Optional[int]) – Current inference step for progress tracking

  • inferenceProgressPct (Optional[float]) – Inference progress percentage (0.0 to 100.0)

  • inferenceTotalSteps (Optional[int]) – Total number of inference steps expected

  • inferenceUid (Optional[str]) – Unique identifier for current inference execution, DEPRECATED

  • currentInferenceTaskId (Optional[str]) – Current inference task identifier

  • inferenceStatusMessage (Optional[str]) – Detailed inference status message

  • predictedDamageLayerUrl (Optional[str]) – URL to predicted damage layer output

  • gpkgUrl (Optional[str]) – URL to GeoPackage output file with predictions

  • labelsUrl (Optional[str]) – URL to labels file used for training

  • dependsOn (Optional[tuple[str, str]]) – Dependency tuple specifying parent resource type and ID

Example

```python model = Model(

modelId=”model_123”, name=”Building Damage Detection v1”, baseModel=”ResNet50”, learningRate=”0.001”, batchSize=”32”, maxEpochs=”100”, autoRunInference=True

autoRunInference: Optional[bool]#
baseModel: Optional[str]#
baseModelWeightsUrl: Optional[str]#
batchSize: Optional[str]#
checkpointPath: Optional[str]#
creationDate: Optional[str]#
currentInferenceTaskId: Optional[str]#
currentStep: Optional[int]#
dependsOn: Optional[tuple[str, str]]#
embeddingJob: Optional[TrainingJob]#
embeddingModel: Optional[str]#
embeddingsGeoJSONUrl: Optional[str]#
featuresSidecarUrl: Optional[str]#
gpkgUrl: Optional[str]#
imageLayerId: Optional[str]#
inferenceCurrentStep: Optional[int]#
inferenceJobs: Optional[List[InferenceJob]]#
inferenceOutputPath: Optional[str]#
inferenceProgressPct: Optional[float]#
inferenceStatus: Optional[str]#
inferenceStatusMessage: Optional[str]#
inferenceTotalSteps: Optional[int]#
inferenceUid: Optional[str]#
initialWeightsUrl: Optional[str]#
labelprojectId: Optional[str]#
labelsCount: Optional[int]#
labelsUrl: Optional[str]#
learningRate: Optional[str]#
maxEpochs: Optional[str]#
modelId: Optional[str]#
modelType: Optional[str]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: Optional[str]#
numFeatures: Optional[int]#
outputModelWeightsUrl: Optional[str]#
pmtilesUrl: Optional[str]#
predictedDamageLayerUrl: Optional[str]#
progressPct: Optional[float]#
projectId: Optional[str]#
resizeFactor: Optional[int]#
status: Optional[str]#
statusMessage: Optional[str]#
totalSteps: Optional[int]#
trainDate: Optional[str]#
trainingJob: Optional[TrainingJob]#
trainingOutputPath: Optional[str]#
userId: Optional[str]#
class hastegeo.core.models.projects.ModelArtifacts(*, projectId=None, imageLayerId=None, modelId=None, currentZipJobUid=None, zipUrl=None, trainingZipUrl=None, trainingZipSize=None, inferenceZipUrl=None, inferenceZipSize=None, zipStatus=None, zipStatusMessage='', zipJobs=<factory>, dependsOn=('Model', 'modelId'))[source]#

Bases: BaseModel

Represents model artifact management and packaging state in the HASTE system.

This model tracks the status and availability of model output artifacts, including training results, inference outputs, and packaged downloads. Coordinates zip job execution for artifact archiving and distribution.

Parameters:
  • projectId (Optional[str]) – Reference to the parent project containing the model

  • imageLayerId (Optional[str]) – Reference to the imagery layer used by the model

  • modelId (Optional[str]) – Reference to the model that generated the artifacts

  • currentZipJobUid (Optional[str]) – Reference to the active zip job packaging artifacts

  • zipUrl (Optional[str]) – URL to the downloadable zip archive of model artifacts

  • zipStatus (Optional[str]) – Current status of the zip packaging operation

  • zipStatusMessage (Optional[str]) – Detailed message about zip operation status

  • zipJobs (Optional[List[ZipJob]]) – List of zip jobs associated with this model’s artifacts

  • dependsOn (Optional[tuple[str, str]]) – Dependency tuple specifying parent resource type and ID

Example

```python artifacts = ModelArtifacts(

projectId=”proj_123”, modelId=”model_456”, zipStatus=”completed”, zipUrl=”https://storage.blob.core.windows.net/artifacts/model_456.zip

currentZipJobUid: Optional[str]#
dependsOn: Optional[tuple[str, str]]#
imageLayerId: Optional[str]#
inferenceZipSize: Optional[int]#
inferenceZipUrl: Optional[str]#
modelId: Optional[str]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

projectId: Optional[str]#
trainingZipSize: Optional[int]#
trainingZipUrl: Optional[str]#
zipJobs: Optional[List[ZipJob]]#
zipStatus: Optional[str]#
zipStatusMessage: Optional[str]#
zipUrl: Optional[str]#
class hastegeo.core.models.projects.ModelRequest(*, modelId=None, projectId=None, imageLayerId=None, labelProjectId=None, status=None)[source]#

Bases: BaseModel

Represents a request to create or configure a model in the HASTE system.

This model captures the parameters needed to initiate model creation, linking together project data, imagery layers, and labeling information required for training setup.

Parameters:
  • modelId (Optional[str]) – Unique identifier for the requested model

  • projectId (Optional[str]) – Reference to the parent project containing training data

  • imageLayerId (Optional[str]) – Reference to the imagery layer for model input

  • labelProjectId (Optional[str]) – Reference to the labeling project providing ground truth

  • status (Optional[str]) – Current status of the model request (e.g., ‘pending’, ‘approved’)

Example

```python model_request = ModelRequest(

modelId=”model_123”, projectId=”proj_456”, imageLayerId=”layer_789”, labelProjectId=”labels_101”

imageLayerId: Optional[str]#
labelProjectId: Optional[str]#
modelId: Optional[str]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

projectId: Optional[str]#
status: Optional[str]#
class hastegeo.core.models.projects.PrimaryClass(*, name=None, color=None)[source]#

Bases: BaseModel

Primary classification definition for labeling tasks.

Defines a primary class used in the labeling tool for categorizing damage or features in imagery analysis.

name#

Human-readable name of the classification.

Type:

str, optional

color#

Hex color code for visualization (e.g., ‘#FF0000’).

Type:

str, optional

color: Optional[str]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: Optional[str]#
class hastegeo.core.models.projects.Project(*, projectId=None, name=None, description=None, affectedCountries=None, userId=None, eventDate=None, eventTypes=None, creationDate=None, imageLayerCount=0, imageLayer=None, primaryClasses=None)[source]#

Bases: BaseModel

Represents a top-level project in the HASTE system for damage assessment analysis.

This model serves as the root container for all project-related resources including imagery layers, labeling projects, models, and analysis results. Projects typically correspond to specific disaster events or geographical areas of interest.

Parameters:
  • projectId (Optional[str]) – Unique identifier for the project

  • name (Optional[str]) – Human-readable name for the project

  • description (Optional[str]) – Detailed description of the project scope and objectives

  • affectedCountries (Optional[List[str]]) – List of countries affected by the event being analyzed

  • userId (Optional[str]) – Identifier of the user who created the project

  • eventDate (Optional[str]) – ISO formatted date when the disaster event occurred

  • creationDate (Optional[str]) – ISO formatted timestamp when project was created

  • imageLayerCount (Optional[int]) – Number of imagery layers associated with the project

  • imageLayer (Optional[List[ImageLayer]]) – List of imagery layers containing satellite/aerial data

  • primaryClasses (Optional[List[PrimaryClass]]) – List of damage classification categories for labeling

Example

```python project = Project(

projectId=”proj_123”, name=”Hurricane Harvey 2017 - Houston Assessment”, description=”Building damage assessment for Hurricane Harvey impact in Houston”, affectedCountries=[“United States”], eventDate=”2017-08-25T00:00:00Z”

affectedCountries: Optional[List[str]]#
creationDate: Optional[str]#
description: Optional[str]#
eventDate: Optional[str]#
eventTypes: Optional[List[str]]#
imageLayer: Optional[List[ImageLayer]]#
imageLayerCount: Optional[int]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: Optional[str]#
primaryClasses: Optional[List[PrimaryClass]]#
projectId: Optional[str]#
userId: Optional[str]#
class hastegeo.core.models.projects.Projects(*, root=<factory>)[source]#

Bases: BaseModel

Container model for managing multiple Project instances in the HASTE system.

This model provides a structured way to handle collections of projects, typically used in API responses and batch operations.

Parameters:

root (List[Project]) – List of Project instances managed by this container

Example

```python projects = Projects(

root=[

Project(name=”Hurricane Harvey Assessment”), Project(name=”California Wildfire Analysis”)

]

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

root: List[Project]#
class hastegeo.core.models.projects.Properties(*, azureMapsShapeId=None, primaryClass=None, source=None, subType=None, radius=None)[source]#

Bases: BaseModel

Properties associated with a labeled feature.

Contains metadata and classification information for geographic features identified in imagery analysis and labeling tasks.

azureMapsShapeId#

Azure Maps shape identifier.

Type:

str, optional

primaryClass#

Primary classification of the feature. Aliased as ‘class’ for serialization compatibility.

Type:

str, optional

source#

Source system or method of creation.

Type:

str, optional

subType#

Sub-classification or additional type information.

Type:

str, optional

radius#

Radius in meters for circular features.

Type:

float, optional

Note

The primaryClass field is serialized as ‘class’ to maintain compatibility with training systems while avoiding Python reserved keyword conflicts.

class Config[source]#

Bases: object

populate_by_name = True#
azureMapsShapeId: Optional[str]#
model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

primaryClass: Optional[str]#
radius: Optional[float]#
source: Optional[str]#
subType: Optional[str]#
class hastegeo.core.models.projects.TrainingJob(*, trainingjobUid=None, jobId=None, taskId=None, modelId=None, projectId=None, status=None, trainStartTime=None, completedEpochs='0', approxMinutesToComplete='', totalElapsedTime='', timePerEpoch='', logs=None, artifactZipJobUid=None, creationDate=None, completedDate=None, dependsOn=('Model', 'modelId'))[source]#

Bases: BaseModel

Represents a machine learning model training job in the HASTE system.

This model captures comprehensive training job metadata including execution status, timing information, and resource dependencies. Training jobs are managed through Azure Batch services and produce trained model artifacts for inference.

Parameters:
  • trainingjobUid (Optional[str]) – Unique identifier for the training job instance

  • jobId (Optional[str]) – Azure Batch job identifier for job management and monitoring

  • taskId (Optional[str]) – Azure Batch task identifier within the job

  • modelId (Optional[str]) – Reference to the model configuration being trained

  • projectId (Optional[str]) – Reference to the parent project containing training data

  • status (Optional[str]) – Current execution status (e.g., ‘running’, ‘completed’, ‘failed’)

  • trainStartTime (Optional[str]) – ISO formatted timestamp when training began

  • completedEpochs (Optional[str]) – Number of training epochs completed as string

  • approxMinutesToComplete (Optional[str]) – Estimated remaining training time in minutes

  • totalElapsedTime (Optional[str]) – Total time elapsed since training started

  • timePerEpoch (Optional[str]) – Average time per training epoch for progress estimation

  • logs (Optional[str]) – Training logs and output messages from the job execution

  • artifactZipJobUid (Optional[str]) – Reference to zip job for packaging training artifacts

  • creationDate (Optional[str]) – ISO formatted timestamp when job was created

  • completedDate (Optional[str]) – ISO formatted timestamp when job finished

  • dependsOn (Optional[tuple[str, str]]) – Dependency tuple specifying parent resource type and ID

Example

```python training_job = TrainingJob(

trainingjobUid=”train_123”, modelId=”model_456”, projectId=”proj_789”, status=”running”, completedEpochs=”5”

approxMinutesToComplete: Optional[str]#
artifactZipJobUid: Optional[str]#
completedDate: Optional[str]#
completedEpochs: Optional[str]#
creationDate: Optional[str]#
dependsOn: Optional[tuple[str, str]]#
jobId: Optional[str]#
logs: Optional[str]#
modelId: Optional[str]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

projectId: Optional[str]#
status: Optional[str]#
taskId: Optional[str]#
timePerEpoch: Optional[str]#
totalElapsedTime: Optional[str]#
trainStartTime: Optional[str]#
trainingjobUid: Optional[str]#
class hastegeo.core.models.projects.ValidationLabel(*, id, label, updatedAt)[source]#

Bases: BaseModel

Represents a single building validation label assigned by a user.

Parameters:
  • id (str) – Overture Maps building ID

  • label (str) – Damage assessment label — one of “Damaged”, “NotDamaged”, or “Unknown”

  • updatedAt (str) – ISO timestamp when this label was last set

id: str#
label: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

updatedAt: str#
class hastegeo.core.models.projects.ZipJob(*, projectId=None, imageLayerId=None, modelId=None, uid=None, jobId=None, taskId=None, status=None, logs='', srcArtifactPaths=<factory>, dstZipPath=None, creationDate=None, completedDate=None, dependsOn=('ModelArtifacts', 'modelId'))[source]#

Bases: BaseModel

Represents a file archiving job for packaging model artifacts in the HASTE system.

This model captures zip job execution details for packaging training outputs, inference results, and other model artifacts into downloadable archives. Zip jobs run on Azure Batch services to handle large file collections.

Parameters:
  • projectId (Optional[str]) – Reference to the parent project containing artifacts

  • imageLayerId (Optional[str]) – Reference to the imagery layer associated with artifacts

  • modelId (Optional[str]) – Reference to the model that generated the artifacts

  • uid (Optional[str]) – Unique identifier for the zip job instance, DEPRECATED

  • jobId (Optional[str]) – Azure Batch job identifier for job management and monitoring

  • taskId (Optional[str]) – Azure Batch task identifier within the job

  • status (Optional[str]) – Current execution status (e.g., ‘running’, ‘completed’, ‘failed’)

  • logs (Optional[str]) – Job logs and output messages from the execution

  • srcArtifactPaths (Optional[List[str]]) – List of source file paths to include in the archive

  • dstZipPath (Optional[str]) – Destination path for the generated zip file

  • creationDate (Optional[str]) – ISO formatted timestamp when job was created

  • completedDate (Optional[str]) – ISO formatted timestamp when job finished

  • dependsOn (Optional[tuple[str, str]]) – Dependency tuple specifying parent resource type and ID

Example

```python zip_job = ZipJob(

projectId=”proj_123”, modelId=”model_456”, srcArtifactPaths=[“/models/weights.pth”, “/logs/training.log”], dstZipPath=”/archives/model_artifacts.zip”

completedDate: Optional[str]#
creationDate: Optional[str]#
dependsOn: Optional[tuple[str, str]]#
dstZipPath: Optional[str]#
imageLayerId: Optional[str]#
jobId: Optional[str]#
logs: Optional[str]#
modelId: Optional[str]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

projectId: Optional[str]#
srcArtifactPaths: Optional[List[str]]#
status: Optional[str]#
taskId: Optional[str]#
uid: Optional[str]#
class hastegeo.core.models.projects.ZipTypeEnum(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: str, Enum

Enumeration of zip job types in the HASTE system.

Defines the supported types of artifact packaging operations, distinguishing between training and inference output archiving.

TRAINING#

Zip job for packaging training artifacts and outputs

INFERENCE#

Zip job for packaging inference results and predictions

INFERENCE = 'inference'#
TRAINING = 'training'#

Admin (hastegeo.core.models.admin)#

Administrative configuration models:

  • SourceType — Imagery source configuration

  • BaseModels — Base model artifact metadata

  • DrawingTools — Labeling tool drawing capabilities (polygon, rectangle, circle)

  • Grid — Grid visualization settings

  • DefaultPrimaryClass — Default classification for labeling

  • LabelingToolSettings — Complete labeling UI configuration

  • AdminConfig — Administrative configuration container

class hastegeo.core.models.admin.AdminConfig(*, sourceTypes=<factory>, baseModels=<factory>, labelingToolSettings=<factory>)[source]#

Bases: BaseModel

baseModels: List[BaseModels]#
labelingToolSettings: LabelingToolSettings#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

sourceTypes: List[SourceType]#
class hastegeo.core.models.admin.BaseModels(*, baseModelId=0, name=None, sourceURL=None, creationDate=None)[source]#

Bases: BaseModel

baseModelId: str#
creationDate: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str#
sourceURL: str#
class hastegeo.core.models.admin.DefaultPrimaryClass(*, name=None, color=None)[source]#

Bases: BaseModel

color: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str#
class hastegeo.core.models.admin.DrawingTools(*, polygon=False, rectangle=False, circle=False)[source]#

Bases: BaseModel

circle: bool#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

polygon: bool#
rectangle: bool#
class hastegeo.core.models.admin.Grid(*, gridStrokeColor=None)[source]#

Bases: BaseModel

gridStrokeColor: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class hastegeo.core.models.admin.LabelingToolSettings(*, drawingTools=<factory>, grid=<factory>, defaultPrimaryClasses=<factory>, tileServerSettings=None)[source]#

Bases: BaseModel

defaultPrimaryClasses: List[DefaultPrimaryClass]#
drawingTools: DrawingTools#
grid: Grid#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

tileServerSettings: str#
class hastegeo.core.models.admin.SourceType(*, sourceTypeId=0, name=None, baseURL=None, creationDate=None)[source]#

Bases: BaseModel

baseURL: str#
creationDate: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str#
sourceTypeId: int#

Training (hastegeo.core.models.training)#

ML training and experiment configuration:

  • ModelSource (Enum) — Model source: HASTE or EXTERNAL

  • Imagery — Imagery normalization and channel configuration

  • Inference — Inference job configuration (batch size, GPU, output path)

  • Labels — Training label configuration

  • Training — Training hyperparameters (learning rate, batch size, epochs, GPU)

  • ExperimentConfig — Complete experiment configuration for training

  • CatalogModel — Model catalog entry with metadata

class hastegeo.core.models.training.CatalogModel(*, baseModelName, description=None, modelId=None, projectId=None, imageLayerId=None, imagerySource=None, checkpointFilePath=None, eventTypes=None, cataloguedDate=None, cataloguedByUser, additionalInfo=None, source=ModelSource.HASTE, usedByModels=<factory>)[source]#

Bases: BaseModel

additionalInfo: Optional[dict]#
baseModelName: str#
cataloguedByUser: str#
cataloguedDate: Optional[str]#
checkpointFilePath: Optional[str]#
description: Optional[str]#
eventTypes: Optional[List[str]]#
imageLayerId: Optional[str]#
imagerySource: Optional[str]#
modelId: Optional[str]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

projectId: Optional[str]#
source: ModelSource#
usedByModels: list[str]#
class hastegeo.core.models.training.ExperimentConfig(*, experiment_dir=None, experiment_name=None, imagery=None, inference=<factory>, labels=None, training=None)[source]#

Bases: BaseModel

experiment_dir: Optional[str]#
experiment_name: Optional[str]#
imagery: Optional[Imagery]#
inference: Inference#
labels: Optional[Labels]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

training: Optional[Training]#
class hastegeo.core.models.training.Imagery(*, normalization_means=None, normalization_stds=None, num_channels=None, raw_fn=None, rgb_fn=None)[source]#

Bases: BaseModel

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

normalization_means: Optional[List[int]]#
normalization_stds: Optional[List[int]]#
num_channels: Optional[int]#
raw_fn: Optional[str]#
rgb_fn: Optional[str]#
class hastegeo.core.models.training.Inference(*, output_subdir='', batch_size=1, gpu_id=0, checkpoint_fn='', padding=None, patch_size=None, building_footprints_source=None, country_alpha2_iso_code=None, predictions_gpkg_fileprefix=None)[source]#

Bases: BaseModel

batch_size: int#
building_footprints_source: Optional[str]#
checkpoint_fn: str#
country_alpha2_iso_code: Optional[str]#
gpu_id: int#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

output_subdir: str#
padding: Optional[int]#
patch_size: Optional[int]#
predictions_gpkg_fileprefix: Optional[str]#
class hastegeo.core.models.training.Labels(*, buffer_in_meters=None, class_to_buffer=None, class_to_buffer_by=None, classes=None, fn=None)[source]#

Bases: BaseModel

buffer_in_meters: Optional[int]#
class_to_buffer: Optional[str]#
class_to_buffer_by: Optional[str]#
classes: Optional[List[str]]#
fn: Optional[str]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class hastegeo.core.models.training.ModelSource(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: str, Enum

EXTERNAL = 'external'#
HASTE = 'haste'#
class hastegeo.core.models.training.Training(*, batch_size=None, checkpoint_subdir=None, gpu_id=None, learning_rate=None, log_dir=None, max_epochs=None, use_constraint_loss=False, initial_weights_fn=None)[source]#

Bases: BaseModel

batch_size: Optional[int]#
checkpoint_subdir: Optional[str]#
gpu_id: Optional[int]#
initial_weights_fn: Optional[str]#
learning_rate: Optional[float]#
log_dir: Optional[str]#
max_epochs: Optional[int]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

use_constraint_loss: Optional[bool]#

Statistics (hastegeo.core.models.stats)#

Project statistics models:

  • ImageLayerStats — Statistics for an image layer (ID, label count)

  • ProjectStats — Project-level statistics (layers, models, labels, countries)

  • StatsRequest — Request to update project statistics

  • ProjectsSummary — Container for all project statistics

class hastegeo.core.models.stats.ImageLayerStats(*, imageLayerId=None, labelsCount=0)[source]#

Bases: BaseModel

imageLayerId: Optional[str]#
labelsCount: Optional[int]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class hastegeo.core.models.stats.ProjectStats(*, projectId=None, name=None, description=None, creationDate=None, imageLayerStats=<factory>, modelIds=<factory>, affectedCountries=<factory>, imageLayerCount=0, modelsCount=0, labelsCount=0)[source]#

Bases: BaseModel

affectedCountries: Optional[List[str]]#
creationDate: Optional[str]#
description: Optional[str]#
imageLayerCount: Optional[int]#
imageLayerStats: Optional[List[ImageLayerStats]]#
labelsCount: Optional[int]#
modelIds: Optional[List[str]]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

modelsCount: Optional[int]#
name: Optional[str]#
projectId: Optional[str]#
class hastegeo.core.models.stats.ProjectsSummary(*, projects=<factory>)[source]#

Bases: BaseModel

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

projects: Optional[List[ProjectStats]]#
class hastegeo.core.models.stats.StatsRequest(*, action=None, projectId=None, name=None, description=None, creationDate=None, imageLayerStats=None, modelIds=<factory>, affectedCountries=<factory>)[source]#

Bases: BaseModel

action: Optional[str]#
affectedCountries: Optional[List[str]]#
creationDate: Optional[str]#
description: Optional[str]#
imageLayerStats: Optional[ImageLayerStats]#
modelIds: Optional[List[str]]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: Optional[str]#
projectId: Optional[str]#

Users (hastegeo.core.models.users)#

User management models:

  • User — User profile and role information

  • Users — Container for list of users

  • Invite — Invitation with email, roles, link, and send status

  • Invites — Container for list of invitations

  • AddUsersRequest — Request to add multiple users with roles

class hastegeo.core.models.users.AddUsersRequest(*, emails=<factory>, roles=<factory>, added_by)[source]#

Bases: BaseModel

added_by: str#
emails: List[str]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

roles: List[str]#
class hastegeo.core.models.users.Invite(*, email_id, roles=<factory>, invitation_link=None, email_sent=False, error=None)[source]#

Bases: BaseModel

email_id: str#
email_sent: bool#
error: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

roles: List[str]#
class hastegeo.core.models.users.Invites(*, results=<factory>)[source]#

Bases: BaseModel

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

results: List[Invite]#
class hastegeo.core.models.users.User(*, userId=None, objectId=None, name=None, email=None, userRoles=<factory>, identityProvider=None, settings=<factory>, status=None, added_by=None, added_on=None, updated_on=None, deleted=False)[source]#

Bases: BaseModel

added_by: Optional[str]#
added_on: Optional[str]#
deleted: bool#
email: Optional[str]#
identityProvider: Optional[str]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: Optional[str]#
objectId: Optional[str]#
settings: Optional[dict]#
status: Optional[str]#
updated_on: Optional[str]#
userId: Optional[str]#
userRoles: Optional[List[str]]#
class hastegeo.core.models.users.Users(*, users=<factory>)[source]#

Bases: BaseModel

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

users: Optional[List[User]]#

Visualizer (hastegeo.core.models.visualizer)#

Visualization configuration:

  • Imagery — Imagery layer configuration (URL, TMS, attribution, zoom bounds)

  • Visualizer — Visualization config with pre/post event imagery and damage predictions

class hastegeo.core.models.visualizer.Imagery(*, url='', tms=False, attribution='AI For Good Lab', minZoom=12, maxNativeZoom=20, maxZoom=21, bounds=<factory>)[source]#

Bases: BaseModel

attribution: str#
bounds: list#
maxNativeZoom: int#
maxZoom: int#
minZoom: int#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

tms: bool#
url: str#
class hastegeo.core.models.visualizer.Visualizer(*, projectId='', imageLayerId='', modelId='', projectName='', studyArea=<factory>, eventDate=None, predictedDamageImageryDownloadUrl='', preDisasterImagery=<factory>, postDisasterImagery=<factory>, predictedDamageLayer=<factory>, predictionsLayer=<factory>, sourceTypePreEvent=None, sourceTypePostEvent=None, imageryCaptureDatePreEvent=None, imageryCaptureDatePostEvent=None)[source]#

Bases: BaseModel

eventDate: Optional[str]#
imageLayerId: str#
imageryCaptureDatePostEvent: Optional[str]#
imageryCaptureDatePreEvent: Optional[str]#
modelId: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

postDisasterImagery: Imagery#
preDisasterImagery: Imagery#
predictedDamageImageryDownloadUrl: str#
predictedDamageLayer: Imagery#
predictionsLayer: Imagery#
projectId: str#
projectName: str#
sourceTypePostEvent: Optional[str]#
sourceTypePreEvent: Optional[str]#
studyArea: list#

Uploader (hastegeo.core.models.uploader)#

File upload models:

  • FileUploadRequest — File upload status and progress tracking

class hastegeo.core.models.uploader.FileUploadRequest(*, projectId=None, fileId=None, totalChunks=None, chunkNumber=None, status=None, statusMessage=None, outputUrl=None, updatedDate=None)[source]#

Bases: BaseModel

chunkNumber: Optional[str]#
fileId: Optional[str]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

outputUrl: Optional[str]#
projectId: Optional[str]#
status: Optional[str]#
statusMessage: Optional[str]#
totalChunks: Optional[str]#
updatedDate: Optional[str]#