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
|
@@ -12,7 +12,6 @@ from mage_ai.settings.platform import (
|
|
|
12
12
|
get_repo_paths_for_file_path,
|
|
13
13
|
project_platform_activated,
|
|
14
14
|
)
|
|
15
|
-
from mage_ai.settings.repo import get_repo_path
|
|
16
15
|
from mage_ai.settings.utils import base_repo_path
|
|
17
16
|
from mage_ai.shared.path_fixer import (
|
|
18
17
|
add_absolute_path,
|
|
@@ -147,11 +146,12 @@ class ProjectPlatformAccessible:
|
|
|
147
146
|
|
|
148
147
|
root_project_path, path, file_path_base = parts
|
|
149
148
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
149
|
+
if file_path_base and path and root_project_path:
|
|
150
|
+
return File(
|
|
151
|
+
filename=file_path_base,
|
|
152
|
+
dir_path=path,
|
|
153
|
+
repo_path=root_project_path,
|
|
154
|
+
)
|
|
155
155
|
|
|
156
156
|
def hydrate_dbt_nodes(self, nodes_default: Dict, nodes_init: List[Dict]) -> Dict:
|
|
157
157
|
"""
|
|
@@ -173,7 +173,6 @@ class ProjectPlatformAccessible:
|
|
|
173
173
|
# /home/src/default_platform/default_repo/dbt/demo
|
|
174
174
|
# node['original_file_path']
|
|
175
175
|
# models/example/model.sql
|
|
176
|
-
print('self.project_path', self.project_path)
|
|
177
176
|
return {
|
|
178
177
|
node['unique_id']: {
|
|
179
178
|
# file_path needs to be:
|
|
@@ -258,7 +257,7 @@ class ProjectPlatformAccessible:
|
|
|
258
257
|
if paths:
|
|
259
258
|
return paths.get('full_path')
|
|
260
259
|
|
|
261
|
-
return
|
|
260
|
+
return None
|
|
262
261
|
|
|
263
262
|
def __file_source(self) -> str:
|
|
264
263
|
return self.configuration.get('file_source') if self.configuration else None
|
|
@@ -9,20 +9,25 @@ import simplejson
|
|
|
9
9
|
|
|
10
10
|
from mage_ai.data_preparation.models.block import Block
|
|
11
11
|
from mage_ai.data_preparation.models.constants import BlockType
|
|
12
|
-
from mage_ai.data_preparation.models.
|
|
12
|
+
from mage_ai.data_preparation.models.variables.constants import (
|
|
13
|
+
DATAFRAME_CSV_FILE,
|
|
14
|
+
VariableType,
|
|
15
|
+
)
|
|
13
16
|
from mage_ai.shared.parsers import encode_complex
|
|
14
17
|
|
|
15
18
|
BLOCK_TYPE_TO_EXECUTION_TEMPLATE = {
|
|
16
|
-
BlockType.DATA_LOADER:
|
|
17
|
-
BlockType.TRANSFORMER:
|
|
18
|
-
BlockType.DATA_EXPORTER:
|
|
19
|
+
BlockType.DATA_LOADER: "data_loader.jinja",
|
|
20
|
+
BlockType.TRANSFORMER: "transformer.jinja",
|
|
21
|
+
BlockType.DATA_EXPORTER: "data_exporter.jinja",
|
|
19
22
|
}
|
|
20
23
|
|
|
21
24
|
template_env = jinja2.Environment(
|
|
22
|
-
loader=jinja2.FileSystemLoader(
|
|
23
|
-
os.path.
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
loader=jinja2.FileSystemLoader(
|
|
26
|
+
os.path.join(
|
|
27
|
+
os.path.dirname(__file__),
|
|
28
|
+
"templates",
|
|
29
|
+
)
|
|
30
|
+
),
|
|
26
31
|
lstrip_blocks=True,
|
|
27
32
|
trim_blocks=True,
|
|
28
33
|
)
|
|
@@ -34,9 +39,12 @@ def execute_r_code(
|
|
|
34
39
|
execution_partition: str = None,
|
|
35
40
|
global_vars: Dict = None,
|
|
36
41
|
):
|
|
37
|
-
input_variable_objects =
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
input_variable_objects = (
|
|
43
|
+
block.input_variable_objects(
|
|
44
|
+
execution_partition=execution_partition,
|
|
45
|
+
)
|
|
46
|
+
or []
|
|
47
|
+
)
|
|
40
48
|
|
|
41
49
|
# Render R script with user code
|
|
42
50
|
execution_code = __render_r_script(
|
|
@@ -46,8 +54,8 @@ def execute_r_code(
|
|
|
46
54
|
global_vars=global_vars,
|
|
47
55
|
input_variable_objects=input_variable_objects,
|
|
48
56
|
)
|
|
49
|
-
file_path = f
|
|
50
|
-
with open(file_path,
|
|
57
|
+
file_path = f"/tmp/{str(uuid.uuid4())}.r"
|
|
58
|
+
with open(file_path, "w") as foutput:
|
|
51
59
|
foutput.write(execution_code)
|
|
52
60
|
|
|
53
61
|
# Convert input variable to csv format
|
|
@@ -60,14 +68,21 @@ def execute_r_code(
|
|
|
60
68
|
output_variable_objects = block.output_variable_objects(
|
|
61
69
|
execution_partition=execution_partition,
|
|
62
70
|
)
|
|
63
|
-
output_variable_objects = [
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
71
|
+
output_variable_objects = [
|
|
72
|
+
v
|
|
73
|
+
for v in output_variable_objects
|
|
74
|
+
if os.path.exists(
|
|
75
|
+
os.path.join(
|
|
76
|
+
output_variable_objects[0].variable_path,
|
|
77
|
+
DATAFRAME_CSV_FILE,
|
|
78
|
+
)
|
|
79
|
+
)
|
|
80
|
+
]
|
|
68
81
|
|
|
69
82
|
if len(output_variable_objects) > 0:
|
|
70
|
-
df = pd.read_csv(
|
|
83
|
+
df = pd.read_csv(
|
|
84
|
+
os.path.join(output_variable_objects[0].variable_path, DATAFRAME_CSV_FILE)
|
|
85
|
+
)
|
|
71
86
|
else:
|
|
72
87
|
df = None
|
|
73
88
|
return df
|
|
@@ -81,7 +96,7 @@ def __convert_inputs_to_csvs(input_variable_objects):
|
|
|
81
96
|
|
|
82
97
|
def __render_global_vars(global_vars: Dict = None):
|
|
83
98
|
if not global_vars:
|
|
84
|
-
return
|
|
99
|
+
return ""
|
|
85
100
|
|
|
86
101
|
def format_value(val):
|
|
87
102
|
if type(val) is int or type(val) is float:
|
|
@@ -96,9 +111,9 @@ def __render_global_vars(global_vars: Dict = None):
|
|
|
96
111
|
else:
|
|
97
112
|
return f"'{val}'"
|
|
98
113
|
|
|
99
|
-
var_list = [f
|
|
100
|
-
val_list_str =
|
|
101
|
-
return f
|
|
114
|
+
var_list = [f"{k}={format_value(v)}" for k, v in global_vars.items()]
|
|
115
|
+
val_list_str = ", ".join(var_list)
|
|
116
|
+
return f"global_vars = c({val_list_str})"
|
|
102
117
|
|
|
103
118
|
|
|
104
119
|
def __render_r_script(
|
|
@@ -112,12 +127,12 @@ def __render_r_script(
|
|
|
112
127
|
input_variable_objects = []
|
|
113
128
|
if block.type not in BLOCK_TYPE_TO_EXECUTION_TEMPLATE:
|
|
114
129
|
raise Exception(
|
|
115
|
-
f
|
|
130
|
+
f"Block execution for {block.type} with R language is not supported.",
|
|
116
131
|
)
|
|
117
132
|
template = template_env.get_template(BLOCK_TYPE_TO_EXECUTION_TEMPLATE[block.type])
|
|
118
133
|
|
|
119
134
|
output_variable_object = block.variable_object(
|
|
120
|
-
|
|
135
|
+
"output_0",
|
|
121
136
|
execution_partition=execution_partition,
|
|
122
137
|
)
|
|
123
138
|
os.makedirs(output_variable_object.variable_path, exist_ok=True)
|
|
@@ -125,23 +140,26 @@ def __render_r_script(
|
|
|
125
140
|
|
|
126
141
|
global_vars_str = __render_global_vars(global_vars=global_vars)
|
|
127
142
|
|
|
128
|
-
return
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
143
|
+
return (
|
|
144
|
+
template.render(
|
|
145
|
+
code=code,
|
|
146
|
+
global_vars=global_vars_str,
|
|
147
|
+
input_paths=[
|
|
148
|
+
os.path.join(v.variable_path, DATAFRAME_CSV_FILE)
|
|
149
|
+
for v in input_variable_objects
|
|
150
|
+
],
|
|
151
|
+
input_vars_str=", ".join(
|
|
152
|
+
[f"df_{i + 1}" for i in range(len(input_variable_objects))]
|
|
153
|
+
),
|
|
154
|
+
output_path=output_path,
|
|
155
|
+
)
|
|
156
|
+
+ "\n"
|
|
157
|
+
)
|
|
136
158
|
|
|
137
159
|
|
|
138
160
|
def __execute_r_code(file_path: str):
|
|
139
161
|
subprocess.run(
|
|
140
|
-
[
|
|
141
|
-
'Rscript',
|
|
142
|
-
'--vanilla',
|
|
143
|
-
file_path
|
|
144
|
-
],
|
|
162
|
+
["Rscript", "--vanilla", file_path],
|
|
145
163
|
check=True,
|
|
146
164
|
)
|
|
147
165
|
|
|
File without changes
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
from typing import Any, List
|
|
3
|
+
|
|
4
|
+
from mage_ai.shared.models import BaseDataClass
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@dataclass
|
|
8
|
+
class RemoteBlock(BaseDataClass):
|
|
9
|
+
block_uuid: str
|
|
10
|
+
execution_partition: str = None
|
|
11
|
+
pipeline_uuid: str = None
|
|
12
|
+
repo_path: str = None
|
|
13
|
+
|
|
14
|
+
def __post_init__(self):
|
|
15
|
+
self._block = None
|
|
16
|
+
self._pipeline = None
|
|
17
|
+
|
|
18
|
+
@property
|
|
19
|
+
def pipeline(self):
|
|
20
|
+
from mage_ai.data_preparation.models.pipeline import Pipeline
|
|
21
|
+
|
|
22
|
+
if self._pipeline:
|
|
23
|
+
return self._pipeline
|
|
24
|
+
|
|
25
|
+
self._pipeline = Pipeline.get(
|
|
26
|
+
self.pipeline_uuid,
|
|
27
|
+
all_projects=True,
|
|
28
|
+
check_if_exists=False,
|
|
29
|
+
repo_path=self.repo_path,
|
|
30
|
+
use_repo_path=True if self.repo_path else False,
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
return self._pipeline
|
|
34
|
+
|
|
35
|
+
@property
|
|
36
|
+
def block(self):
|
|
37
|
+
if self._block:
|
|
38
|
+
return self._block
|
|
39
|
+
|
|
40
|
+
self._block = self.pipeline.get_block(self.block_uuid)
|
|
41
|
+
|
|
42
|
+
return self._block
|
|
43
|
+
|
|
44
|
+
@property
|
|
45
|
+
def variable_uuids(self):
|
|
46
|
+
return self.block.output_variables(execution_partition=self.execution_partition)
|
|
47
|
+
|
|
48
|
+
def get_outputs(self, **kwargs) -> List[Any]:
|
|
49
|
+
arr = []
|
|
50
|
+
for variable_uuid in self.variable_uuids:
|
|
51
|
+
output = self.pipeline.get_block_variable(
|
|
52
|
+
self.block_uuid,
|
|
53
|
+
variable_uuid,
|
|
54
|
+
partition=self.execution_partition,
|
|
55
|
+
)
|
|
56
|
+
arr.append(output)
|
|
57
|
+
|
|
58
|
+
return arr
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from mage_ai.data_preparation.models.block.settings.dynamic.constants import ModeType
|
|
4
|
+
from mage_ai.data_preparation.models.block.settings.dynamic.models import (
|
|
5
|
+
DynamicConfiguration,
|
|
6
|
+
ModeSettings,
|
|
7
|
+
)
|
|
8
|
+
from mage_ai.shared.array import find
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class DynamicMixin:
|
|
12
|
+
"""
|
|
13
|
+
How the configuration looks in a pipeline’s metadata.yaml
|
|
14
|
+
|
|
15
|
+
- uuid: block_uuid
|
|
16
|
+
configuration:
|
|
17
|
+
dynamic:
|
|
18
|
+
parent: true
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
configuration = dict(dynamic=None)
|
|
22
|
+
downstream_blocks = []
|
|
23
|
+
replicated_block = None
|
|
24
|
+
upstream_blocks = []
|
|
25
|
+
uuid = None
|
|
26
|
+
uuid_replicated = None
|
|
27
|
+
|
|
28
|
+
def is_original_block(self, block_uuid: str) -> bool:
|
|
29
|
+
return self.uuid == block_uuid or (
|
|
30
|
+
self.replicated_block is not None and self.uuid_replicated == block_uuid
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
@property
|
|
34
|
+
def is_dynamic_v2(self) -> bool:
|
|
35
|
+
from mage_ai.settings.server import DYNAMIC_BLOCKS_V2
|
|
36
|
+
|
|
37
|
+
return DYNAMIC_BLOCKS_V2
|
|
38
|
+
|
|
39
|
+
@property
|
|
40
|
+
def is_dynamic_streaming(self) -> bool:
|
|
41
|
+
return self.is_dynamic_v2 and (
|
|
42
|
+
(self.is_dynamic_parent and self.is_dynamic_stream_mode_enabled)
|
|
43
|
+
or self.is_dynamic_child_streaming
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
@property
|
|
47
|
+
def is_dynamic_parent(self) -> bool:
|
|
48
|
+
return self.__dynamic_configuration().parent is not None
|
|
49
|
+
|
|
50
|
+
@property
|
|
51
|
+
def is_dynamic_child(self) -> bool:
|
|
52
|
+
return any(
|
|
53
|
+
upstream_block.should_dynamically_generate_block(self)
|
|
54
|
+
or upstream_block.is_dynamic_child
|
|
55
|
+
for upstream_block in self.upstream_blocks
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def is_dynamic_child_streaming(self) -> bool:
|
|
60
|
+
return self.is_dynamic_v2 and any(
|
|
61
|
+
(
|
|
62
|
+
upstream_block.should_dynamically_generate_block(self)
|
|
63
|
+
and upstream_block.is_dynamic_stream_mode_enabled
|
|
64
|
+
)
|
|
65
|
+
or upstream_block.is_dynamic_child_streaming
|
|
66
|
+
for upstream_block in self.upstream_blocks
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
def should_reduce_output(self) -> bool:
|
|
71
|
+
return self.__dynamic_configuration().reduce_output is not None
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def is_dynamic_stream_mode_enabled(self) -> bool:
|
|
75
|
+
return self.settings_for_mode(ModeType.STREAM) is not None
|
|
76
|
+
|
|
77
|
+
def build_dynamic_uuid(self, index: int) -> str:
|
|
78
|
+
return ':'.join([self.uuid or '__missing_uuid__', str(index)])
|
|
79
|
+
|
|
80
|
+
def settings_for_mode(self, mode_type: ModeType) -> Optional[ModeSettings]:
|
|
81
|
+
modes = self.__dynamic_configuration().modes
|
|
82
|
+
if modes is not None:
|
|
83
|
+
return find(lambda ms: ms.type == mode_type, modes)
|
|
84
|
+
|
|
85
|
+
def should_reduce_output_from_upstream_block(self, block) -> bool:
|
|
86
|
+
reduce_output_upstream = self.__dynamic_configuration().reduce_output_upstream or []
|
|
87
|
+
return reduce_output_upstream is not None and block.uuid in reduce_output_upstream
|
|
88
|
+
|
|
89
|
+
def should_reduce_output_for_downstream_block(self, block) -> bool:
|
|
90
|
+
reduce_output = self.__dynamic_configuration().reduce_output
|
|
91
|
+
|
|
92
|
+
if reduce_output is True:
|
|
93
|
+
return True
|
|
94
|
+
|
|
95
|
+
if isinstance(reduce_output, list):
|
|
96
|
+
return block.uuid in reduce_output
|
|
97
|
+
|
|
98
|
+
return False
|
|
99
|
+
|
|
100
|
+
def should_dynamically_generate_block(self, block) -> bool:
|
|
101
|
+
parent = self.__dynamic_configuration().parent
|
|
102
|
+
|
|
103
|
+
if parent is True:
|
|
104
|
+
return True
|
|
105
|
+
|
|
106
|
+
if isinstance(parent, list):
|
|
107
|
+
return block.uuid in parent
|
|
108
|
+
|
|
109
|
+
return False
|
|
110
|
+
|
|
111
|
+
def __dynamic_configuration(self) -> DynamicConfiguration:
|
|
112
|
+
if self.configuration:
|
|
113
|
+
config = self.configuration.get('dynamic', {})
|
|
114
|
+
if config and isinstance(config, dict):
|
|
115
|
+
return DynamicConfiguration.load(**config)
|
|
116
|
+
elif isinstance(config, DynamicConfiguration):
|
|
117
|
+
return config
|
|
118
|
+
return DynamicConfiguration()
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
from typing import List, Optional, Union
|
|
3
|
+
|
|
4
|
+
from mage_ai.data.tabular.models import BatchSettings
|
|
5
|
+
from mage_ai.data_preparation.models.block.settings.dynamic.constants import ModeType
|
|
6
|
+
from mage_ai.shared.models import BaseDataClass
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@dataclass
|
|
10
|
+
class ModeSettings(BaseDataClass):
|
|
11
|
+
type: ModeType
|
|
12
|
+
poll_interval: Optional[int] = None
|
|
13
|
+
|
|
14
|
+
def __post_init__(self):
|
|
15
|
+
self.serialize_attribute_enums('type', ModeType)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@dataclass
|
|
19
|
+
class DynamicConfiguration(BaseDataClass):
|
|
20
|
+
batch_settings: Optional[BatchSettings] = None
|
|
21
|
+
modes: Optional[List[ModeSettings]] = None
|
|
22
|
+
# Enable for all downstream or choose specific downstream blocks
|
|
23
|
+
parent: Optional[Union[List[str], bool]] = None
|
|
24
|
+
# Enable for all downstream or choose specific downstream blocks
|
|
25
|
+
reduce_output: Optional[Union[List[str], bool]] = None
|
|
26
|
+
# As a dynamic child, choose which upstream blocks to reduce their output
|
|
27
|
+
reduce_output_upstream: Optional[List[str]] = None
|
|
28
|
+
|
|
29
|
+
def __post_init__(self):
|
|
30
|
+
self.serialize_attribute_class('batch_settings', BatchSettings)
|
|
31
|
+
self.serialize_attribute_classes('modes', ModeSettings)
|
|
File without changes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from typing import Dict, Optional
|
|
2
|
+
|
|
3
|
+
from mage_ai.data_preparation.models.block.settings.global_data_products.models import (
|
|
4
|
+
GlobalDataProductConfiguration,
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class GlobalDataProductsMixin:
|
|
9
|
+
configuration = dict(global_data_products=None)
|
|
10
|
+
|
|
11
|
+
def global_data_products_configuration(
|
|
12
|
+
self,
|
|
13
|
+
) -> Optional[Dict[str, GlobalDataProductConfiguration]]:
|
|
14
|
+
if self.configuration:
|
|
15
|
+
configs = self.configuration.get('global_data_products', {})
|
|
16
|
+
if configs and isinstance(configs, dict):
|
|
17
|
+
return {
|
|
18
|
+
k: GlobalDataProductConfiguration.load(**v) if isinstance(v, dict) else v
|
|
19
|
+
for k, v in configs.items()
|
|
20
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
from enum import Enum
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from mage_ai.shared.models import BaseDataClass
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class GlobalDataProductObjectType(str, Enum):
|
|
9
|
+
BLOCK = 'block'
|
|
10
|
+
PIPELINE = 'pipeline'
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@dataclass
|
|
14
|
+
class OutdatedAfterSettings(BaseDataClass):
|
|
15
|
+
months: Optional[int] = None
|
|
16
|
+
seconds: Optional[int] = None
|
|
17
|
+
weeks: Optional[int] = None
|
|
18
|
+
years: Optional[int] = None
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@dataclass
|
|
22
|
+
class OutdatedStartingAtSettings(BaseDataClass):
|
|
23
|
+
day_of_month: Optional[int] = None
|
|
24
|
+
day_of_week: Optional[int] = None
|
|
25
|
+
day_of_year: Optional[int] = None
|
|
26
|
+
hour_of_day: Optional[int] = None
|
|
27
|
+
minute_of_hour: Optional[int] = None
|
|
28
|
+
month_of_year: Optional[int] = None
|
|
29
|
+
second_of_minute: Optional[int] = None
|
|
30
|
+
week_of_month: Optional[int] = None
|
|
31
|
+
week_of_year: Optional[int] = None
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
@dataclass
|
|
35
|
+
class GlobalDataProductConfiguration(BaseDataClass):
|
|
36
|
+
uuid: str
|
|
37
|
+
object_type: Optional[GlobalDataProductObjectType] = None
|
|
38
|
+
object_uuid: Optional[str] = None
|
|
39
|
+
outdated_after: Optional[OutdatedAfterSettings] = None
|
|
40
|
+
outdated_starting_at: Optional[OutdatedStartingAtSettings] = None
|
|
41
|
+
project: Optional[str] = None
|
|
42
|
+
|
|
43
|
+
def __post_init__(self):
|
|
44
|
+
self.serialize_attribute_class('outdated_after', OutdatedAfterSettings)
|
|
45
|
+
self.serialize_attribute_class('outdated_starting_at', OutdatedStartingAtSettings)
|
|
46
|
+
self.serialize_attribute_enum('object_type', GlobalDataProductObjectType)
|
|
File without changes
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
from typing import Dict, List, Optional
|
|
2
|
+
|
|
3
|
+
from mage_ai.data.constants import InputDataType
|
|
4
|
+
from mage_ai.data.tabular.models import BatchSettings
|
|
5
|
+
from mage_ai.data_preparation.models.block.settings.variables.models import (
|
|
6
|
+
ChunkKeyTypeUnion,
|
|
7
|
+
VariableConfiguration,
|
|
8
|
+
VariableSettings,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class VariablesMixin:
|
|
13
|
+
configuration = dict(variables=None)
|
|
14
|
+
|
|
15
|
+
@property
|
|
16
|
+
def variables_configuration(self) -> Optional[VariableConfiguration]:
|
|
17
|
+
if self.configuration:
|
|
18
|
+
configs = self.configuration.get('variables', {})
|
|
19
|
+
if configs and isinstance(configs, dict):
|
|
20
|
+
return VariableConfiguration.load(**configs)
|
|
21
|
+
elif isinstance(configs, VariableConfiguration):
|
|
22
|
+
return configs
|
|
23
|
+
|
|
24
|
+
@property
|
|
25
|
+
def variable_settings_upstream(self) -> Optional[Dict[str, VariableSettings]]:
|
|
26
|
+
if self.variables_configuration:
|
|
27
|
+
return self.variables_configuration.upstream
|
|
28
|
+
|
|
29
|
+
def upstream_batch_settings(self, block_uuid: str) -> BatchSettings:
|
|
30
|
+
return (
|
|
31
|
+
(self.variables_configuration or VariableConfiguration())
|
|
32
|
+
.upstream_settings(block_uuid)
|
|
33
|
+
.batch_settings
|
|
34
|
+
) or BatchSettings()
|
|
35
|
+
|
|
36
|
+
def upstream_chunks(self, block_uuid: str) -> Optional[List[ChunkKeyTypeUnion]]:
|
|
37
|
+
return (
|
|
38
|
+
(self.variables_configuration or VariableConfiguration())
|
|
39
|
+
.upstream_settings(block_uuid)
|
|
40
|
+
.chunks
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
def input_data_types(self, block_uuid: str) -> List[InputDataType]:
|
|
44
|
+
return (
|
|
45
|
+
(self.variables_configuration or VariableConfiguration())
|
|
46
|
+
.upstream_settings(block_uuid)
|
|
47
|
+
.input_data_types
|
|
48
|
+
) or [InputDataType.DEFAULT]
|
|
49
|
+
|
|
50
|
+
@property
|
|
51
|
+
def read_settings(self) -> VariableSettings:
|
|
52
|
+
settings = self.variables_configuration.read if self.variables_configuration else None
|
|
53
|
+
return settings or VariableSettings()
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def read_batch_settings(self) -> BatchSettings:
|
|
57
|
+
return self.read_settings.batch_settings or BatchSettings()
|
|
58
|
+
|
|
59
|
+
@property
|
|
60
|
+
def read_chunks(self) -> Optional[List[ChunkKeyTypeUnion]]:
|
|
61
|
+
return self.read_settings.chunks
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def write_settings(self) -> VariableSettings:
|
|
65
|
+
settings = self.variables_configuration.write if self.variables_configuration else None
|
|
66
|
+
return settings or VariableSettings()
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def write_batch_settings(self) -> BatchSettings:
|
|
70
|
+
return self.write_settings.batch_settings or BatchSettings()
|
|
71
|
+
|
|
72
|
+
@property
|
|
73
|
+
def write_chunks(self) -> Optional[List[ChunkKeyTypeUnion]]:
|
|
74
|
+
return self.write_settings.chunks
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
from typing import Dict, List, Optional, Union
|
|
3
|
+
|
|
4
|
+
from mage_ai.data.constants import InputDataType
|
|
5
|
+
from mage_ai.data.tabular.models import BatchSettings
|
|
6
|
+
from mage_ai.shared.models import BaseDataClass
|
|
7
|
+
|
|
8
|
+
ChunkKeyTypeBase = Union[bool, float, int, str]
|
|
9
|
+
ChunkKeyTypeDict = Dict[str, ChunkKeyTypeBase]
|
|
10
|
+
ChunkKeyTypeUnion = Union[ChunkKeyTypeDict, ChunkKeyTypeBase]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@dataclass
|
|
14
|
+
class VariableSettings(BaseDataClass):
|
|
15
|
+
batch_settings: Optional[BatchSettings] = None
|
|
16
|
+
chunks: Optional[List[ChunkKeyTypeUnion]] = None
|
|
17
|
+
input_data_types: Optional[List[InputDataType]] = None
|
|
18
|
+
|
|
19
|
+
def __post_init__(self):
|
|
20
|
+
self.serialize_attribute_class('batch_settings', BatchSettings)
|
|
21
|
+
self.serialize_attribute_enums('input_data_types', InputDataType)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
@dataclass
|
|
25
|
+
class VariableConfiguration(BaseDataClass):
|
|
26
|
+
downstream: Optional[Dict[str, VariableSettings]] = None
|
|
27
|
+
read: Optional[VariableSettings] = None
|
|
28
|
+
upstream: Optional[Dict[str, VariableSettings]] = None
|
|
29
|
+
write: Optional[VariableSettings] = None
|
|
30
|
+
|
|
31
|
+
def __post_init__(self):
|
|
32
|
+
self.serialize_attribute_class('read', VariableSettings)
|
|
33
|
+
self.serialize_attribute_class('write', VariableSettings)
|
|
34
|
+
self.downstream = {
|
|
35
|
+
k: VariableSettings.load(**v) if isinstance(v, dict) else v
|
|
36
|
+
for k, v in (self.downstream or {}).items()
|
|
37
|
+
}
|
|
38
|
+
self.upstream = {
|
|
39
|
+
k: VariableSettings.load(**v) if isinstance(v, dict) else v
|
|
40
|
+
for k, v in (self.upstream or {}).items()
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
def downstream_settings(self, block_uuid: str) -> VariableSettings:
|
|
44
|
+
settings = self.downstream.get(block_uuid) if self.downstream else None
|
|
45
|
+
return settings or VariableSettings()
|
|
46
|
+
|
|
47
|
+
def upstream_settings(self, block_uuid: str) -> VariableSettings:
|
|
48
|
+
settings = self.upstream.get(block_uuid) if self.upstream else None
|
|
49
|
+
return settings or VariableSettings()
|
|
@@ -57,7 +57,8 @@ class SparkBlock:
|
|
|
57
57
|
)
|
|
58
58
|
|
|
59
59
|
def compute_management_enabled(self) -> bool:
|
|
60
|
-
return Project(
|
|
60
|
+
return Project(
|
|
61
|
+
repo_config=self.pipeline.repo_config if self.pipeline else None).is_feature_enabled(
|
|
61
62
|
FeatureUUID.COMPUTE_MANAGEMENT,
|
|
62
63
|
)
|
|
63
64
|
|