nextmv 0.35.0__py3-none-any.whl → 0.35.0.dev1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
nextmv/__about__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "v0.35.0"
1
+ __version__ = "v0.35.0.dev1"
nextmv/__init__.py CHANGED
@@ -19,7 +19,6 @@ from .logger import reset_stdout as reset_stdout
19
19
  from .manifest import MANIFEST_FILE_NAME as MANIFEST_FILE_NAME
20
20
  from .manifest import Manifest as Manifest
21
21
  from .manifest import ManifestBuild as ManifestBuild
22
- from .manifest import ManifestExecution as ManifestExecution
23
22
  from .manifest import ManifestOption as ManifestOption
24
23
  from .manifest import ManifestPython as ManifestPython
25
24
  from .manifest import ManifestPythonArch as ManifestPythonArch
nextmv/_serialization.py CHANGED
@@ -1,9 +1,9 @@
1
1
  import datetime
2
2
  import json
3
- from typing import Any
3
+ from typing import Any, Union
4
4
 
5
5
 
6
- def deflated_serialize_json(obj: dict | list, json_configurations: dict[str, Any] = None) -> str:
6
+ def deflated_serialize_json(obj: Union[dict, list], json_configurations: dict[str, Any] = None) -> str:
7
7
  """
8
8
  Serialize a Python object (dict or list) to a JSON string with default configuration for a deflated format.
9
9
 
@@ -35,7 +35,7 @@ def deflated_serialize_json(obj: dict | list, json_configurations: dict[str, Any
35
35
  )
36
36
 
37
37
 
38
- def serialize_json(obj: dict | list, json_configurations: dict[str, Any] = None) -> str:
38
+ def serialize_json(obj: Union[dict, list], json_configurations: dict[str, Any] = None) -> str:
39
39
  """
40
40
  Serialize a Python object (dict or list) to a JSON string.
41
41
 
nextmv/base_model.py CHANGED
@@ -18,7 +18,7 @@ from_dict:
18
18
  """
19
19
 
20
20
  from importlib import import_module
21
- from typing import Any
21
+ from typing import Any, Optional
22
22
 
23
23
  from pydantic import BaseModel as PydanticBaseModel
24
24
 
@@ -32,7 +32,7 @@ class BaseModel(PydanticBaseModel):
32
32
  """
33
33
 
34
34
  @classmethod
35
- def from_dict(cls, data: dict[str, Any] | None = None):
35
+ def from_dict(cls, data: Optional[dict[str, Any]] = None):
36
36
  """
37
37
  Instantiate the class from a dictionary.
38
38
 
@@ -43,6 +43,7 @@ AcceptanceTest : BaseModel
43
43
 
44
44
  from datetime import datetime
45
45
  from enum import Enum
46
+ from typing import Optional
46
47
 
47
48
  from nextmv.base_model import BaseModel
48
49
  from nextmv.cloud.batch_experiment import ExperimentStatus
@@ -860,9 +861,9 @@ class AcceptanceTestResults(BaseModel):
860
861
 
861
862
  passed: bool
862
863
  """Whether the acceptance test passed (or not)."""
863
- metric_results: list[MetricResult] | None = None
864
+ metric_results: Optional[list[MetricResult]] = None
864
865
  """Results of the metrics."""
865
- error: str | None = None
866
+ error: Optional[str] = None
866
867
  """Error message if the acceptance test failed."""
867
868
 
868
869
 
@@ -956,7 +957,7 @@ class AcceptanceTest(BaseModel):
956
957
  """Creation date of the acceptance test."""
957
958
  updated_at: datetime
958
959
  """Last update date of the acceptance test."""
959
- status: ExperimentStatus | None = ExperimentStatus.UNKNOWN
960
+ status: Optional[ExperimentStatus] = ExperimentStatus.UNKNOWN
960
961
  """Status of the acceptance test."""
961
- results: AcceptanceTestResults | None = None
962
+ results: Optional[AcceptanceTestResults] = None
962
963
  """Results of the acceptance test."""
@@ -29,7 +29,7 @@ import tarfile
29
29
  import tempfile
30
30
  from dataclasses import dataclass
31
31
  from datetime import datetime
32
- from typing import Any
32
+ from typing import Any, Optional, Union
33
33
 
34
34
  import requests
35
35
 
@@ -148,9 +148,9 @@ class Application:
148
148
  cls,
149
149
  client: Client,
150
150
  name: str,
151
- id: str | None = None,
152
- description: str | None = None,
153
- is_workflow: bool | None = None,
151
+ id: Optional[str] = None,
152
+ description: Optional[str] = None,
153
+ is_workflow: Optional[bool] = None,
154
154
  exist_ok: bool = False,
155
155
  ) -> "Application":
156
156
  """
