nextmv 0.31.0__py3-none-any.whl → 0.33.0.dev0__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 +1 -1
- nextmv/__init__.py +4 -9
- nextmv/cloud/__init__.py +7 -0
- nextmv/cloud/acceptance_test.py +60 -6
- nextmv/cloud/application.py +274 -49
- nextmv/cloud/batch_experiment.py +7 -1
- nextmv/cloud/ensemble.py +248 -0
- nextmv/default_app/README.md +17 -2
- nextmv/default_app/app.yaml +1 -2
- nextmv/default_app/input.json +5 -0
- nextmv/default_app/main.py +37 -0
- nextmv/input.py +2 -8
- nextmv/local/application.py +250 -224
- nextmv/local/executor.py +9 -13
- nextmv/local/local.py +97 -0
- nextmv/local/runner.py +3 -41
- nextmv/output.py +6 -26
- nextmv/run.py +476 -108
- {nextmv-0.31.0.dist-info → nextmv-0.33.0.dev0.dist-info}/METADATA +1 -1
- {nextmv-0.31.0.dist-info → nextmv-0.33.0.dev0.dist-info}/RECORD +22 -18
- {nextmv-0.31.0.dist-info → nextmv-0.33.0.dev0.dist-info}/WHEEL +0 -0
- {nextmv-0.31.0.dist-info → nextmv-0.33.0.dev0.dist-info}/licenses/LICENSE +0 -0
nextmv/run.py
CHANGED
|
@@ -47,7 +47,7 @@ from datetime import datetime
|
|
|
47
47
|
from enum import Enum
|
|
48
48
|
from typing import Any, Optional, Union
|
|
49
49
|
|
|
50
|
-
from pydantic import AliasChoices, Field
|
|
50
|
+
from pydantic import AliasChoices, Field, field_validator
|
|
51
51
|
|
|
52
52
|
from nextmv._serialization import serialize_json
|
|
53
53
|
from nextmv.base_model import BaseModel
|
|
@@ -226,6 +226,406 @@ class Format(BaseModel):
|
|
|
226
226
|
"""Output format for the run configuration."""
|
|
227
227
|
|
|
228
228
|
|
|
229
|
+
class RunType(str, Enum):
|
|
230
|
+
"""
|
|
231
|
+
The actual type of the run.
|
|
232
|
+
|
|
233
|
+
You can import the `RunType` class directly from `nextmv`:
|
|
234
|
+
|
|
235
|
+
```python
|
|
236
|
+
from nextmv import RunType
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
Parameters
|
|
240
|
+
----------
|
|
241
|
+
STANDARD : str
|
|
242
|
+
Standard run type.
|
|
243
|
+
EXTERNAL : str
|
|
244
|
+
External run type.
|
|
245
|
+
ENSEMBLE : str
|
|
246
|
+
Ensemble run type.
|
|
247
|
+
|
|
248
|
+
Examples
|
|
249
|
+
--------
|
|
250
|
+
>>> from nextmv import RunType
|
|
251
|
+
>>> run_type = RunType.STANDARD
|
|
252
|
+
>>> run_type
|
|
253
|
+
<RunType.STANDARD: 'standard'>
|
|
254
|
+
>>> run_type.value
|
|
255
|
+
'standard'
|
|
256
|
+
|
|
257
|
+
>>> # Creating from string
|
|
258
|
+
>>> external_type = RunType("external")
|
|
259
|
+
>>> external_type
|
|
260
|
+
<RunType.EXTERNAL: 'external'>
|
|
261
|
+
|
|
262
|
+
>>> # All available types
|
|
263
|
+
>>> list(RunType)
|
|
264
|
+
[<RunType.STANDARD: 'standard'>, <RunType.EXTERNAL: 'external'>, <RunType.ENSEMBLE: 'ensemble'>]
|
|
265
|
+
"""
|
|
266
|
+
|
|
267
|
+
STANDARD = "standard"
|
|
268
|
+
"""Standard run type."""
|
|
269
|
+
EXTERNAL = "external"
|
|
270
|
+
"""External run type."""
|
|
271
|
+
ENSEMBLE = "ensemble"
|
|
272
|
+
"""Ensemble run type."""
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
class RunTypeConfiguration(BaseModel):
|
|
276
|
+
"""
|
|
277
|
+
Defines the configuration for the type of the run that is being executed
|
|
278
|
+
on an application.
|
|
279
|
+
|
|
280
|
+
You can import the `RunTypeConfiguration` class directly from `nextmv`:
|
|
281
|
+
|
|
282
|
+
```python
|
|
283
|
+
from nextmv import RunTypeConfiguration
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
Parameters
|
|
287
|
+
----------
|
|
288
|
+
run_type : RunType
|
|
289
|
+
Type of the run.
|
|
290
|
+
definition_id : str, optional
|
|
291
|
+
ID of the definition for the run type. Defaults to None.
|
|
292
|
+
reference_id : str, optional
|
|
293
|
+
ID of the reference for the run type. Defaults to None.
|
|
294
|
+
|
|
295
|
+
Examples
|
|
296
|
+
--------
|
|
297
|
+
>>> from nextmv import RunTypeConfiguration, RunType
|
|
298
|
+
>>> config = RunTypeConfiguration(run_type=RunType.STANDARD)
|
|
299
|
+
>>> config.run_type
|
|
300
|
+
<RunType.STANDARD: 'standard'>
|
|
301
|
+
>>> config.definition_id is None
|
|
302
|
+
True
|
|
303
|
+
|
|
304
|
+
>>> # External run with reference
|
|
305
|
+
>>> external_config = RunTypeConfiguration(
|
|
306
|
+
... run_type=RunType.EXTERNAL,
|
|
307
|
+
... reference_id="ref-12345"
|
|
308
|
+
... )
|
|
309
|
+
>>> external_config.run_type
|
|
310
|
+
<RunType.EXTERNAL: 'external'>
|
|
311
|
+
>>> external_config.reference_id
|
|
312
|
+
'ref-12345'
|
|
313
|
+
|
|
314
|
+
>>> # Ensemble run with definition
|
|
315
|
+
>>> ensemble_config = RunTypeConfiguration(
|
|
316
|
+
... run_type=RunType.ENSEMBLE,
|
|
317
|
+
... definition_id="def-67890"
|
|
318
|
+
... )
|
|
319
|
+
>>> ensemble_config.run_type
|
|
320
|
+
<RunType.ENSEMBLE: 'ensemble'>
|
|
321
|
+
>>> ensemble_config.definition_id
|
|
322
|
+
'def-67890'
|
|
323
|
+
"""
|
|
324
|
+
|
|
325
|
+
run_type: Optional[RunType] = Field(
|
|
326
|
+
serialization_alias="type",
|
|
327
|
+
validation_alias=AliasChoices("type", "run_type"),
|
|
328
|
+
default=None,
|
|
329
|
+
)
|
|
330
|
+
"""Type of the run."""
|
|
331
|
+
definition_id: Optional[str] = None
|
|
332
|
+
"""ID of the definition for the run type."""
|
|
333
|
+
reference_id: Optional[str] = None
|
|
334
|
+
"""ID of the reference for the run type."""
|
|
335
|
+
|
|
336
|
+
@field_validator("run_type", mode="before")
|
|
337
|
+
@classmethod
|
|
338
|
+
def validate_run_type(cls, v):
|
|
339
|
+
"""Convert empty string to None for run_type validation."""
|
|
340
|
+
if v == "":
|
|
341
|
+
return None
|
|
342
|
+
return v
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
class StatisticsIndicator(BaseModel):
|
|
346
|
+
"""
|
|
347
|
+
Statistics indicator of a run.
|
|
348
|
+
|
|
349
|
+
You can import the `StatisticsIndicator` class directly from `nextmv`:
|
|
350
|
+
|
|
351
|
+
```python
|
|
352
|
+
from nextmv import StatisticsIndicator
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
Parameters
|
|
356
|
+
----------
|
|
357
|
+
name : str
|
|
358
|
+
Name of the indicator.
|
|
359
|
+
value : Any
|
|
360
|
+
Value of the indicator.
|
|
361
|
+
|
|
362
|
+
Examples
|
|
363
|
+
--------
|
|
364
|
+
>>> from nextmv import StatisticsIndicator
|
|
365
|
+
>>> indicator = StatisticsIndicator(name="total_cost", value=1250.75)
|
|
366
|
+
>>> indicator.name
|
|
367
|
+
'total_cost'
|
|
368
|
+
>>> indicator.value
|
|
369
|
+
1250.75
|
|
370
|
+
|
|
371
|
+
>>> # Boolean indicator
|
|
372
|
+
>>> bool_indicator = StatisticsIndicator(name="optimal", value=True)
|
|
373
|
+
>>> bool_indicator.name
|
|
374
|
+
'optimal'
|
|
375
|
+
>>> bool_indicator.value
|
|
376
|
+
True
|
|
377
|
+
"""
|
|
378
|
+
|
|
379
|
+
name: str
|
|
380
|
+
"""Name of the indicator."""
|
|
381
|
+
value: Any
|
|
382
|
+
"""Value of the indicator."""
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
class RunInfoStatistics(BaseModel):
|
|
386
|
+
"""
|
|
387
|
+
Statistics information for a run.
|
|
388
|
+
|
|
389
|
+
You can import the `RunInfoStatistics` class directly from `nextmv`:
|
|
390
|
+
|
|
391
|
+
```python
|
|
392
|
+
from nextmv import RunInfoStatistics
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
Parameters
|
|
396
|
+
----------
|
|
397
|
+
status : str
|
|
398
|
+
Status of the statistics in the run.
|
|
399
|
+
error : str, optional
|
|
400
|
+
Error message if the statistics could not be retrieved. Defaults to None.
|
|
401
|
+
indicators : list[StatisticsIndicator], optional
|
|
402
|
+
List of statistics indicators. Defaults to None.
|
|
403
|
+
|
|
404
|
+
Examples
|
|
405
|
+
--------
|
|
406
|
+
>>> from nextmv import RunInfoStatistics, StatisticsIndicator
|
|
407
|
+
>>> indicators = [
|
|
408
|
+
... StatisticsIndicator(name="total_cost", value=1250.75),
|
|
409
|
+
... StatisticsIndicator(name="optimal", value=True)
|
|
410
|
+
... ]
|
|
411
|
+
>>> stats = RunInfoStatistics(status="success", indicators=indicators)
|
|
412
|
+
>>> stats.status
|
|
413
|
+
'success'
|
|
414
|
+
>>> len(stats.indicators)
|
|
415
|
+
2
|
|
416
|
+
|
|
417
|
+
>>> # Statistics with error
|
|
418
|
+
>>> error_stats = RunInfoStatistics(
|
|
419
|
+
... status="error",
|
|
420
|
+
... error="Failed to calculate statistics"
|
|
421
|
+
... )
|
|
422
|
+
>>> error_stats.status
|
|
423
|
+
'error'
|
|
424
|
+
>>> error_stats.error
|
|
425
|
+
'Failed to calculate statistics'
|
|
426
|
+
"""
|
|
427
|
+
|
|
428
|
+
status: str
|
|
429
|
+
"""Status of the statistics in the run."""
|
|
430
|
+
|
|
431
|
+
error: Optional[str] = None
|
|
432
|
+
"""Error message if the statistics could not be retrieved."""
|
|
433
|
+
indicators: Optional[list[StatisticsIndicator]] = None
|
|
434
|
+
"""List of statistics indicators."""
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
class OptionsSummaryItem(BaseModel):
|
|
438
|
+
"""
|
|
439
|
+
Summary item for options used in a run.
|
|
440
|
+
|
|
441
|
+
You can import the `OptionsSummaryItem` class directly from `nextmv`:
|
|
442
|
+
|
|
443
|
+
```python
|
|
444
|
+
from nextmv import OptionsSummaryItem
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
Parameters
|
|
448
|
+
----------
|
|
449
|
+
name : str
|
|
450
|
+
Name of the option.
|
|
451
|
+
value : Any
|
|
452
|
+
Value of the option.
|
|
453
|
+
source : str
|
|
454
|
+
Source of the option.
|
|
455
|
+
|
|
456
|
+
Examples
|
|
457
|
+
--------
|
|
458
|
+
>>> from nextmv import OptionsSummaryItem
|
|
459
|
+
>>> option = OptionsSummaryItem(
|
|
460
|
+
... name="time_limit",
|
|
461
|
+
... value=30,
|
|
462
|
+
... source="config"
|
|
463
|
+
... )
|
|
464
|
+
>>> option.name
|
|
465
|
+
'time_limit'
|
|
466
|
+
>>> option.value
|
|
467
|
+
30
|
|
468
|
+
>>> option.source
|
|
469
|
+
'config'
|
|
470
|
+
|
|
471
|
+
>>> # Option from environment variable
|
|
472
|
+
>>> env_option = OptionsSummaryItem(
|
|
473
|
+
... name="solver_type",
|
|
474
|
+
... value="gurobi",
|
|
475
|
+
... source="environment"
|
|
476
|
+
... )
|
|
477
|
+
>>> env_option.source
|
|
478
|
+
'environment'
|
|
479
|
+
"""
|
|
480
|
+
|
|
481
|
+
name: str
|
|
482
|
+
"""Name of the option."""
|
|
483
|
+
value: Any
|
|
484
|
+
"""Value of the option."""
|
|
485
|
+
source: str
|
|
486
|
+
"""Source of the option."""
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
class Run(BaseModel):
|
|
490
|
+
"""
|
|
491
|
+
Information about a run in the Nextmv platform.
|
|
492
|
+
|
|
493
|
+
You can import the `Run` class directly from `nextmv`:
|
|
494
|
+
|
|
495
|
+
```python
|
|
496
|
+
from nextmv import Run
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
Parameters
|
|
500
|
+
----------
|
|
501
|
+
id : str
|
|
502
|
+
ID of the run.
|
|
503
|
+
user_email : str
|
|
504
|
+
Email of the user who initiated the run.
|
|
505
|
+
name : str
|
|
506
|
+
Name of the run.
|
|
507
|
+
description : str
|
|
508
|
+
Description of the run.
|
|
509
|
+
created_at : datetime
|
|
510
|
+
Timestamp when the run was created.
|
|
511
|
+
application_id : str
|
|
512
|
+
ID of the application associated with the run.
|
|
513
|
+
application_instance_id : str
|
|
514
|
+
ID of the application instance associated with the run.
|
|
515
|
+
application_version_id : str
|
|
516
|
+
ID of the application version associated with the run.
|
|
517
|
+
run_type : RunTypeConfiguration
|
|
518
|
+
Configuration for the type of the run.
|
|
519
|
+
execution_class : str
|
|
520
|
+
Class name for the execution of a job.
|
|
521
|
+
runtime : str
|
|
522
|
+
Runtime environment for the run.
|
|
523
|
+
status : Status
|
|
524
|
+
Deprecated, use status_v2 instead.
|
|
525
|
+
status_v2 : StatusV2
|
|
526
|
+
Status of the run.
|
|
527
|
+
queuing_priority : int, optional
|
|
528
|
+
Priority of the run in the queue. Defaults to None.
|
|
529
|
+
queuing_disabled : bool, optional
|
|
530
|
+
Whether the run is disabled from queuing. Defaults to None.
|
|
531
|
+
experiment_id : str, optional
|
|
532
|
+
ID of the experiment associated with the run. Defaults to None.
|
|
533
|
+
statistics : RunInfoStatistics, optional
|
|
534
|
+
Statistics of the run. Defaults to None.
|
|
535
|
+
input_id : str, optional
|
|
536
|
+
ID of the input associated with the run. Defaults to None.
|
|
537
|
+
option_set : str, optional
|
|
538
|
+
ID of the option set associated with the run. Defaults to None.
|
|
539
|
+
options : dict[str, str], optional
|
|
540
|
+
Options associated with the run. Defaults to None.
|
|
541
|
+
request_options : dict[str, str], optional
|
|
542
|
+
Request options associated with the run. Defaults to None.
|
|
543
|
+
options_summary : list[OptionsSummaryItem], optional
|
|
544
|
+
Summary of options used in the run. Defaults to None.
|
|
545
|
+
scenario_id : str, optional
|
|
546
|
+
ID of the scenario associated with the run. Defaults to None.
|
|
547
|
+
repetition : int, optional
|
|
548
|
+
Repetition number of the run. Defaults to None.
|
|
549
|
+
input_set_id : str, optional
|
|
550
|
+
ID of the input set associated with the run. Defaults to None.
|
|
551
|
+
|
|
552
|
+
Examples
|
|
553
|
+
--------
|
|
554
|
+
>>> from nextmv import Run, RunTypeConfiguration, RunType, StatusV2
|
|
555
|
+
>>> from datetime import datetime
|
|
556
|
+
>>> run = Run(
|
|
557
|
+
... id="run-12345",
|
|
558
|
+
... user_email="user@example.com",
|
|
559
|
+
... name="Test Run",
|
|
560
|
+
... description="A test optimization run",
|
|
561
|
+
... created_at=datetime.now(),
|
|
562
|
+
... application_id="app-123",
|
|
563
|
+
... application_instance_id="instance-456",
|
|
564
|
+
... application_version_id="version-789",
|
|
565
|
+
... run_type=RunTypeConfiguration(run_type=RunType.STANDARD),
|
|
566
|
+
... execution_class="small",
|
|
567
|
+
... runtime="python",
|
|
568
|
+
... status_v2=StatusV2.SUCCEEDED
|
|
569
|
+
... )
|
|
570
|
+
>>> run.id
|
|
571
|
+
'run-12345'
|
|
572
|
+
>>> run.name
|
|
573
|
+
'Test Run'
|
|
574
|
+
"""
|
|
575
|
+
|
|
576
|
+
id: str
|
|
577
|
+
"""ID of the run."""
|
|
578
|
+
user_email: str
|
|
579
|
+
"""Email of the user who initiated the run."""
|
|
580
|
+
name: str
|
|
581
|
+
"""Name of the run."""
|
|
582
|
+
description: str
|
|
583
|
+
"""Description of the run."""
|
|
584
|
+
created_at: datetime
|
|
585
|
+
"""Timestamp when the run was created."""
|
|
586
|
+
application_id: str
|
|
587
|
+
"""ID of the application associated with the run."""
|
|
588
|
+
application_instance_id: str
|
|
589
|
+
"""ID of the application instance associated with the run."""
|
|
590
|
+
application_version_id: str
|
|
591
|
+
"""ID of the application version associated with the run."""
|
|
592
|
+
run_type: RunTypeConfiguration
|
|
593
|
+
"""Configuration for the type of the run."""
|
|
594
|
+
execution_class: str
|
|
595
|
+
"""Class name for the execution of a job."""
|
|
596
|
+
runtime: str
|
|
597
|
+
"""Runtime environment for the run."""
|
|
598
|
+
status_v2: StatusV2
|
|
599
|
+
"""Status of the run."""
|
|
600
|
+
|
|
601
|
+
status: Optional[Status] = None
|
|
602
|
+
"""Deprecated, use status_v2 instead."""
|
|
603
|
+
queuing_priority: Optional[int] = None
|
|
604
|
+
"""Priority of the run in the queue."""
|
|
605
|
+
queuing_disabled: Optional[bool] = None
|
|
606
|
+
"""Whether the run is disabled from queuing."""
|
|
607
|
+
experiment_id: Optional[str] = None
|
|
608
|
+
"""ID of the experiment associated with the run."""
|
|
609
|
+
statistics: Optional[RunInfoStatistics] = None
|
|
610
|
+
"""Statistics of the run."""
|
|
611
|
+
input_id: Optional[str] = None
|
|
612
|
+
"""ID of the input associated with the run."""
|
|
613
|
+
option_set: Optional[str] = None
|
|
614
|
+
"""ID of the option set associated with the run."""
|
|
615
|
+
options: Optional[dict[str, str]] = None
|
|
616
|
+
"""Options associated with the run."""
|
|
617
|
+
request_options: Optional[dict[str, str]] = None
|
|
618
|
+
"""Request options associated with the run."""
|
|
619
|
+
options_summary: Optional[list[OptionsSummaryItem]] = None
|
|
620
|
+
"""Summary of options used in the run."""
|
|
621
|
+
scenario_id: Optional[str] = None
|
|
622
|
+
"""ID of the scenario associated with the run."""
|
|
623
|
+
repetition: Optional[int] = None
|
|
624
|
+
"""Repetition number of the run."""
|
|
625
|
+
input_set_id: Optional[str] = None
|
|
626
|
+
"""ID of the input set associated with the run."""
|
|
627
|
+
|
|
628
|
+
|
|
229
629
|
class Metadata(BaseModel):
|
|
230
630
|
"""
|
|
231
631
|
Metadata of a run, whether it was successful or not.
|
|
@@ -342,6 +742,81 @@ class RunInformation(BaseModel):
|
|
|
342
742
|
has not been synced yet.
|
|
343
743
|
"""
|
|
344
744
|
|
|
745
|
+
def to_run(self) -> Run:
|
|
746
|
+
"""
|
|
747
|
+
Transform this `RunInformation` instance into a `Run` instance.
|
|
748
|
+
|
|
749
|
+
This method maps all available attributes from the `RunInformation`
|
|
750
|
+
and its metadata to create a `Run` instance. Attributes that are not
|
|
751
|
+
available in RunInformation are set to None or appropriate defaults.
|
|
752
|
+
|
|
753
|
+
Returns
|
|
754
|
+
-------
|
|
755
|
+
Run
|
|
756
|
+
A Run instance with attributes populated from this RunInformation.
|
|
757
|
+
|
|
758
|
+
Examples
|
|
759
|
+
--------
|
|
760
|
+
>>> from nextmv import RunInformation, Metadata, Format, FormatInput, FormatOutput
|
|
761
|
+
>>> from nextmv import StatusV2, RunTypeConfiguration, RunType
|
|
762
|
+
>>> from datetime import datetime
|
|
763
|
+
>>> metadata = Metadata(
|
|
764
|
+
... application_id="app-123",
|
|
765
|
+
... application_instance_id="instance-456",
|
|
766
|
+
... application_version_id="version-789",
|
|
767
|
+
... created_at=datetime.now(),
|
|
768
|
+
... duration=5000.0,
|
|
769
|
+
... error="",
|
|
770
|
+
... input_size=1024.0,
|
|
771
|
+
... output_size=2048.0,
|
|
772
|
+
... format=Format(
|
|
773
|
+
... format_input=FormatInput(),
|
|
774
|
+
... format_output=FormatOutput()
|
|
775
|
+
... ),
|
|
776
|
+
... status_v2=StatusV2.SUCCEEDED
|
|
777
|
+
... )
|
|
778
|
+
>>> run_info = RunInformation(
|
|
779
|
+
... id="run-123",
|
|
780
|
+
... description="Test run",
|
|
781
|
+
... name="Test",
|
|
782
|
+
... user_email="user@example.com",
|
|
783
|
+
... metadata=metadata
|
|
784
|
+
... )
|
|
785
|
+
>>> run = run_info.to_run()
|
|
786
|
+
>>> run.id
|
|
787
|
+
'run-123'
|
|
788
|
+
>>> run.application_id
|
|
789
|
+
'app-123'
|
|
790
|
+
"""
|
|
791
|
+
return Run(
|
|
792
|
+
id=self.id,
|
|
793
|
+
user_email=self.user_email,
|
|
794
|
+
name=self.name,
|
|
795
|
+
description=self.description,
|
|
796
|
+
created_at=self.metadata.created_at,
|
|
797
|
+
application_id=self.metadata.application_id,
|
|
798
|
+
application_instance_id=self.metadata.application_instance_id,
|
|
799
|
+
application_version_id=self.metadata.application_version_id,
|
|
800
|
+
run_type=RunTypeConfiguration(), # Default empty configuration
|
|
801
|
+
execution_class="", # Not available in RunInformation
|
|
802
|
+
runtime="", # Not available in RunInformation
|
|
803
|
+
status=self.metadata.status,
|
|
804
|
+
status_v2=self.metadata.status_v2,
|
|
805
|
+
# Optional fields that are not available in RunInformation
|
|
806
|
+
queuing_priority=None,
|
|
807
|
+
queuing_disabled=None,
|
|
808
|
+
experiment_id=None,
|
|
809
|
+
statistics=None,
|
|
810
|
+
input_id=None,
|
|
811
|
+
option_set=None,
|
|
812
|
+
options=None,
|
|
813
|
+
request_options=None,
|
|
814
|
+
options_summary=None,
|
|
815
|
+
scenario_id=None,
|
|
816
|
+
repetition=None,
|
|
817
|
+
input_set_id=None,
|
|
818
|
+
)
|
|
819
|
+
|
|
345
820
|
|
|
346
821
|
class ErrorLog(BaseModel):
|
|
347
822
|
"""
|
|
@@ -429,113 +904,6 @@ class RunLog(BaseModel):
|
|
|
429
904
|
"""Log of the run."""
|
|
430
905
|
|
|
431
906
|
|
|
432
|
-
class RunType(str, Enum):
|
|
433
|
-
"""
|
|
434
|
-
The actual type of the run.
|
|
435
|
-
|
|
436
|
-
You can import the `RunType` class directly from `nextmv`:
|
|
437
|
-
|
|
438
|
-
```python
|
|
439
|
-
from nextmv import RunType
|
|
440
|
-
```
|
|
441
|
-
|
|
442
|
-
Parameters
|
|
443
|
-
----------
|
|
444
|
-
STANDARD : str
|
|
445
|
-
Standard run type.
|
|
446
|
-
EXTERNAL : str
|
|
447
|
-
External run type.
|
|
448
|
-
ENSEMBLE : str
|
|
449
|
-
Ensemble run type.
|
|
450
|
-
|
|
451
|
-
Examples
|
|
452
|
-
--------
|
|
453
|
-
>>> from nextmv import RunType
|
|
454
|
-
>>> run_type = RunType.STANDARD
|
|
455
|
-
>>> run_type
|
|
456
|
-
<RunType.STANDARD: 'standard'>
|
|
457
|
-
>>> run_type.value
|
|
458
|
-
'standard'
|
|
459
|
-
|
|
460
|
-
>>> # Creating from string
|
|
461
|
-
>>> external_type = RunType("external")
|
|
462
|
-
>>> external_type
|
|
463
|
-
<RunType.EXTERNAL: 'external'>
|
|
464
|
-
|
|
465
|
-
>>> # All available types
|
|
466
|
-
>>> list(RunType)
|
|
467
|
-
[<RunType.STANDARD: 'standard'>, <RunType.EXTERNAL: 'external'>, <RunType.ENSEMBLE: 'ensemble'>]
|
|
468
|
-
"""
|
|
469
|
-
|
|
470
|
-
STANDARD = "standard"
|
|
471
|
-
"""Standard run type."""
|
|
472
|
-
EXTERNAL = "external"
|
|
473
|
-
"""External run type."""
|
|
474
|
-
ENSEMBLE = "ensemble"
|
|
475
|
-
"""Ensemble run type."""
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
class RunTypeConfiguration(BaseModel):
|
|
479
|
-
"""
|
|
480
|
-
Defines the configuration for the type of the run that is being executed
|
|
481
|
-
on an application.
|
|
482
|
-
|
|
483
|
-
You can import the `RunTypeConfiguration` class directly from `nextmv`:
|
|
484
|
-
|
|
485
|
-
```python
|
|
486
|
-
from nextmv import RunTypeConfiguration
|
|
487
|
-
```
|
|
488
|
-
|
|
489
|
-
Parameters
|
|
490
|
-
----------
|
|
491
|
-
run_type : RunType
|
|
492
|
-
Type of the run.
|
|
493
|
-
definition_id : str, optional
|
|
494
|
-
ID of the definition for the run type. Defaults to None.
|
|
495
|
-
reference_id : str, optional
|
|
496
|
-
ID of the reference for the run type. Defaults to None.
|
|
497
|
-
|
|
498
|
-
Examples
|
|
499
|
-
--------
|
|
500
|
-
>>> from nextmv import RunTypeConfiguration, RunType
|
|
501
|
-
>>> config = RunTypeConfiguration(run_type=RunType.STANDARD)
|
|
502
|
-
>>> config.run_type
|
|
503
|
-
<RunType.STANDARD: 'standard'>
|
|
504
|
-
>>> config.definition_id is None
|
|
505
|
-
True
|
|
506
|
-
|
|
507
|
-
>>> # External run with reference
|
|
508
|
-
>>> external_config = RunTypeConfiguration(
|
|
509
|
-
... run_type=RunType.EXTERNAL,
|
|
510
|
-
... reference_id="ref-12345"
|
|
511
|
-
... )
|
|
512
|
-
>>> external_config.run_type
|
|
513
|
-
<RunType.EXTERNAL: 'external'>
|
|
514
|
-
>>> external_config.reference_id
|
|
515
|
-
'ref-12345'
|
|
516
|
-
|
|
517
|
-
>>> # Ensemble run with definition
|
|
518
|
-
>>> ensemble_config = RunTypeConfiguration(
|
|
519
|
-
... run_type=RunType.ENSEMBLE,
|
|
520
|
-
... definition_id="def-67890"
|
|
521
|
-
... )
|
|
522
|
-
>>> ensemble_config.run_type
|
|
523
|
-
<RunType.ENSEMBLE: 'ensemble'>
|
|
524
|
-
>>> ensemble_config.definition_id
|
|
525
|
-
'def-67890'
|
|
526
|
-
"""
|
|
527
|
-
|
|
528
|
-
run_type: RunType = Field(
|
|
529
|
-
serialization_alias="type",
|
|
530
|
-
validation_alias=AliasChoices("type", "run_type"),
|
|
531
|
-
)
|
|
532
|
-
"""Type of the run."""
|
|
533
|
-
definition_id: Optional[str] = None
|
|
534
|
-
"""ID of the definition for the run type."""
|
|
535
|
-
reference_id: Optional[str] = None
|
|
536
|
-
"""ID of the reference for the run type."""
|
|
537
|
-
|
|
538
|
-
|
|
539
907
|
class RunQueuing(BaseModel):
|
|
540
908
|
"""
|
|
541
909
|
RunQueuing configuration for a run.
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
nextmv/__about__.py,sha256=
|
|
1
|
+
nextmv/__about__.py,sha256=swx5y44doM60f9hpn91hbwEUw-qTWVfvgrZ4zO7sCP0,29
|
|
2
2
|
nextmv/__entrypoint__.py,sha256=dA0iwwHtrq6Z9w9FxmxKLoBGLyhe7jWtUAU-Y3PEgHg,1094
|
|
3
|
-
nextmv/__init__.py,sha256=
|
|
3
|
+
nextmv/__init__.py,sha256=pW2HMcJnNSFqF_tj77TtqpddEeCosTKS7NxGNPDp7mU,3620
|
|
4
4
|
nextmv/_serialization.py,sha256=JlSl6BL0M2Esf7F89GsGIZ__Pp8RnFRNM0UxYhuuYU4,2853
|
|
5
5
|
nextmv/base_model.py,sha256=qmJ4AsYr9Yv01HQX_BERrn3229gyoZrYyP9tcyqNfeU,2311
|
|
6
6
|
nextmv/deprecated.py,sha256=kEVfyQ-nT0v2ePXTNldjQG9uH5IlfQVy3L4tztIxwmU,1638
|
|
7
|
-
nextmv/input.py,sha256=
|
|
7
|
+
nextmv/input.py,sha256=m9sVfO9ZL3F5i1l8amEtlWlbkekyUP4C3y9DduHWGFs,40211
|
|
8
8
|
nextmv/logger.py,sha256=kNIbu46MisrzYe4T0hNMpWfRTKKacDVvbtQcNys_c_E,2513
|
|
9
9
|
nextmv/manifest.py,sha256=wzGDrGleIgYvRvKyy73acjd68cGdCLD_7x_Dy3UhCaI,44266
|
|
10
10
|
nextmv/model.py,sha256=vI3pSV3iTwjRPflar7nAg-6h98XRUyi9II5O2J06-Kc,15018
|
|
11
11
|
nextmv/options.py,sha256=yPJu5lYMbV6YioMwAXv7ctpZUggLXKlZc9CqIbUFvE4,37895
|
|
12
|
-
nextmv/output.py,sha256=
|
|
12
|
+
nextmv/output.py,sha256=HdvWYG3gIzwoXquulaEVI4LLchXJDjkbag0BkBPM0vQ,55128
|
|
13
13
|
nextmv/polling.py,sha256=nfefvWI1smm-lIzaXE-4DMlojp6KXIvVi88XLJYUmo8,9724
|
|
14
|
-
nextmv/run.py,sha256=
|
|
14
|
+
nextmv/run.py,sha256=lAWWkLml1C7wkXSvN8orBjudoz72Qv5ZCHCWY9e7xaY,45813
|
|
15
15
|
nextmv/safe.py,sha256=VAK4fGEurbLNji4Pg5Okga5XQSbI4aI9JJf95_68Z20,3867
|
|
16
16
|
nextmv/status.py,sha256=SCDLhh2om3yeO5FxO0x-_RShQsZNXEpjHNdCGdb3VUI,2787
|
|
17
|
-
nextmv/cloud/__init__.py,sha256=
|
|
18
|
-
nextmv/cloud/acceptance_test.py,sha256=
|
|
17
|
+
nextmv/cloud/__init__.py,sha256=2wI72lhWq81BYv1OpS0OOTT5-3sivpX0H4z5ANPoLMc,5051
|
|
18
|
+
nextmv/cloud/acceptance_test.py,sha256=ZvOaVzhy3sHb5Vi9uBGhZJPggLN0oEmEvLKyc830zQ8,27439
|
|
19
19
|
nextmv/cloud/account.py,sha256=jIdGNyI3l3dVh2PuriAwAOrEuWRM150WgzxcBMVBNRw,6058
|
|
20
|
-
nextmv/cloud/application.py,sha256=
|
|
21
|
-
nextmv/cloud/batch_experiment.py,sha256=
|
|
20
|
+
nextmv/cloud/application.py,sha256=wieXFWijmCsgEDpmefLWs010BkHMbAdLLV7Cwmncu5I,140555
|
|
21
|
+
nextmv/cloud/batch_experiment.py,sha256=13ciRpgBabMMTyazfdfEAymD3rTPrTAAorECsANxxuA,10397
|
|
22
22
|
nextmv/cloud/client.py,sha256=E0DiUb377jvEnpXlRnfT1PGCI0Jm0lTUoX5VqeU91lk,18165
|
|
23
|
+
nextmv/cloud/ensemble.py,sha256=glrRgyRFcEH12fNUhEl1FOo6xOTDEaF478dxfX0wj2Y,8604
|
|
23
24
|
nextmv/cloud/input_set.py,sha256=NkzA6_hwgD-YwoirzwvZrObIoBTfurry7Os3jo4DyXc,4236
|
|
24
25
|
nextmv/cloud/instance.py,sha256=SS4tbp0LQMWDaeYpwcNxJei82oi_Hozv1t5i3QGjASY,4024
|
|
25
26
|
nextmv/cloud/package.py,sha256=cG75DptN4sxXaT8ruDh2EY2duaK5Jwg16X2LV0BP8ts,13021
|
|
@@ -28,19 +29,22 @@ nextmv/cloud/secrets.py,sha256=fA5cX0jfTsPVZWV7433wzETGlXpWRLHGswuObx9e6FQ,6820
|
|
|
28
29
|
nextmv/cloud/url.py,sha256=Fz70ywkWdCLmP21ZBmJwZi5kDbjpmsX_VlwVF_xQeHg,1836
|
|
29
30
|
nextmv/cloud/version.py,sha256=5_S7_pWUVBFbvAArku20eK7S645GJcHtgE2OpXLdSzQ,5300
|
|
30
31
|
nextmv/default_app/.gitignore,sha256=gsfnfXMYNt-YTroh5hAzauwBZoPDJ6D_fB17rMSnIko,8
|
|
31
|
-
nextmv/default_app/README.md,sha256=
|
|
32
|
-
nextmv/default_app/app.yaml,sha256=
|
|
32
|
+
nextmv/default_app/README.md,sha256=SroGwvWiDTz12yctMfviFYw7z1EMU_72ESK2dyt-Ypg,664
|
|
33
|
+
nextmv/default_app/app.yaml,sha256=TKjKnuoK0SDpouB_AS7TQmE_8HZbQYjmwFvhzFL1xpc,382
|
|
34
|
+
nextmv/default_app/input.json,sha256=zgvbKL3boB0WIU6-9mEU3ZWBddQ5cQ0vhgmDwDyz4hE,63
|
|
35
|
+
nextmv/default_app/main.py,sha256=gG-1JIvKXPCkm4JV46PcXxsQTAefwPXQbdPxkSubhf0,888
|
|
33
36
|
nextmv/default_app/requirements.txt,sha256=wRE_HkYYWzCGnYZ2NuatHXul4gCHvU3iUAdsxtzpYiA,29
|
|
34
37
|
nextmv/default_app/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
38
|
nextmv/default_app/src/main.py,sha256=WWeN_xl_mcPhICl3rSCvdEjRkFXGmAnej88FhS-fAmc,884
|
|
36
39
|
nextmv/default_app/src/visuals.py,sha256=WYK_YBnLmYo3TpVev1CpoNCuW5R7hk9QIkeCmvMn1Fs,1014
|
|
37
40
|
nextmv/local/__init__.py,sha256=6BsoqlK4dw6X11_uKzz9gBPfxKpdiol2FYO8R3X73SE,116
|
|
38
|
-
nextmv/local/application.py,sha256=
|
|
39
|
-
nextmv/local/executor.py,sha256=
|
|
41
|
+
nextmv/local/application.py,sha256=qq14ihKxymg5NHqhU56qTu6lVmMYWLGYUJC4MrhWB68,45815
|
|
42
|
+
nextmv/local/executor.py,sha256=ohAUrIRohcH_qGglK1hSFR0W6bPBSuMAcMwVkW5G4vM,24338
|
|
40
43
|
nextmv/local/geojson_handler.py,sha256=7FavJdkUonop-yskjis0x3qFGB8A5wZyoBUblw-bVhw,12540
|
|
44
|
+
nextmv/local/local.py,sha256=wUHuoAXqJIZpTJBh056hmQuiPEjlZvLTR2BC6Ino-WI,2619
|
|
41
45
|
nextmv/local/plotly_handler.py,sha256=bLb50e3AkVr_W-F6S7lXfeRdN60mG2jk3UElNmhoMWU,1930
|
|
42
|
-
nextmv/local/runner.py,sha256=
|
|
43
|
-
nextmv-0.
|
|
44
|
-
nextmv-0.
|
|
45
|
-
nextmv-0.
|
|
46
|
-
nextmv-0.
|
|
46
|
+
nextmv/local/runner.py,sha256=hwkITHrQG_J9TzxufnaP1mjLWG-iSsNQD66UFZY4pp4,8602
|
|
47
|
+
nextmv-0.33.0.dev0.dist-info/METADATA,sha256=GU6x---pvDI4R1SBV9BW1J5fVLLPxllbrccj6kLyApA,16013
|
|
48
|
+
nextmv-0.33.0.dev0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
49
|
+
nextmv-0.33.0.dev0.dist-info/licenses/LICENSE,sha256=ZIbK-sSWA-OZprjNbmJAglYRtl5_K4l9UwAV3PGJAPc,11349
|
|
50
|
+
nextmv-0.33.0.dev0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|