From 53c781d0deb7169842bd30f81faffb7475b36609 Mon Sep 17 00:00:00 2001 From: "Jeremy A. Prescott" Date: Mon, 13 Nov 2023 10:16:49 +0100 Subject: [PATCH] new specs with correct v3 --- .../swagger_client/__init__.py | 3 + .../swagger_client/__init__.py-e | 276 ++++++++++ .../swagger_client/api/__init__.py-e | 22 + .../swagger_client/api/scores_api.py | 507 +++++++++++++++++- .../swagger_client/models/__init__.py | 3 + .../swagger_client/models/__init__.py-e | 242 +++++++++ .../active_learning_score_types_v2_data.py | 116 ++++ .../models/active_learning_score_v2_data.py | 118 ++++ .../models/docker_worker_config_v3_docker.py | 6 +- ...prediction_singleton_keypoint_detection.py | 4 +- ...ion_singleton_keypoint_detection_all_of.py | 4 +- .../models/selection_config_entry_strategy.py | 6 +- .../selection_config_v3_entry_strategy.py | 12 +- ...lection_config_v3_entry_strategy_all_of.py | 9 +- .../models/selection_strategy_type_v3.py | 46 ++ 15 files changed, 1353 insertions(+), 21 deletions(-) create mode 100644 lightly/openapi_generated/swagger_client/__init__.py-e create mode 100644 lightly/openapi_generated/swagger_client/api/__init__.py-e create mode 100644 lightly/openapi_generated/swagger_client/models/__init__.py-e create mode 100644 lightly/openapi_generated/swagger_client/models/active_learning_score_types_v2_data.py create mode 100644 lightly/openapi_generated/swagger_client/models/active_learning_score_v2_data.py create mode 100644 lightly/openapi_generated/swagger_client/models/selection_strategy_type_v3.py diff --git a/lightly/openapi_generated/swagger_client/__init__.py b/lightly/openapi_generated/swagger_client/__init__.py index 8e5195943..8d3328d74 100644 --- a/lightly/openapi_generated/swagger_client/__init__.py +++ b/lightly/openapi_generated/swagger_client/__init__.py @@ -50,6 +50,8 @@ # import models into sdk package from lightly.openapi_generated.swagger_client.models.active_learning_score_create_request import ActiveLearningScoreCreateRequest from lightly.openapi_generated.swagger_client.models.active_learning_score_data import ActiveLearningScoreData +from lightly.openapi_generated.swagger_client.models.active_learning_score_types_v2_data import ActiveLearningScoreTypesV2Data +from lightly.openapi_generated.swagger_client.models.active_learning_score_v2_data import ActiveLearningScoreV2Data from lightly.openapi_generated.swagger_client.models.api_error_code import ApiErrorCode from lightly.openapi_generated.swagger_client.models.api_error_response import ApiErrorResponse from lightly.openapi_generated.swagger_client.models.async_task_data import AsyncTaskData @@ -231,6 +233,7 @@ from lightly.openapi_generated.swagger_client.models.selection_input_type import SelectionInputType from lightly.openapi_generated.swagger_client.models.selection_strategy_threshold_operation import SelectionStrategyThresholdOperation from lightly.openapi_generated.swagger_client.models.selection_strategy_type import SelectionStrategyType +from lightly.openapi_generated.swagger_client.models.selection_strategy_type_v3 import SelectionStrategyTypeV3 from lightly.openapi_generated.swagger_client.models.service_account_basic_data import ServiceAccountBasicData from lightly.openapi_generated.swagger_client.models.set_embeddings_is_processed_flag_by_id_body_request import SetEmbeddingsIsProcessedFlagByIdBodyRequest from lightly.openapi_generated.swagger_client.models.shared_access_config_create_request import SharedAccessConfigCreateRequest diff --git a/lightly/openapi_generated/swagger_client/__init__.py-e b/lightly/openapi_generated/swagger_client/__init__.py-e new file mode 100644 index 000000000..dba58e18d --- /dev/null +++ b/lightly/openapi_generated/swagger_client/__init__.py-e @@ -0,0 +1,276 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Lightly API + + Lightly.ai enables you to do self-supervised learning in an easy and intuitive way. The lightly.ai OpenAPI spec defines how one can interact with our REST API to unleash the full potential of lightly.ai # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: support@lightly.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" + + +__version__ = "1.0.0" + +# import apis into sdk package +from lightly.openapi_generated.swagger_client.api.collaboration_api import CollaborationApi +from lightly.openapi_generated.swagger_client.api.datasets_api import DatasetsApi +from lightly.openapi_generated.swagger_client.api.datasources_api import DatasourcesApi +from lightly.openapi_generated.swagger_client.api.docker_api import DockerApi +from lightly.openapi_generated.swagger_client.api.embeddings_api import EmbeddingsApi +from lightly.openapi_generated.swagger_client.api.embeddings2d_api import Embeddings2dApi +from lightly.openapi_generated.swagger_client.api.jobs_api import JobsApi +from lightly.openapi_generated.swagger_client.api.mappings_api import MappingsApi +from lightly.openapi_generated.swagger_client.api.meta_data_configurations_api import MetaDataConfigurationsApi +from lightly.openapi_generated.swagger_client.api.predictions_api import PredictionsApi +from lightly.openapi_generated.swagger_client.api.profiles_api import ProfilesApi +from lightly.openapi_generated.swagger_client.api.quota_api import QuotaApi +from lightly.openapi_generated.swagger_client.api.samples_api import SamplesApi +from lightly.openapi_generated.swagger_client.api.samplings_api import SamplingsApi +from lightly.openapi_generated.swagger_client.api.scores_api import ScoresApi +from lightly.openapi_generated.swagger_client.api.tags_api import TagsApi +from lightly.openapi_generated.swagger_client.api.teams_api import TeamsApi +from lightly.openapi_generated.swagger_client.api.versioning_api import VersioningApi + +# import ApiClient +from lightly.openapi_generated.swagger_client.api_response import ApiResponse +from lightly.openapi_generated.swagger_client.api_client import ApiClient +from lightly.openapi_generated.swagger_client.configuration import Configuration +from lightly.openapi_generated.swagger_client.exceptions import OpenApiException +from lightly.openapi_generated.swagger_client.exceptions import ApiTypeError +from lightly.openapi_generated.swagger_client.exceptions import ApiValueError +from lightly.openapi_generated.swagger_client.exceptions import ApiKeyError +from lightly.openapi_generated.swagger_client.exceptions import ApiAttributeError +from lightly.openapi_generated.swagger_client.exceptions import ApiException + +# import models into sdk package +from lightly.openapi_generated.swagger_client.models.active_learning_score_create_request import ActiveLearningScoreCreateRequest +from lightly.openapi_generated.swagger_client.models.active_learning_score_data import ActiveLearningScoreData +from lightly.openapi_generated.swagger_client.models.active_learning_score_types_v2_data import ActiveLearningScoreTypesV2Data +from lightly.openapi_generated.swagger_client.models.active_learning_score_v2_data import ActiveLearningScoreV2Data +from lightly.openapi_generated.swagger_client.models.api_error_code import ApiErrorCode +from lightly.openapi_generated.swagger_client.models.api_error_response import ApiErrorResponse +from lightly.openapi_generated.swagger_client.models.async_task_data import AsyncTaskData +from lightly.openapi_generated.swagger_client.models.configuration_data import ConfigurationData +from lightly.openapi_generated.swagger_client.models.configuration_entry import ConfigurationEntry +from lightly.openapi_generated.swagger_client.models.configuration_set_request import ConfigurationSetRequest +from lightly.openapi_generated.swagger_client.models.configuration_value_data_type import ConfigurationValueDataType +from lightly.openapi_generated.swagger_client.models.create_cf_bucket_activity_request import CreateCFBucketActivityRequest +from lightly.openapi_generated.swagger_client.models.create_docker_worker_registry_entry_request import CreateDockerWorkerRegistryEntryRequest +from lightly.openapi_generated.swagger_client.models.create_entity_response import CreateEntityResponse +from lightly.openapi_generated.swagger_client.models.create_sample_with_write_urls_response import CreateSampleWithWriteUrlsResponse +from lightly.openapi_generated.swagger_client.models.create_team_membership_request import CreateTeamMembershipRequest +from lightly.openapi_generated.swagger_client.models.creator import Creator +from lightly.openapi_generated.swagger_client.models.crop_data import CropData +from lightly.openapi_generated.swagger_client.models.dataset_create_request import DatasetCreateRequest +from lightly.openapi_generated.swagger_client.models.dataset_creator import DatasetCreator +from lightly.openapi_generated.swagger_client.models.dataset_data import DatasetData +from lightly.openapi_generated.swagger_client.models.dataset_data_enriched import DatasetDataEnriched +from lightly.openapi_generated.swagger_client.models.dataset_embedding_data import DatasetEmbeddingData +from lightly.openapi_generated.swagger_client.models.dataset_type import DatasetType +from lightly.openapi_generated.swagger_client.models.dataset_update_request import DatasetUpdateRequest +from lightly.openapi_generated.swagger_client.models.datasource_config import DatasourceConfig +from lightly.openapi_generated.swagger_client.models.datasource_config_azure import DatasourceConfigAzure +from lightly.openapi_generated.swagger_client.models.datasource_config_azure_all_of import DatasourceConfigAzureAllOf +from lightly.openapi_generated.swagger_client.models.datasource_config_base import DatasourceConfigBase +from lightly.openapi_generated.swagger_client.models.datasource_config_base_full_path import DatasourceConfigBaseFullPath +from lightly.openapi_generated.swagger_client.models.datasource_config_gcs import DatasourceConfigGCS +from lightly.openapi_generated.swagger_client.models.datasource_config_gcs_all_of import DatasourceConfigGCSAllOf +from lightly.openapi_generated.swagger_client.models.datasource_config_lightly import DatasourceConfigLIGHTLY +from lightly.openapi_generated.swagger_client.models.datasource_config_local import DatasourceConfigLOCAL +from lightly.openapi_generated.swagger_client.models.datasource_config_local_all_of import DatasourceConfigLOCALAllOf +from lightly.openapi_generated.swagger_client.models.datasource_config_obs import DatasourceConfigOBS +from lightly.openapi_generated.swagger_client.models.datasource_config_obs_all_of import DatasourceConfigOBSAllOf +from lightly.openapi_generated.swagger_client.models.datasource_config_s3 import DatasourceConfigS3 +from lightly.openapi_generated.swagger_client.models.datasource_config_s3_all_of import DatasourceConfigS3AllOf +from lightly.openapi_generated.swagger_client.models.datasource_config_s3_delegated_access import DatasourceConfigS3DelegatedAccess +from lightly.openapi_generated.swagger_client.models.datasource_config_s3_delegated_access_all_of import DatasourceConfigS3DelegatedAccessAllOf +from lightly.openapi_generated.swagger_client.models.datasource_config_verify_data import DatasourceConfigVerifyData +from lightly.openapi_generated.swagger_client.models.datasource_config_verify_data_errors import DatasourceConfigVerifyDataErrors +from lightly.openapi_generated.swagger_client.models.datasource_processed_until_timestamp_request import DatasourceProcessedUntilTimestampRequest +from lightly.openapi_generated.swagger_client.models.datasource_processed_until_timestamp_response import DatasourceProcessedUntilTimestampResponse +from lightly.openapi_generated.swagger_client.models.datasource_purpose import DatasourcePurpose +from lightly.openapi_generated.swagger_client.models.datasource_raw_samples_data import DatasourceRawSamplesData +from lightly.openapi_generated.swagger_client.models.datasource_raw_samples_data_row import DatasourceRawSamplesDataRow +from lightly.openapi_generated.swagger_client.models.datasource_raw_samples_metadata_data import DatasourceRawSamplesMetadataData +from lightly.openapi_generated.swagger_client.models.datasource_raw_samples_metadata_data_row import DatasourceRawSamplesMetadataDataRow +from lightly.openapi_generated.swagger_client.models.datasource_raw_samples_predictions_data import DatasourceRawSamplesPredictionsData +from lightly.openapi_generated.swagger_client.models.datasource_raw_samples_predictions_data_row import DatasourceRawSamplesPredictionsDataRow +from lightly.openapi_generated.swagger_client.models.dimensionality_reduction_method import DimensionalityReductionMethod +from lightly.openapi_generated.swagger_client.models.docker_license_information import DockerLicenseInformation +from lightly.openapi_generated.swagger_client.models.docker_run_artifact_create_request import DockerRunArtifactCreateRequest +from lightly.openapi_generated.swagger_client.models.docker_run_artifact_created_data import DockerRunArtifactCreatedData +from lightly.openapi_generated.swagger_client.models.docker_run_artifact_data import DockerRunArtifactData +from lightly.openapi_generated.swagger_client.models.docker_run_artifact_storage_location import DockerRunArtifactStorageLocation +from lightly.openapi_generated.swagger_client.models.docker_run_artifact_type import DockerRunArtifactType +from lightly.openapi_generated.swagger_client.models.docker_run_create_request import DockerRunCreateRequest +from lightly.openapi_generated.swagger_client.models.docker_run_data import DockerRunData +from lightly.openapi_generated.swagger_client.models.docker_run_log_data import DockerRunLogData +from lightly.openapi_generated.swagger_client.models.docker_run_log_entry_data import DockerRunLogEntryData +from lightly.openapi_generated.swagger_client.models.docker_run_log_level import DockerRunLogLevel +from lightly.openapi_generated.swagger_client.models.docker_run_scheduled_create_request import DockerRunScheduledCreateRequest +from lightly.openapi_generated.swagger_client.models.docker_run_scheduled_data import DockerRunScheduledData +from lightly.openapi_generated.swagger_client.models.docker_run_scheduled_priority import DockerRunScheduledPriority +from lightly.openapi_generated.swagger_client.models.docker_run_scheduled_state import DockerRunScheduledState +from lightly.openapi_generated.swagger_client.models.docker_run_scheduled_update_request import DockerRunScheduledUpdateRequest +from lightly.openapi_generated.swagger_client.models.docker_run_state import DockerRunState +from lightly.openapi_generated.swagger_client.models.docker_run_update_request import DockerRunUpdateRequest +from lightly.openapi_generated.swagger_client.models.docker_task_description import DockerTaskDescription +from lightly.openapi_generated.swagger_client.models.docker_user_stats import DockerUserStats +from lightly.openapi_generated.swagger_client.models.docker_worker_config import DockerWorkerConfig +from lightly.openapi_generated.swagger_client.models.docker_worker_config_create_request import DockerWorkerConfigCreateRequest +from lightly.openapi_generated.swagger_client.models.docker_worker_config_data import DockerWorkerConfigData +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2 import DockerWorkerConfigV2 +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2_create_request import DockerWorkerConfigV2CreateRequest +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2_data import DockerWorkerConfigV2Data +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2_docker import DockerWorkerConfigV2Docker +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2_docker_object_level import DockerWorkerConfigV2DockerObjectLevel +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2_docker_stopping_condition import DockerWorkerConfigV2DockerStoppingCondition +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2_lightly import DockerWorkerConfigV2Lightly +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2_lightly_collate import DockerWorkerConfigV2LightlyCollate +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2_lightly_model import DockerWorkerConfigV2LightlyModel +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2_lightly_trainer import DockerWorkerConfigV2LightlyTrainer +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3 import DockerWorkerConfigV3 +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_create_request import DockerWorkerConfigV3CreateRequest +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_data import DockerWorkerConfigV3Data +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_docker import DockerWorkerConfigV3Docker +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_docker_corruptness_check import DockerWorkerConfigV3DockerCorruptnessCheck +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_docker_datasource import DockerWorkerConfigV3DockerDatasource +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_docker_training import DockerWorkerConfigV3DockerTraining +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_lightly import DockerWorkerConfigV3Lightly +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_lightly_checkpoint_callback import DockerWorkerConfigV3LightlyCheckpointCallback +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_lightly_collate import DockerWorkerConfigV3LightlyCollate +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_lightly_criterion import DockerWorkerConfigV3LightlyCriterion +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_lightly_loader import DockerWorkerConfigV3LightlyLoader +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_lightly_model import DockerWorkerConfigV3LightlyModel +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_lightly_optimizer import DockerWorkerConfigV3LightlyOptimizer +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_lightly_trainer import DockerWorkerConfigV3LightlyTrainer +from lightly.openapi_generated.swagger_client.models.docker_worker_registry_entry_data import DockerWorkerRegistryEntryData +from lightly.openapi_generated.swagger_client.models.docker_worker_state import DockerWorkerState +from lightly.openapi_generated.swagger_client.models.docker_worker_type import DockerWorkerType +from lightly.openapi_generated.swagger_client.models.embedding2d_create_request import Embedding2dCreateRequest +from lightly.openapi_generated.swagger_client.models.embedding2d_data import Embedding2dData +from lightly.openapi_generated.swagger_client.models.embedding_data import EmbeddingData +from lightly.openapi_generated.swagger_client.models.file_name_format import FileNameFormat +from lightly.openapi_generated.swagger_client.models.file_output_format import FileOutputFormat +from lightly.openapi_generated.swagger_client.models.filename_and_read_url import FilenameAndReadUrl +from lightly.openapi_generated.swagger_client.models.image_type import ImageType +from lightly.openapi_generated.swagger_client.models.initial_tag_create_request import InitialTagCreateRequest +from lightly.openapi_generated.swagger_client.models.job_result_type import JobResultType +from lightly.openapi_generated.swagger_client.models.job_state import JobState +from lightly.openapi_generated.swagger_client.models.job_status_data import JobStatusData +from lightly.openapi_generated.swagger_client.models.job_status_data_result import JobStatusDataResult +from lightly.openapi_generated.swagger_client.models.job_status_meta import JobStatusMeta +from lightly.openapi_generated.swagger_client.models.job_status_upload_method import JobStatusUploadMethod +from lightly.openapi_generated.swagger_client.models.jobs_data import JobsData +from lightly.openapi_generated.swagger_client.models.label_box_data_row import LabelBoxDataRow +from lightly.openapi_generated.swagger_client.models.label_box_v4_data_row import LabelBoxV4DataRow +from lightly.openapi_generated.swagger_client.models.label_studio_task import LabelStudioTask +from lightly.openapi_generated.swagger_client.models.label_studio_task_data import LabelStudioTaskData +from lightly.openapi_generated.swagger_client.models.lightly_docker_selection_method import LightlyDockerSelectionMethod +from lightly.openapi_generated.swagger_client.models.lightly_model_v2 import LightlyModelV2 +from lightly.openapi_generated.swagger_client.models.lightly_model_v3 import LightlyModelV3 +from lightly.openapi_generated.swagger_client.models.lightly_trainer_precision_v2 import LightlyTrainerPrecisionV2 +from lightly.openapi_generated.swagger_client.models.lightly_trainer_precision_v3 import LightlyTrainerPrecisionV3 +from lightly.openapi_generated.swagger_client.models.prediction_singleton import PredictionSingleton +from lightly.openapi_generated.swagger_client.models.prediction_singleton_base import PredictionSingletonBase +from lightly.openapi_generated.swagger_client.models.prediction_singleton_classification import PredictionSingletonClassification +from lightly.openapi_generated.swagger_client.models.prediction_singleton_classification_all_of import PredictionSingletonClassificationAllOf +from lightly.openapi_generated.swagger_client.models.prediction_singleton_instance_segmentation import PredictionSingletonInstanceSegmentation +from lightly.openapi_generated.swagger_client.models.prediction_singleton_instance_segmentation_all_of import PredictionSingletonInstanceSegmentationAllOf +from lightly.openapi_generated.swagger_client.models.prediction_singleton_keypoint_detection import PredictionSingletonKeypointDetection +from lightly.openapi_generated.swagger_client.models.prediction_singleton_keypoint_detection_all_of import PredictionSingletonKeypointDetectionAllOf +from lightly.openapi_generated.swagger_client.models.prediction_singleton_object_detection import PredictionSingletonObjectDetection +from lightly.openapi_generated.swagger_client.models.prediction_singleton_object_detection_all_of import PredictionSingletonObjectDetectionAllOf +from lightly.openapi_generated.swagger_client.models.prediction_singleton_semantic_segmentation import PredictionSingletonSemanticSegmentation +from lightly.openapi_generated.swagger_client.models.prediction_singleton_semantic_segmentation_all_of import PredictionSingletonSemanticSegmentationAllOf +from lightly.openapi_generated.swagger_client.models.prediction_task_schema import PredictionTaskSchema +from lightly.openapi_generated.swagger_client.models.prediction_task_schema_base import PredictionTaskSchemaBase +from lightly.openapi_generated.swagger_client.models.prediction_task_schema_category import PredictionTaskSchemaCategory +from lightly.openapi_generated.swagger_client.models.prediction_task_schema_category_keypoints import PredictionTaskSchemaCategoryKeypoints +from lightly.openapi_generated.swagger_client.models.prediction_task_schema_category_keypoints_all_of import PredictionTaskSchemaCategoryKeypointsAllOf +from lightly.openapi_generated.swagger_client.models.prediction_task_schema_keypoint import PredictionTaskSchemaKeypoint +from lightly.openapi_generated.swagger_client.models.prediction_task_schema_keypoint_all_of import PredictionTaskSchemaKeypointAllOf +from lightly.openapi_generated.swagger_client.models.prediction_task_schema_simple import PredictionTaskSchemaSimple +from lightly.openapi_generated.swagger_client.models.prediction_task_schema_simple_all_of import PredictionTaskSchemaSimpleAllOf +from lightly.openapi_generated.swagger_client.models.prediction_task_schemas import PredictionTaskSchemas +from lightly.openapi_generated.swagger_client.models.profile_basic_data import ProfileBasicData +from lightly.openapi_generated.swagger_client.models.profile_me_data import ProfileMeData +from lightly.openapi_generated.swagger_client.models.profile_me_data_settings import ProfileMeDataSettings +from lightly.openapi_generated.swagger_client.models.questionnaire_data import QuestionnaireData +from lightly.openapi_generated.swagger_client.models.s3_region import S3Region +from lightly.openapi_generated.swagger_client.models.sama_task import SamaTask +from lightly.openapi_generated.swagger_client.models.sama_task_data import SamaTaskData +from lightly.openapi_generated.swagger_client.models.sample_create_request import SampleCreateRequest +from lightly.openapi_generated.swagger_client.models.sample_data import SampleData +from lightly.openapi_generated.swagger_client.models.sample_data_modes import SampleDataModes +from lightly.openapi_generated.swagger_client.models.sample_meta_data import SampleMetaData +from lightly.openapi_generated.swagger_client.models.sample_partial_mode import SamplePartialMode +from lightly.openapi_generated.swagger_client.models.sample_sort_by import SampleSortBy +from lightly.openapi_generated.swagger_client.models.sample_type import SampleType +from lightly.openapi_generated.swagger_client.models.sample_update_request import SampleUpdateRequest +from lightly.openapi_generated.swagger_client.models.sample_write_urls import SampleWriteUrls +from lightly.openapi_generated.swagger_client.models.sampling_config import SamplingConfig +from lightly.openapi_generated.swagger_client.models.sampling_config_stopping_condition import SamplingConfigStoppingCondition +from lightly.openapi_generated.swagger_client.models.sampling_create_request import SamplingCreateRequest +from lightly.openapi_generated.swagger_client.models.sampling_method import SamplingMethod +from lightly.openapi_generated.swagger_client.models.sector import Sector +from lightly.openapi_generated.swagger_client.models.selection_config import SelectionConfig +from lightly.openapi_generated.swagger_client.models.selection_config_all_of import SelectionConfigAllOf +from lightly.openapi_generated.swagger_client.models.selection_config_base import SelectionConfigBase +from lightly.openapi_generated.swagger_client.models.selection_config_entry import SelectionConfigEntry +from lightly.openapi_generated.swagger_client.models.selection_config_entry_input import SelectionConfigEntryInput +from lightly.openapi_generated.swagger_client.models.selection_config_entry_strategy import SelectionConfigEntryStrategy +from lightly.openapi_generated.swagger_client.models.selection_config_v3 import SelectionConfigV3 +from lightly.openapi_generated.swagger_client.models.selection_config_v3_all_of import SelectionConfigV3AllOf +from lightly.openapi_generated.swagger_client.models.selection_config_v3_entry import SelectionConfigV3Entry +from lightly.openapi_generated.swagger_client.models.selection_config_v3_entry_input import SelectionConfigV3EntryInput +from lightly.openapi_generated.swagger_client.models.selection_config_v3_entry_strategy import SelectionConfigV3EntryStrategy +from lightly.openapi_generated.swagger_client.models.selection_config_v3_entry_strategy_all_of import SelectionConfigV3EntryStrategyAllOf +from lightly.openapi_generated.swagger_client.models.selection_config_v3_entry_strategy_all_of_target_range import SelectionConfigV3EntryStrategyAllOfTargetRange +from lightly.openapi_generated.swagger_client.models.selection_input_predictions_name import SelectionInputPredictionsName +from lightly.openapi_generated.swagger_client.models.selection_input_type import SelectionInputType +from lightly.openapi_generated.swagger_client.models.selection_strategy_threshold_operation import SelectionStrategyThresholdOperation +from lightly.openapi_generated.swagger_client.models.selection_strategy_type import SelectionStrategyType +from lightly.openapi_generated.swagger_client.models.selection_strategy_type_v3 import SelectionStrategyTypeV3 +from lightly.openapi_generated.swagger_client.models.service_account_basic_data import ServiceAccountBasicData +from lightly.openapi_generated.swagger_client.models.set_embeddings_is_processed_flag_by_id_body_request import SetEmbeddingsIsProcessedFlagByIdBodyRequest +from lightly.openapi_generated.swagger_client.models.shared_access_config_create_request import SharedAccessConfigCreateRequest +from lightly.openapi_generated.swagger_client.models.shared_access_config_data import SharedAccessConfigData +from lightly.openapi_generated.swagger_client.models.shared_access_type import SharedAccessType +from lightly.openapi_generated.swagger_client.models.tag_active_learning_scores_data import TagActiveLearningScoresData +from lightly.openapi_generated.swagger_client.models.tag_arithmetics_operation import TagArithmeticsOperation +from lightly.openapi_generated.swagger_client.models.tag_arithmetics_request import TagArithmeticsRequest +from lightly.openapi_generated.swagger_client.models.tag_arithmetics_response import TagArithmeticsResponse +from lightly.openapi_generated.swagger_client.models.tag_bit_mask_response import TagBitMaskResponse +from lightly.openapi_generated.swagger_client.models.tag_change_data import TagChangeData +from lightly.openapi_generated.swagger_client.models.tag_change_data_arithmetics import TagChangeDataArithmetics +from lightly.openapi_generated.swagger_client.models.tag_change_data_initial import TagChangeDataInitial +from lightly.openapi_generated.swagger_client.models.tag_change_data_metadata import TagChangeDataMetadata +from lightly.openapi_generated.swagger_client.models.tag_change_data_operation_method import TagChangeDataOperationMethod +from lightly.openapi_generated.swagger_client.models.tag_change_data_rename import TagChangeDataRename +from lightly.openapi_generated.swagger_client.models.tag_change_data_sampler import TagChangeDataSampler +from lightly.openapi_generated.swagger_client.models.tag_change_data_samples import TagChangeDataSamples +from lightly.openapi_generated.swagger_client.models.tag_change_data_scatterplot import TagChangeDataScatterplot +from lightly.openapi_generated.swagger_client.models.tag_change_data_upsize import TagChangeDataUpsize +from lightly.openapi_generated.swagger_client.models.tag_change_entry import TagChangeEntry +from lightly.openapi_generated.swagger_client.models.tag_create_request import TagCreateRequest +from lightly.openapi_generated.swagger_client.models.tag_creator import TagCreator +from lightly.openapi_generated.swagger_client.models.tag_data import TagData +from lightly.openapi_generated.swagger_client.models.tag_update_request import TagUpdateRequest +from lightly.openapi_generated.swagger_client.models.tag_upsize_request import TagUpsizeRequest +from lightly.openapi_generated.swagger_client.models.task_type import TaskType +from lightly.openapi_generated.swagger_client.models.team_basic_data import TeamBasicData +from lightly.openapi_generated.swagger_client.models.team_data import TeamData +from lightly.openapi_generated.swagger_client.models.team_role import TeamRole +from lightly.openapi_generated.swagger_client.models.trigger2d_embedding_job_request import Trigger2dEmbeddingJobRequest +from lightly.openapi_generated.swagger_client.models.update_docker_worker_registry_entry_request import UpdateDockerWorkerRegistryEntryRequest +from lightly.openapi_generated.swagger_client.models.update_team_membership_request import UpdateTeamMembershipRequest +from lightly.openapi_generated.swagger_client.models.user_type import UserType +from lightly.openapi_generated.swagger_client.models.video_frame_data import VideoFrameData +from lightly.openapi_generated.swagger_client.models.write_csv_url_data import WriteCSVUrlData diff --git a/lightly/openapi_generated/swagger_client/api/__init__.py-e b/lightly/openapi_generated/swagger_client/api/__init__.py-e new file mode 100644 index 000000000..341e863fc --- /dev/null +++ b/lightly/openapi_generated/swagger_client/api/__init__.py-e @@ -0,0 +1,22 @@ +# flake8: noqa + +# import apis into api package +from lightly.openapi_generated.swagger_client.api.collaboration_api import CollaborationApi +from lightly.openapi_generated.swagger_client.api.datasets_api import DatasetsApi +from lightly.openapi_generated.swagger_client.api.datasources_api import DatasourcesApi +from lightly.openapi_generated.swagger_client.api.docker_api import DockerApi +from lightly.openapi_generated.swagger_client.api.embeddings_api import EmbeddingsApi +from lightly.openapi_generated.swagger_client.api.embeddings2d_api import Embeddings2dApi +from lightly.openapi_generated.swagger_client.api.jobs_api import JobsApi +from lightly.openapi_generated.swagger_client.api.mappings_api import MappingsApi +from lightly.openapi_generated.swagger_client.api.meta_data_configurations_api import MetaDataConfigurationsApi +from lightly.openapi_generated.swagger_client.api.predictions_api import PredictionsApi +from lightly.openapi_generated.swagger_client.api.profiles_api import ProfilesApi +from lightly.openapi_generated.swagger_client.api.quota_api import QuotaApi +from lightly.openapi_generated.swagger_client.api.samples_api import SamplesApi +from lightly.openapi_generated.swagger_client.api.samplings_api import SamplingsApi +from lightly.openapi_generated.swagger_client.api.scores_api import ScoresApi +from lightly.openapi_generated.swagger_client.api.tags_api import TagsApi +from lightly.openapi_generated.swagger_client.api.teams_api import TeamsApi +from lightly.openapi_generated.swagger_client.api.versioning_api import VersioningApi + diff --git a/lightly/openapi_generated/swagger_client/api/scores_api.py b/lightly/openapi_generated/swagger_client/api/scores_api.py index 7c43e49cf..4b07d9206 100644 --- a/lightly/openapi_generated/swagger_client/api/scores_api.py +++ b/lightly/openapi_generated/swagger_client/api/scores_api.py @@ -20,12 +20,14 @@ from pydantic import validate_arguments, ValidationError from typing_extensions import Annotated -from pydantic import Field, constr, validator +from pydantic import Field, conint, constr, validator from typing import List from lightly.openapi_generated.swagger_client.models.active_learning_score_create_request import ActiveLearningScoreCreateRequest from lightly.openapi_generated.swagger_client.models.active_learning_score_data import ActiveLearningScoreData +from lightly.openapi_generated.swagger_client.models.active_learning_score_types_v2_data import ActiveLearningScoreTypesV2Data +from lightly.openapi_generated.swagger_client.models.active_learning_score_v2_data import ActiveLearningScoreV2Data from lightly.openapi_generated.swagger_client.models.create_entity_response import CreateEntityResponse from lightly.openapi_generated.swagger_client.models.tag_active_learning_scores_data import TagActiveLearningScoresData @@ -51,7 +53,7 @@ def __init__(self, api_client=None): @validate_arguments def create_or_update_active_learning_score_by_tag_id(self, dataset_id : Annotated[constr(strict=True), Field(..., description="ObjectId of the dataset")], tag_id : Annotated[constr(strict=True), Field(..., description="ObjectId of the tag")], active_learning_score_create_request : ActiveLearningScoreCreateRequest, **kwargs) -> CreateEntityResponse: # noqa: E501 - """create_or_update_active_learning_score_by_tag_id # noqa: E501 + """(Deprecated) create_or_update_active_learning_score_by_tag_id # noqa: E501 Create or update active learning score object by tag id # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -84,7 +86,7 @@ def create_or_update_active_learning_score_by_tag_id(self, dataset_id : Annotate @validate_arguments def create_or_update_active_learning_score_by_tag_id_with_http_info(self, dataset_id : Annotated[constr(strict=True), Field(..., description="ObjectId of the dataset")], tag_id : Annotated[constr(strict=True), Field(..., description="ObjectId of the tag")], active_learning_score_create_request : ActiveLearningScoreCreateRequest, **kwargs) -> ApiResponse: # noqa: E501 - """create_or_update_active_learning_score_by_tag_id # noqa: E501 + """(Deprecated) create_or_update_active_learning_score_by_tag_id # noqa: E501 Create or update active learning score object by tag id # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -124,6 +126,8 @@ def create_or_update_active_learning_score_by_tag_id_with_http_info(self, datase :rtype: tuple(CreateEntityResponse, status_code(int), headers(HTTPHeaderDict)) """ + warnings.warn("POST /v1/datasets/{datasetId}/tags/{tagId}/scores is deprecated.", DeprecationWarning) + _params = locals() _all_params = [ @@ -215,9 +219,189 @@ def create_or_update_active_learning_score_by_tag_id_with_http_info(self, datase collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) + @validate_arguments + def create_or_update_active_learning_v2_score_by_dataset_id(self, dataset_id : Annotated[constr(strict=True), Field(..., description="ObjectId of the dataset")], prediction_uuid_timestamp : Annotated[conint(strict=True, ge=0), Field(..., description="The timestamp of when the actual predictions were created. This is used as a peg to version predictions. E.g one could upload predictions on day 1 and then create new predictions with an improved model on day 30. One can then upload the new predictions to the same dataset. ")], task_name : Annotated[constr(strict=True, min_length=1), Field(..., description="The prediction task name for which one wants to list the predictions")], active_learning_score_create_request : ActiveLearningScoreCreateRequest, **kwargs) -> CreateEntityResponse: # noqa: E501 + """create_or_update_active_learning_v2_score_by_dataset_id # noqa: E501 + + Create or update active learning score object for a dataset, taskName, predictionUUIDTimestamp # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_or_update_active_learning_v2_score_by_dataset_id(dataset_id, prediction_uuid_timestamp, task_name, active_learning_score_create_request, async_req=True) + >>> result = thread.get() + + :param dataset_id: ObjectId of the dataset (required) + :type dataset_id: str + :param prediction_uuid_timestamp: The timestamp of when the actual predictions were created. This is used as a peg to version predictions. E.g one could upload predictions on day 1 and then create new predictions with an improved model on day 30. One can then upload the new predictions to the same dataset. (required) + :type prediction_uuid_timestamp: int + :param task_name: The prediction task name for which one wants to list the predictions (required) + :type task_name: str + :param active_learning_score_create_request: (required) + :type active_learning_score_create_request: ActiveLearningScoreCreateRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: CreateEntityResponse + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the create_or_update_active_learning_v2_score_by_dataset_id_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.create_or_update_active_learning_v2_score_by_dataset_id_with_http_info(dataset_id, prediction_uuid_timestamp, task_name, active_learning_score_create_request, **kwargs) # noqa: E501 + + @validate_arguments + def create_or_update_active_learning_v2_score_by_dataset_id_with_http_info(self, dataset_id : Annotated[constr(strict=True), Field(..., description="ObjectId of the dataset")], prediction_uuid_timestamp : Annotated[conint(strict=True, ge=0), Field(..., description="The timestamp of when the actual predictions were created. This is used as a peg to version predictions. E.g one could upload predictions on day 1 and then create new predictions with an improved model on day 30. One can then upload the new predictions to the same dataset. ")], task_name : Annotated[constr(strict=True, min_length=1), Field(..., description="The prediction task name for which one wants to list the predictions")], active_learning_score_create_request : ActiveLearningScoreCreateRequest, **kwargs) -> ApiResponse: # noqa: E501 + """create_or_update_active_learning_v2_score_by_dataset_id # noqa: E501 + + Create or update active learning score object for a dataset, taskName, predictionUUIDTimestamp # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_or_update_active_learning_v2_score_by_dataset_id_with_http_info(dataset_id, prediction_uuid_timestamp, task_name, active_learning_score_create_request, async_req=True) + >>> result = thread.get() + + :param dataset_id: ObjectId of the dataset (required) + :type dataset_id: str + :param prediction_uuid_timestamp: The timestamp of when the actual predictions were created. This is used as a peg to version predictions. E.g one could upload predictions on day 1 and then create new predictions with an improved model on day 30. One can then upload the new predictions to the same dataset. (required) + :type prediction_uuid_timestamp: int + :param task_name: The prediction task name for which one wants to list the predictions (required) + :type task_name: str + :param active_learning_score_create_request: (required) + :type active_learning_score_create_request: ActiveLearningScoreCreateRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(CreateEntityResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'dataset_id', + 'prediction_uuid_timestamp', + 'task_name', + 'active_learning_score_create_request' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_or_update_active_learning_v2_score_by_dataset_id" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['dataset_id']: + _path_params['datasetId'] = _params['dataset_id'] + + + # process the query parameters + _query_params = [] + if _params.get('prediction_uuid_timestamp') is not None: # noqa: E501 + _query_params.append(( + 'predictionUUIDTimestamp', + _params['prediction_uuid_timestamp'].value if hasattr(_params['prediction_uuid_timestamp'], 'value') else _params['prediction_uuid_timestamp'] + )) + + if _params.get('task_name') is not None: # noqa: E501 + _query_params.append(( + 'taskName', + _params['task_name'].value if hasattr(_params['task_name'], 'value') else _params['task_name'] + )) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['active_learning_score_create_request'] is not None: + _body_params = _params['active_learning_score_create_request'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['auth0Bearer', 'ApiKeyAuth'] # noqa: E501 + + _response_types_map = { + '201': "CreateEntityResponse", + '400': "ApiErrorResponse", + '401': "ApiErrorResponse", + '403': "ApiErrorResponse", + '404': "ApiErrorResponse", + } + + return self.api_client.call_api( + '/v1/datasets/{datasetId}/predictions/scores', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + @validate_arguments def get_active_learning_score_by_score_id(self, dataset_id : Annotated[constr(strict=True), Field(..., description="ObjectId of the dataset")], tag_id : Annotated[constr(strict=True), Field(..., description="ObjectId of the tag")], score_id : Annotated[constr(strict=True), Field(..., description="ObjectId of the scores")], **kwargs) -> ActiveLearningScoreData: # noqa: E501 - """get_active_learning_score_by_score_id # noqa: E501 + """(Deprecated) get_active_learning_score_by_score_id # noqa: E501 Get active learning score object by id # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -250,7 +434,7 @@ def get_active_learning_score_by_score_id(self, dataset_id : Annotated[constr(st @validate_arguments def get_active_learning_score_by_score_id_with_http_info(self, dataset_id : Annotated[constr(strict=True), Field(..., description="ObjectId of the dataset")], tag_id : Annotated[constr(strict=True), Field(..., description="ObjectId of the tag")], score_id : Annotated[constr(strict=True), Field(..., description="ObjectId of the scores")], **kwargs) -> ApiResponse: # noqa: E501 - """get_active_learning_score_by_score_id # noqa: E501 + """(Deprecated) get_active_learning_score_by_score_id # noqa: E501 Get active learning score object by id # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -290,6 +474,8 @@ def get_active_learning_score_by_score_id_with_http_info(self, dataset_id : Anno :rtype: tuple(ActiveLearningScoreData, status_code(int), headers(HTTPHeaderDict)) """ + warnings.warn("GET /v1/datasets/{datasetId}/tags/{tagId}/scores/{scoreId} is deprecated.", DeprecationWarning) + _params = locals() _all_params = [ @@ -376,7 +562,7 @@ def get_active_learning_score_by_score_id_with_http_info(self, dataset_id : Anno @validate_arguments def get_active_learning_scores_by_tag_id(self, dataset_id : Annotated[constr(strict=True), Field(..., description="ObjectId of the dataset")], tag_id : Annotated[constr(strict=True), Field(..., description="ObjectId of the tag")], **kwargs) -> List[TagActiveLearningScoresData]: # noqa: E501 - """get_active_learning_scores_by_tag_id # noqa: E501 + """(Deprecated) get_active_learning_scores_by_tag_id # noqa: E501 Get all scoreIds for the given tag # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -407,7 +593,7 @@ def get_active_learning_scores_by_tag_id(self, dataset_id : Annotated[constr(str @validate_arguments def get_active_learning_scores_by_tag_id_with_http_info(self, dataset_id : Annotated[constr(strict=True), Field(..., description="ObjectId of the dataset")], tag_id : Annotated[constr(strict=True), Field(..., description="ObjectId of the tag")], **kwargs) -> ApiResponse: # noqa: E501 - """get_active_learning_scores_by_tag_id # noqa: E501 + """(Deprecated) get_active_learning_scores_by_tag_id # noqa: E501 Get all scoreIds for the given tag # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -445,6 +631,8 @@ def get_active_learning_scores_by_tag_id_with_http_info(self, dataset_id : Annot :rtype: tuple(List[TagActiveLearningScoresData], status_code(int), headers(HTTPHeaderDict)) """ + warnings.warn("GET /v1/datasets/{datasetId}/tags/{tagId}/scores is deprecated.", DeprecationWarning) + _params = locals() _all_params = [ @@ -524,3 +712,308 @@ def get_active_learning_scores_by_tag_id_with_http_info(self, dataset_id : Annot _request_timeout=_params.get('_request_timeout'), collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_active_learning_v2_score_by_dataset_and_score_id(self, dataset_id : Annotated[constr(strict=True), Field(..., description="ObjectId of the dataset")], score_id : Annotated[constr(strict=True), Field(..., description="ObjectId of the scores")], **kwargs) -> ActiveLearningScoreV2Data: # noqa: E501 + """get_active_learning_v2_score_by_dataset_and_score_id # noqa: E501 + + Get active learning scores by scoreId # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_active_learning_v2_score_by_dataset_and_score_id(dataset_id, score_id, async_req=True) + >>> result = thread.get() + + :param dataset_id: ObjectId of the dataset (required) + :type dataset_id: str + :param score_id: ObjectId of the scores (required) + :type score_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: ActiveLearningScoreV2Data + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_active_learning_v2_score_by_dataset_and_score_id_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_active_learning_v2_score_by_dataset_and_score_id_with_http_info(dataset_id, score_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_active_learning_v2_score_by_dataset_and_score_id_with_http_info(self, dataset_id : Annotated[constr(strict=True), Field(..., description="ObjectId of the dataset")], score_id : Annotated[constr(strict=True), Field(..., description="ObjectId of the scores")], **kwargs) -> ApiResponse: # noqa: E501 + """get_active_learning_v2_score_by_dataset_and_score_id # noqa: E501 + + Get active learning scores by scoreId # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_active_learning_v2_score_by_dataset_and_score_id_with_http_info(dataset_id, score_id, async_req=True) + >>> result = thread.get() + + :param dataset_id: ObjectId of the dataset (required) + :type dataset_id: str + :param score_id: ObjectId of the scores (required) + :type score_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ActiveLearningScoreV2Data, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'dataset_id', + 'score_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_active_learning_v2_score_by_dataset_and_score_id" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['dataset_id']: + _path_params['datasetId'] = _params['dataset_id'] + + if _params['score_id']: + _path_params['scoreId'] = _params['score_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['auth0Bearer', 'ApiKeyAuth'] # noqa: E501 + + _response_types_map = { + '200': "ActiveLearningScoreV2Data", + '400': "ApiErrorResponse", + '401': "ApiErrorResponse", + '403': "ApiErrorResponse", + '404': "ApiErrorResponse", + } + + return self.api_client.call_api( + '/v1/datasets/{datasetId}/predictions/scores/{scoreId}', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + @validate_arguments + def get_active_learning_v2_scores_by_dataset_id(self, dataset_id : Annotated[constr(strict=True), Field(..., description="ObjectId of the dataset")], prediction_uuid_timestamp : Annotated[conint(strict=True, ge=0), Field(..., description="The timestamp of when the actual predictions were created. This is used as a peg to version predictions. E.g one could upload predictions on day 1 and then create new predictions with an improved model on day 30. One can then upload the new predictions to the same dataset. ")], **kwargs) -> List[ActiveLearningScoreTypesV2Data]: # noqa: E501 + """get_active_learning_v2_scores_by_dataset_id # noqa: E501 + + Get all AL score types by datasetId and predictionUUIDTimestamp # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_active_learning_v2_scores_by_dataset_id(dataset_id, prediction_uuid_timestamp, async_req=True) + >>> result = thread.get() + + :param dataset_id: ObjectId of the dataset (required) + :type dataset_id: str + :param prediction_uuid_timestamp: The timestamp of when the actual predictions were created. This is used as a peg to version predictions. E.g one could upload predictions on day 1 and then create new predictions with an improved model on day 30. One can then upload the new predictions to the same dataset. (required) + :type prediction_uuid_timestamp: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: List[ActiveLearningScoreTypesV2Data] + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_active_learning_v2_scores_by_dataset_id_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_active_learning_v2_scores_by_dataset_id_with_http_info(dataset_id, prediction_uuid_timestamp, **kwargs) # noqa: E501 + + @validate_arguments + def get_active_learning_v2_scores_by_dataset_id_with_http_info(self, dataset_id : Annotated[constr(strict=True), Field(..., description="ObjectId of the dataset")], prediction_uuid_timestamp : Annotated[conint(strict=True, ge=0), Field(..., description="The timestamp of when the actual predictions were created. This is used as a peg to version predictions. E.g one could upload predictions on day 1 and then create new predictions with an improved model on day 30. One can then upload the new predictions to the same dataset. ")], **kwargs) -> ApiResponse: # noqa: E501 + """get_active_learning_v2_scores_by_dataset_id # noqa: E501 + + Get all AL score types by datasetId and predictionUUIDTimestamp # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_active_learning_v2_scores_by_dataset_id_with_http_info(dataset_id, prediction_uuid_timestamp, async_req=True) + >>> result = thread.get() + + :param dataset_id: ObjectId of the dataset (required) + :type dataset_id: str + :param prediction_uuid_timestamp: The timestamp of when the actual predictions were created. This is used as a peg to version predictions. E.g one could upload predictions on day 1 and then create new predictions with an improved model on day 30. One can then upload the new predictions to the same dataset. (required) + :type prediction_uuid_timestamp: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(List[ActiveLearningScoreTypesV2Data], status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'dataset_id', + 'prediction_uuid_timestamp' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_active_learning_v2_scores_by_dataset_id" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['dataset_id']: + _path_params['datasetId'] = _params['dataset_id'] + + + # process the query parameters + _query_params = [] + if _params.get('prediction_uuid_timestamp') is not None: # noqa: E501 + _query_params.append(( + 'predictionUUIDTimestamp', + _params['prediction_uuid_timestamp'].value if hasattr(_params['prediction_uuid_timestamp'], 'value') else _params['prediction_uuid_timestamp'] + )) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['auth0Bearer', 'ApiKeyAuth'] # noqa: E501 + + _response_types_map = { + '200': "List[ActiveLearningScoreTypesV2Data]", + '400': "ApiErrorResponse", + '401': "ApiErrorResponse", + '403': "ApiErrorResponse", + '404': "ApiErrorResponse", + } + + return self.api_client.call_api( + '/v1/datasets/{datasetId}/predictions/scores', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) diff --git a/lightly/openapi_generated/swagger_client/models/__init__.py b/lightly/openapi_generated/swagger_client/models/__init__.py index 9aee96206..fd20c0edc 100644 --- a/lightly/openapi_generated/swagger_client/models/__init__.py +++ b/lightly/openapi_generated/swagger_client/models/__init__.py @@ -17,6 +17,8 @@ # import models into model package from lightly.openapi_generated.swagger_client.models.active_learning_score_create_request import ActiveLearningScoreCreateRequest from lightly.openapi_generated.swagger_client.models.active_learning_score_data import ActiveLearningScoreData +from lightly.openapi_generated.swagger_client.models.active_learning_score_types_v2_data import ActiveLearningScoreTypesV2Data +from lightly.openapi_generated.swagger_client.models.active_learning_score_v2_data import ActiveLearningScoreV2Data from lightly.openapi_generated.swagger_client.models.api_error_code import ApiErrorCode from lightly.openapi_generated.swagger_client.models.api_error_response import ApiErrorResponse from lightly.openapi_generated.swagger_client.models.async_task_data import AsyncTaskData @@ -198,6 +200,7 @@ from lightly.openapi_generated.swagger_client.models.selection_input_type import SelectionInputType from lightly.openapi_generated.swagger_client.models.selection_strategy_threshold_operation import SelectionStrategyThresholdOperation from lightly.openapi_generated.swagger_client.models.selection_strategy_type import SelectionStrategyType +from lightly.openapi_generated.swagger_client.models.selection_strategy_type_v3 import SelectionStrategyTypeV3 from lightly.openapi_generated.swagger_client.models.service_account_basic_data import ServiceAccountBasicData from lightly.openapi_generated.swagger_client.models.set_embeddings_is_processed_flag_by_id_body_request import SetEmbeddingsIsProcessedFlagByIdBodyRequest from lightly.openapi_generated.swagger_client.models.shared_access_config_create_request import SharedAccessConfigCreateRequest diff --git a/lightly/openapi_generated/swagger_client/models/__init__.py-e b/lightly/openapi_generated/swagger_client/models/__init__.py-e new file mode 100644 index 000000000..7720c546f --- /dev/null +++ b/lightly/openapi_generated/swagger_client/models/__init__.py-e @@ -0,0 +1,242 @@ +# coding: utf-8 + +# flake8: noqa +""" + Lightly API + + Lightly.ai enables you to do self-supervised learning in an easy and intuitive way. The lightly.ai OpenAPI spec defines how one can interact with our REST API to unleash the full potential of lightly.ai # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: support@lightly.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" + + +# import models into model package +from lightly.openapi_generated.swagger_client.models.active_learning_score_create_request import ActiveLearningScoreCreateRequest +from lightly.openapi_generated.swagger_client.models.active_learning_score_data import ActiveLearningScoreData +from lightly.openapi_generated.swagger_client.models.active_learning_score_types_v2_data import ActiveLearningScoreTypesV2Data +from lightly.openapi_generated.swagger_client.models.active_learning_score_v2_data import ActiveLearningScoreV2Data +from lightly.openapi_generated.swagger_client.models.api_error_code import ApiErrorCode +from lightly.openapi_generated.swagger_client.models.api_error_response import ApiErrorResponse +from lightly.openapi_generated.swagger_client.models.async_task_data import AsyncTaskData +from lightly.openapi_generated.swagger_client.models.configuration_data import ConfigurationData +from lightly.openapi_generated.swagger_client.models.configuration_entry import ConfigurationEntry +from lightly.openapi_generated.swagger_client.models.configuration_set_request import ConfigurationSetRequest +from lightly.openapi_generated.swagger_client.models.configuration_value_data_type import ConfigurationValueDataType +from lightly.openapi_generated.swagger_client.models.create_cf_bucket_activity_request import CreateCFBucketActivityRequest +from lightly.openapi_generated.swagger_client.models.create_docker_worker_registry_entry_request import CreateDockerWorkerRegistryEntryRequest +from lightly.openapi_generated.swagger_client.models.create_entity_response import CreateEntityResponse +from lightly.openapi_generated.swagger_client.models.create_sample_with_write_urls_response import CreateSampleWithWriteUrlsResponse +from lightly.openapi_generated.swagger_client.models.create_team_membership_request import CreateTeamMembershipRequest +from lightly.openapi_generated.swagger_client.models.creator import Creator +from lightly.openapi_generated.swagger_client.models.crop_data import CropData +from lightly.openapi_generated.swagger_client.models.dataset_create_request import DatasetCreateRequest +from lightly.openapi_generated.swagger_client.models.dataset_creator import DatasetCreator +from lightly.openapi_generated.swagger_client.models.dataset_data import DatasetData +from lightly.openapi_generated.swagger_client.models.dataset_data_enriched import DatasetDataEnriched +from lightly.openapi_generated.swagger_client.models.dataset_embedding_data import DatasetEmbeddingData +from lightly.openapi_generated.swagger_client.models.dataset_type import DatasetType +from lightly.openapi_generated.swagger_client.models.dataset_update_request import DatasetUpdateRequest +from lightly.openapi_generated.swagger_client.models.datasource_config import DatasourceConfig +from lightly.openapi_generated.swagger_client.models.datasource_config_azure import DatasourceConfigAzure +from lightly.openapi_generated.swagger_client.models.datasource_config_azure_all_of import DatasourceConfigAzureAllOf +from lightly.openapi_generated.swagger_client.models.datasource_config_base import DatasourceConfigBase +from lightly.openapi_generated.swagger_client.models.datasource_config_base_full_path import DatasourceConfigBaseFullPath +from lightly.openapi_generated.swagger_client.models.datasource_config_gcs import DatasourceConfigGCS +from lightly.openapi_generated.swagger_client.models.datasource_config_gcs_all_of import DatasourceConfigGCSAllOf +from lightly.openapi_generated.swagger_client.models.datasource_config_lightly import DatasourceConfigLIGHTLY +from lightly.openapi_generated.swagger_client.models.datasource_config_local import DatasourceConfigLOCAL +from lightly.openapi_generated.swagger_client.models.datasource_config_local_all_of import DatasourceConfigLOCALAllOf +from lightly.openapi_generated.swagger_client.models.datasource_config_obs import DatasourceConfigOBS +from lightly.openapi_generated.swagger_client.models.datasource_config_obs_all_of import DatasourceConfigOBSAllOf +from lightly.openapi_generated.swagger_client.models.datasource_config_s3 import DatasourceConfigS3 +from lightly.openapi_generated.swagger_client.models.datasource_config_s3_all_of import DatasourceConfigS3AllOf +from lightly.openapi_generated.swagger_client.models.datasource_config_s3_delegated_access import DatasourceConfigS3DelegatedAccess +from lightly.openapi_generated.swagger_client.models.datasource_config_s3_delegated_access_all_of import DatasourceConfigS3DelegatedAccessAllOf +from lightly.openapi_generated.swagger_client.models.datasource_config_verify_data import DatasourceConfigVerifyData +from lightly.openapi_generated.swagger_client.models.datasource_config_verify_data_errors import DatasourceConfigVerifyDataErrors +from lightly.openapi_generated.swagger_client.models.datasource_processed_until_timestamp_request import DatasourceProcessedUntilTimestampRequest +from lightly.openapi_generated.swagger_client.models.datasource_processed_until_timestamp_response import DatasourceProcessedUntilTimestampResponse +from lightly.openapi_generated.swagger_client.models.datasource_purpose import DatasourcePurpose +from lightly.openapi_generated.swagger_client.models.datasource_raw_samples_data import DatasourceRawSamplesData +from lightly.openapi_generated.swagger_client.models.datasource_raw_samples_data_row import DatasourceRawSamplesDataRow +from lightly.openapi_generated.swagger_client.models.datasource_raw_samples_metadata_data import DatasourceRawSamplesMetadataData +from lightly.openapi_generated.swagger_client.models.datasource_raw_samples_metadata_data_row import DatasourceRawSamplesMetadataDataRow +from lightly.openapi_generated.swagger_client.models.datasource_raw_samples_predictions_data import DatasourceRawSamplesPredictionsData +from lightly.openapi_generated.swagger_client.models.datasource_raw_samples_predictions_data_row import DatasourceRawSamplesPredictionsDataRow +from lightly.openapi_generated.swagger_client.models.dimensionality_reduction_method import DimensionalityReductionMethod +from lightly.openapi_generated.swagger_client.models.docker_license_information import DockerLicenseInformation +from lightly.openapi_generated.swagger_client.models.docker_run_artifact_create_request import DockerRunArtifactCreateRequest +from lightly.openapi_generated.swagger_client.models.docker_run_artifact_created_data import DockerRunArtifactCreatedData +from lightly.openapi_generated.swagger_client.models.docker_run_artifact_data import DockerRunArtifactData +from lightly.openapi_generated.swagger_client.models.docker_run_artifact_storage_location import DockerRunArtifactStorageLocation +from lightly.openapi_generated.swagger_client.models.docker_run_artifact_type import DockerRunArtifactType +from lightly.openapi_generated.swagger_client.models.docker_run_create_request import DockerRunCreateRequest +from lightly.openapi_generated.swagger_client.models.docker_run_data import DockerRunData +from lightly.openapi_generated.swagger_client.models.docker_run_log_data import DockerRunLogData +from lightly.openapi_generated.swagger_client.models.docker_run_log_entry_data import DockerRunLogEntryData +from lightly.openapi_generated.swagger_client.models.docker_run_log_level import DockerRunLogLevel +from lightly.openapi_generated.swagger_client.models.docker_run_scheduled_create_request import DockerRunScheduledCreateRequest +from lightly.openapi_generated.swagger_client.models.docker_run_scheduled_data import DockerRunScheduledData +from lightly.openapi_generated.swagger_client.models.docker_run_scheduled_priority import DockerRunScheduledPriority +from lightly.openapi_generated.swagger_client.models.docker_run_scheduled_state import DockerRunScheduledState +from lightly.openapi_generated.swagger_client.models.docker_run_scheduled_update_request import DockerRunScheduledUpdateRequest +from lightly.openapi_generated.swagger_client.models.docker_run_state import DockerRunState +from lightly.openapi_generated.swagger_client.models.docker_run_update_request import DockerRunUpdateRequest +from lightly.openapi_generated.swagger_client.models.docker_task_description import DockerTaskDescription +from lightly.openapi_generated.swagger_client.models.docker_user_stats import DockerUserStats +from lightly.openapi_generated.swagger_client.models.docker_worker_config import DockerWorkerConfig +from lightly.openapi_generated.swagger_client.models.docker_worker_config_create_request import DockerWorkerConfigCreateRequest +from lightly.openapi_generated.swagger_client.models.docker_worker_config_data import DockerWorkerConfigData +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2 import DockerWorkerConfigV2 +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2_create_request import DockerWorkerConfigV2CreateRequest +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2_data import DockerWorkerConfigV2Data +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2_docker import DockerWorkerConfigV2Docker +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2_docker_object_level import DockerWorkerConfigV2DockerObjectLevel +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2_docker_stopping_condition import DockerWorkerConfigV2DockerStoppingCondition +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2_lightly import DockerWorkerConfigV2Lightly +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2_lightly_collate import DockerWorkerConfigV2LightlyCollate +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2_lightly_model import DockerWorkerConfigV2LightlyModel +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v2_lightly_trainer import DockerWorkerConfigV2LightlyTrainer +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3 import DockerWorkerConfigV3 +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_create_request import DockerWorkerConfigV3CreateRequest +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_data import DockerWorkerConfigV3Data +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_docker import DockerWorkerConfigV3Docker +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_docker_corruptness_check import DockerWorkerConfigV3DockerCorruptnessCheck +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_docker_datasource import DockerWorkerConfigV3DockerDatasource +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_docker_training import DockerWorkerConfigV3DockerTraining +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_lightly import DockerWorkerConfigV3Lightly +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_lightly_checkpoint_callback import DockerWorkerConfigV3LightlyCheckpointCallback +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_lightly_collate import DockerWorkerConfigV3LightlyCollate +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_lightly_criterion import DockerWorkerConfigV3LightlyCriterion +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_lightly_loader import DockerWorkerConfigV3LightlyLoader +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_lightly_model import DockerWorkerConfigV3LightlyModel +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_lightly_optimizer import DockerWorkerConfigV3LightlyOptimizer +from lightly.openapi_generated.swagger_client.models.docker_worker_config_v3_lightly_trainer import DockerWorkerConfigV3LightlyTrainer +from lightly.openapi_generated.swagger_client.models.docker_worker_registry_entry_data import DockerWorkerRegistryEntryData +from lightly.openapi_generated.swagger_client.models.docker_worker_state import DockerWorkerState +from lightly.openapi_generated.swagger_client.models.docker_worker_type import DockerWorkerType +from lightly.openapi_generated.swagger_client.models.embedding2d_create_request import Embedding2dCreateRequest +from lightly.openapi_generated.swagger_client.models.embedding2d_data import Embedding2dData +from lightly.openapi_generated.swagger_client.models.embedding_data import EmbeddingData +from lightly.openapi_generated.swagger_client.models.file_name_format import FileNameFormat +from lightly.openapi_generated.swagger_client.models.file_output_format import FileOutputFormat +from lightly.openapi_generated.swagger_client.models.filename_and_read_url import FilenameAndReadUrl +from lightly.openapi_generated.swagger_client.models.image_type import ImageType +from lightly.openapi_generated.swagger_client.models.initial_tag_create_request import InitialTagCreateRequest +from lightly.openapi_generated.swagger_client.models.job_result_type import JobResultType +from lightly.openapi_generated.swagger_client.models.job_state import JobState +from lightly.openapi_generated.swagger_client.models.job_status_data import JobStatusData +from lightly.openapi_generated.swagger_client.models.job_status_data_result import JobStatusDataResult +from lightly.openapi_generated.swagger_client.models.job_status_meta import JobStatusMeta +from lightly.openapi_generated.swagger_client.models.job_status_upload_method import JobStatusUploadMethod +from lightly.openapi_generated.swagger_client.models.jobs_data import JobsData +from lightly.openapi_generated.swagger_client.models.label_box_data_row import LabelBoxDataRow +from lightly.openapi_generated.swagger_client.models.label_box_v4_data_row import LabelBoxV4DataRow +from lightly.openapi_generated.swagger_client.models.label_studio_task import LabelStudioTask +from lightly.openapi_generated.swagger_client.models.label_studio_task_data import LabelStudioTaskData +from lightly.openapi_generated.swagger_client.models.lightly_docker_selection_method import LightlyDockerSelectionMethod +from lightly.openapi_generated.swagger_client.models.lightly_model_v2 import LightlyModelV2 +from lightly.openapi_generated.swagger_client.models.lightly_model_v3 import LightlyModelV3 +from lightly.openapi_generated.swagger_client.models.lightly_trainer_precision_v2 import LightlyTrainerPrecisionV2 +from lightly.openapi_generated.swagger_client.models.lightly_trainer_precision_v3 import LightlyTrainerPrecisionV3 +from lightly.openapi_generated.swagger_client.models.prediction_singleton import PredictionSingleton +from lightly.openapi_generated.swagger_client.models.prediction_singleton_base import PredictionSingletonBase +from lightly.openapi_generated.swagger_client.models.prediction_singleton_classification import PredictionSingletonClassification +from lightly.openapi_generated.swagger_client.models.prediction_singleton_classification_all_of import PredictionSingletonClassificationAllOf +from lightly.openapi_generated.swagger_client.models.prediction_singleton_instance_segmentation import PredictionSingletonInstanceSegmentation +from lightly.openapi_generated.swagger_client.models.prediction_singleton_instance_segmentation_all_of import PredictionSingletonInstanceSegmentationAllOf +from lightly.openapi_generated.swagger_client.models.prediction_singleton_keypoint_detection import PredictionSingletonKeypointDetection +from lightly.openapi_generated.swagger_client.models.prediction_singleton_keypoint_detection_all_of import PredictionSingletonKeypointDetectionAllOf +from lightly.openapi_generated.swagger_client.models.prediction_singleton_object_detection import PredictionSingletonObjectDetection +from lightly.openapi_generated.swagger_client.models.prediction_singleton_object_detection_all_of import PredictionSingletonObjectDetectionAllOf +from lightly.openapi_generated.swagger_client.models.prediction_singleton_semantic_segmentation import PredictionSingletonSemanticSegmentation +from lightly.openapi_generated.swagger_client.models.prediction_singleton_semantic_segmentation_all_of import PredictionSingletonSemanticSegmentationAllOf +from lightly.openapi_generated.swagger_client.models.prediction_task_schema import PredictionTaskSchema +from lightly.openapi_generated.swagger_client.models.prediction_task_schema_base import PredictionTaskSchemaBase +from lightly.openapi_generated.swagger_client.models.prediction_task_schema_category import PredictionTaskSchemaCategory +from lightly.openapi_generated.swagger_client.models.prediction_task_schema_category_keypoints import PredictionTaskSchemaCategoryKeypoints +from lightly.openapi_generated.swagger_client.models.prediction_task_schema_category_keypoints_all_of import PredictionTaskSchemaCategoryKeypointsAllOf +from lightly.openapi_generated.swagger_client.models.prediction_task_schema_keypoint import PredictionTaskSchemaKeypoint +from lightly.openapi_generated.swagger_client.models.prediction_task_schema_keypoint_all_of import PredictionTaskSchemaKeypointAllOf +from lightly.openapi_generated.swagger_client.models.prediction_task_schema_simple import PredictionTaskSchemaSimple +from lightly.openapi_generated.swagger_client.models.prediction_task_schema_simple_all_of import PredictionTaskSchemaSimpleAllOf +from lightly.openapi_generated.swagger_client.models.prediction_task_schemas import PredictionTaskSchemas +from lightly.openapi_generated.swagger_client.models.profile_basic_data import ProfileBasicData +from lightly.openapi_generated.swagger_client.models.profile_me_data import ProfileMeData +from lightly.openapi_generated.swagger_client.models.profile_me_data_settings import ProfileMeDataSettings +from lightly.openapi_generated.swagger_client.models.questionnaire_data import QuestionnaireData +from lightly.openapi_generated.swagger_client.models.s3_region import S3Region +from lightly.openapi_generated.swagger_client.models.sama_task import SamaTask +from lightly.openapi_generated.swagger_client.models.sama_task_data import SamaTaskData +from lightly.openapi_generated.swagger_client.models.sample_create_request import SampleCreateRequest +from lightly.openapi_generated.swagger_client.models.sample_data import SampleData +from lightly.openapi_generated.swagger_client.models.sample_data_modes import SampleDataModes +from lightly.openapi_generated.swagger_client.models.sample_meta_data import SampleMetaData +from lightly.openapi_generated.swagger_client.models.sample_partial_mode import SamplePartialMode +from lightly.openapi_generated.swagger_client.models.sample_sort_by import SampleSortBy +from lightly.openapi_generated.swagger_client.models.sample_type import SampleType +from lightly.openapi_generated.swagger_client.models.sample_update_request import SampleUpdateRequest +from lightly.openapi_generated.swagger_client.models.sample_write_urls import SampleWriteUrls +from lightly.openapi_generated.swagger_client.models.sampling_config import SamplingConfig +from lightly.openapi_generated.swagger_client.models.sampling_config_stopping_condition import SamplingConfigStoppingCondition +from lightly.openapi_generated.swagger_client.models.sampling_create_request import SamplingCreateRequest +from lightly.openapi_generated.swagger_client.models.sampling_method import SamplingMethod +from lightly.openapi_generated.swagger_client.models.sector import Sector +from lightly.openapi_generated.swagger_client.models.selection_config import SelectionConfig +from lightly.openapi_generated.swagger_client.models.selection_config_all_of import SelectionConfigAllOf +from lightly.openapi_generated.swagger_client.models.selection_config_base import SelectionConfigBase +from lightly.openapi_generated.swagger_client.models.selection_config_entry import SelectionConfigEntry +from lightly.openapi_generated.swagger_client.models.selection_config_entry_input import SelectionConfigEntryInput +from lightly.openapi_generated.swagger_client.models.selection_config_entry_strategy import SelectionConfigEntryStrategy +from lightly.openapi_generated.swagger_client.models.selection_config_v3 import SelectionConfigV3 +from lightly.openapi_generated.swagger_client.models.selection_config_v3_all_of import SelectionConfigV3AllOf +from lightly.openapi_generated.swagger_client.models.selection_config_v3_entry import SelectionConfigV3Entry +from lightly.openapi_generated.swagger_client.models.selection_config_v3_entry_input import SelectionConfigV3EntryInput +from lightly.openapi_generated.swagger_client.models.selection_config_v3_entry_strategy import SelectionConfigV3EntryStrategy +from lightly.openapi_generated.swagger_client.models.selection_config_v3_entry_strategy_all_of import SelectionConfigV3EntryStrategyAllOf +from lightly.openapi_generated.swagger_client.models.selection_config_v3_entry_strategy_all_of_target_range import SelectionConfigV3EntryStrategyAllOfTargetRange +from lightly.openapi_generated.swagger_client.models.selection_input_predictions_name import SelectionInputPredictionsName +from lightly.openapi_generated.swagger_client.models.selection_input_type import SelectionInputType +from lightly.openapi_generated.swagger_client.models.selection_strategy_threshold_operation import SelectionStrategyThresholdOperation +from lightly.openapi_generated.swagger_client.models.selection_strategy_type import SelectionStrategyType +from lightly.openapi_generated.swagger_client.models.selection_strategy_type_v3 import SelectionStrategyTypeV3 +from lightly.openapi_generated.swagger_client.models.service_account_basic_data import ServiceAccountBasicData +from lightly.openapi_generated.swagger_client.models.set_embeddings_is_processed_flag_by_id_body_request import SetEmbeddingsIsProcessedFlagByIdBodyRequest +from lightly.openapi_generated.swagger_client.models.shared_access_config_create_request import SharedAccessConfigCreateRequest +from lightly.openapi_generated.swagger_client.models.shared_access_config_data import SharedAccessConfigData +from lightly.openapi_generated.swagger_client.models.shared_access_type import SharedAccessType +from lightly.openapi_generated.swagger_client.models.tag_active_learning_scores_data import TagActiveLearningScoresData +from lightly.openapi_generated.swagger_client.models.tag_arithmetics_operation import TagArithmeticsOperation +from lightly.openapi_generated.swagger_client.models.tag_arithmetics_request import TagArithmeticsRequest +from lightly.openapi_generated.swagger_client.models.tag_arithmetics_response import TagArithmeticsResponse +from lightly.openapi_generated.swagger_client.models.tag_bit_mask_response import TagBitMaskResponse +from lightly.openapi_generated.swagger_client.models.tag_change_data import TagChangeData +from lightly.openapi_generated.swagger_client.models.tag_change_data_arithmetics import TagChangeDataArithmetics +from lightly.openapi_generated.swagger_client.models.tag_change_data_initial import TagChangeDataInitial +from lightly.openapi_generated.swagger_client.models.tag_change_data_metadata import TagChangeDataMetadata +from lightly.openapi_generated.swagger_client.models.tag_change_data_operation_method import TagChangeDataOperationMethod +from lightly.openapi_generated.swagger_client.models.tag_change_data_rename import TagChangeDataRename +from lightly.openapi_generated.swagger_client.models.tag_change_data_sampler import TagChangeDataSampler +from lightly.openapi_generated.swagger_client.models.tag_change_data_samples import TagChangeDataSamples +from lightly.openapi_generated.swagger_client.models.tag_change_data_scatterplot import TagChangeDataScatterplot +from lightly.openapi_generated.swagger_client.models.tag_change_data_upsize import TagChangeDataUpsize +from lightly.openapi_generated.swagger_client.models.tag_change_entry import TagChangeEntry +from lightly.openapi_generated.swagger_client.models.tag_create_request import TagCreateRequest +from lightly.openapi_generated.swagger_client.models.tag_creator import TagCreator +from lightly.openapi_generated.swagger_client.models.tag_data import TagData +from lightly.openapi_generated.swagger_client.models.tag_update_request import TagUpdateRequest +from lightly.openapi_generated.swagger_client.models.tag_upsize_request import TagUpsizeRequest +from lightly.openapi_generated.swagger_client.models.task_type import TaskType +from lightly.openapi_generated.swagger_client.models.team_basic_data import TeamBasicData +from lightly.openapi_generated.swagger_client.models.team_data import TeamData +from lightly.openapi_generated.swagger_client.models.team_role import TeamRole +from lightly.openapi_generated.swagger_client.models.trigger2d_embedding_job_request import Trigger2dEmbeddingJobRequest +from lightly.openapi_generated.swagger_client.models.update_docker_worker_registry_entry_request import UpdateDockerWorkerRegistryEntryRequest +from lightly.openapi_generated.swagger_client.models.update_team_membership_request import UpdateTeamMembershipRequest +from lightly.openapi_generated.swagger_client.models.user_type import UserType +from lightly.openapi_generated.swagger_client.models.video_frame_data import VideoFrameData +from lightly.openapi_generated.swagger_client.models.write_csv_url_data import WriteCSVUrlData diff --git a/lightly/openapi_generated/swagger_client/models/active_learning_score_types_v2_data.py b/lightly/openapi_generated/swagger_client/models/active_learning_score_types_v2_data.py new file mode 100644 index 000000000..5455a44d3 --- /dev/null +++ b/lightly/openapi_generated/swagger_client/models/active_learning_score_types_v2_data.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Lightly API + + Lightly.ai enables you to do self-supervised learning in an easy and intuitive way. The lightly.ai OpenAPI spec defines how one can interact with our REST API to unleash the full potential of lightly.ai # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: support@lightly.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + + + +from pydantic import Extra, BaseModel, Field, conint, constr, validator + +class ActiveLearningScoreTypesV2Data(BaseModel): + """ + ActiveLearningScoreTypesV2Data + """ + id: constr(strict=True) = Field(..., description="MongoDB ObjectId") + dataset_id: constr(strict=True) = Field(..., alias="datasetId", description="MongoDB ObjectId") + prediction_uuid_timestamp: conint(strict=True, ge=0) = Field(..., alias="predictionUUIDTimestamp", description="unix timestamp in milliseconds") + task_name: constr(strict=True, min_length=1) = Field(..., alias="taskName", description="A name which is safe to have as a file/folder name in a file system") + score_type: constr(strict=True, min_length=1) = Field(..., alias="scoreType", description="Type of active learning score") + created_at: conint(strict=True, ge=0) = Field(..., alias="createdAt", description="unix timestamp in milliseconds") + __properties = ["id", "datasetId", "predictionUUIDTimestamp", "taskName", "scoreType", "createdAt"] + + @validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-f0-9]{24}$", value): + raise ValueError(r"must validate the regular expression /^[a-f0-9]{24}$/") + return value + + @validator('dataset_id') + def dataset_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-f0-9]{24}$", value): + raise ValueError(r"must validate the regular expression /^[a-f0-9]{24}$/") + return value + + @validator('task_name') + def task_name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-zA-Z0-9][a-zA-Z0-9 ._-]+$", value): + raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9][a-zA-Z0-9 ._-]+$/") + return value + + @validator('score_type') + def score_type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-zA-Z0-9_+=,.@:\/-]*$", value): + raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9_+=,.@:\/-]*$/") + return value + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + use_enum_values = True + extra = Extra.forbid + + def to_str(self, by_alias: bool = False) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.dict(by_alias=by_alias)) + + def to_json(self, by_alias: bool = False) -> str: + """Returns the JSON representation of the model""" + return json.dumps(self.to_dict(by_alias=by_alias)) + + @classmethod + def from_json(cls, json_str: str) -> ActiveLearningScoreTypesV2Data: + """Create an instance of ActiveLearningScoreTypesV2Data from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, by_alias: bool = False): + """Returns the dictionary representation of the model""" + _dict = self.dict(by_alias=by_alias, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> ActiveLearningScoreTypesV2Data: + """Create an instance of ActiveLearningScoreTypesV2Data from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ActiveLearningScoreTypesV2Data.parse_obj(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ActiveLearningScoreTypesV2Data) in the input: " + str(obj)) + + _obj = ActiveLearningScoreTypesV2Data.parse_obj({ + "id": obj.get("id"), + "dataset_id": obj.get("datasetId"), + "prediction_uuid_timestamp": obj.get("predictionUUIDTimestamp"), + "task_name": obj.get("taskName"), + "score_type": obj.get("scoreType"), + "created_at": obj.get("createdAt") + }) + return _obj + diff --git a/lightly/openapi_generated/swagger_client/models/active_learning_score_v2_data.py b/lightly/openapi_generated/swagger_client/models/active_learning_score_v2_data.py new file mode 100644 index 000000000..1970b7c58 --- /dev/null +++ b/lightly/openapi_generated/swagger_client/models/active_learning_score_v2_data.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Lightly API + + Lightly.ai enables you to do self-supervised learning in an easy and intuitive way. The lightly.ai OpenAPI spec defines how one can interact with our REST API to unleash the full potential of lightly.ai # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: support@lightly.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + + +from typing import List, Union +from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt, conint, conlist, constr, validator + +class ActiveLearningScoreV2Data(BaseModel): + """ + ActiveLearningScoreV2Data + """ + id: constr(strict=True) = Field(..., description="MongoDB ObjectId") + dataset_id: constr(strict=True) = Field(..., alias="datasetId", description="MongoDB ObjectId") + prediction_uuid_timestamp: conint(strict=True, ge=0) = Field(..., alias="predictionUUIDTimestamp", description="unix timestamp in milliseconds") + task_name: constr(strict=True, min_length=1) = Field(..., alias="taskName", description="A name which is safe to have as a file/folder name in a file system") + score_type: constr(strict=True, min_length=1) = Field(..., alias="scoreType", description="Type of active learning score") + scores: conlist(Union[StrictFloat, StrictInt], min_items=1) = Field(..., description="Array of active learning scores") + created_at: conint(strict=True, ge=0) = Field(..., alias="createdAt", description="unix timestamp in milliseconds") + __properties = ["id", "datasetId", "predictionUUIDTimestamp", "taskName", "scoreType", "scores", "createdAt"] + + @validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-f0-9]{24}$", value): + raise ValueError(r"must validate the regular expression /^[a-f0-9]{24}$/") + return value + + @validator('dataset_id') + def dataset_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-f0-9]{24}$", value): + raise ValueError(r"must validate the regular expression /^[a-f0-9]{24}$/") + return value + + @validator('task_name') + def task_name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-zA-Z0-9][a-zA-Z0-9 ._-]+$", value): + raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9][a-zA-Z0-9 ._-]+$/") + return value + + @validator('score_type') + def score_type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-zA-Z0-9_+=,.@:\/-]*$", value): + raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9_+=,.@:\/-]*$/") + return value + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + use_enum_values = True + extra = Extra.forbid + + def to_str(self, by_alias: bool = False) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.dict(by_alias=by_alias)) + + def to_json(self, by_alias: bool = False) -> str: + """Returns the JSON representation of the model""" + return json.dumps(self.to_dict(by_alias=by_alias)) + + @classmethod + def from_json(cls, json_str: str) -> ActiveLearningScoreV2Data: + """Create an instance of ActiveLearningScoreV2Data from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, by_alias: bool = False): + """Returns the dictionary representation of the model""" + _dict = self.dict(by_alias=by_alias, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> ActiveLearningScoreV2Data: + """Create an instance of ActiveLearningScoreV2Data from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ActiveLearningScoreV2Data.parse_obj(obj) + + # raise errors for additional fields in the input + for _key in obj.keys(): + if _key not in cls.__properties: + raise ValueError("Error due to additional fields (not defined in ActiveLearningScoreV2Data) in the input: " + str(obj)) + + _obj = ActiveLearningScoreV2Data.parse_obj({ + "id": obj.get("id"), + "dataset_id": obj.get("datasetId"), + "prediction_uuid_timestamp": obj.get("predictionUUIDTimestamp"), + "task_name": obj.get("taskName"), + "score_type": obj.get("scoreType"), + "scores": obj.get("scores"), + "created_at": obj.get("createdAt") + }) + return _obj + diff --git a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_docker.py b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_docker.py index 87322b288..7a66eab2e 100644 --- a/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_docker.py +++ b/lightly/openapi_generated/swagger_client/models/docker_worker_config_v3_docker.py @@ -45,7 +45,8 @@ class DockerWorkerConfigV3Docker(BaseModel): relevant_filenames_file: Optional[StrictStr] = Field(None, alias="relevantFilenamesFile") selected_sequence_length: Optional[conint(strict=True, ge=1)] = Field(None, alias="selectedSequenceLength") upload_report: Optional[StrictBool] = Field(None, alias="uploadReport") - __properties = ["checkpoint", "checkpointRunId", "corruptnessCheck", "datasource", "embeddings", "enableTraining", "training", "normalizeEmbeddings", "numProcesses", "numThreads", "outputImageFormat", "pretagging", "pretaggingUpload", "relevantFilenamesFile", "selectedSequenceLength", "uploadReport"] + shutdown_when_job_finished: Optional[StrictBool] = Field(None, alias="shutdownWhenJobFinished") + __properties = ["checkpoint", "checkpointRunId", "corruptnessCheck", "datasource", "embeddings", "enableTraining", "training", "normalizeEmbeddings", "numProcesses", "numThreads", "outputImageFormat", "pretagging", "pretaggingUpload", "relevantFilenamesFile", "selectedSequenceLength", "uploadReport", "shutdownWhenJobFinished"] @validator('checkpoint_run_id') def checkpoint_run_id_validate_regular_expression(cls, value): @@ -124,7 +125,8 @@ def from_dict(cls, obj: dict) -> DockerWorkerConfigV3Docker: "pretagging_upload": obj.get("pretaggingUpload"), "relevant_filenames_file": obj.get("relevantFilenamesFile"), "selected_sequence_length": obj.get("selectedSequenceLength"), - "upload_report": obj.get("uploadReport") + "upload_report": obj.get("uploadReport"), + "shutdown_when_job_finished": obj.get("shutdownWhenJobFinished") }) return _obj diff --git a/lightly/openapi_generated/swagger_client/models/prediction_singleton_keypoint_detection.py b/lightly/openapi_generated/swagger_client/models/prediction_singleton_keypoint_detection.py index c0def6930..be66eae4a 100644 --- a/lightly/openapi_generated/swagger_client/models/prediction_singleton_keypoint_detection.py +++ b/lightly/openapi_generated/swagger_client/models/prediction_singleton_keypoint_detection.py @@ -28,8 +28,9 @@ class PredictionSingletonKeypointDetection(PredictionSingletonBase): PredictionSingletonKeypointDetection """ keypoints: conlist(Union[confloat(ge=0, strict=True), conint(ge=0, strict=True)], min_items=3) = Field(..., description="[x1, y2, s1, ..., xk, yk, sk] as outlined by https://docs.lightly.ai/docs/prediction-format#keypoint-detection ") + bbox: Optional[conlist(Union[confloat(ge=0, strict=True), conint(ge=0, strict=True)], max_items=4, min_items=4)] = Field(None, description="The bbox of where a prediction task yielded a finding. [x, y, width, height]") probabilities: Optional[conlist(Union[confloat(le=1, ge=0, strict=True), conint(le=1, ge=0, strict=True)])] = Field(None, description="The probabilities of it being a certain category other than the one which was selected. The sum of all probabilities should equal 1.") - __properties = ["type", "taskName", "cropDatasetId", "cropSampleId", "categoryId", "score", "keypoints", "probabilities"] + __properties = ["type", "taskName", "cropDatasetId", "cropSampleId", "categoryId", "score", "keypoints", "bbox", "probabilities"] class Config: """Pydantic configuration""" @@ -81,6 +82,7 @@ def from_dict(cls, obj: dict) -> PredictionSingletonKeypointDetection: "category_id": obj.get("categoryId"), "score": obj.get("score"), "keypoints": obj.get("keypoints"), + "bbox": obj.get("bbox"), "probabilities": obj.get("probabilities") }) return _obj diff --git a/lightly/openapi_generated/swagger_client/models/prediction_singleton_keypoint_detection_all_of.py b/lightly/openapi_generated/swagger_client/models/prediction_singleton_keypoint_detection_all_of.py index abeadb9dc..d5cfa8795 100644 --- a/lightly/openapi_generated/swagger_client/models/prediction_singleton_keypoint_detection_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/prediction_singleton_keypoint_detection_all_of.py @@ -27,8 +27,9 @@ class PredictionSingletonKeypointDetectionAllOf(BaseModel): PredictionSingletonKeypointDetectionAllOf """ keypoints: conlist(Union[confloat(ge=0, strict=True), conint(ge=0, strict=True)], min_items=3) = Field(..., description="[x1, y2, s1, ..., xk, yk, sk] as outlined by https://docs.lightly.ai/docs/prediction-format#keypoint-detection ") + bbox: Optional[conlist(Union[confloat(ge=0, strict=True), conint(ge=0, strict=True)], max_items=4, min_items=4)] = Field(None, description="The bbox of where a prediction task yielded a finding. [x, y, width, height]") probabilities: Optional[conlist(Union[confloat(le=1, ge=0, strict=True), conint(le=1, ge=0, strict=True)])] = Field(None, description="The probabilities of it being a certain category other than the one which was selected. The sum of all probabilities should equal 1.") - __properties = ["keypoints", "probabilities"] + __properties = ["keypoints", "bbox", "probabilities"] class Config: """Pydantic configuration""" @@ -74,6 +75,7 @@ def from_dict(cls, obj: dict) -> PredictionSingletonKeypointDetectionAllOf: _obj = PredictionSingletonKeypointDetectionAllOf.parse_obj({ "keypoints": obj.get("keypoints"), + "bbox": obj.get("bbox"), "probabilities": obj.get("probabilities") }) return _obj diff --git a/lightly/openapi_generated/swagger_client/models/selection_config_entry_strategy.py b/lightly/openapi_generated/swagger_client/models/selection_config_entry_strategy.py index e614c2978..67bf84527 100644 --- a/lightly/openapi_generated/swagger_client/models/selection_config_entry_strategy.py +++ b/lightly/openapi_generated/swagger_client/models/selection_config_entry_strategy.py @@ -20,7 +20,7 @@ from typing import Any, Dict, Optional, Union -from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt, confloat, conint +from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt from lightly.openapi_generated.swagger_client.models.selection_strategy_threshold_operation import SelectionStrategyThresholdOperation from lightly.openapi_generated.swagger_client.models.selection_strategy_type import SelectionStrategyType @@ -29,12 +29,11 @@ class SelectionConfigEntryStrategy(BaseModel): SelectionConfigEntryStrategy """ type: SelectionStrategyType = Field(...) - strength: Optional[Union[confloat(le=1000000000, ge=-1000000000, strict=True), conint(le=1000000000, ge=-1000000000, strict=True)]] = Field(None, description="The relative strength of this strategy compared to other strategies. The default value is 1.0, which is set in the worker for backwards compatibility. The minimum and maximum values of +-10^9 are used to prevent numerical issues. ") stopping_condition_minimum_distance: Optional[Union[StrictFloat, StrictInt]] = None threshold: Optional[Union[StrictFloat, StrictInt]] = None operation: Optional[SelectionStrategyThresholdOperation] = None target: Optional[Dict[str, Any]] = None - __properties = ["type", "strength", "stopping_condition_minimum_distance", "threshold", "operation", "target"] + __properties = ["type", "stopping_condition_minimum_distance", "threshold", "operation", "target"] class Config: """Pydantic configuration""" @@ -80,7 +79,6 @@ def from_dict(cls, obj: dict) -> SelectionConfigEntryStrategy: _obj = SelectionConfigEntryStrategy.parse_obj({ "type": obj.get("type"), - "strength": obj.get("strength"), "stopping_condition_minimum_distance": obj.get("stopping_condition_minimum_distance"), "threshold": obj.get("threshold"), "operation": obj.get("operation"), diff --git a/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry_strategy.py b/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry_strategy.py index d5b39a3dc..0426a1211 100644 --- a/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry_strategy.py +++ b/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry_strategy.py @@ -23,21 +23,22 @@ from pydantic import Extra, BaseModel, Field, StrictFloat, StrictInt, confloat, conint from lightly.openapi_generated.swagger_client.models.selection_config_v3_entry_strategy_all_of_target_range import SelectionConfigV3EntryStrategyAllOfTargetRange from lightly.openapi_generated.swagger_client.models.selection_strategy_threshold_operation import SelectionStrategyThresholdOperation -from lightly.openapi_generated.swagger_client.models.selection_strategy_type import SelectionStrategyType +from lightly.openapi_generated.swagger_client.models.selection_strategy_type_v3 import SelectionStrategyTypeV3 class SelectionConfigV3EntryStrategy(BaseModel): """ SelectionConfigV3EntryStrategy """ - type: SelectionStrategyType = Field(...) - strength: Optional[Union[confloat(le=1000000000, ge=-1000000000, strict=True), conint(le=1000000000, ge=-1000000000, strict=True)]] = Field(None, description="The relative strength of this strategy compared to other strategies. The default value is 1.0, which is set in the worker for backwards compatibility. The minimum and maximum values of +-10^9 are used to prevent numerical issues. ") + type: SelectionStrategyTypeV3 = Field(...) stopping_condition_minimum_distance: Optional[Union[StrictFloat, StrictInt]] = None threshold: Optional[Union[StrictFloat, StrictInt]] = None operation: Optional[SelectionStrategyThresholdOperation] = None target: Optional[Dict[str, Any]] = None + stopping_condition_minimum_typicality: Optional[Union[confloat(gt=0, strict=True), conint(gt=0, strict=True)]] = Field(None, alias="stoppingConditionMinimumTypicality", description="It is the minimal allowed typicality of the selected samples. When the typicality of the selected samples reaches this, the selection stops. It should be a number between 0 and 1. ") + strength: Optional[Union[confloat(le=1000000000, ge=-1000000000, strict=True), conint(le=1000000000, ge=-1000000000, strict=True)]] = Field(None, description="The relative strength of this strategy compared to other strategies. The default value is 1.0, which is set in the worker for backwards compatibility. The minimum and maximum values of +-10^9 are used to prevent numerical issues. ") stopping_condition_max_sum: Optional[Union[confloat(ge=0.0, strict=True), conint(ge=0, strict=True)]] = Field(None, alias="stoppingConditionMaxSum", description="When the sum of inputs reaches this, the selection stops. Only compatible with the WEIGHTS strategy. Similar to the stopping_condition_minimum_distance for the DIVERSITY strategy. ") target_range: Optional[SelectionConfigV3EntryStrategyAllOfTargetRange] = Field(None, alias="targetRange") - __properties = ["type", "strength", "stopping_condition_minimum_distance", "threshold", "operation", "target", "stoppingConditionMaxSum", "targetRange"] + __properties = ["type", "stopping_condition_minimum_distance", "threshold", "operation", "target", "stoppingConditionMinimumTypicality", "strength", "stoppingConditionMaxSum", "targetRange"] class Config: """Pydantic configuration""" @@ -86,11 +87,12 @@ def from_dict(cls, obj: dict) -> SelectionConfigV3EntryStrategy: _obj = SelectionConfigV3EntryStrategy.parse_obj({ "type": obj.get("type"), - "strength": obj.get("strength"), "stopping_condition_minimum_distance": obj.get("stopping_condition_minimum_distance"), "threshold": obj.get("threshold"), "operation": obj.get("operation"), "target": obj.get("target"), + "stopping_condition_minimum_typicality": obj.get("stoppingConditionMinimumTypicality"), + "strength": obj.get("strength"), "stopping_condition_max_sum": obj.get("stoppingConditionMaxSum"), "target_range": SelectionConfigV3EntryStrategyAllOfTargetRange.from_dict(obj.get("targetRange")) if obj.get("targetRange") is not None else None }) diff --git a/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry_strategy_all_of.py b/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry_strategy_all_of.py index 2aa0f01cb..e64feff7e 100644 --- a/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry_strategy_all_of.py +++ b/lightly/openapi_generated/swagger_client/models/selection_config_v3_entry_strategy_all_of.py @@ -22,14 +22,18 @@ from typing import Optional, Union from pydantic import Extra, BaseModel, Field, confloat, conint from lightly.openapi_generated.swagger_client.models.selection_config_v3_entry_strategy_all_of_target_range import SelectionConfigV3EntryStrategyAllOfTargetRange +from lightly.openapi_generated.swagger_client.models.selection_strategy_type_v3 import SelectionStrategyTypeV3 class SelectionConfigV3EntryStrategyAllOf(BaseModel): """ SelectionConfigV3EntryStrategyAllOf """ + type: SelectionStrategyTypeV3 = Field(...) + stopping_condition_minimum_typicality: Optional[Union[confloat(gt=0, strict=True), conint(gt=0, strict=True)]] = Field(None, alias="stoppingConditionMinimumTypicality", description="It is the minimal allowed typicality of the selected samples. When the typicality of the selected samples reaches this, the selection stops. It should be a number between 0 and 1. ") + strength: Optional[Union[confloat(le=1000000000, ge=-1000000000, strict=True), conint(le=1000000000, ge=-1000000000, strict=True)]] = Field(None, description="The relative strength of this strategy compared to other strategies. The default value is 1.0, which is set in the worker for backwards compatibility. The minimum and maximum values of +-10^9 are used to prevent numerical issues. ") stopping_condition_max_sum: Optional[Union[confloat(ge=0.0, strict=True), conint(ge=0, strict=True)]] = Field(None, alias="stoppingConditionMaxSum", description="When the sum of inputs reaches this, the selection stops. Only compatible with the WEIGHTS strategy. Similar to the stopping_condition_minimum_distance for the DIVERSITY strategy. ") target_range: Optional[SelectionConfigV3EntryStrategyAllOfTargetRange] = Field(None, alias="targetRange") - __properties = ["stoppingConditionMaxSum", "targetRange"] + __properties = ["type", "stoppingConditionMinimumTypicality", "strength", "stoppingConditionMaxSum", "targetRange"] class Config: """Pydantic configuration""" @@ -77,6 +81,9 @@ def from_dict(cls, obj: dict) -> SelectionConfigV3EntryStrategyAllOf: raise ValueError("Error due to additional fields (not defined in SelectionConfigV3EntryStrategyAllOf) in the input: " + str(obj)) _obj = SelectionConfigV3EntryStrategyAllOf.parse_obj({ + "type": obj.get("type"), + "stopping_condition_minimum_typicality": obj.get("stoppingConditionMinimumTypicality"), + "strength": obj.get("strength"), "stopping_condition_max_sum": obj.get("stoppingConditionMaxSum"), "target_range": SelectionConfigV3EntryStrategyAllOfTargetRange.from_dict(obj.get("targetRange")) if obj.get("targetRange") is not None else None }) diff --git a/lightly/openapi_generated/swagger_client/models/selection_strategy_type_v3.py b/lightly/openapi_generated/swagger_client/models/selection_strategy_type_v3.py new file mode 100644 index 000000000..4d1984560 --- /dev/null +++ b/lightly/openapi_generated/swagger_client/models/selection_strategy_type_v3.py @@ -0,0 +1,46 @@ +# coding: utf-8 + +""" + Lightly API + + Lightly.ai enables you to do self-supervised learning in an easy and intuitive way. The lightly.ai OpenAPI spec defines how one can interact with our REST API to unleash the full potential of lightly.ai # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Contact: support@lightly.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" + + +import json +import pprint +import re # noqa: F401 +from enum import Enum +from aenum import no_arg # type: ignore + + + + + +class SelectionStrategyTypeV3(str, Enum): + """ + SelectionStrategyTypeV3 + """ + + """ + allowed enum values + """ + DIVERSITY = 'DIVERSITY' + WEIGHTS = 'WEIGHTS' + THRESHOLD = 'THRESHOLD' + BALANCE = 'BALANCE' + SIMILARITY = 'SIMILARITY' + TYPICALITY = 'TYPICALITY' + + @classmethod + def from_json(cls, json_str: str) -> 'SelectionStrategyTypeV3': + """Create an instance of SelectionStrategyTypeV3 from a JSON string""" + return SelectionStrategyTypeV3(json.loads(json_str)) + +