@@ -1063,10 +1063,10 @@ class Application:
1063
1063
  candidate_instance_id: str,
1064
1064
  baseline_instance_id: str,
1065
1065
  id: str,
1066
- metrics: list[Metric | dict[str, Any]],
1066
+ metrics: list[Union[Metric, dict[str, Any]]],
1067
1067
  name: str,
1068
- input_set_id: str | None = None,
1069
- description: str | None = None,
1068
+ input_set_id: Optional[str] = None,
1069
+ description: Optional[str] = None,
1070
1070
  ) -> AcceptanceTest:
1071
1071
  """
1072
1072
  Create a new acceptance test.
@@ -1180,10 +1180,10 @@ class Application:
1180
1180
  candidate_instance_id: str,
1181
1181
  baseline_instance_id: str,
1182
1182
  id: str,
1183
- metrics: list[Metric | dict[str, Any]],
1183
+ metrics: list[Union[Metric, dict[str, Any]]],
1184
1184
  name: str,
1185
- input_set_id: str | None = None,
1186
- description: str | None = None,
1185
+ input_set_id: Optional[str] = None,
1186
+ description: Optional[str] = None,
1187
1187
  polling_options: PollingOptions = DEFAULT_POLLING_OPTIONS,
1188
1188
  ) -> AcceptanceTest:
1189
1189
  """
@@ -1260,13 +1260,13 @@ class Application:
1260
1260
  def new_batch_experiment(
1261
1261
  self,
1262
1262
  name: str,
1263
- input_set_id: str | None = None,
1264
- instance_ids: list[str] | None = None,
1265
- description: str | None = None,
1266
- id: str | None = None,
1267
- option_sets: dict[str, dict[str, str]] | None = None,
1268
- runs: list[BatchExperimentRun | dict[str, Any]] | None = None,
1269
- type: str | None = "batch",
1263
+ input_set_id: Optional[str] = None,
1264
+ instance_ids: Optional[list[str]] = None,
1265
+ description: Optional[str] = None,
1266
+ id: Optional[str] = None,
1267
+ option_sets: Optional[dict[str, dict[str, str]]] = None,
1268
+ runs: Optional[list[Union[BatchExperimentRun, dict[str, Any]]]] = None,
1269
+ type: Optional[str] = "batch",
1270
1270
  ) -> str:
1271
1271
  """
1272
1272
  Create a new batch experiment.
@@ -1341,13 +1341,13 @@ class Application:
1341
1341
  def new_batch_experiment_with_result(
1342
1342
  self,
1343
1343
  name: str,
1344
- input_set_id: str | None = None,
1345
- instance_ids: list[str] | None = None,
1346
- description: str | None = None,
1347
- id: str | None = None,
1348
- option_sets: dict[str, dict[str, str]] | None = None,
1349
- runs: list[BatchExperimentRun | dict[str, Any]] | None = None,
1350
- type: str | None = "batch",
1344
+ input_set_id: Optional[str] = None,
1345
+ instance_ids: Optional[list[str]] = None,
1346
+ description: Optional[str] = None,
1347
+ id: Optional[str] = None,
1348
+ option_sets: Optional[dict[str, dict[str, str]]] = None,
1349
+ runs: Optional[list[Union[BatchExperimentRun, dict[str, Any]]]] = None,
1350
+ type: Optional[str] = "batch",
1351
1351
  polling_options: PollingOptions = DEFAULT_POLLING_OPTIONS,
1352
1352
  ) -> BatchExperiment:
1353
1353
  """
@@ -1413,8 +1413,8 @@ class Application:
1413
1413
  id: str,
1414
1414
  run_groups: list[RunGroup],
1415
1415
  rules: list[EvaluationRule],
