mage-ai 0.9.69__py3-none-any.whl → 0.9.71__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.
Potentially problematic release.
This version of mage-ai might be problematic. Click here for more details.
- mage_ai/ai/utils/xgboost.py +222 -0
- mage_ai/api/errors.py +37 -25
- mage_ai/api/operations/base.py +13 -1
- mage_ai/api/parsers/PipelineScheduleParser.py +1 -1
- mage_ai/api/policies/BackfillPolicy.py +1 -0
- mage_ai/api/policies/BlockOutputPolicy.py +40 -17
- mage_ai/api/policies/GlobalDataProductPolicy.py +91 -41
- mage_ai/api/policies/KernelPolicy.py +55 -32
- mage_ai/api/policies/KernelProcessPolicy.py +56 -0
- mage_ai/api/policies/OutputPolicy.py +73 -41
- mage_ai/api/policies/PipelinePolicy.py +206 -137
- mage_ai/api/policies/WorkspacePolicy.py +1 -0
- mage_ai/api/presenters/BackfillPresenter.py +1 -0
- mage_ai/api/presenters/BlockLayoutItemPresenter.py +9 -7
- mage_ai/api/presenters/BlockPresenter.py +1 -1
- mage_ai/api/presenters/GlobalDataProductPresenter.py +6 -1
- mage_ai/api/presenters/KernelPresenter.py +5 -26
- mage_ai/api/presenters/KernelProcessPresenter.py +28 -0
- mage_ai/api/presenters/PipelinePresenter.py +18 -5
- mage_ai/api/presenters/StatusPresenter.py +2 -0
- mage_ai/api/presenters/SyncPresenter.py +25 -0
- mage_ai/api/resources/AutocompleteItemResource.py +1 -1
- mage_ai/api/resources/BlockLayoutItemResource.py +90 -44
- mage_ai/api/resources/BlockOutputResource.py +42 -9
- mage_ai/api/resources/BlockResource.py +4 -3
- mage_ai/api/resources/BlockRunResource.py +27 -22
- mage_ai/api/resources/ClusterResource.py +4 -1
- mage_ai/api/resources/CustomTemplateResource.py +34 -14
- mage_ai/api/resources/DataProviderResource.py +1 -1
- mage_ai/api/resources/ExecutionStateResource.py +3 -1
- mage_ai/api/resources/FileContentResource.py +8 -2
- mage_ai/api/resources/FileResource.py +10 -4
- mage_ai/api/resources/FileVersionResource.py +3 -1
- mage_ai/api/resources/GitBranchResource.py +101 -31
- mage_ai/api/resources/GitCustomBranchResource.py +29 -1
- mage_ai/api/resources/GlobalDataProductResource.py +44 -7
- mage_ai/api/resources/GlobalHookResource.py +4 -1
- mage_ai/api/resources/IntegrationDestinationResource.py +6 -2
- mage_ai/api/resources/IntegrationSourceResource.py +8 -4
- mage_ai/api/resources/IntegrationSourceStreamResource.py +6 -2
- mage_ai/api/resources/KernelProcessResource.py +44 -0
- mage_ai/api/resources/KernelResource.py +25 -3
- mage_ai/api/resources/OauthResource.py +1 -1
- mage_ai/api/resources/OutputResource.py +33 -11
- mage_ai/api/resources/PageBlockLayoutResource.py +34 -23
- mage_ai/api/resources/PipelineInteractionResource.py +31 -15
- mage_ai/api/resources/PipelineResource.py +258 -125
- mage_ai/api/resources/PipelineRunResource.py +52 -7
- mage_ai/api/resources/PipelineScheduleResource.py +11 -2
- mage_ai/api/resources/PipelineTriggerResource.py +6 -1
- mage_ai/api/resources/ProjectResource.py +18 -7
- mage_ai/api/resources/PullRequestResource.py +6 -4
- mage_ai/api/resources/SecretResource.py +1 -1
- mage_ai/api/resources/SeedResource.py +8 -1
- mage_ai/api/resources/StatusResource.py +21 -6
- mage_ai/api/resources/SyncResource.py +6 -8
- mage_ai/api/resources/VariableResource.py +46 -26
- mage_ai/api/resources/VersionControlProjectResource.py +9 -2
- mage_ai/api/resources/WidgetResource.py +1 -1
- mage_ai/api/resources/WorkspaceResource.py +6 -5
- mage_ai/api/views.py +47 -40
- mage_ai/authentication/permissions/seed.py +16 -2
- mage_ai/authentication/providers/oidc.py +21 -1
- mage_ai/autocomplete/utils.py +13 -9
- mage_ai/cache/base.py +1 -1
- mage_ai/cache/block.py +18 -12
- mage_ai/cache/block_action_object/__init__.py +33 -5
- mage_ai/cache/file.py +22 -19
- mage_ai/cache/pipeline.py +18 -12
- mage_ai/cli/main.py +1 -0
- mage_ai/cluster_manager/aws/emr_cluster_manager.py +9 -5
- mage_ai/cluster_manager/config.py +2 -2
- mage_ai/cluster_manager/kubernetes/workload_manager.py +52 -1
- mage_ai/cluster_manager/manage.py +1 -1
- mage_ai/cluster_manager/workspace/base.py +7 -1
- mage_ai/cluster_manager/workspace/kubernetes.py +22 -1
- mage_ai/command_center/applications/factory.py +10 -7
- mage_ai/command_center/applications/utils.py +2 -2
- mage_ai/command_center/files/factory.py +17 -15
- mage_ai/command_center/presenters/text.py +1 -1
- mage_ai/command_center/utils.py +25 -13
- mage_ai/data/__init__.py +0 -0
- mage_ai/data/constants.py +45 -0
- mage_ai/data/models/__init__.py +0 -0
- mage_ai/data/models/base.py +119 -0
- mage_ai/data/models/constants.py +1 -0
- mage_ai/data/models/generator.py +115 -0
- mage_ai/data/models/manager.py +168 -0
- mage_ai/data/models/pyarrow/__init__.py +0 -0
- mage_ai/data/models/pyarrow/record_batch.py +55 -0
- mage_ai/data/models/pyarrow/shared.py +21 -0
- mage_ai/data/models/pyarrow/table.py +8 -0
- mage_ai/data/models/reader.py +103 -0
- mage_ai/data/models/utils.py +59 -0
- mage_ai/data/models/writer.py +91 -0
- mage_ai/data/tabular/__init__.py +0 -0
- mage_ai/data/tabular/constants.py +23 -0
- mage_ai/data/tabular/mocks.py +19 -0
- mage_ai/data/tabular/models.py +126 -0
- mage_ai/data/tabular/reader.py +602 -0
- mage_ai/data/tabular/utils.py +102 -0
- mage_ai/data/tabular/writer.py +266 -0
- mage_ai/data/variables/__init__.py +0 -0
- mage_ai/data/variables/wrapper.py +54 -0
- mage_ai/data_cleaner/analysis/charts.py +61 -39
- mage_ai/data_cleaner/column_types/column_type_detector.py +53 -31
- mage_ai/data_cleaner/estimators/encoders.py +5 -2
- mage_ai/data_integrations/utils/scheduler.py +16 -11
- mage_ai/data_preparation/decorators.py +1 -0
- mage_ai/data_preparation/executors/block_executor.py +237 -155
- mage_ai/data_preparation/executors/k8s_block_executor.py +30 -7
- mage_ai/data_preparation/executors/k8s_pipeline_executor.py +30 -7
- mage_ai/data_preparation/executors/streaming_pipeline_executor.py +2 -2
- mage_ai/data_preparation/git/__init__.py +77 -29
- mage_ai/data_preparation/git/api.py +69 -8
- mage_ai/data_preparation/git/utils.py +64 -34
- mage_ai/data_preparation/logging/logger_manager.py +4 -3
- mage_ai/data_preparation/models/block/__init__.py +1562 -879
- mage_ai/data_preparation/models/block/data_integration/mixins.py +4 -3
- mage_ai/data_preparation/models/block/dynamic/__init__.py +17 -6
- mage_ai/data_preparation/models/block/dynamic/child.py +41 -102
- mage_ai/data_preparation/models/block/dynamic/constants.py +1 -0
- mage_ai/data_preparation/models/block/dynamic/counter.py +296 -0
- mage_ai/data_preparation/models/block/dynamic/data.py +16 -0
- mage_ai/data_preparation/models/block/dynamic/factory.py +163 -0
- mage_ai/data_preparation/models/block/dynamic/models.py +19 -0
- mage_ai/data_preparation/models/block/dynamic/shared.py +92 -0
- mage_ai/data_preparation/models/block/dynamic/utils.py +295 -167
- mage_ai/data_preparation/models/block/dynamic/variables.py +384 -144
- mage_ai/data_preparation/models/block/dynamic/wrappers.py +77 -0
- mage_ai/data_preparation/models/block/extension/utils.py +10 -1
- mage_ai/data_preparation/models/block/global_data_product/__init__.py +35 -3
- mage_ai/data_preparation/models/block/integration/__init__.py +6 -2
- mage_ai/data_preparation/models/block/outputs.py +722 -0
- mage_ai/data_preparation/models/block/platform/mixins.py +7 -8
- mage_ai/data_preparation/models/block/r/__init__.py +56 -38
- mage_ai/data_preparation/models/block/remote/__init__.py +0 -0
- mage_ai/data_preparation/models/block/remote/models.py +58 -0
- mage_ai/data_preparation/models/block/settings/__init__.py +0 -0
- mage_ai/data_preparation/models/block/settings/dynamic/__init__.py +0 -0
- mage_ai/data_preparation/models/block/settings/dynamic/constants.py +7 -0
- mage_ai/data_preparation/models/block/settings/dynamic/mixins.py +118 -0
- mage_ai/data_preparation/models/block/settings/dynamic/models.py +31 -0
- mage_ai/data_preparation/models/block/settings/global_data_products/__init__.py +0 -0
- mage_ai/data_preparation/models/block/settings/global_data_products/mixins.py +20 -0
- mage_ai/data_preparation/models/block/settings/global_data_products/models.py +46 -0
- mage_ai/data_preparation/models/block/settings/variables/__init__.py +0 -0
- mage_ai/data_preparation/models/block/settings/variables/mixins.py +74 -0
- mage_ai/data_preparation/models/block/settings/variables/models.py +49 -0
- mage_ai/data_preparation/models/block/spark/mixins.py +2 -1
- mage_ai/data_preparation/models/block/sql/__init__.py +30 -5
- mage_ai/data_preparation/models/block/sql/utils/shared.py +21 -3
- mage_ai/data_preparation/models/block/utils.py +164 -69
- mage_ai/data_preparation/models/constants.py +21 -14
- mage_ai/data_preparation/models/custom_templates/custom_block_template.py +18 -13
- mage_ai/data_preparation/models/custom_templates/custom_pipeline_template.py +33 -16
- mage_ai/data_preparation/models/custom_templates/utils.py +1 -1
- mage_ai/data_preparation/models/file.py +41 -28
- mage_ai/data_preparation/models/global_data_product/__init__.py +100 -58
- mage_ai/data_preparation/models/global_hooks/models.py +1 -0
- mage_ai/data_preparation/models/interfaces.py +29 -0
- mage_ai/data_preparation/models/pipeline.py +374 -185
- mage_ai/data_preparation/models/pipelines/integration_pipeline.py +1 -2
- mage_ai/data_preparation/models/pipelines/seed.py +1 -1
- mage_ai/data_preparation/models/project/__init__.py +66 -18
- mage_ai/data_preparation/models/project/constants.py +2 -0
- mage_ai/data_preparation/models/triggers/__init__.py +124 -26
- mage_ai/data_preparation/models/utils.py +467 -17
- mage_ai/data_preparation/models/variable.py +1028 -137
- mage_ai/data_preparation/models/variables/__init__.py +0 -0
- mage_ai/data_preparation/models/variables/cache.py +149 -0
- mage_ai/data_preparation/models/variables/constants.py +72 -0
- mage_ai/data_preparation/models/variables/summarizer.py +336 -0
- mage_ai/data_preparation/models/variables/utils.py +77 -0
- mage_ai/data_preparation/models/widget/__init__.py +63 -41
- mage_ai/data_preparation/models/widget/charts.py +40 -27
- mage_ai/data_preparation/models/widget/constants.py +2 -0
- mage_ai/data_preparation/models/widget/utils.py +3 -3
- mage_ai/data_preparation/preferences.py +3 -3
- mage_ai/data_preparation/repo_manager.py +55 -21
- mage_ai/data_preparation/storage/base_storage.py +2 -2
- mage_ai/data_preparation/storage/gcs_storage.py +7 -4
- mage_ai/data_preparation/storage/local_storage.py +18 -9
- mage_ai/data_preparation/storage/s3_storage.py +5 -2
- mage_ai/data_preparation/templates/data_exporters/streaming/oracledb.yaml +8 -0
- mage_ai/data_preparation/variable_manager.py +281 -76
- mage_ai/io/base.py +3 -2
- mage_ai/io/bigquery.py +1 -0
- mage_ai/io/redshift.py +7 -5
- mage_ai/kernels/__init__.py +0 -0
- mage_ai/kernels/models.py +188 -0
- mage_ai/kernels/utils.py +169 -0
- mage_ai/orchestration/concurrency.py +6 -2
- mage_ai/orchestration/db/__init__.py +1 -0
- mage_ai/orchestration/db/migrations/versions/0227396a216c_add_userproject_table.py +38 -0
- mage_ai/orchestration/db/migrations/versions/42a14d6143f1_update_token_column_type.py +54 -0
- mage_ai/orchestration/db/models/dynamic/__init__.py +0 -0
- mage_ai/orchestration/db/models/dynamic/controller.py +67 -0
- mage_ai/orchestration/db/models/oauth.py +12 -18
- mage_ai/orchestration/db/models/projects.py +10 -0
- mage_ai/orchestration/db/models/schedules.py +225 -187
- mage_ai/orchestration/db/models/schedules_project_platform.py +18 -12
- mage_ai/orchestration/db/models/utils.py +46 -5
- mage_ai/orchestration/metrics/pipeline_run.py +8 -9
- mage_ai/orchestration/notification/sender.py +38 -15
- mage_ai/orchestration/pipeline_scheduler_original.py +64 -33
- mage_ai/orchestration/pipeline_scheduler_project_platform.py +1 -1
- mage_ai/orchestration/run_status_checker.py +11 -4
- mage_ai/orchestration/triggers/api.py +41 -2
- mage_ai/orchestration/triggers/global_data_product.py +9 -4
- mage_ai/orchestration/triggers/utils.py +10 -1
- mage_ai/orchestration/utils/resources.py +3 -0
- mage_ai/presenters/charts/data_sources/base.py +4 -2
- mage_ai/presenters/charts/data_sources/block.py +15 -9
- mage_ai/presenters/charts/data_sources/chart_code.py +8 -5
- mage_ai/presenters/charts/data_sources/constants.py +1 -0
- mage_ai/presenters/charts/data_sources/system_metrics.py +22 -0
- mage_ai/presenters/interactions/models.py +11 -7
- mage_ai/presenters/pages/loaders/pipelines.py +5 -3
- mage_ai/presenters/pages/models/page_components/pipeline_schedules.py +3 -1
- mage_ai/presenters/utils.py +2 -0
- mage_ai/server/api/blocks.py +2 -1
- mage_ai/server/api/downloads.py +9 -2
- mage_ai/server/api/runs.py +151 -0
- mage_ai/server/api/triggers.py +3 -1
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +8 -8
- mage_ai/server/frontend_dist/_next/static/UZLabyPgcxtZvp0O0EUUS/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1376-22de38b4ad008d8a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1557-25a7d985d5564fd3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1668-30b4619b9534519b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1799-c42db95a015689ee.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/2996-2108b53b9d371d8d.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{3548-fa0792ddb88f4646.js → 3548-9d26185b3fb663b1.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{3763-61b542dafdbf5754.js → 3763-40780c6d1e4b261d.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3782-129dd2a2448a2e36.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3958-bcdfa414ccfa1eb2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/4168-97fd1578d1a38315.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/4982-fa5a238b139fbdd2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/5699-176f445e1313f001.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7162-7dd03f0f605de721.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7779-68d2b72a90c5f925.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7966-5446a8e43711e2f9.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/8023-6c2f172f48dcb99b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/8095-c351b8a735d73e0c.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/9624-8b8e100079ab69e1.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{main-77fe248a6fbd12d8.js → main-b99d4e30a88d9dc7.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-9fe2d9d07c94e968.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{block-layout-14f952f66964022f.js → block-layout-7f4b735c67115df5.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/[...slug]-e7d48e6b0c3068ac.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products-b943f31f050fc3a4.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-4bfc84ff07d7656f.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{overview-597b74828bf105db.js → overview-9f1ac4ec003884f3.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-3edc6270c5b0e962.js → frontend_dist/_next/static/chunks/pages/pipeline-runs-6d183f91a2ff6668.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-7e737f6fc7e83e9b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-38e1fbcfbfc1014e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-d94488e3f2eeef36.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-cc641a7fa8473796.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-a5c0362763a21fa8.js → block-runs-284309877f3c5a5a.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-26250e5335194ade.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-7acc7afc00df17c2.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-5f4c8128b2413fd8.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-4ebfc8e400315dda.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-e5e0150a256aadb3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-eb11c5390c982b49.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-1bdfda8edc9cf4a8.js → triggers-4612d15a65c35912.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/{profile-3f0df3decc856ee9.js → profile-3ae43c932537b254.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-b603d7fe4b175256.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js → frontend_dist/_next/static/chunks/pages/settings/platform/settings-319ddbabc239e91b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-47b64ced27c24985.js → [...slug]-5c360f72e4498855.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{permissions-e5a4d3d815cec25d.js → permissions-fb29fa6c2bd90bb0.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-3b76fa959ffa09d3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-379e1ee292504842.js → [...slug]-3b787b42f1093b1f.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles-0b83fbdd39e85f5b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-a1e6950974d643a8.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users/{[...slug]-2af9afbe727d88aa.js → [...slug]-0aa019d87db8b0b8.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-a4db8710f703c729.js → users-88c694d19207f2ec.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{triggers-9cba3211434a8966.js → triggers-a599c6ac89be8c8d.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-31d0d50f7f30462b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{webpack-d079359c241db804.js → webpack-ac7fdc472bedf682.js} +1 -1
- mage_ai/server/frontend_dist/block-layout.html +3 -3
- mage_ai/server/frontend_dist/compute.html +6 -6
- mage_ai/server/frontend_dist/files.html +6 -6
- mage_ai/server/frontend_dist/global-data-products/[...slug].html +6 -6
- mage_ai/server/frontend_dist/global-data-products.html +6 -6
- mage_ai/server/frontend_dist/global-hooks/[...slug].html +6 -6
- mage_ai/server/frontend_dist/global-hooks.html +6 -6
- mage_ai/server/frontend_dist/index.html +3 -3
- mage_ai/server/frontend_dist/manage/files.html +6 -6
- mage_ai/server/frontend_dist/manage/settings.html +6 -6
- mage_ai/server/frontend_dist/manage/users/[user].html +6 -6
- mage_ai/server/frontend_dist/manage/users/new.html +6 -6
- mage_ai/server/frontend_dist/manage/users.html +6 -6
- mage_ai/server/frontend_dist/manage.html +6 -6
- mage_ai/server/frontend_dist/oauth.html +5 -5
- mage_ai/server/frontend_dist/overview.html +6 -6
- mage_ai/server/frontend_dist/pipeline-runs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +3 -3
- mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +6 -6
- mage_ai/server/frontend_dist/pipelines/[pipeline].html +3 -3
- mage_ai/server/frontend_dist/pipelines.html +6 -6
- mage_ai/server/frontend_dist/platform/global-hooks/[...slug].html +6 -6
- mage_ai/server/frontend_dist/platform/global-hooks.html +6 -6
- mage_ai/server/frontend_dist/settings/account/profile.html +6 -6
- mage_ai/server/frontend_dist/settings/platform/preferences.html +6 -6
- mage_ai/server/frontend_dist/settings/platform/settings.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/permissions.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/roles.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/sync-data.html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +6 -6
- mage_ai/server/frontend_dist/settings/workspace/users.html +6 -6
- mage_ai/server/frontend_dist/settings.html +3 -3
- mage_ai/server/frontend_dist/sign-in.html +15 -15
- mage_ai/server/frontend_dist/templates/[...slug].html +6 -6
- mage_ai/server/frontend_dist/templates.html +6 -6
- mage_ai/server/frontend_dist/terminal.html +6 -6
- mage_ai/server/frontend_dist/test.html +3 -3
- mage_ai/server/frontend_dist/triggers.html +6 -6
- mage_ai/server/frontend_dist/version-control.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/404.html +8 -8
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1376-22de38b4ad008d8a.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-25a7d985d5564fd3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1668-30b4619b9534519b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1799-c42db95a015689ee.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2996-2108b53b9d371d8d.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{3548-fa0792ddb88f4646.js → 3548-9d26185b3fb663b1.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{3763-61b542dafdbf5754.js → 3763-40780c6d1e4b261d.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3782-129dd2a2448a2e36.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3958-bcdfa414ccfa1eb2.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4168-97fd1578d1a38315.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4982-fa5a238b139fbdd2.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-176f445e1313f001.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7162-7dd03f0f605de721.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7779-68d2b72a90c5f925.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7966-5446a8e43711e2f9.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8023-6c2f172f48dcb99b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8095-c351b8a735d73e0c.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-8b8e100079ab69e1.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{main-70b78159c2bb3fe1.js → main-384298e9133cec76.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-13a578bce3b7f30c.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{block-layout-14f952f66964022f.js → block-layout-7f4b735c67115df5.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/[...slug]-e7d48e6b0c3068ac.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products-b943f31f050fc3a4.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-4bfc84ff07d7656f.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{overview-597b74828bf105db.js → overview-9f1ac4ec003884f3.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipeline-runs-3edc6270c5b0e962.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-6d183f91a2ff6668.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-7e737f6fc7e83e9b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-38e1fbcfbfc1014e.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-d94488e3f2eeef36.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-cc641a7fa8473796.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-a5c0362763a21fa8.js → block-runs-284309877f3c5a5a.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-26250e5335194ade.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-7acc7afc00df17c2.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-5f4c8128b2413fd8.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-4ebfc8e400315dda.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-e5e0150a256aadb3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-eb11c5390c982b49.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-1bdfda8edc9cf4a8.js → triggers-4612d15a65c35912.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/{profile-3f0df3decc856ee9.js → profile-3ae43c932537b254.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-b603d7fe4b175256.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js → frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-319ddbabc239e91b.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-47b64ced27c24985.js → [...slug]-5c360f72e4498855.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{permissions-e5a4d3d815cec25d.js → permissions-fb29fa6c2bd90bb0.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-3b76fa959ffa09d3.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-379e1ee292504842.js → [...slug]-3b787b42f1093b1f.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles-0b83fbdd39e85f5b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-a1e6950974d643a8.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users/{[...slug]-2af9afbe727d88aa.js → [...slug]-0aa019d87db8b0b8.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{users-a4db8710f703c729.js → users-88c694d19207f2ec.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{triggers-9cba3211434a8966.js → triggers-a599c6ac89be8c8d.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-31d0d50f7f30462b.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{webpack-68c003fb6a175cd7.js → webpack-481689d9989710cd.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/kcptwoOU-JJJg6Vwpkfmx/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/block-layout.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/compute.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/files.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/global-data-products.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/global-hooks.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/index.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/manage/files.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage/settings.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage/users.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/manage.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/oauth.html +5 -5
- mage_ai/server/frontend_dist_base_path_template/overview.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +3 -3
- mage_ai/server/frontend_dist_base_path_template/pipelines.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/platform/preferences.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/platform/settings.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/settings.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/sign-in.html +15 -15
- mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +6 -6
- mage_ai/server/frontend_dist_base_path_template/templates.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/terminal.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/test.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/triggers.html +6 -6
- mage_ai/server/frontend_dist_base_path_template/version-control.html +6 -6
- mage_ai/server/kernel_output_parser.py +4 -1
- mage_ai/server/scheduler_manager.py +12 -1
- mage_ai/server/server.py +69 -42
- mage_ai/server/utils/custom_output.py +284 -0
- mage_ai/server/utils/execute_custom_code.py +245 -0
- mage_ai/server/utils/output_display.py +123 -289
- mage_ai/server/websocket_server.py +116 -69
- mage_ai/services/aws/ecs/ecs.py +1 -0
- mage_ai/services/k8s/config.py +27 -4
- mage_ai/services/k8s/job_manager.py +6 -1
- mage_ai/services/k8s/utils.py +97 -0
- mage_ai/services/ssh/aws/emr/utils.py +8 -8
- mage_ai/settings/keys/auth.py +1 -0
- mage_ai/settings/platform/__init__.py +159 -38
- mage_ai/settings/platform/constants.py +5 -0
- mage_ai/settings/platform/utils.py +53 -10
- mage_ai/settings/repo.py +26 -12
- mage_ai/settings/server.py +128 -37
- mage_ai/shared/array.py +24 -1
- mage_ai/shared/complex.py +45 -0
- mage_ai/shared/config.py +2 -1
- mage_ai/shared/custom_logger.py +11 -0
- mage_ai/shared/dates.py +10 -6
- mage_ai/shared/files.py +63 -8
- mage_ai/shared/hash.py +33 -9
- mage_ai/shared/io.py +9 -5
- mage_ai/shared/models.py +82 -24
- mage_ai/shared/outputs.py +87 -0
- mage_ai/shared/parsers.py +144 -13
- mage_ai/shared/path_fixer.py +11 -7
- mage_ai/shared/singletons/__init__.py +0 -0
- mage_ai/shared/singletons/base.py +47 -0
- mage_ai/shared/singletons/memory.py +38 -0
- mage_ai/shared/strings.py +34 -1
- mage_ai/shared/yaml.py +24 -0
- mage_ai/streaming/sinks/oracledb.py +57 -0
- mage_ai/streaming/sinks/sink_factory.py +4 -0
- mage_ai/system/__init__.py +0 -0
- mage_ai/system/constants.py +14 -0
- mage_ai/system/memory/__init__.py +0 -0
- mage_ai/system/memory/constants.py +1 -0
- mage_ai/system/memory/manager.py +174 -0
- mage_ai/system/memory/presenters.py +158 -0
- mage_ai/system/memory/process.py +216 -0
- mage_ai/system/memory/samples.py +13 -0
- mage_ai/system/memory/utils.py +656 -0
- mage_ai/system/memory/wrappers.py +177 -0
- mage_ai/system/models.py +58 -0
- mage_ai/system/storage/__init__.py +0 -0
- mage_ai/system/storage/utils.py +29 -0
- mage_ai/tests/api/endpoints/mixins.py +2 -2
- mage_ai/tests/api/endpoints/test_blocks.py +2 -1
- mage_ai/tests/api/endpoints/test_custom_designs.py +4 -4
- mage_ai/tests/api/endpoints/test_pipeline_runs.py +2 -2
- mage_ai/tests/api/endpoints/test_projects.py +2 -1
- mage_ai/tests/api/operations/base/mixins.py +1 -1
- mage_ai/tests/api/operations/base/test_base.py +27 -27
- mage_ai/tests/api/operations/base/test_base_with_user_authentication.py +27 -27
- mage_ai/tests/api/operations/base/test_base_with_user_permissions.py +23 -23
- mage_ai/tests/api/operations/test_syncs.py +6 -4
- mage_ai/tests/api/resources/test_pipeline_resource.py +11 -4
- mage_ai/tests/authentication/oauth/test_utils.py +1 -1
- mage_ai/tests/authentication/providers/test_oidc.py +59 -0
- mage_ai/tests/base_test.py +2 -2
- mage_ai/tests/data/__init__.py +0 -0
- mage_ai/tests/data/models/__init__.py +0 -0
- mage_ai/tests/data_preparation/executors/test_block_executor.py +23 -16
- mage_ai/tests/data_preparation/git/test_git.py +4 -1
- mage_ai/tests/data_preparation/models/block/dynamic/test_combos.py +305 -0
- mage_ai/tests/data_preparation/models/block/dynamic/test_counter.py +212 -0
- mage_ai/tests/data_preparation/models/block/dynamic/test_factory.py +360 -0
- mage_ai/tests/data_preparation/models/block/dynamic/test_variables.py +332 -0
- mage_ai/tests/data_preparation/models/block/hook/test_hook_block.py +2 -2
- mage_ai/tests/data_preparation/models/block/platform/test_mixins.py +1 -1
- mage_ai/tests/data_preparation/models/block/sql/utils/test_shared.py +26 -1
- mage_ai/tests/data_preparation/models/block/test_global_data_product.py +5 -2
- mage_ai/tests/data_preparation/models/custom_templates/test_utils.py +5 -4
- mage_ai/tests/data_preparation/models/global_hooks/test_hook.py +3 -0
- mage_ai/tests/data_preparation/models/global_hooks/test_predicates.py +9 -3
- mage_ai/tests/data_preparation/models/test_block.py +115 -120
- mage_ai/tests/data_preparation/models/test_blocks_helper.py +114 -0
- mage_ai/tests/data_preparation/models/test_global_data_product.py +41 -24
- mage_ai/tests/data_preparation/models/test_pipeline.py +9 -6
- mage_ai/tests/data_preparation/models/test_project.py +4 -1
- mage_ai/tests/data_preparation/models/test_utils.py +80 -0
- mage_ai/tests/data_preparation/models/test_variable.py +242 -69
- mage_ai/tests/data_preparation/models/variables/__init__.py +0 -0
- mage_ai/tests/data_preparation/models/variables/test_summarizer.py +481 -0
- mage_ai/tests/data_preparation/storage/shared/__init__.py +0 -0
- mage_ai/tests/data_preparation/test_repo_manager.py +6 -7
- mage_ai/tests/data_preparation/test_variable_manager.py +57 -48
- mage_ai/tests/factory.py +64 -43
- mage_ai/tests/orchestration/db/models/test_schedules.py +3 -3
- mage_ai/tests/orchestration/db/models/test_schedules_dynamic_blocks.py +279 -0
- mage_ai/tests/orchestration/test_pipeline_scheduler.py +1 -0
- mage_ai/tests/orchestration/triggers/test_global_data_product.py +141 -138
- mage_ai/tests/orchestration/triggers/test_utils.py +3 -2
- mage_ai/tests/server/test_server.py +19 -0
- mage_ai/tests/services/k8s/test_job_manager.py +27 -6
- mage_ai/tests/streaming/sinks/test_oracledb.py +38 -0
- mage_ai/tests/test_shared.py +61 -0
- mage_ai/usage_statistics/logger.py +7 -2
- mage_ai/utils/code.py +33 -19
- mage_ai/version_control/branch/utils.py +2 -1
- mage_ai/version_control/models.py +3 -2
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/METADATA +6 -3
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/RECORD +555 -454
- mage_ai/data_preparation/models/global_data_product/constants.py +0 -6
- mage_ai/server/frontend_dist/_next/static/_krrrgup_C-dPOpX36S8I/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1557-df144fbd8b2208c3.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2631-b9f9bea3f1cf906d.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3782-ef4cd4f0b52072d0.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/4783-422429203610c318.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5699-6d708c6b2153ea08.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/635-0d6b7c8804bcd2dc.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7022-0d52dd8868621fb0.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7361-8a23dd8360593e7a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7966-f07b2913f7326b50.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8095-bdce03896ef9639a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/8146-6bed4e7401e067e6.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9265-d2a1aaec75ec69b8.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9440-4069842b90d4b801.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9624-59b2f803f9c88cd6.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9832-67896490f6e8a014.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-d9c89527266296f7.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/[...slug]-591abd392dc50ed4.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products-78e8e88f2a757a18.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-852d403c7bda21b3.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ff4bd7a8ec3bab40.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a8b61d8d239fd16f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-95ffcd3e2b27e567.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1dd1ed71d26c10d.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-1ed9045b2f1dfd65.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1417ad1c821d720a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-f028ef3880ed856c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-503049734a8b082f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-5b26eeda8aed8a7b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles-36fa165a48af586b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-8b793b3b696a2cd3.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-5753fac7c1bfdc88.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/KLL5mirre9d7_ZeEpaw3s/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-df144fbd8b2208c3.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2631-b9f9bea3f1cf906d.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3782-ef4cd4f0b52072d0.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4783-422429203610c318.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-6d708c6b2153ea08.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/635-0d6b7c8804bcd2dc.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7022-0d52dd8868621fb0.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-8a23dd8360593e7a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7966-f07b2913f7326b50.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8095-bdce03896ef9639a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8146-6bed4e7401e067e6.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9265-d2a1aaec75ec69b8.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9440-4069842b90d4b801.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-59b2f803f9c88cd6.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9832-67896490f6e8a014.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-d9c89527266296f7.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/[...slug]-591abd392dc50ed4.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products-78e8e88f2a757a18.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-852d403c7bda21b3.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ff4bd7a8ec3bab40.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a8b61d8d239fd16f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-95ffcd3e2b27e567.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1dd1ed71d26c10d.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-1ed9045b2f1dfd65.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1417ad1c821d720a.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-f028ef3880ed856c.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-503049734a8b082f.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-5b26eeda8aed8a7b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles-36fa165a48af586b.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-8b793b3b696a2cd3.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-5753fac7c1bfdc88.js +0 -1
- mage_ai/shared/memory.py +0 -90
- mage_ai/tests/data_preparation/models/block/dynamic/test_dynamic_helpers.py +0 -48
- /mage_ai/{tests/data_preparation/shared → ai/utils}/__init__.py +0 -0
- /mage_ai/server/frontend_dist/_next/static/{_krrrgup_C-dPOpX36S8I → UZLabyPgcxtZvp0O0EUUS}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{KLL5mirre9d7_ZeEpaw3s → kcptwoOU-JJJg6Vwpkfmx}/_ssgManifest.js +0 -0
- /mage_ai/tests/data_preparation/{shared → storage/shared}/test_secrets.py +0 -0
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/WHEEL +0 -0
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/top_level.txt +0 -0
|
@@ -29,6 +29,7 @@ from mage_ai.data_preparation.models.constants import (
|
|
|
29
29
|
PIPELINES_FOLDER,
|
|
30
30
|
BlockLanguage,
|
|
31
31
|
BlockType,
|
|
32
|
+
PipelineType,
|
|
32
33
|
)
|
|
33
34
|
from mage_ai.data_preparation.models.project import Project
|
|
34
35
|
from mage_ai.data_preparation.models.project.constants import FeatureUUID
|
|
@@ -215,12 +216,11 @@ class DataIntegrationMixin:
|
|
|
215
216
|
bool: True if it's a data integration block, False otherwise.
|
|
216
217
|
"""
|
|
217
218
|
if not self.pipeline:
|
|
218
|
-
|
|
219
219
|
return False
|
|
220
220
|
|
|
221
221
|
actual_project: Project = pipeline_project
|
|
222
222
|
if not actual_project:
|
|
223
|
-
actual_project =
|
|
223
|
+
actual_project = self.pipeline.project
|
|
224
224
|
|
|
225
225
|
if not actual_project.is_feature_enabled(
|
|
226
226
|
FeatureUUID.DATA_INTEGRATION_IN_BATCH_PIPELINE,
|
|
@@ -229,7 +229,8 @@ class DataIntegrationMixin:
|
|
|
229
229
|
return False
|
|
230
230
|
|
|
231
231
|
if self.type in [BlockType.DATA_LOADER, BlockType.DATA_EXPORTER] and \
|
|
232
|
-
BlockLanguage.YAML == self.language
|
|
232
|
+
BlockLanguage.YAML == self.language and \
|
|
233
|
+
self.pipeline.type != PipelineType.STREAMING:
|
|
233
234
|
|
|
234
235
|
return True
|
|
235
236
|
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
import os
|
|
2
2
|
from typing import Any, Dict, List, Tuple
|
|
3
3
|
|
|
4
|
+
from pandas.core.construction import Optional
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
|
|
7
|
+
def all_variable_uuids(
|
|
8
|
+
block, partition: Optional[str] = None, max_results: Optional[int] = None
|
|
9
|
+
) -> List[str]:
|
|
6
10
|
arr = __all_variable_uuids_and_file_paths_for_reducing_block_output(
|
|
7
11
|
block,
|
|
8
12
|
partition=partition,
|
|
9
13
|
)
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
arr = list(set([tup[0] for tup in arr]))
|
|
16
|
+
|
|
17
|
+
if max_results is not None:
|
|
18
|
+
arr = arr[:max_results]
|
|
19
|
+
|
|
20
|
+
return arr
|
|
12
21
|
|
|
13
22
|
|
|
14
23
|
def reduce_output_from_block(
|
|
@@ -99,9 +108,11 @@ def __all_variable_uuids_and_file_paths_for_reducing_block_output(
|
|
|
99
108
|
# e.g. output_0
|
|
100
109
|
dir_name = os.path.basename(os.path.normpath(dir_path))
|
|
101
110
|
|
|
102
|
-
variable_uuid_and_file_paths.append(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
111
|
+
variable_uuid_and_file_paths.append(
|
|
112
|
+
(
|
|
113
|
+
dir_name,
|
|
114
|
+
dir_path,
|
|
115
|
+
)
|
|
116
|
+
)
|
|
106
117
|
|
|
107
118
|
return variable_uuid_and_file_paths
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import time
|
|
2
|
-
from
|
|
3
|
-
from typing import Dict, List
|
|
2
|
+
from typing import Dict, List, Optional
|
|
4
3
|
|
|
5
4
|
import pandas as pd
|
|
6
5
|
|
|
@@ -13,63 +12,16 @@ from mage_ai.data_preparation.models.block.dynamic.variables import (
|
|
|
13
12
|
get_outputs_for_dynamic_block,
|
|
14
13
|
get_outputs_for_dynamic_child,
|
|
15
14
|
)
|
|
16
|
-
from mage_ai.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class DynamicChildController:
|
|
21
|
-
def __init__(self, block, block_run_id: int):
|
|
22
|
-
self.block = block
|
|
23
|
-
self.block_run_id = block_run_id
|
|
24
|
-
self._block_run = None
|
|
25
|
-
self._block_runs = None
|
|
26
|
-
self._pipeline_run = None
|
|
27
|
-
|
|
28
|
-
def __getattr__(self, name):
|
|
29
|
-
val = getattr(self.block, name)
|
|
30
|
-
|
|
31
|
-
def _missing(val=val, *args, **kwargs):
|
|
32
|
-
return val(*args, **kwargs)
|
|
33
|
-
|
|
34
|
-
if callable(val):
|
|
35
|
-
return _missing
|
|
36
|
-
|
|
37
|
-
return val
|
|
38
|
-
|
|
39
|
-
def block_run(self) -> BlockRun:
|
|
40
|
-
if self._block_run:
|
|
41
|
-
return self._block_run
|
|
42
|
-
|
|
43
|
-
self._block_run = BlockRun.query.get(self.block_run_id)
|
|
44
|
-
|
|
45
|
-
return self._block_run
|
|
46
|
-
|
|
47
|
-
def pipeline_run(self):
|
|
48
|
-
if self._pipeline_run:
|
|
49
|
-
return self._pipeline_run
|
|
50
|
-
|
|
51
|
-
self._pipeline_run = self.block_run().pipeline_run
|
|
52
|
-
|
|
53
|
-
return self._pipeline_run
|
|
54
|
-
|
|
55
|
-
def block_runs(self) -> List[BlockRun]:
|
|
56
|
-
if self._block_runs:
|
|
57
|
-
return self._block_runs
|
|
58
|
-
|
|
59
|
-
self._block_runs = BlockRun.query.filter(
|
|
60
|
-
BlockRun.pipeline_run_id == self.block_run().pipeline_run_id,
|
|
61
|
-
).all()
|
|
62
|
-
|
|
63
|
-
return self._block_runs
|
|
15
|
+
from mage_ai.data_preparation.models.block.dynamic.wrappers import (
|
|
16
|
+
DynamicBlockWrapperBase,
|
|
17
|
+
)
|
|
64
18
|
|
|
65
|
-
def is_completed(self) -> bool:
|
|
66
|
-
return True
|
|
67
19
|
|
|
20
|
+
class DynamicChildController(DynamicBlockWrapperBase):
|
|
68
21
|
def execute_sync(
|
|
69
22
|
self,
|
|
70
|
-
execution_partition: str = None,
|
|
71
|
-
|
|
72
|
-
logging_tags: Dict = None,
|
|
23
|
+
execution_partition: Optional[str] = None,
|
|
24
|
+
logging_tags: Optional[Dict] = None,
|
|
73
25
|
**kwargs,
|
|
74
26
|
) -> List[Dict]:
|
|
75
27
|
pipeline = self.block.pipeline
|
|
@@ -95,27 +47,10 @@ class DynamicChildController:
|
|
|
95
47
|
count = 0
|
|
96
48
|
while tries < 12 and count == 0:
|
|
97
49
|
# If this block tries to get the data too soon, it’ll return empty.
|
|
98
|
-
|
|
50
|
+
lazy_variable_controller = get_outputs_for_dynamic_child(
|
|
51
|
+
upstream_block,
|
|
99
52
|
execution_partition=execution_partition,
|
|
100
|
-
logger=logger,
|
|
101
|
-
logging_tags=logging_tags,
|
|
102
|
-
upstream_block=upstream_block,
|
|
103
|
-
):
|
|
104
|
-
return get_outputs_for_dynamic_child(
|
|
105
|
-
upstream_block,
|
|
106
|
-
execution_partition=execution_partition,
|
|
107
|
-
logger=logger,
|
|
108
|
-
logging_tags=logging_tags,
|
|
109
|
-
)
|
|
110
|
-
|
|
111
|
-
lazy_variable_controller = get_memory_usage(
|
|
112
|
-
logger=logger,
|
|
113
53
|
logging_tags=logging_tags,
|
|
114
|
-
message_prefix=(
|
|
115
|
-
f'DynamicChild {self.block.uuid} '
|
|
116
|
-
'execute_sync get_outputs_for_dynamic_child'
|
|
117
|
-
),
|
|
118
|
-
wrapped_function=__get,
|
|
119
54
|
)
|
|
120
55
|
|
|
121
56
|
if lazy_variable_controller is not None:
|
|
@@ -128,8 +63,9 @@ class DynamicChildController:
|
|
|
128
63
|
counts_by_upstream_block_uuid[upstream_block.uuid] = count
|
|
129
64
|
|
|
130
65
|
if is_dynamic:
|
|
131
|
-
metadata_by_upstream_block_uuid[upstream_block.uuid] =
|
|
132
|
-
|
|
66
|
+
metadata_by_upstream_block_uuid[upstream_block.uuid] = [
|
|
67
|
+
lazy_var_set.read_metadata() for lazy_var_set in lazy_variable_controller
|
|
68
|
+
]
|
|
133
69
|
elif is_dynamic:
|
|
134
70
|
tries = 0
|
|
135
71
|
count = 0
|
|
@@ -164,6 +100,9 @@ class DynamicChildController:
|
|
|
164
100
|
time.sleep(10)
|
|
165
101
|
tries += 1
|
|
166
102
|
|
|
103
|
+
if combos is None:
|
|
104
|
+
return []
|
|
105
|
+
|
|
167
106
|
block_run_dicts = []
|
|
168
107
|
|
|
169
108
|
for combo in combos:
|
|
@@ -180,31 +119,34 @@ class DynamicChildController:
|
|
|
180
119
|
if is_dynamic_child or is_dynamic:
|
|
181
120
|
count = counts_by_upstream_block_uuid.get(upstream_block.uuid)
|
|
182
121
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
metadata = metadata_by_upstream_block_uuid[upstream_block.uuid]
|
|
197
|
-
if parent_index < len(metadata):
|
|
198
|
-
metadata = metadata[parent_index]
|
|
199
|
-
|
|
200
|
-
if metadata.get('block_uuid'):
|
|
201
|
-
block_run_block_uuid = metadata.get('block_uuid')
|
|
202
|
-
|
|
203
|
-
if metadata.get('upstream_blocks'):
|
|
204
|
-
upstream_blocks_from_metadata.extend(
|
|
205
|
-
metadata.get('upstream_blocks'),
|
|
122
|
+
if count is not None and count >= 1:
|
|
123
|
+
parent_index = dynamic_block_index % count
|
|
124
|
+
|
|
125
|
+
if is_dynamic_child:
|
|
126
|
+
block_runs = block_runs_by_block_uuid[upstream_block.uuid]
|
|
127
|
+
block_runs = sorted(
|
|
128
|
+
[br for br in block_runs if br.block_uuid != upstream_block.uuid],
|
|
129
|
+
key=lambda br: br.id,
|
|
130
|
+
)
|
|
131
|
+
# This errors list index out of range
|
|
132
|
+
if parent_index < len(block_runs):
|
|
133
|
+
dynamic_upstream_block_uuids.append(
|
|
134
|
+
block_runs[parent_index].block_uuid
|
|
206
135
|
)
|
|
207
136
|
|
|
137
|
+
if metadata_by_upstream_block_uuid.get(upstream_block.uuid):
|
|
138
|
+
metadata = metadata_by_upstream_block_uuid[upstream_block.uuid]
|
|
139
|
+
if parent_index < len(metadata):
|
|
140
|
+
metadata = metadata[parent_index]
|
|
141
|
+
|
|
142
|
+
if metadata.get('block_uuid'):
|
|
143
|
+
block_run_block_uuid = metadata.get('block_uuid')
|
|
144
|
+
|
|
145
|
+
if metadata.get('upstream_blocks'):
|
|
146
|
+
upstream_blocks_from_metadata.extend(
|
|
147
|
+
metadata.get('upstream_blocks'),
|
|
148
|
+
)
|
|
149
|
+
|
|
208
150
|
block_run_dict = dict(
|
|
209
151
|
dynamic_block_index=dynamic_block_index,
|
|
210
152
|
dynamic_upstream_block_uuids=dynamic_upstream_block_uuids,
|
|
@@ -229,6 +171,3 @@ class DynamicChildController:
|
|
|
229
171
|
block_runs.append(block_run)
|
|
230
172
|
|
|
231
173
|
return block_runs
|
|
232
|
-
|
|
233
|
-
def run_tests(self, **kwargs):
|
|
234
|
-
pass
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
CHILD_DATA_VARIABLE_UUID = 'output_0'
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
from typing import Any, Iterable, List, Optional, Sequence
|
|
2
|
+
|
|
3
|
+
from mage_ai.data.tabular.reader import read_metadata
|
|
4
|
+
from mage_ai.data_preparation.models.block.dynamic.constants import (
|
|
5
|
+
CHILD_DATA_VARIABLE_UUID,
|
|
6
|
+
)
|
|
7
|
+
from mage_ai.data_preparation.models.block.dynamic.utils import (
|
|
8
|
+
is_dynamic_block,
|
|
9
|
+
is_dynamic_block_child,
|
|
10
|
+
should_reduce_output,
|
|
11
|
+
)
|
|
12
|
+
from mage_ai.data_preparation.models.variables.cache import VariableAggregateCache
|
|
13
|
+
from mage_ai.data_preparation.models.variables.constants import (
|
|
14
|
+
VariableAggregateDataType,
|
|
15
|
+
VariableAggregateSummaryGroupType,
|
|
16
|
+
)
|
|
17
|
+
from mage_ai.data_preparation.models.variables.summarizer import (
|
|
18
|
+
aggregate_summary_info_for_all_variables,
|
|
19
|
+
dynamic_block_index_paths,
|
|
20
|
+
get_aggregate_summary_info,
|
|
21
|
+
get_part_uuids,
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class DynamicItemCounter:
|
|
26
|
+
def __init__(
|
|
27
|
+
self,
|
|
28
|
+
block: Any,
|
|
29
|
+
dynamic_block_index: Optional[int] = None,
|
|
30
|
+
partition: Optional[str] = None,
|
|
31
|
+
variable_uuid: Optional[str] = None,
|
|
32
|
+
):
|
|
33
|
+
self.block = block
|
|
34
|
+
self.dynamic_block_index = dynamic_block_index
|
|
35
|
+
self.variable_uuid = variable_uuid or CHILD_DATA_VARIABLE_UUID
|
|
36
|
+
self.partition = partition
|
|
37
|
+
|
|
38
|
+
self._output = None
|
|
39
|
+
self._summary_information = None
|
|
40
|
+
|
|
41
|
+
@classmethod
|
|
42
|
+
def build_counter(
|
|
43
|
+
cls,
|
|
44
|
+
block: Any,
|
|
45
|
+
downstream_block: Optional[Any] = None,
|
|
46
|
+
dynamic_block_index: Optional[int] = None,
|
|
47
|
+
partition: Optional[str] = None,
|
|
48
|
+
variable_uuid: Optional[str] = None,
|
|
49
|
+
):
|
|
50
|
+
counter_class = None
|
|
51
|
+
is_dynamic_parent = (
|
|
52
|
+
(
|
|
53
|
+
block.should_dynamically_generate_block(downstream_block)
|
|
54
|
+
if downstream_block is not None
|
|
55
|
+
else block.is_dynamic_parent
|
|
56
|
+
)
|
|
57
|
+
if block.is_dynamic_v2
|
|
58
|
+
else is_dynamic_block(block)
|
|
59
|
+
)
|
|
60
|
+
is_dynamic_child = (
|
|
61
|
+
block.is_dynamic_child if block.is_dynamic_v2 else is_dynamic_block_child(block)
|
|
62
|
+
)
|
|
63
|
+
if is_dynamic_child:
|
|
64
|
+
if is_dynamic_parent:
|
|
65
|
+
counter_class = DynamicDuoItemCounter
|
|
66
|
+
else:
|
|
67
|
+
counter_class = DynamicChildItemCounter
|
|
68
|
+
elif is_dynamic_parent:
|
|
69
|
+
counter_class = DynamicBlockItemCounter
|
|
70
|
+
|
|
71
|
+
if counter_class is not None:
|
|
72
|
+
return counter_class(
|
|
73
|
+
block,
|
|
74
|
+
dynamic_block_index=dynamic_block_index,
|
|
75
|
+
partition=partition,
|
|
76
|
+
variable_uuid=variable_uuid,
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
@property
|
|
80
|
+
def variable_manager(self):
|
|
81
|
+
return self.block.variable_manager
|
|
82
|
+
|
|
83
|
+
@property
|
|
84
|
+
def pipeline(self):
|
|
85
|
+
return self.block.pipeline
|
|
86
|
+
|
|
87
|
+
@property
|
|
88
|
+
def output(self):
|
|
89
|
+
if self._output is not None:
|
|
90
|
+
return self._output
|
|
91
|
+
|
|
92
|
+
self._output = self.variable.read_data()
|
|
93
|
+
return self._output
|
|
94
|
+
|
|
95
|
+
@property
|
|
96
|
+
def variable(self):
|
|
97
|
+
return self.variable_manager.get_variable_object(
|
|
98
|
+
self.pipeline.uuid, self.block.uuid, self.variable_uuid, partition=self.partition
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
def item_count(self, downstream_block: Optional[Any] = None) -> int:
|
|
102
|
+
return 0
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
class DynamicBlockItemCounter(DynamicItemCounter):
|
|
106
|
+
@property
|
|
107
|
+
def summary_information(self) -> Optional[VariableAggregateCache]:
|
|
108
|
+
if self._summary_information is not None:
|
|
109
|
+
return self._summary_information
|
|
110
|
+
|
|
111
|
+
self._summary_information = get_aggregate_summary_info(
|
|
112
|
+
self.block.variable_manager,
|
|
113
|
+
pipeline_uuid=self.block.pipeline.uuid,
|
|
114
|
+
block_uuid=self.block.uuid,
|
|
115
|
+
variable_uuid=CHILD_DATA_VARIABLE_UUID,
|
|
116
|
+
data_type=VariableAggregateDataType.STATISTICS,
|
|
117
|
+
partition=self.partition,
|
|
118
|
+
)
|
|
119
|
+
return self._summary_information
|
|
120
|
+
|
|
121
|
+
@property
|
|
122
|
+
def part_uuids(self) -> Optional[Sequence]:
|
|
123
|
+
return get_part_uuids(self.variable)
|
|
124
|
+
|
|
125
|
+
@property
|
|
126
|
+
def num_rows_from_parquet_metadata(self) -> Optional[int]:
|
|
127
|
+
metadata = read_metadata(self.variable.variable_path)
|
|
128
|
+
if metadata:
|
|
129
|
+
num_rows = metadata.get('num_rows') or 0
|
|
130
|
+
if num_rows is not None and str(num_rows).isdigit():
|
|
131
|
+
return int(str(num_rows))
|
|
132
|
+
|
|
133
|
+
return 0
|
|
134
|
+
|
|
135
|
+
def item_count(self, downstream_block: Optional[Any] = None) -> int:
|
|
136
|
+
"""
|
|
137
|
+
Try the following methods to calculate the item count by starting with the
|
|
138
|
+
lowest resource consumption method first.
|
|
139
|
+
|
|
140
|
+
1. Read the original_row_count from:
|
|
141
|
+
block_uuid/
|
|
142
|
+
output_0/
|
|
143
|
+
statistics.json
|
|
144
|
+
2. Counting the number of parts within an output variable directory:
|
|
145
|
+
block_uuid/
|
|
146
|
+
output_0/
|
|
147
|
+
0/
|
|
148
|
+
filename.extension
|
|
149
|
+
3. Parquet metadata: read_metadata('source_directory')['num_rows']
|
|
150
|
+
block_uuid/
|
|
151
|
+
output_0/
|
|
152
|
+
chunks/
|
|
153
|
+
chunk=0/
|
|
154
|
+
filename.parquet
|
|
155
|
+
filename.parquet
|
|
156
|
+
4. Read the file into memory (worst case)
|
|
157
|
+
"""
|
|
158
|
+
|
|
159
|
+
if (
|
|
160
|
+
self.summary_information is not None
|
|
161
|
+
and self.summary_information.statistics is not None
|
|
162
|
+
and self.summary_information.statistics.original_row_count is not None
|
|
163
|
+
):
|
|
164
|
+
return self.summary_information.statistics.original_row_count
|
|
165
|
+
|
|
166
|
+
if self.part_uuids is not None:
|
|
167
|
+
return len(self.part_uuids)
|
|
168
|
+
|
|
169
|
+
if self.num_rows_from_parquet_metadata is not None:
|
|
170
|
+
return self.num_rows_from_parquet_metadata
|
|
171
|
+
|
|
172
|
+
if self.output is not None and isinstance(self.output, Iterable):
|
|
173
|
+
return sum(1 for _ in self.output)
|
|
174
|
+
|
|
175
|
+
return 0
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
class DynamicChildItemCounter(DynamicItemCounter):
|
|
179
|
+
@property
|
|
180
|
+
def part_uuids(self) -> Optional[Sequence]:
|
|
181
|
+
return dynamic_block_index_paths(self.variable)
|
|
182
|
+
|
|
183
|
+
def item_count(self, downstream_block: Optional[Any] = None) -> int:
|
|
184
|
+
"""
|
|
185
|
+
1. Similar to counting the number of parts,
|
|
186
|
+
count the number of dynamic child block directories
|
|
187
|
+
block_uuid/
|
|
188
|
+
0/
|
|
189
|
+
output_0/
|
|
190
|
+
filename.extension
|
|
191
|
+
2. If dynamic child block reduces output, the count is 1
|
|
192
|
+
"""
|
|
193
|
+
|
|
194
|
+
if (
|
|
195
|
+
(not self.block.is_dynamic_v2 and should_reduce_output(self.block))
|
|
196
|
+
or (
|
|
197
|
+
downstream_block is not None
|
|
198
|
+
and (
|
|
199
|
+
self.block.should_reduce_output_for_downstream_block(downstream_block)
|
|
200
|
+
or downstream_block.should_reduce_output_from_upstream_block(self.block)
|
|
201
|
+
)
|
|
202
|
+
)
|
|
203
|
+
) or self.block.should_reduce_output:
|
|
204
|
+
return 1
|
|
205
|
+
|
|
206
|
+
if self.part_uuids is not None:
|
|
207
|
+
return len(self.part_uuids)
|
|
208
|
+
|
|
209
|
+
if self.output is not None and isinstance(self.output, Iterable):
|
|
210
|
+
return sum(1 for _ in self.output)
|
|
211
|
+
|
|
212
|
+
return 0
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
class DynamicDuoItemCounter(DynamicItemCounter):
|
|
216
|
+
@property
|
|
217
|
+
def summary_information(self) -> Optional[VariableAggregateCache]:
|
|
218
|
+
if self._summary_information is not None:
|
|
219
|
+
return self._summary_information
|
|
220
|
+
|
|
221
|
+
aggregate_summary_info_for_all_variables(
|
|
222
|
+
self.block.variable_manager,
|
|
223
|
+
pipeline_uuid=self.block.pipeline.uuid,
|
|
224
|
+
block_uuid=self.block.uuid,
|
|
225
|
+
partition=self.partition,
|
|
226
|
+
)
|
|
227
|
+
self._summary_information = get_aggregate_summary_info(
|
|
228
|
+
self.block.variable_manager,
|
|
229
|
+
self.block.pipeline.uuid,
|
|
230
|
+
self.block.uuid,
|
|
231
|
+
self.variable_uuid,
|
|
232
|
+
VariableAggregateDataType.STATISTICS,
|
|
233
|
+
group_type=VariableAggregateSummaryGroupType.DYNAMIC,
|
|
234
|
+
partition=self.partition,
|
|
235
|
+
)
|
|
236
|
+
|
|
237
|
+
return self._summary_information
|
|
238
|
+
|
|
239
|
+
@property
|
|
240
|
+
def indexes(self) -> List[int]:
|
|
241
|
+
dynamic_child_counter = DynamicChildItemCounter(
|
|
242
|
+
self.block,
|
|
243
|
+
partition=self.partition,
|
|
244
|
+
variable_uuid=self.variable_uuid,
|
|
245
|
+
)
|
|
246
|
+
return [i for i in range(dynamic_child_counter.item_count())]
|
|
247
|
+
|
|
248
|
+
def calculate_item_count(self) -> int:
|
|
249
|
+
return sum([
|
|
250
|
+
DynamicBlockItemCounter(
|
|
251
|
+
self.block,
|
|
252
|
+
dynamic_block_index=dynamic_block_index,
|
|
253
|
+
partition=self.partition,
|
|
254
|
+
variable_uuid=self.variable_uuid,
|
|
255
|
+
).item_count()
|
|
256
|
+
for dynamic_block_index in self.indexes
|
|
257
|
+
])
|
|
258
|
+
|
|
259
|
+
def item_count(self, downstream_block: Optional[Any] = None) -> int:
|
|
260
|
+
"""
|
|
261
|
+
If block is dynamic and a dynamic child,
|
|
262
|
+
the count is the sum of dynamic_output_item_count() across all dynamic child blocks:
|
|
263
|
+
0/
|
|
264
|
+
-> [1, 2, 3]
|
|
265
|
+
1/
|
|
266
|
+
-> [4, 5]
|
|
267
|
+
2/
|
|
268
|
+
-> [6, 7, 8]
|
|
269
|
+
Count: 8
|
|
270
|
+
|
|
271
|
+
After a block completes, the statistics.json must be created, aggregated, and mapped:
|
|
272
|
+
|
|
273
|
+
block_uuid/
|
|
274
|
+
0/
|
|
275
|
+
output_0/
|
|
276
|
+
0/
|
|
277
|
+
data.parquet
|
|
278
|
+
statistics.json
|
|
279
|
+
1/
|
|
280
|
+
output_1/
|
|
281
|
+
1/
|
|
282
|
+
output_0/
|
|
283
|
+
data.json
|
|
284
|
+
statistics.json
|
|
285
|
+
"""
|
|
286
|
+
if (
|
|
287
|
+
self.summary_information
|
|
288
|
+
and self.summary_information.dynamic
|
|
289
|
+
and self.summary_information.dynamic.statistics
|
|
290
|
+
):
|
|
291
|
+
return sum(
|
|
292
|
+
sum(i.original_row_count for i in arr)
|
|
293
|
+
for arr in self.summary_information.dynamic.statistics
|
|
294
|
+
)
|
|
295
|
+
|
|
296
|
+
return self.calculate_item_count()
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from typing import List
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def calculate_dynamic_index_data_index(
|
|
5
|
+
dynamic_block_index: int,
|
|
6
|
+
upstream_index: int,
|
|
7
|
+
child_data_count: int,
|
|
8
|
+
item_counts: List[int],
|
|
9
|
+
):
|
|
10
|
+
# The step size for each upstream index
|
|
11
|
+
step_size = 1
|
|
12
|
+
for i in range(upstream_index + 1, len(item_counts)):
|
|
13
|
+
step_size *= item_counts[i]
|
|
14
|
+
|
|
15
|
+
# Calculate the index with modulo to ensure it fits within child_data_count
|
|
16
|
+
return (dynamic_block_index // step_size) % child_data_count
|