qwak-sdk 0.5.102__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.
- qwak_sdk/__init__.py +9 -0
- qwak_sdk/cli.py +79 -0
- qwak_sdk/commands/__init__.py +0 -0
- qwak_sdk/commands/_logic/__init__.py +0 -0
- qwak_sdk/commands/_logic/tools.py +6 -0
- qwak_sdk/commands/admin/__init__.py +0 -0
- qwak_sdk/commands/admin/admin_commands_group.py +17 -0
- qwak_sdk/commands/admin/apikeys/__init__.py +0 -0
- qwak_sdk/commands/admin/apikeys/api_keys_commands_group.py +17 -0
- qwak_sdk/commands/admin/apikeys/generate/__init__.py +0 -0
- qwak_sdk/commands/admin/apikeys/generate/_logic.py +21 -0
- qwak_sdk/commands/admin/apikeys/generate/ui.py +45 -0
- qwak_sdk/commands/admin/apikeys/revoke/__init__.py +0 -0
- qwak_sdk/commands/admin/apikeys/revoke/_logic.py +22 -0
- qwak_sdk/commands/admin/apikeys/revoke/ui.py +31 -0
- qwak_sdk/commands/alerts/__init__.py +0 -0
- qwak_sdk/commands/alerts/alerts_commnad_group.py +18 -0
- qwak_sdk/commands/alerts/delete/__init__.py +0 -0
- qwak_sdk/commands/alerts/delete/_logic.py +5 -0
- qwak_sdk/commands/alerts/delete/ui.py +10 -0
- qwak_sdk/commands/alerts/list/__init__.py +0 -0
- qwak_sdk/commands/alerts/list/_logic.py +23 -0
- qwak_sdk/commands/alerts/list/ui.py +17 -0
- qwak_sdk/commands/alerts/register/__init__.py +0 -0
- qwak_sdk/commands/alerts/register/_logic.py +72 -0
- qwak_sdk/commands/alerts/register/ui.py +30 -0
- qwak_sdk/commands/audience/__init__.py +0 -0
- qwak_sdk/commands/audience/_logic/__init__.py +0 -0
- qwak_sdk/commands/audience/_logic/config/__init__.py +0 -0
- qwak_sdk/commands/audience/_logic/config/config_base.py +15 -0
- qwak_sdk/commands/audience/_logic/config/parser.py +30 -0
- qwak_sdk/commands/audience/_logic/config/v1/__init__.py +0 -0
- qwak_sdk/commands/audience/_logic/config/v1/audience_config.py +26 -0
- qwak_sdk/commands/audience/_logic/config/v1/conditions_config.py +59 -0
- qwak_sdk/commands/audience/_logic/config/v1/config_v1.py +23 -0
- qwak_sdk/commands/audience/_logic/config/v1/route_config.py +15 -0
- qwak_sdk/commands/audience/_logic/config/v1/spec.py +9 -0
- qwak_sdk/commands/audience/audience_api_dump.py +86 -0
- qwak_sdk/commands/audience/audience_commands_group.py +30 -0
- qwak_sdk/commands/audience/create/__init__.py +0 -0
- qwak_sdk/commands/audience/create/logic.py +41 -0
- qwak_sdk/commands/audience/create/ui.py +21 -0
- qwak_sdk/commands/audience/delete/__init__.py +0 -0
- qwak_sdk/commands/audience/delete/logic.py +13 -0
- qwak_sdk/commands/audience/delete/ui.py +17 -0
- qwak_sdk/commands/audience/get/__init__.py +0 -0
- qwak_sdk/commands/audience/get/logic.py +14 -0
- qwak_sdk/commands/audience/get/ui.py +25 -0
- qwak_sdk/commands/audience/list/__init__.py +0 -0
- qwak_sdk/commands/audience/list/logic.py +16 -0
- qwak_sdk/commands/audience/list/ui.py +26 -0
- qwak_sdk/commands/audience/update/__init__.py +0 -0
- qwak_sdk/commands/audience/update/logic.py +37 -0
- qwak_sdk/commands/audience/update/ui.py +26 -0
- qwak_sdk/commands/auto_scalling/__init__.py +0 -0
- qwak_sdk/commands/auto_scalling/_logic/__init__.py +0 -0
- qwak_sdk/commands/auto_scalling/_logic/config/__init__.py +3 -0
- qwak_sdk/commands/auto_scalling/_logic/config/config.py +152 -0
- qwak_sdk/commands/auto_scalling/_logic/config/parser.py +21 -0
- qwak_sdk/commands/auto_scalling/attach/__init__.py +0 -0
- qwak_sdk/commands/auto_scalling/attach/_logic.py +43 -0
- qwak_sdk/commands/auto_scalling/attach/ui.py +21 -0
- qwak_sdk/commands/auto_scalling/autoscaling_commands_group.py +15 -0
- qwak_sdk/commands/automations/__init__.py +0 -0
- qwak_sdk/commands/automations/automations_commands_group.py +30 -0
- qwak_sdk/commands/automations/delete/__init__.py +0 -0
- qwak_sdk/commands/automations/delete/_logic.py +6 -0
- qwak_sdk/commands/automations/delete/ui.py +23 -0
- qwak_sdk/commands/automations/executions/__init__.py +0 -0
- qwak_sdk/commands/automations/executions/executions_commands_group.py +14 -0
- qwak_sdk/commands/automations/executions/list/__init__.py +0 -0
- qwak_sdk/commands/automations/executions/list/_logic.py +8 -0
- qwak_sdk/commands/automations/executions/list/ui.py +25 -0
- qwak_sdk/commands/automations/list/__init__.py +0 -0
- qwak_sdk/commands/automations/list/_logic.py +36 -0
- qwak_sdk/commands/automations/list/ui.py +21 -0
- qwak_sdk/commands/automations/register/__init__.py +0 -0
- qwak_sdk/commands/automations/register/_logic.py +43 -0
- qwak_sdk/commands/automations/register/ui.py +44 -0
- qwak_sdk/commands/feature_store/__init__.py +0 -0
- qwak_sdk/commands/feature_store/backfill/__init__.py +0 -0
- qwak_sdk/commands/feature_store/backfill/_logic.py +140 -0
- qwak_sdk/commands/feature_store/backfill/streaming/__init__.py +0 -0
- qwak_sdk/commands/feature_store/backfill/streaming/_logic.py +50 -0
- qwak_sdk/commands/feature_store/backfill/streaming/ui.py +67 -0
- qwak_sdk/commands/feature_store/backfill/ui.py +146 -0
- qwak_sdk/commands/feature_store/delete/__init__.py +0 -0
- qwak_sdk/commands/feature_store/delete/_logic.py +104 -0
- qwak_sdk/commands/feature_store/delete/ui.py +40 -0
- qwak_sdk/commands/feature_store/execution/__init__.py +0 -0
- qwak_sdk/commands/feature_store/execution/ui.py +19 -0
- qwak_sdk/commands/feature_store/feature_store_command_group.py +29 -0
- qwak_sdk/commands/feature_store/list/__init__.py +0 -0
- qwak_sdk/commands/feature_store/list/ui.py +140 -0
- qwak_sdk/commands/feature_store/pause/__init__.py +0 -0
- qwak_sdk/commands/feature_store/pause/ui.py +18 -0
- qwak_sdk/commands/feature_store/register/__init__.py +0 -0
- qwak_sdk/commands/feature_store/register/_logic.py +367 -0
- qwak_sdk/commands/feature_store/register/ui.py +111 -0
- qwak_sdk/commands/feature_store/resume/__init__.py +0 -0
- qwak_sdk/commands/feature_store/resume/ui.py +18 -0
- qwak_sdk/commands/feature_store/trigger/__init__.py +0 -0
- qwak_sdk/commands/feature_store/trigger/ui.py +39 -0
- qwak_sdk/commands/models/__init__.py +0 -0
- qwak_sdk/commands/models/build/__init__.py +0 -0
- qwak_sdk/commands/models/build/_logic/__init__.py +0 -0
- qwak_sdk/commands/models/build/_logic/build_steps.py +42 -0
- qwak_sdk/commands/models/build/_logic/client_logs/__init__.py +0 -0
- qwak_sdk/commands/models/build/_logic/client_logs/cli_phase_run_handler.py +123 -0
- qwak_sdk/commands/models/build/_logic/client_logs/cli_trigger_build_logger.py +19 -0
- qwak_sdk/commands/models/build/_logic/client_logs/logger.py +88 -0
- qwak_sdk/commands/models/build/_logic/client_logs/messages.py +36 -0
- qwak_sdk/commands/models/build/_logic/client_logs/spinner.py +14 -0
- qwak_sdk/commands/models/build/_logic/client_logs/trigger_build_logger.py +54 -0
- qwak_sdk/commands/models/build/_logic/client_logs/utils.py +12 -0
- qwak_sdk/commands/models/build/_logic/phase/__init__.py +0 -0
- qwak_sdk/commands/models/build/_logic/phase/a_fetch_model_code/__init__.py +20 -0
- qwak_sdk/commands/models/build/_logic/phase/a_fetch_model_code/get_sdk_version_step.py +14 -0
- qwak_sdk/commands/models/build/_logic/phase/b_remote_register_qwak_build/__init__.py +16 -0
- qwak_sdk/commands/models/build/_logic/phase/c_deploy/__init__.py +6 -0
- qwak_sdk/commands/models/build/_logic/phase/c_deploy/build_polling_status.py +55 -0
- qwak_sdk/commands/models/build/_logic/phase/c_deploy/deploy_build.py +61 -0
- qwak_sdk/commands/models/build/_logic/util/__init__.py +0 -0
- qwak_sdk/commands/models/build/_logic/util/protobuf_factory.py +45 -0
- qwak_sdk/commands/models/build/_logic/util/step_decorator.py +60 -0
- qwak_sdk/commands/models/build/_logic/util/text.py +9 -0
- qwak_sdk/commands/models/build/_logic/wait_until_finished.py +27 -0
- qwak_sdk/commands/models/build/ui.py +337 -0
- qwak_sdk/commands/models/builds/__init__.py +0 -0
- qwak_sdk/commands/models/builds/builds_commands_group.py +16 -0
- qwak_sdk/commands/models/builds/cancel/__init__.py +0 -0
- qwak_sdk/commands/models/builds/cancel/_logic.py +5 -0
- qwak_sdk/commands/models/builds/cancel/ui.py +15 -0
- qwak_sdk/commands/models/builds/logs/__init__.py +0 -0
- qwak_sdk/commands/models/builds/logs/ui.py +35 -0
- qwak_sdk/commands/models/builds/status/__init__.py +0 -0
- qwak_sdk/commands/models/builds/status/_logic.py +6 -0
- qwak_sdk/commands/models/builds/status/ui.py +39 -0
- qwak_sdk/commands/models/create/__init__.py +0 -0
- qwak_sdk/commands/models/create/_logic.py +36 -0
- qwak_sdk/commands/models/create/ui.py +43 -0
- qwak_sdk/commands/models/delete/__init__.py +0 -0
- qwak_sdk/commands/models/delete/_logic.py +5 -0
- qwak_sdk/commands/models/delete/ui.py +25 -0
- qwak_sdk/commands/models/deployments/__init__.py +0 -0
- qwak_sdk/commands/models/deployments/deploy/__init__.py +0 -0
- qwak_sdk/commands/models/deployments/deploy/_logic/__init__.py +0 -0
- qwak_sdk/commands/models/deployments/deploy/_logic/advance_deployment_options_handler.py +31 -0
- qwak_sdk/commands/models/deployments/deploy/_logic/base_deploy_executor.py +68 -0
- qwak_sdk/commands/models/deployments/deploy/_logic/deploy_config.py +261 -0
- qwak_sdk/commands/models/deployments/deploy/_logic/deployment.py +405 -0
- qwak_sdk/commands/models/deployments/deploy/_logic/deployment_message_helpers.py +114 -0
- qwak_sdk/commands/models/deployments/deploy/_logic/deployment_response_handler.py +156 -0
- qwak_sdk/commands/models/deployments/deploy/_logic/deployment_size_mapper.py +96 -0
- qwak_sdk/commands/models/deployments/deploy/_logic/get_latest_successful_build.py +28 -0
- qwak_sdk/commands/models/deployments/deploy/_logic/local_deployment.py +193 -0
- qwak_sdk/commands/models/deployments/deploy/batch/__init__.py +0 -0
- qwak_sdk/commands/models/deployments/deploy/batch/_logic/__init__.py +0 -0
- qwak_sdk/commands/models/deployments/deploy/batch/_logic/advanced_deployment_mapper.py +15 -0
- qwak_sdk/commands/models/deployments/deploy/batch/_logic/deploy_executor.py +24 -0
- qwak_sdk/commands/models/deployments/deploy/batch/ui.py +126 -0
- qwak_sdk/commands/models/deployments/deploy/deploy_commands_group.py +19 -0
- qwak_sdk/commands/models/deployments/deploy/realtime/__init__.py +0 -0
- qwak_sdk/commands/models/deployments/deploy/realtime/_logic/__init__.py +0 -0
- qwak_sdk/commands/models/deployments/deploy/realtime/_logic/advanced_deployment_mapper.py +21 -0
- qwak_sdk/commands/models/deployments/deploy/realtime/_logic/deploy_executor.py +24 -0
- qwak_sdk/commands/models/deployments/deploy/realtime/_logic/serving_strategy_mapper.py +75 -0
- qwak_sdk/commands/models/deployments/deploy/realtime/ui.py +209 -0
- qwak_sdk/commands/models/deployments/deploy/streaming/__init__.py +0 -0
- qwak_sdk/commands/models/deployments/deploy/streaming/_logic/__init__.py +0 -0
- qwak_sdk/commands/models/deployments/deploy/streaming/_logic/deploy_executor.py +24 -0
- qwak_sdk/commands/models/deployments/deploy/streaming/_logic/serving_strategy_mapper.py +38 -0
- qwak_sdk/commands/models/deployments/deploy/streaming/ui.py +213 -0
- qwak_sdk/commands/models/deployments/undeploy/__init__.py +0 -0
- qwak_sdk/commands/models/deployments/undeploy/_logic/__init__.py +0 -0
- qwak_sdk/commands/models/deployments/undeploy/_logic/request_undeploy.py +249 -0
- qwak_sdk/commands/models/deployments/undeploy/ui.py +72 -0
- qwak_sdk/commands/models/describe/__init__.py +0 -0
- qwak_sdk/commands/models/describe/_logic.py +169 -0
- qwak_sdk/commands/models/describe/ui.py +35 -0
- qwak_sdk/commands/models/executions/__init__.py +0 -0
- qwak_sdk/commands/models/executions/cancel/__init__.py +0 -0
- qwak_sdk/commands/models/executions/cancel/_logic.py +9 -0
- qwak_sdk/commands/models/executions/cancel/ui.py +27 -0
- qwak_sdk/commands/models/executions/execution_commands_group.py +24 -0
- qwak_sdk/commands/models/executions/report/__init__.py +0 -0
- qwak_sdk/commands/models/executions/report/_logic.py +14 -0
- qwak_sdk/commands/models/executions/report/ui.py +43 -0
- qwak_sdk/commands/models/executions/start/__init__.py +0 -0
- qwak_sdk/commands/models/executions/start/_logic.py +81 -0
- qwak_sdk/commands/models/executions/start/ui.py +208 -0
- qwak_sdk/commands/models/executions/status/__init__.py +0 -0
- qwak_sdk/commands/models/executions/status/_logic.py +13 -0
- qwak_sdk/commands/models/executions/status/ui.py +27 -0
- qwak_sdk/commands/models/init/__init__.py +0 -0
- qwak_sdk/commands/models/init/_logic/__init__.py +0 -0
- qwak_sdk/commands/models/init/_logic/initialize_model_structure.py +40 -0
- qwak_sdk/commands/models/init/_logic/template/__init__.py +0 -0
- qwak_sdk/commands/models/init/_logic/template/churn/__init__.py +0 -0
- qwak_sdk/commands/models/init/_logic/template/churn/cookiecutter.json +3 -0
- qwak_sdk/commands/models/init/_logic/template/churn/{{cookiecutter.model_directory}}/__init__.py +0 -0
- qwak_sdk/commands/models/init/_logic/template/churn/{{cookiecutter.model_directory}}/main/__init__.py +5 -0
- qwak_sdk/commands/models/init/_logic/template/churn/{{cookiecutter.model_directory}}/main/conda.yml +10 -0
- qwak_sdk/commands/models/init/_logic/template/churn/{{cookiecutter.model_directory}}/main/data.csv +1001 -0
- qwak_sdk/commands/models/init/_logic/template/churn/{{cookiecutter.model_directory}}/main/model.py +95 -0
- qwak_sdk/commands/models/init/_logic/template/churn/{{cookiecutter.model_directory}}/tests/__init__.py +0 -0
- qwak_sdk/commands/models/init/_logic/template/churn/{{cookiecutter.model_directory}}/tests/it/__init__.py +0 -0
- qwak_sdk/commands/models/init/_logic/template/churn/{{cookiecutter.model_directory}}/tests/it/test_churn.py +32 -0
- qwak_sdk/commands/models/init/_logic/template/credit_risk/__init__.py +0 -0
- qwak_sdk/commands/models/init/_logic/template/credit_risk/cookiecutter.json +3 -0
- qwak_sdk/commands/models/init/_logic/template/credit_risk/{{cookiecutter.model_directory}}/__init__.py +0 -0
- qwak_sdk/commands/models/init/_logic/template/credit_risk/{{cookiecutter.model_directory}}/main/__init__.py +5 -0
- qwak_sdk/commands/models/init/_logic/template/credit_risk/{{cookiecutter.model_directory}}/main/conda.yml +11 -0
- qwak_sdk/commands/models/init/_logic/template/credit_risk/{{cookiecutter.model_directory}}/main/data.csv +1001 -0
- qwak_sdk/commands/models/init/_logic/template/credit_risk/{{cookiecutter.model_directory}}/main/model.py +108 -0
- qwak_sdk/commands/models/init/_logic/template/general/__init__.py +0 -0
- qwak_sdk/commands/models/init/_logic/template/general/cookiecutter.json +6 -0
- qwak_sdk/commands/models/init/_logic/template/general/{{cookiecutter.model_directory}}/__init__.py +0 -0
- qwak_sdk/commands/models/init/_logic/template/general/{{cookiecutter.model_directory}}/{{cookiecutter.main_directory}}/__init__.py +5 -0
- qwak_sdk/commands/models/init/_logic/template/general/{{cookiecutter.model_directory}}/{{cookiecutter.main_directory}}/conda.yml +8 -0
- qwak_sdk/commands/models/init/_logic/template/general/{{cookiecutter.model_directory}}/{{cookiecutter.main_directory}}/model.py +66 -0
- qwak_sdk/commands/models/init/_logic/template/general/{{cookiecutter.model_directory}}/{{cookiecutter.test_directory}}/__init__.py +0 -0
- qwak_sdk/commands/models/init/_logic/template/general/{{cookiecutter.model_directory}}/{{cookiecutter.test_directory}}/test_qwak_model.py +5 -0
- qwak_sdk/commands/models/init/_logic/template/titanic/__init__.py +0 -0
- qwak_sdk/commands/models/init/_logic/template/titanic/cookiecutter.json +3 -0
- qwak_sdk/commands/models/init/_logic/template/titanic/{{cookiecutter.model_directory}}/__init__.py +0 -0
- qwak_sdk/commands/models/init/_logic/template/titanic/{{cookiecutter.model_directory}}/main/__init__.py +5 -0
- qwak_sdk/commands/models/init/_logic/template/titanic/{{cookiecutter.model_directory}}/main/conda.yml +11 -0
- qwak_sdk/commands/models/init/_logic/template/titanic/{{cookiecutter.model_directory}}/main/model.py +98 -0
- qwak_sdk/commands/models/init/_logic/template/titanic/{{cookiecutter.model_directory}}/tests/__init__.py +0 -0
- qwak_sdk/commands/models/init/_logic/template/titanic/{{cookiecutter.model_directory}}/tests/it/__init__.py +0 -0
- qwak_sdk/commands/models/init/_logic/template/titanic/{{cookiecutter.model_directory}}/tests/it/test_titanic.py +24 -0
- qwak_sdk/commands/models/init/_logic/template/titanic_poetry/__init__.py +0 -0
- qwak_sdk/commands/models/init/_logic/template/titanic_poetry/cookiecutter.json +3 -0
- qwak_sdk/commands/models/init/_logic/template/titanic_poetry/{{cookiecutter.model_directory}}/__init__.py +0 -0
- qwak_sdk/commands/models/init/_logic/template/titanic_poetry/{{cookiecutter.model_directory}}/main/__init__.py +5 -0
- qwak_sdk/commands/models/init/_logic/template/titanic_poetry/{{cookiecutter.model_directory}}/main/model.py +98 -0
- qwak_sdk/commands/models/init/_logic/template/titanic_poetry/{{cookiecutter.model_directory}}/main/pyproject.toml +20 -0
- qwak_sdk/commands/models/init/_logic/template/titanic_poetry/{{cookiecutter.model_directory}}/tests/__init__.py +0 -0
- qwak_sdk/commands/models/init/_logic/template/titanic_poetry/{{cookiecutter.model_directory}}/tests/it/__init__.py +0 -0
- qwak_sdk/commands/models/init/_logic/template/titanic_poetry/{{cookiecutter.model_directory}}/tests/it/test_titanic.py +25 -0
- qwak_sdk/commands/models/init/ui.py +61 -0
- qwak_sdk/commands/models/list/__init__.py +0 -0
- qwak_sdk/commands/models/list/_logic.py +5 -0
- qwak_sdk/commands/models/list/ui.py +40 -0
- qwak_sdk/commands/models/list_models/__init__.py +0 -0
- qwak_sdk/commands/models/list_models/_logic.py +5 -0
- qwak_sdk/commands/models/list_models/ui.py +60 -0
- qwak_sdk/commands/models/metadata/__init__.py +0 -0
- qwak_sdk/commands/models/metadata/_logic.py +5 -0
- qwak_sdk/commands/models/metadata/ui.py +60 -0
- qwak_sdk/commands/models/models_command_group.py +44 -0
- qwak_sdk/commands/models/runtime/__init__.py +0 -0
- qwak_sdk/commands/models/runtime/logs/__init__.py +0 -0
- qwak_sdk/commands/models/runtime/logs/ui.py +63 -0
- qwak_sdk/commands/models/runtime/runtime_commands_group.py +17 -0
- qwak_sdk/commands/models/runtime/update/__init__.py +0 -0
- qwak_sdk/commands/models/runtime/update/_logic.py +9 -0
- qwak_sdk/commands/models/runtime/update/ui.py +15 -0
- qwak_sdk/commands/projects/__init__.py +0 -0
- qwak_sdk/commands/projects/create/__init__.py +0 -0
- qwak_sdk/commands/projects/create/_logic.py +9 -0
- qwak_sdk/commands/projects/create/ui.py +68 -0
- qwak_sdk/commands/projects/delete/__init__.py +0 -0
- qwak_sdk/commands/projects/delete/_logic.py +6 -0
- qwak_sdk/commands/projects/delete/ui.py +24 -0
- qwak_sdk/commands/projects/list/__init__.py +0 -0
- qwak_sdk/commands/projects/list/_logic.py +6 -0
- qwak_sdk/commands/projects/list/ui.py +45 -0
- qwak_sdk/commands/projects/projects_command_group.py +19 -0
- qwak_sdk/commands/secrets/__init__.py +0 -0
- qwak_sdk/commands/secrets/delete/__init__.py +0 -0
- qwak_sdk/commands/secrets/delete/_logic.py +5 -0
- qwak_sdk/commands/secrets/delete/ui.py +21 -0
- qwak_sdk/commands/secrets/get/__init__.py +0 -0
- qwak_sdk/commands/secrets/get/_logic.py +5 -0
- qwak_sdk/commands/secrets/get/ui.py +17 -0
- qwak_sdk/commands/secrets/secrets_commands_group.py +19 -0
- qwak_sdk/commands/secrets/set/__init__.py +0 -0
- qwak_sdk/commands/secrets/set/_logic.py +5 -0
- qwak_sdk/commands/secrets/set/ui.py +16 -0
- qwak_sdk/commands/ui_tools.py +18 -0
- qwak_sdk/commands/workspaces/__init__.py +0 -0
- qwak_sdk/commands/workspaces/_logic/__init__.py +0 -0
- qwak_sdk/commands/workspaces/_logic/tools.py +44 -0
- qwak_sdk/commands/workspaces/_logic/workspace_validations.py +41 -0
- qwak_sdk/commands/workspaces/config/__init__.py +0 -0
- qwak_sdk/commands/workspaces/config/workspace_config.py +35 -0
- qwak_sdk/commands/workspaces/create/__init__.py +0 -0
- qwak_sdk/commands/workspaces/create/_logic.py +54 -0
- qwak_sdk/commands/workspaces/create/ui.py +48 -0
- qwak_sdk/commands/workspaces/delete/__init__.py +0 -0
- qwak_sdk/commands/workspaces/delete/_logic.py +30 -0
- qwak_sdk/commands/workspaces/delete/ui.py +23 -0
- qwak_sdk/commands/workspaces/start/__init__.py +0 -0
- qwak_sdk/commands/workspaces/start/_logic.py +30 -0
- qwak_sdk/commands/workspaces/start/ui.py +23 -0
- qwak_sdk/commands/workspaces/stop/__init__.py +0 -0
- qwak_sdk/commands/workspaces/stop/_logic.py +30 -0
- qwak_sdk/commands/workspaces/stop/ui.py +23 -0
- qwak_sdk/commands/workspaces/update/__init__.py +0 -0
- qwak_sdk/commands/workspaces/update/_logic.py +82 -0
- qwak_sdk/commands/workspaces/update/ui.py +57 -0
- qwak_sdk/commands/workspaces/workspaces_commands_group.py +23 -0
- qwak_sdk/exceptions/__init__.py +11 -0
- qwak_sdk/exceptions/qwak_command_exception.py +2 -0
- qwak_sdk/exceptions/qwak_deploy_new_build_failed.py +5 -0
- qwak_sdk/exceptions/qwak_resource_not_found.py +2 -0
- qwak_sdk/inner/__init__.py +0 -0
- qwak_sdk/inner/file_registry.py +98 -0
- qwak_sdk/inner/tools/__init__.py +0 -0
- qwak_sdk/inner/tools/cli_tools.py +220 -0
- qwak_sdk/inner/tools/config_handler.py +27 -0
- qwak_sdk/inner/tools/dataclasses_utils.py +21 -0
- qwak_sdk/inner/tools/logger/__init__.py +3 -0
- qwak_sdk/inner/tools/logger/logger.py +269 -0
- qwak_sdk/inner/tools/logger/logging.yml +79 -0
- qwak_sdk/inner/tools/tracking.py +47 -0
- qwak_sdk/main.py +9 -0
- qwak_sdk/tools/__init__.py +0 -0
- qwak_sdk/tools/colors.py +13 -0
- qwak_sdk/tools/files.py +63 -0
- qwak_sdk/tools/log_handling.py +159 -0
- qwak_sdk/tools/utils.py +42 -0
- qwak_sdk-0.5.102.dist-info/METADATA +51 -0
- qwak_sdk-0.5.102.dist-info/RECORD +328 -0
- qwak_sdk-0.5.102.dist-info/WHEEL +4 -0
- qwak_sdk-0.5.102.dist-info/entry_points.txt +3 -0
qwak_sdk/tools/files.py
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import shutil
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def copytree(
|
|
6
|
+
src,
|
|
7
|
+
dst,
|
|
8
|
+
symlinks=False,
|
|
9
|
+
ignore=None,
|
|
10
|
+
ignore_dangling_symlinks=False,
|
|
11
|
+
dirs_exist_ok=False,
|
|
12
|
+
):
|
|
13
|
+
names = os.listdir(src)
|
|
14
|
+
if ignore is not None:
|
|
15
|
+
ignored_names = ignore(src, names)
|
|
16
|
+
else:
|
|
17
|
+
ignored_names = set()
|
|
18
|
+
|
|
19
|
+
os.makedirs(dst, exist_ok=dirs_exist_ok)
|
|
20
|
+
errors = []
|
|
21
|
+
for name in names:
|
|
22
|
+
if name in ignored_names:
|
|
23
|
+
continue
|
|
24
|
+
srcname = os.path.join(src, name)
|
|
25
|
+
dstname = os.path.join(dst, name)
|
|
26
|
+
try:
|
|
27
|
+
if os.path.islink(srcname):
|
|
28
|
+
linkto = os.readlink(srcname)
|
|
29
|
+
if symlinks:
|
|
30
|
+
# We can't just leave it to `copy_function` because legacy
|
|
31
|
+
# code with a custom `copy_function` may rely on copytree
|
|
32
|
+
# doing the right thing.
|
|
33
|
+
os.symlink(linkto, dstname)
|
|
34
|
+
shutil.copystat(srcname, dstname, follow_symlinks=not symlinks)
|
|
35
|
+
else:
|
|
36
|
+
# ignore dangling symlink if the flag is on
|
|
37
|
+
if not os.path.exists(linkto) and ignore_dangling_symlinks:
|
|
38
|
+
continue
|
|
39
|
+
# otherwise let the copy occurs. copy2 will raise an error
|
|
40
|
+
if os.path.isdir(srcname):
|
|
41
|
+
copytree(srcname, dstname, symlinks, ignore)
|
|
42
|
+
else:
|
|
43
|
+
shutil.copy2(srcname, dstname)
|
|
44
|
+
elif os.path.isdir(srcname):
|
|
45
|
+
copytree(srcname, dstname, symlinks, ignore)
|
|
46
|
+
else:
|
|
47
|
+
# Will raise a SpecialFileError for unsupported file types
|
|
48
|
+
shutil.copy2(srcname, dstname)
|
|
49
|
+
# catch the Error from the recursive copytree so that we can
|
|
50
|
+
# continue with other files
|
|
51
|
+
except shutil.Error as err:
|
|
52
|
+
errors.extend(err.args[0])
|
|
53
|
+
except OSError as why:
|
|
54
|
+
errors.append((srcname, dstname, str(why)))
|
|
55
|
+
try:
|
|
56
|
+
shutil.copystat(src, dst)
|
|
57
|
+
except OSError as why:
|
|
58
|
+
# Copying file access times may fail on Windows
|
|
59
|
+
if getattr(why, "winerror", None) is None:
|
|
60
|
+
errors.append((src, dst, str(why)))
|
|
61
|
+
if errors:
|
|
62
|
+
raise shutil.Error(errors)
|
|
63
|
+
return dst
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import time
|
|
2
|
+
from datetime import datetime, timedelta, timezone
|
|
3
|
+
|
|
4
|
+
from _qwak_proto.qwak.build.v1.build_pb2 import BuildStatus
|
|
5
|
+
from qwak.clients.build_orchestrator import BuildOrchestratorClient
|
|
6
|
+
from qwak.clients.logging_client import LoggingClient
|
|
7
|
+
from qwak.exceptions import QwakException
|
|
8
|
+
|
|
9
|
+
from qwak_sdk.tools.colors import Color
|
|
10
|
+
|
|
11
|
+
INGESTED_TIMESTAMP_FORMAT = "%Y-%m-%dT%H:%M:%S.%f"
|
|
12
|
+
# Ingested timestamp arrives with format "1900-01-01T00:00:00.000000000Z" but python doesn't support
|
|
13
|
+
# nanoseconds or Zulu
|
|
14
|
+
INGESTED_TIMESTAMP_MAXSIZE = 26
|
|
15
|
+
# Because the source of the timestamp truncates trailing zeros, we need to
|
|
16
|
+
# support two formats for the timestamp that is exactly on the second
|
|
17
|
+
ALTERNATIVE_INGESTED_TIMESTAMP_FORMAT_WITHOUT_DECIMALS = "%Y-%m-%dT%H:%M:%S"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class QwakLogHandling:
|
|
21
|
+
TIME_UNITS = ["seconds", "minutes", "hours", "days"]
|
|
22
|
+
FOLLOW_SLEEP_IF_NO_RESULTS_SECS = 5
|
|
23
|
+
TIME_FORMAT = "%Y-%m-%dT%H:%M:%S"
|
|
24
|
+
BUILD_PENDING_STATUS = ["IN_PROGRESS", "REMOTE_BUILD_INITIALIZING"]
|
|
25
|
+
BUILD_FINISHED_STATUS = [
|
|
26
|
+
"INVALID",
|
|
27
|
+
"SUCCESSFUL",
|
|
28
|
+
"FAILED",
|
|
29
|
+
"REMOTE_BUILD_CANCELLED",
|
|
30
|
+
"REMOTE_BUILD_TIMED_OUT",
|
|
31
|
+
"REMOTE_BUILD_UNKNOWN",
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
def __init__(self):
|
|
35
|
+
self.log_formatter = self.LogFormatting()
|
|
36
|
+
|
|
37
|
+
@staticmethod
|
|
38
|
+
def get_build_status_name(build_client, build_id: str):
|
|
39
|
+
return BuildStatus.Name(build_client.get_build(build_id).build.build_status)
|
|
40
|
+
|
|
41
|
+
def get_logs(
|
|
42
|
+
self, follow, since, number_of_results, grep, source_params, source_name
|
|
43
|
+
):
|
|
44
|
+
after = self.parse_since(since)
|
|
45
|
+
after = after.strftime(self.TIME_FORMAT) if after is not None else after
|
|
46
|
+
|
|
47
|
+
logging_client = LoggingClient()
|
|
48
|
+
if source_name == "build":
|
|
49
|
+
build_client = BuildOrchestratorClient()
|
|
50
|
+
while True:
|
|
51
|
+
params = {
|
|
52
|
+
**source_params,
|
|
53
|
+
"before_offset": None,
|
|
54
|
+
"after_offset": after,
|
|
55
|
+
"max_number_of_results": number_of_results,
|
|
56
|
+
"log_text_filter": grep,
|
|
57
|
+
}
|
|
58
|
+
if source_name == "runtime_model":
|
|
59
|
+
response = logging_client.read_model_runtime_logs(**params)
|
|
60
|
+
elif source_name == "build":
|
|
61
|
+
response = logging_client.read_build_logs(**params)
|
|
62
|
+
else:
|
|
63
|
+
raise QwakException(
|
|
64
|
+
f"Provided a non existing source name [{source_name}]"
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
if response.log_line:
|
|
68
|
+
formatted_log_lines = self.log_formatter.format_logs(
|
|
69
|
+
response.log_line, without_instance_id=True
|
|
70
|
+
)
|
|
71
|
+
print("\n".join(formatted_log_lines), end="")
|
|
72
|
+
after = response.last_offset
|
|
73
|
+
elif follow:
|
|
74
|
+
if source_name == "build":
|
|
75
|
+
build_status = self.get_build_status_name(
|
|
76
|
+
build_client, source_params["build_id"]
|
|
77
|
+
)
|
|
78
|
+
if build_status in self.BUILD_FINISHED_STATUS:
|
|
79
|
+
break
|
|
80
|
+
time.sleep(self.FOLLOW_SLEEP_IF_NO_RESULTS_SECS)
|
|
81
|
+
else:
|
|
82
|
+
print("No logs returned")
|
|
83
|
+
return
|
|
84
|
+
|
|
85
|
+
if not follow:
|
|
86
|
+
break
|
|
87
|
+
|
|
88
|
+
def parse_since(self, since_sentence):
|
|
89
|
+
if since_sentence is None:
|
|
90
|
+
return None
|
|
91
|
+
|
|
92
|
+
timedelta_params = {}
|
|
93
|
+
split_line = since_sentence.split(" ")
|
|
94
|
+
|
|
95
|
+
for base_index in range(0, len(split_line) - 1, 2):
|
|
96
|
+
amount_string = split_line[base_index]
|
|
97
|
+
if not amount_string.isdigit():
|
|
98
|
+
raise QwakException(
|
|
99
|
+
"First word of [--since] must be a number representing "
|
|
100
|
+
"the amount of the time unit. (i.e. 3 minutes ago)"
|
|
101
|
+
)
|
|
102
|
+
time_unit = split_line[base_index + 1].lower()
|
|
103
|
+
if time_unit not in self.TIME_UNITS:
|
|
104
|
+
raise QwakException(
|
|
105
|
+
f"Must provide one of: {self.TIME_UNITS} to [--since] paramater. (i.e. 2 hours ago)"
|
|
106
|
+
)
|
|
107
|
+
timedelta_params[time_unit] = int(amount_string)
|
|
108
|
+
|
|
109
|
+
return datetime.now(timezone.utc) - timedelta(**timedelta_params)
|
|
110
|
+
|
|
111
|
+
class LogFormatting:
|
|
112
|
+
def __init__(self):
|
|
113
|
+
self.instance_color_map = {}
|
|
114
|
+
self.colors = [
|
|
115
|
+
Color.PURPLE,
|
|
116
|
+
Color.CYAN,
|
|
117
|
+
Color.DARKCYAN,
|
|
118
|
+
Color.BLUE,
|
|
119
|
+
Color.GREEN,
|
|
120
|
+
Color.YELLOW,
|
|
121
|
+
Color.WHITE,
|
|
122
|
+
Color.GREY,
|
|
123
|
+
]
|
|
124
|
+
|
|
125
|
+
def __format_datetime(self, timestamp_string):
|
|
126
|
+
if timestamp_string.endswith("Z"):
|
|
127
|
+
timestamp_string = timestamp_string[:-1]
|
|
128
|
+
try:
|
|
129
|
+
return f"{datetime.strptime(timestamp_string[:INGESTED_TIMESTAMP_MAXSIZE], INGESTED_TIMESTAMP_FORMAT)}\t"
|
|
130
|
+
except ValueError:
|
|
131
|
+
return f"{datetime.strptime(timestamp_string, ALTERNATIVE_INGESTED_TIMESTAMP_FORMAT_WITHOUT_DECIMALS)}\t"
|
|
132
|
+
|
|
133
|
+
def format_logs(self, log_lines, without_instance_id: bool = False):
|
|
134
|
+
colors_lines = []
|
|
135
|
+
|
|
136
|
+
for line in log_lines:
|
|
137
|
+
if line.source_instance_id not in self.instance_color_map:
|
|
138
|
+
source_id = len(self.instance_color_map) + 1
|
|
139
|
+
self.instance_color_map[line.source_instance_id] = {
|
|
140
|
+
"id": source_id,
|
|
141
|
+
"color": self.colors[source_id % len(self.colors)],
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
instance_params = self.instance_color_map[line.source_instance_id]
|
|
145
|
+
datetime_prefix = self.__format_datetime(line.ingested_iso_timestamp)
|
|
146
|
+
prefix = ""
|
|
147
|
+
if "level" in line.metadata:
|
|
148
|
+
prefix = f"{prefix}{line.metadata['level']} - "
|
|
149
|
+
|
|
150
|
+
if "phase" in line.metadata:
|
|
151
|
+
prefix = f"{prefix}{line.metadata['phase']} - "
|
|
152
|
+
|
|
153
|
+
if without_instance_id:
|
|
154
|
+
formatted_line = f'{instance_params["color"]}{datetime_prefix}{prefix}{line.text}{Color.END}'
|
|
155
|
+
else:
|
|
156
|
+
formatted_line = f'{datetime_prefix}{instance_params["id"]} - {instance_params["color"]}{prefix}{line.text}{Color.END}'
|
|
157
|
+
colors_lines.append(formatted_line)
|
|
158
|
+
|
|
159
|
+
return colors_lines
|
qwak_sdk/tools/utils.py
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
import sys
|
|
3
|
+
from contextlib import contextmanager
|
|
4
|
+
from typing import Callable, Optional
|
|
5
|
+
|
|
6
|
+
from qwak.tools.logger.logger import get_qwak_logger, get_qwak_logger_verbosity_level
|
|
7
|
+
from yaspin import yaspin
|
|
8
|
+
|
|
9
|
+
logger = get_qwak_logger()
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@contextmanager
|
|
13
|
+
def qwak_spinner(
|
|
14
|
+
begin_text: Optional[str],
|
|
15
|
+
end_text: Optional[str] = "",
|
|
16
|
+
print_callback: Callable[[str], None] = logger.info,
|
|
17
|
+
):
|
|
18
|
+
"""Qwak spinner.
|
|
19
|
+
|
|
20
|
+
Args:
|
|
21
|
+
begin_text: Text to shown when spinner starts.
|
|
22
|
+
end_text: Text to shown when spinner ends.
|
|
23
|
+
print_callback: Callback used to print the output.
|
|
24
|
+
"""
|
|
25
|
+
if (
|
|
26
|
+
logging.getLevelName(get_qwak_logger_verbosity_level()) < logging.WARNING
|
|
27
|
+
if print_callback != print
|
|
28
|
+
else False
|
|
29
|
+
) or not sys.stdout.isatty():
|
|
30
|
+
print_callback(begin_text)
|
|
31
|
+
yield
|
|
32
|
+
print_callback(end_text)
|
|
33
|
+
else:
|
|
34
|
+
with yaspin(text=begin_text, color="blue", timer=True) as sp:
|
|
35
|
+
try:
|
|
36
|
+
yield sp
|
|
37
|
+
except Exception as e:
|
|
38
|
+
sp.fail("💥")
|
|
39
|
+
raise e
|
|
40
|
+
if end_text:
|
|
41
|
+
sp.text = end_text
|
|
42
|
+
sp.ok("✅")
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: qwak-sdk
|
|
3
|
+
Version: 0.5.102
|
|
4
|
+
Summary: Qwak SDK and CLI for qwak models
|
|
5
|
+
License: Apache-2.0
|
|
6
|
+
Keywords: mlops,ml,deployment,serving,model
|
|
7
|
+
Author: Qwak
|
|
8
|
+
Author-email: info@qwak.com
|
|
9
|
+
Requires-Python: >=3.9,<3.12
|
|
10
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
18
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
20
|
+
Provides-Extra: batch
|
|
21
|
+
Provides-Extra: feature-store
|
|
22
|
+
Provides-Extra: feedback
|
|
23
|
+
Provides-Extra: local-deployment
|
|
24
|
+
Requires-Dist: boto3 (>=1.24.116,<2.0.0) ; extra == "batch" or extra == "feedback" or extra == "local-deployment"
|
|
25
|
+
Requires-Dist: click (==8.1.8)
|
|
26
|
+
Requires-Dist: cloudpickle (==2.2.1) ; extra == "feature-store"
|
|
27
|
+
Requires-Dist: cookiecutter
|
|
28
|
+
Requires-Dist: croniter (==1.4.1)
|
|
29
|
+
Requires-Dist: gitpython (>=2.1.0)
|
|
30
|
+
Requires-Dist: joblib (>=1.1.0,<2.0.0) ; extra == "batch" or extra == "feedback"
|
|
31
|
+
Requires-Dist: numpy (<2.0.0)
|
|
32
|
+
Requires-Dist: pandas (>1.1.3) ; (python_version == "3.9") and (extra == "batch" or extra == "feedback" or extra == "feature-store")
|
|
33
|
+
Requires-Dist: pandas (>=1.4.0) ; (python_version >= "3.10" and python_version < "3.12") and (extra == "batch" or extra == "feedback" or extra == "feature-store")
|
|
34
|
+
Requires-Dist: pyarrow (>=6.0.0) ; extra == "batch" or extra == "feature-store"
|
|
35
|
+
Requires-Dist: pyathena (>=2.2.0,!=2.18.0) ; extra == "feature-store"
|
|
36
|
+
Requires-Dist: pyspark (==3.4.2) ; extra == "feature-store"
|
|
37
|
+
Requires-Dist: python-json-logger (>=3.2.1,<4.0.0)
|
|
38
|
+
Requires-Dist: qwak-core (>=0.5.7)
|
|
39
|
+
Requires-Dist: qwak-inference (>=0.1.25,<0.2.0)
|
|
40
|
+
Requires-Dist: rich (>=13.0.0)
|
|
41
|
+
Requires-Dist: tabulate (>=0.8.0)
|
|
42
|
+
Requires-Dist: yaspin (>=2.0.0)
|
|
43
|
+
Project-URL: Home page, https://www.qwak.com/
|
|
44
|
+
Description-Content-Type: text/markdown
|
|
45
|
+
|
|
46
|
+
# Qwak SDK
|
|
47
|
+
|
|
48
|
+
Qwak is an end-to-end production ML platform designed to allow data scientists to build, deploy, and monitor their models in production with minimal engineering friction.
|
|
49
|
+
|
|
50
|
+
### Qwak SDK
|
|
51
|
+
|