1416
- name: str | None = None,
1417
- description: str | None = None,
1416
+ name: Optional[str] = None,
1417
+ description: Optional[str] = None,
1418
1418
  ) -> EnsembleDefinition:
1419
1419
  """
1420
1420
  Create a new ensemble definition.
@@ -1459,13 +1459,13 @@ class Application:
1459
1459
  self,
1460
1460
  id: str,
1461
1461
  name: str,
1462
- description: str | None = None,
1463
- end_time: datetime | None = None,
1464
- instance_id: str | None = None,
1465
- maximum_runs: int | None = None,
1466
- run_ids: list[str] | None = None,
1467
- start_time: datetime | None = None,
1468
- inputs: list[ManagedInput] | None = None,
1462
+ description: Optional[str] = None,
1463
+ end_time: Optional[datetime] = None,
1464
+ instance_id: Optional[str] = None,
1465
+ maximum_runs: Optional[int] = None,
1466
+ run_ids: Optional[list[str]] = None,
1467
+ start_time: Optional[datetime] = None,
1468
+ inputs: Optional[list[ManagedInput]] = None,
1469
1469
  ) -> InputSet:
1470
1470
  """
1471
1471
  Create a new input set. You can create an input set from three
@@ -1553,8 +1553,8 @@ class Application:
1553
1553
  version_id: str,
1554
1554
  id: str,
1555
1555
  name: str,
1556
- description: str | None = None,
1557
- configuration: InstanceConfiguration | None = None,
1556
+ description: Optional[str] = None,
1557
+ configuration: Optional[InstanceConfiguration] = None,
1558
1558
  exist_ok: bool = False,
1559
1559
  ) -> Instance:
1560
1560
  """
@@ -1636,10 +1636,10 @@ class Application:
1636
1636
  self,
1637
1637
  id: str,
1638
1638
  name: str,
1639
- description: str | None = None,
1640
- upload_id: str | None = None,
1641
- run_id: str | None = None,
1642
- format: Format | dict[str, Any] | None = None,
1639
+ description: Optional[str] = None,
1640
+ upload_id: Optional[str] = None,
1641
+ run_id: Optional[str] = None,
1642
+ format: Optional[Union[Format, dict[str, Any]]] = None,
1643
1643
  ) -> ManagedInput:
1644
1644
  """
1645
1645
  Create a new managed input. There are two methods for creating a
@@ -1715,17 +1715,17 @@ class Application:
1715
1715
 
1716
1716
  def new_run( # noqa: C901 # Refactor this function at some point.
1717
1717
  self,
1718
- input: Input | dict[str, Any] | BaseModel | str = None,
1719
- instance_id: str | None = None,
1720
- name: str | None = None,
1721
- description: str | None = None,
1722
- upload_id: str | None = None,
1723
- options: Options | dict[str, str] | None = None,
1724
- configuration: RunConfiguration | dict[str, Any] | None = None,
1725
- batch_experiment_id: str | None = None,
1726
- external_result: ExternalRunResult | dict[str, Any] | None = None,
1727
- json_configurations: dict[str, Any] | None = None,
1728
- input_dir_path: str | None = None,
1718
+ input: Union[Input, dict[str, Any], BaseModel, str] = None,
1719
+ instance_id: Optional[str] = None,
1720
+ name: Optional[str] = None,
1721
+ description: Optional[str] = None,
1722
+ upload_id: Optional[str] = None,
1723
+ options: Optional[Union[Options, dict[str, str]]] = None,
1724
+ configuration: Optional[Union[RunConfiguration, dict[str, Any]]] = None,
1725
+ batch_experiment_id: Optional[str] = None,
1726
+ external_result: Optional[Union[ExternalRunResult, dict[str, Any]]] = None,
1727
+ json_configurations: Optional[dict[str, Any]] = None,
1728
+ input_dir_path: Optional[str] = None,
1729
1729
  ) -> str:
1730
1730
  """
1731
1731
  Submit an input to start a new run of the application. Returns the
@@ -1893,19 +1893,19 @@ class Application:
1893
1893
 
1894
1894
  def new_run_with_result(
1895
1895
  self,
1896
- input: Input | dict[str, Any] | BaseModel | str = None,
1897
- instance_id: str | None = None,
1898
- name: str | None = None,
1899
- description: str | None = None,
1900
- upload_id: str | None = None,
1901
- run_options: Options | dict[str, str] | None = None,
1896
+ input: Union[Input, dict[str, Any], BaseModel, str] = None,
1897
+ instance_id: Optional[str] = None,
1898
+ name: Optional[str] = None,
1899
+ description: Optional[str] = None,
1900
+ upload_id: Optional[str] = None,
1901
+ run_options: Optional[Union[Options, dict[str, str]]] = None,
1902
1902
  polling_options: PollingOptions = DEFAULT_POLLING_OPTIONS,
1903
- configuration: RunConfiguration | dict[str, Any] | None = None,
1904
- batch_experiment_id: str | None = None,
1905
- external_result: ExternalRunResult | dict[str, Any] | None = None,
1906
- json_configurations: dict[str, Any] | None = None,
1907
- input_dir_path: str | None = None,
1908
- output_dir_path: str | None = ".",
1903
+ configuration: Optional[Union[RunConfiguration, dict[str, Any]]] = None,
1904
+ batch_experiment_id: Optional[str] = None,
1905
+ external_result: Optional[Union[ExternalRunResult, dict[str, Any]]] = None,
1906
+ json_configurations: Optional[dict[str, Any]] = None,
1907
+ input_dir_path: Optional[str] = None,
1908
+ output_dir_path: Optional[str] = ".",
1909
1909
  ) -> RunResult:
1910
1910
  """
1911
1911
  Submit an input to start a new run of the application and poll for the
@@ -2045,8 +2045,8 @@ class Application:
2045
2045
  id: str,
2046
2046
  name: str,
2047
2047
  scenarios: list[Scenario],
2048
- description: str | None = None,
2049
- repetitions: int | None = 0,
2048
+ description: Optional[str] = None,
2049
+ repetitions: Optional[int] = 0,
2050
2050
  ) -> str:
2051
2051
  """
2052
2052
  Create a new scenario test. The test is based on `scenarios` and you
@@ -2166,8 +2166,8 @@ class Application:
2166
2166
  id: str,
2167
2167
  name: str,
2168
2168
  scenarios: list[Scenario],
2169
- description: str | None = None,
2170
- repetitions: int | None = 0,
2169
+ description: Optional[str] = None,
2170
+ repetitions: Optional[int] = 0,
2171
2171
  polling_options: PollingOptions = DEFAULT_POLLING_OPTIONS,
2172
2172
  ) -> BatchExperiment:
2173
2173
  """
@@ -2229,7 +2229,7 @@ class Application:
2229
2229
  secrets: list[Secret],
2230
2230
  id: str,
2231
2231
  name: str,
2232
- description: str | None = None,
2232
+ description: Optional[str] = None,
2233
2233
  ) -> SecretsCollectionSummary:
2234
2234
  """
2235
2235
  Create a new secrets collection.
@@ -2313,9 +2313,9 @@ class Application:
2313
2313
 
2314
2314
  def new_version(
2315
2315
  self,
2316
- id: str | None = None,
2317
- name: str | None = None,
2318
- description: str | None = None,
2316
+ id: Optional[str] = None,
2317
+ name: Optional[str] = None,
2318
+ description: Optional[str] = None,
2319
2319
  exist_ok: bool = False,
2320
2320
  ) -> Version:
2321
2321
  """
@@ -2397,11 +2397,11 @@ class Application:
2397
2397
 
2398
2398
  def push(
2399
2399
  self,
2400
- manifest: Manifest | None = None,
2401
- app_dir: str | None = None,
2400
+ manifest: Optional[Manifest] = None,
2401
+ app_dir: Optional[str] = None,
2402
2402
  verbose: bool = False,
2403
- model: Model | None = None,
2404
- model_configuration: ModelConfiguration | None = None,
2403
+ model: Optional[Model] = None,
2404
+ model_configuration: Optional[ModelConfiguration] = None,
2405
2405
  ) -> None:
2406
2406
  """
2407
2407
  Push an app to Nextmv Cloud.
@@ -2664,7 +2664,7 @@ class Application:
2664
2664
  )
2665
2665
  return RunLog.from_dict(response.json())
2666
2666
 
2667
- def run_result(self, run_id: str, output_dir_path: str | None = ".") -> RunResult:
2667
+ def run_result(self, run_id: str, output_dir_path: Optional[str] = ".") -> RunResult:
2668
2668
  """
2669
2669
  Get the result of a run.
2670
2670
 
@@ -2708,7 +2708,7 @@ class Application:
2708
2708
  self,
2709
2709
  run_id: str,
2710
2710
  polling_options: PollingOptions = DEFAULT_POLLING_OPTIONS,
2711
- output_dir_path: str | None = ".",
2711
+ output_dir_path: Optional[str] = ".",
2712
2712
  ) -> RunResult:
2713
2713
  """
2714
2714
  Get the result of a run with polling.
@@ -2887,8 +2887,8 @@ class Application:
2887
2887
  def track_run( # noqa: C901
2888
2888
  self,
2889
2889
  tracked_run: TrackedRun,
2890
- instance_id: str | None = None,
2891
- configuration: RunConfiguration | dict[str, Any] | None = None,
2890
+ instance_id: Optional[str] = None,
2891
+ configuration: Optional[Union[RunConfiguration, dict[str, Any]]] = None,
2892
2892
  ) -> str:
2893
2893
  """
2894
2894
  Track an external run.
@@ -3058,9 +3058,9 @@ class Application:
3058
3058
  self,
3059
3059
  tracked_run: TrackedRun,
3060
3060
  polling_options: PollingOptions = DEFAULT_POLLING_OPTIONS,
3061
- instance_id: str | None = None,
3062
- output_dir_path: str | None = ".",
3063
- configuration: RunConfiguration | dict[str, Any] | None = None,
3061
+ instance_id: Optional[str] = None,
3062
+ output_dir_path: Optional[str] = ".",
3063
+ configuration: Optional[Union[RunConfiguration, dict[str, Any]]] = None,
3064
3064
  ) -> RunResult:
3065
3065
  """
3066
3066
  Track an external run and poll for the result. This is a convenience
@@ -3120,8 +3120,8 @@ class Application:
3120
3120
  def update_batch_experiment(
3121
3121
  self,
3122
3122
  batch_experiment_id: str,
3123
- name: str | None = None,
3124
- description: str | None = None,
3123
+ name: Optional[str] = None,
3124
+ description: Optional[str] = None,
3125
3125
  ) -> BatchExperimentInformation:
3126
3126
  """
3127
3127
  Update a batch experiment.
@@ -3164,8 +3164,8 @@ class Application:
3164
3164
  def update_ensemble_definition(
3165
3165
  self,
3166
3166
  id: str,
3167
- name: str | None = None,
3168
- description: str | None = None,
3167
+ name: Optional[str] = None,
3168
+ description: Optional[str] = None,
3169
3169
  ) -> EnsembleDefinition:
3170
3170
  """
3171
3171
  Update an ensemble definition.
@@ -3212,10 +3212,10 @@ class Application:
3212
3212
  def update_instance(
3213
3213
  self,
3214
3214
  id: str,
3215
- name: str | None = None,
3216
- version_id: str | None = None,
3217
- description: str | None = None,
3218
- configuration: InstanceConfiguration | None = None,
3215
+ name: Optional[str] = None,
3216
+ version_id: Optional[str] = None,
3217
+ description: Optional[str] = None,
3218
+ configuration: Optional[InstanceConfiguration] = None,
3219
3219
  ) -> Instance:
3220
3220
  """
3221
3221
  Update an instance.
@@ -3275,8 +3275,8 @@ class Application:
3275
3275
  def update_managed_input(
3276
3276
  self,
3277
3277
  managed_input_id: str,
3278
- name: str | None = None,
3279
- description: str | None = None,
3278
+ name: Optional[str] = None,
3279
+ description: Optional[str] = None,
3280
3280
  ) -> ManagedInput:
3281
3281
  """
3282
3282
  Update a managed input.
@@ -3325,8 +3325,8 @@ class Application:
3325
3325
  def update_scenario_test(
3326
3326
  self,
3327
3327
  scenario_test_id: str,
3328
- name: str | None = None,
3329
- description: str | None = None,
3328
+ name: Optional[str] = None,
3329
+ description: Optional[str] = None,
3330
3330
  ) -> BatchExperimentInformation:
3331
3331
  """
3332
3332
  Update a scenario test.
@@ -3374,9 +3374,9 @@ class Application:
3374
3374
  def update_secrets_collection(
3375
3375
  self,
3376
3376
  secrets_collection_id: str,
3377
- name: str | None = None,
3378
- description: str | None = None,
3379
- secrets: list[Secret] | None = None,
3377
+ name: Optional[str] = None,
3378
+ description: Optional[str] = None,
3379
+ secrets: Optional[list[Secret]] = None,
3380
3380
  ) -> SecretsCollectionSummary:
3381
3381
  """
3382
3382
  Update a secrets collection.
@@ -3453,10 +3453,10 @@ class Application:
3453
3453
 
3454
3454
  def upload_large_input(
3455
3455
  self,
3456
- input: dict[str, Any] | str | None,
3456
+ input: Optional[Union[dict[str, Any], str]],
3457
3457
  upload_url: UploadURL,
3458
- json_configurations: dict[str, Any] | None = None,
3459
- tar_file: str | None = None,
3458
+ json_configurations: Optional[dict[str, Any]] = None,
3459
+ tar_file: Optional[str] = None,
3460
3460
  ) -> None:
3461
3461
  """
3462
3462
  Upload large input data to the provided upload URL.
@@ -3676,7 +3676,7 @@ class Application:
3676
3676
  self,
3677
3677
  run_id: str,
3678
3678
  run_information: RunInformation,
3679
- output_dir_path: str | None = ".",
3679
+ output_dir_path: Optional[str] = ".",
3680
3680
  ) -> RunResult:
3681
3681
  """
3682
3682
  Get the result of a run.
@@ -3764,7 +3764,7 @@ class Application:
3764
3764
  return result
3765
3765
 
3766
3766
  @staticmethod
3767
- def __convert_manifest_to_payload(manifest: Manifest) -> dict[str, Any]: # noqa: C901
3767
+ def __convert_manifest_to_payload(manifest: Manifest) -> dict[str, Any]:
3768
3768
  """Converts a manifest to a payload dictionary for the API."""
3769
3769
 
3770
3770
  activation_request = {
@@ -3802,13 +3802,6 @@ class Application:
3802
3802
  "template": options["format"],
3803
3803
  }
3804
3804
  activation_request["requirements"]["options"] = options
3805
-
3806
- if manifest.execution is not None:
3807
- if manifest.execution.entrypoint:
3808
- activation_request["requirements"]["entrypoint"] = manifest.execution.entrypoint
3809
- if manifest.execution.cwd:
3810
- activation_request["requirements"]["working_directory"] = manifest.execution.cwd
3811
-
3812
3805
  return activation_request
3813
3806
 
3814
3807
  def __update_app_binary(
@@ -3950,7 +3943,7 @@ class Application:
3950
3943
  upload_id_used: bool,
3951
3944
  input_size: int,
3952
3945
  tar_file: str,
3953
- input: Input | dict[str, Any] | BaseModel | str = None,
3946
+ input: Union[Input, dict[str, Any], BaseModel, str] = None,
3954
3947
  ) -> bool:
3955
3948
  """
3956
3949
  Auxiliary function to determine if an upload URL is required
@@ -3974,8 +3967,8 @@ class Application:
3974
3967
 
3975
3968
  def __extract_input_data(
3976
3969
  self,
3977
- input: Input | dict[str, Any] | BaseModel | str = None,
3978
- ) -> dict[str, Any] | str | None:
3970
+ input: Union[Input, dict[str, Any], BaseModel, str] = None,
3971
+ ) -> Optional[Union[dict[str, Any], str]]:
3979
3972
  """
3980
3973
  Auxiliary function to extract the input data from the input, based on
3981
3974
  its type.
@@ -3993,8 +3986,8 @@ class Application:
3993
3986
 
3994
3987
  def __extract_options_dict(
3995
3988
  self,
3996
- options: Options | dict[str, str] | None = None,
3997
- json_configurations: dict[str, Any] | None = None,
3989
+ options: Optional[Union[Options, dict[str, str]]] = None,
3990
+ json_configurations: Optional[dict[str, Any]] = None,
3998
3991
  ) -> dict[str, str]:
3999
3992
  """
4000
3993
  Auxiliary function to extract the options that will be sent to the
@@ -4018,9 +4011,9 @@ class Application:
4018
4011
 
4019
4012
  def __extract_run_config(
4020
4013
  self,
4021
- input: Input | dict[str, Any] | BaseModel | str = None,
4022
- configuration: RunConfiguration | dict[str, Any] | None = None,
4023
- dir_path: str | None = None,
4014
+ input: Union[Input, dict[str, Any], BaseModel, str] = None,
4015
+ configuration: Optional[Union[RunConfiguration, dict[str, Any]]] = None,
4016
+ dir_path: Optional[str] = None,
4024
4017
  ) -> dict[str, Any]:
4025
4018
  """
4026
4019
  Auxiliary function to extract the run configuration that will be sent
@@ -17,7 +17,7 @@ BatchExperimentMetadata
17
17
 
18
18
  from datetime import datetime
19
19
  from enum import Enum
20
- from typing import Any
20
+ from typing import Any, Optional
21
21
 
22
22
  from nextmv.base_model import BaseModel
23
23
  from nextmv.cloud.input_set import InputSet
@@ -156,19 +156,19 @@ class BatchExperimentInformation(BaseModel):
156
156
  updated_at: datetime
157
157
  """Last update date of the batch experiment."""
158
158
 
159
- status: ExperimentStatus | None = None
159
+ status: Optional[ExperimentStatus] = None
160
160
  """Status of the batch experiment."""
161
- description: str | None = None
161
+ description: Optional[str] = None
162
162
  """Description of the batch experiment."""
163
- number_of_requested_runs: int | None = None
163
+ number_of_requested_runs: Optional[int] = None
164
164
  """Number of runs requested for the batch experiment."""
165
- number_of_runs: int | None = None
165
+ number_of_runs: Optional[int] = None
166
166
  """Number of runs in the batch experiment."""
167
- number_of_completed_runs: int | None = None
167
+ number_of_completed_runs: Optional[int] = None
168
168
  """Number of completed runs in the batch experiment."""
169
- type: str | None = None
169
+ type: Optional[str] = None
170
170
  """Type of the batch experiment."""
171
- option_sets: dict[str, dict[str, str]] | None = None
171
+ option_sets: Optional[dict[str, dict[str, str]]] = None
172
172
  """Option sets used for the experiment."""
173
173
 
174
174
 
@@ -202,9 +202,9 @@ class BatchExperiment(BatchExperimentInformation):
202
202
  """ID of the input set used for the experiment."""
203
203
  instance_ids: list[str]
204
204
  """List of instance IDs used for the experiment."""
205
- grouped_distributional_summaries: list[dict[str, Any]] | None = None
205
+ grouped_distributional_summaries: Optional[list[dict[str, Any]]] = None
206
206
  """Grouped distributional summaries of the batch experiment."""
207
- runs: list[Run] | None = None
207
+ runs: Optional[list[Run]] = None
208
208
  """List of runs in the batch experiment."""
209
209
 
210
210
 
@@ -244,17 +244,17 @@ class BatchExperimentRun(BaseModel):
244
244
  input_id: str
245
245
  """ID of the input used for the experiment."""
246
246
 
247
- option_set: str | None = None
247
+ option_set: Optional[str] = None
248
248
  """Option set used for the experiment."""
249
- instance_id: str | None = None
249
+ instance_id: Optional[str] = None
250
250
  """ID of the instance used for the experiment."""
251
- version_id: str | None = None
251
+ version_id: Optional[str] = None
252
252
  """ID of the version used for the experiment."""
253
- input_set_id: str | None = None
253
+ input_set_id: Optional[str] = None
254
254
  """ID of the input set used for the experiment."""
255
- scenario_id: str | None = None
255
+ scenario_id: Optional[str] = None
256
256
  """If the batch experiment is a scenario test, this is the ID of that test."""
257
- repetition: int | None = None
257
+ repetition: Optional[int] = None
258
258
  """Repetition number of the experiment."""
259
259
 
260
260
  def __post_init_post_parse__(self):
@@ -290,7 +290,7 @@ class BatchExperimentMetadata(BatchExperimentInformation):
290
290
  ID of the application used for the batch experiment. Defaults to None.
291
291
  """
292
292
 
293
- app_id: str | None = None
293
+ app_id: Optional[str] = None
294
294
  """ID of the application used for the batch experiment."""
295
295
 
296
296