You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by yo...@apache.org on 2025/12/16 08:45:08 UTC
(iotdb) branch rc/2.0.6 updated (460f3e90bb0 -> 8f6d4b5076e)
This is an automated email from the ASF dual-hosted git repository.
yongzao pushed a change to branch rc/2.0.6
in repository https://gitbox.apache.org/repos/asf/iotdb.git
from 460f3e90bb0 [AINode] Fix pom.xml of ainode (#16375)
new a1ee17ceac5 [AINode] Refactor code base
new 9272ef6c2c6 [AINode] Implement concurrent inference framework (#16311)
new 49fbdbcbda7 [AINode] Fix bugs for SHOW LOADED MODELS (#16410)
new 4e42ba6b525 [AINode] Add a batcher for inference (#16411)
new c7a614c8ccf [AINode][Bug fix] Concurrent inference (#16518)
new 68e44cca191 [AINode] Concurrent inference bug fix (#16595)
new 9bd8328f24d [AINode] Adjust the maximum inference input length (#16640)
new 048abac28f0 [AINode] Fix bug of sundial and forecast udf (#16768)
new 6ec4bcfc541 [AINode] Package AINode via PyInstaller (#16707)
new 533087eb5a5 [AINode] Enable AINode start as background (-d) (#16762)
new c163b93165f [AINode] Update AINodeClient for DataNode to borrow (#16647)
new 3eecb8adcdd [AINode] Fix bug that AINode cannot compile in Windows (#16767)
new e70b66dc09b [AINode] Delete poetry.lock for easier maintain different operating systems (#16793)
new 3cfcc7518b0 [AINode] Fix cp errors
new 8f6d4b5076e [AINode] Bump version to 2.0.6
The 15 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.github/workflows/cluster-it-1c1d1a.yml | 5 +-
integration-test/src/assembly/mpp-test.xml | 2 +-
.../iotdb/it/env/cluster/node/AINodeWrapper.java | 27 +-
.../ainode/it/AINodeConcurrentInferenceIT.java | 181 ++
.../iotdb/ainode/it/AINodeInferenceSQLIT.java | 4 +-
.../ainode/it/AINodeInstanceManagementIT.java | 212 ++
.../apache/iotdb/ainode/utils/AINodeTestUtils.java | 35 +
.../java/org/apache/iotdb/rpc/TSStatusCode.java | 1 +
.../client-py => iotdb-core/ainode}/.flake8 | 2 +-
iotdb-core/ainode/.gitignore | 11 +-
iotdb-core/ainode/ainode.spec | 199 ++
iotdb-core/ainode/ainode.xml | 17 +-
iotdb-core/ainode/ainode/__init__.py | 0
.../core/inference/inference_request_pool.py | 197 --
iotdb-core/ainode/ainode/core/rpc/handler.py | 76 -
iotdb-core/ainode/ainode/core/script.py | 110 -
iotdb-core/ainode/build_binary.py | 602 +++++
iotdb-core/ainode/iotdb/Session.py | 33 +-
.../{ainode/core => iotdb/ainode}/__init__.py | 0
iotdb-core/ainode/iotdb/ainode/conf/git.properties | 3 -
.../inference => iotdb/ainode/core}/__init__.py | 0
.../ainode/{ => iotdb}/ainode/core/ai_node.py | 29 +-
.../ainode/{ => iotdb}/ainode/core/config.py | 107 +-
.../ainode/{ => iotdb}/ainode/core/constant.py | 35 +-
.../ainode/{ => iotdb}/ainode/core/exception.py | 9 +-
.../ainode/core/inference}/__init__.py | 0
.../ainode/core/inference/batcher}/__init__.py | 0
.../core/inference/batcher/abstract_batcher.py | 35 +-
.../ainode/core/inference/batcher/basic_batcher.py | 63 +
.../ainode/core/inference/dispatcher}/__init__.py | 0
.../inference/dispatcher/abstract_dispatcher.py} | 49 +-
.../core/inference/dispatcher/basic_dispatcher.py | 60 +
.../ainode/core/inference/inference_request.py | 18 +-
.../core/inference/inference_request_pool.py | 223 ++
.../iotdb/ainode/core/inference/pool_controller.py | 519 ++++
.../iotdb/ainode/core/inference/pool_group.py | 121 +
.../core/inference/pool_scheduler}/__init__.py | 0
.../pool_scheduler/abstract_pool_scheduler.py | 86 +
.../pool_scheduler/basic_pool_scheduler.py | 193 ++
.../core/inference/request_scheduler}/__init__.py | 0
.../abstract_request_scheduler.py} | 2 +-
.../request_scheduler/basic_request_scheduler.py} | 11 +-
.../ainode/core/inference/strategy}/__init__.py | 0
.../strategy/abstract_inference_pipeline.py | 0
.../strategy/timer_sundial_inference_pipeline.py | 6 +-
.../strategy/timerxl_inference_pipeline.py | 12 +-
.../{ => iotdb}/ainode/core/inference/utils.py | 0
.../ainode/core/ingress}/__init__.py | 0
.../{ => iotdb}/ainode/core/ingress/dataset.py | 0
.../{ => iotdb}/ainode/core/ingress/iotdb.py | 22 +-
iotdb-core/ainode/{ => iotdb}/ainode/core/log.py | 8 +-
.../rpc => iotdb/ainode/core/manager}/__init__.py | 0
.../ainode/core/manager/cluster_manager.py | 7 +-
.../ainode/core/manager/inference_manager.py | 254 +-
.../ainode/core/manager/model_manager.py | 38 +-
.../{ => iotdb}/ainode/core/manager/utils.py | 35 +-
.../util => iotdb/ainode/core/model}/__init__.py | 0
.../ainode/core/model/built_in_model_factory.py | 54 +-
.../{ => iotdb}/ainode/core/model/model_enums.py | 0
.../{ => iotdb}/ainode/core/model/model_factory.py | 14 +-
.../{ => iotdb}/ainode/core/model/model_info.py | 4 +-
.../{ => iotdb}/ainode/core/model/model_storage.py | 37 +-
.../iotdb/ainode/core/model/sundial}/__init__.py | 0
.../core/model/sundial/configuration_sundial.py | 0
.../ainode/core/model/sundial/flow_loss.py | 0
.../ainode/core/model/sundial/modeling_sundial.py | 23 +-
.../core/model/sundial/ts_generation_mixin.py | 0
.../iotdb/ainode/core/model/timerxl}/__init__.py | 0
.../core/model/timerxl/configuration_timer.py | 0
.../ainode/core/model/timerxl/modeling_timer.py | 12 +-
.../core/model/timerxl/ts_generation_mixin.py | 0
.../{ => iotdb}/ainode/core/model/uri_utils.py | 10 +-
.../ainode/iotdb/ainode/core/rpc}/__init__.py | 0
.../ainode/{ => iotdb}/ainode/core/rpc/client.py | 65 +-
iotdb-core/ainode/iotdb/ainode/core/rpc/handler.py | 137 ++
.../ainode/{ => iotdb}/ainode/core/rpc/service.py | 42 +-
.../ainode/{ => iotdb}/ainode/core/rpc/status.py | 6 +-
iotdb-core/ainode/iotdb/ainode/core/script.py | 69 +
.../ainode/iotdb/ainode/core/util}/__init__.py | 0
.../{ => iotdb}/ainode/core/util/activation.py | 0
.../ainode/iotdb/ainode/core/util/atmoic_int.py | 66 +
.../iotdb/ainode/core/util/batch_executor.py | 133 +
.../ainode/{ => iotdb}/ainode/core/util/cache.py | 4 +-
.../{ => iotdb}/ainode/core/util/decorator.py | 15 +
.../ainode/iotdb/ainode/core/util/gpu_mapping.py | 93 +
.../ainode/core/util/huggingface_cache.py | 0
.../ainode/{ => iotdb}/ainode/core/util/lock.py | 0
.../ainode/{ => iotdb}/ainode/core/util/masking.py | 0
.../ainode/{ => iotdb}/ainode/core/util/serde.py | 2 +-
.../pom.properties => core/util/thread_name.py} | 9 +-
.../ainode/iotdb/sqlalchemy/IoTDBSQLCompiler.py | 3 +-
iotdb-core/ainode/iotdb/table_session_pool.py | 2 +-
.../ainode/iotdb/template/MeasurementNode.py | 5 +-
iotdb-core/ainode/iotdb/template/Template.py | 2 +-
.../iotdb/thrift/ainode/IAINodeRPCService-remote | 6 +-
.../iotdb/thrift/ainode/IAINodeRPCService.py | 18 +-
iotdb-core/ainode/iotdb/thrift/ainode/constants.py | 11 +-
iotdb-core/ainode/iotdb/thrift/ainode/ttypes.py | 13 +-
iotdb-core/ainode/iotdb/thrift/common/constants.py | 11 +-
iotdb-core/ainode/iotdb/thrift/common/ttypes.py | 104 +-
.../thrift/confignode/IConfigNodeRPCService-remote | 70 +-
.../thrift/confignode/IConfigNodeRPCService.py | 1680 ++-----------
.../ainode/iotdb/thrift/confignode/constants.py | 11 +-
.../ainode/iotdb/thrift/confignode/ttypes.py | 2530 ++++++--------------
.../thrift/datanode/IDataNodeRPCService-remote | 31 +-
.../iotdb/thrift/datanode/IDataNodeRPCService.py | 567 +----
.../thrift/datanode/MPPDataExchangeService-remote | 6 +-
.../thrift/datanode/MPPDataExchangeService.py | 18 +-
.../ainode/iotdb/thrift/datanode/constants.py | 11 +-
iotdb-core/ainode/iotdb/thrift/datanode/ttypes.py | 319 +--
.../iotdb/thrift/rpc/IClientRPCService-remote | 13 +-
.../ainode/iotdb/thrift/rpc/IClientRPCService.py | 207 +-
iotdb-core/ainode/iotdb/thrift/rpc/constants.py | 11 +-
iotdb-core/ainode/iotdb/thrift/rpc/ttypes.py | 231 +-
.../iotdb/tsfile/utils/read_write_io_utils.py | 2 +-
.../ainode/iotdb/tsfile/utils/tsblock_serde.py | 1 -
iotdb-core/ainode/iotdb/utils/Field.py | 8 +-
iotdb-core/ainode/iotdb/utils/IoTDBConstants.py | 3 +-
iotdb-core/ainode/iotdb/utils/NumpyTablet.py | 4 +-
iotdb-core/ainode/iotdb/utils/SessionDataSet.py | 6 +-
iotdb-core/ainode/iotdb/utils/Tablet.py | 2 +-
iotdb-core/ainode/iotdb/utils/iotdb_rpc_dataset.py | 4 +-
iotdb-core/ainode/poetry.lock | 2402 -------------------
iotdb-core/ainode/pom.xml | 106 +-
iotdb-core/ainode/pyproject.toml | 109 +-
.../ainode/resources/syncPythonVersion.groovy | 33 -
.../org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4 | 20 +-
.../antlr4/org/apache/iotdb/db/qp/sql/SqlLexer.g4 | 8 +
.../async/AsyncAINodeHeartbeatClientPool.java | 7 +-
.../request/read/model/ShowModelPlan.java | 4 +-
.../consensus/response/model/GetModelInfoResp.java | 8 -
...eption.java => NoAvailableAINodeException.java} | 8 +-
.../iotdb/confignode/manager/ConfigManager.java | 49 +-
.../apache/iotdb/confignode/manager/IManager.java | 23 +-
.../iotdb/confignode/manager/ModelManager.java | 149 +-
.../iotdb/confignode/persistence/ModelInfo.java | 2 -
.../procedure/impl/model/CreateModelProcedure.java | 4 +-
.../procedure/impl/model/DropModelProcedure.java | 7 +-
.../procedure/impl/node/RemoveAINodeProcedure.java | 4 +-
.../thrift/ConfigNodeRPCServiceProcessor.java | 44 +-
.../db/protocol/client/AINodeClientFactory.java | 133 +
.../iotdb/db/protocol/client/ConfigNodeClient.java | 23 +-
.../db/protocol}/client/ainode/AINodeClient.java | 153 +-
.../client/ainode/AINodeClientManager.java | 75 +
.../client/ainode/AsyncAINodeServiceClient.java | 2 +-
.../table/v1/handler/ExecuteStatementHandler.java | 4 +
.../rest/v1/handler/ExecuteStatementHandler.java | 4 +
.../rest/v1/handler/QueryDataSetHandler.java | 4 +
.../rest/v2/handler/ExecuteStatementHandler.java | 4 +
.../rest/v2/handler/QueryDataSetHandler.java | 4 +
.../protocol/thrift/impl/ClientRPCServiceImpl.java | 1 -
.../common/header/DatasetHeaderFactory.java | 8 +
.../operator/process/ai/InferenceOperator.java | 4 +-
.../InformationSchemaContentSupplierFactory.java | 17 +-
.../iotdb/db/queryengine/plan/Coordinator.java | 8 +
.../queryengine/plan/analyze/AnalyzeVisitor.java | 10 +-
.../db/queryengine/plan/analyze/ModelFetcher.java | 23 +-
.../execution/config/TableConfigTaskVisitor.java | 32 +
.../execution/config/TreeConfigTaskVisitor.java | 33 +
.../config/executor/ClusterConfigTaskExecutor.java | 140 +-
.../config/executor/IConfigTaskExecutor.java | 8 +
.../{CreateModelTask.java => LoadModelTask.java} | 12 +-
.../ShowAIDevicesTask.java} | 38 +-
.../ShowLoadedModelsTask.java} | 41 +-
.../config/metadata/ai/ShowModelsTask.java | 4 +-
.../{CreateModelTask.java => UnloadModelTask.java} | 12 +-
.../db/queryengine/plan/parser/ASTVisitor.java | 55 +
.../parameter/model/ModelInferenceDescriptor.java | 5 +-
.../function/tvf/ForecastTableFunction.java | 22 +-
.../plan/relational/sql/ast/AstVisitor.java | 16 +
.../sql/ast/{CreateModel.java => LoadModel.java} | 23 +-
.../ast/{NaturalJoin.java => ShowAIDevices.java} | 34 +-
.../{RemoveAINode.java => ShowLoadedModels.java} | 26 +-
.../sql/ast/{CreateModel.java => UnloadModel.java} | 22 +-
.../plan/relational/sql/parser/AstBuilder.java | 53 +
.../plan/statement/StatementVisitor.java | 20 +
...ModelStatement.java => LoadModelStatement.java} | 52 +-
.../ShowAIDevicesStatement.java} | 22 +-
.../model/ShowLoadedModelsStatement.java} | 45 +-
...delStatement.java => UnloadModelStatement.java} | 62 +-
.../db/queryengine/plan/udf/UDTFForecast.java | 270 +++
.../relational/analyzer/TableFunctionTest.java | 4 +-
iotdb-core/node-commons/pom.xml | 6 -
.../iotdb/commons/client/ClientPoolFactory.java | 52 -
.../commons/client/ainode/AINodeClientManager.java | 40 -
.../schema/column/ColumnHeaderConstant.java | 11 +
.../db/relational/grammar/sql/RelationalSql.g4 | 24 +
.../thrift-ainode/src/main/thrift/ainode.thrift | 32 +
.../src/main/thrift/confignode.thrift | 35 +-
scripts/conf/ainode-env.sh | 138 --
scripts/conf/windows/ainode-env.bat | 129 -
scripts/sbin/start-ainode.sh | 56 +-
scripts/sbin/windows/start-ainode.bat | 62 +-
193 files changed, 6921 insertions(+), 8543 deletions(-)
create mode 100644 integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeConcurrentInferenceIT.java
create mode 100644 integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeInstanceManagementIT.java
copy {iotdb-client/client-py => iotdb-core/ainode}/.flake8 (98%)
create mode 100644 iotdb-core/ainode/ainode.spec
delete mode 100644 iotdb-core/ainode/ainode/__init__.py
delete mode 100644 iotdb-core/ainode/ainode/core/inference/inference_request_pool.py
delete mode 100644 iotdb-core/ainode/ainode/core/rpc/handler.py
delete mode 100644 iotdb-core/ainode/ainode/core/script.py
create mode 100644 iotdb-core/ainode/build_binary.py
rename iotdb-core/ainode/{ainode/core => iotdb/ainode}/__init__.py (100%)
delete mode 100644 iotdb-core/ainode/iotdb/ainode/conf/git.properties
rename iotdb-core/ainode/{ainode/core/inference => iotdb/ainode/core}/__init__.py (100%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/ai_node.py (87%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/config.py (81%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/constant.py (88%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/exception.py (96%)
rename iotdb-core/ainode/{ainode/core/inference/scheduler => iotdb/ainode/core/inference}/__init__.py (100%)
rename iotdb-core/ainode/{ainode/core/inference/strategy => iotdb/ainode/core/inference/batcher}/__init__.py (100%)
copy iotdb-client/client-py/iotdb/template/TemplateQueryType.py => iotdb-core/ainode/iotdb/ainode/core/inference/batcher/abstract_batcher.py (59%)
create mode 100644 iotdb-core/ainode/iotdb/ainode/core/inference/batcher/basic_batcher.py
rename iotdb-core/ainode/{ainode/core/ingress => iotdb/ainode/core/inference/dispatcher}/__init__.py (100%)
copy iotdb-core/ainode/iotdb/{template/TemplateNode.py => ainode/core/inference/dispatcher/abstract_dispatcher.py} (51%)
create mode 100644 iotdb-core/ainode/iotdb/ainode/core/inference/dispatcher/basic_dispatcher.py
rename iotdb-core/ainode/{ => iotdb}/ainode/core/inference/inference_request.py (84%)
create mode 100644 iotdb-core/ainode/iotdb/ainode/core/inference/inference_request_pool.py
create mode 100644 iotdb-core/ainode/iotdb/ainode/core/inference/pool_controller.py
create mode 100644 iotdb-core/ainode/iotdb/ainode/core/inference/pool_group.py
rename iotdb-core/ainode/{ainode/core/manager => iotdb/ainode/core/inference/pool_scheduler}/__init__.py (100%)
create mode 100644 iotdb-core/ainode/iotdb/ainode/core/inference/pool_scheduler/abstract_pool_scheduler.py
create mode 100644 iotdb-core/ainode/iotdb/ainode/core/inference/pool_scheduler/basic_pool_scheduler.py
rename iotdb-core/ainode/{ainode/core/model => iotdb/ainode/core/inference/request_scheduler}/__init__.py (100%)
rename iotdb-core/ainode/{ainode/core/inference/scheduler/abstract_scheduler.py => iotdb/ainode/core/inference/request_scheduler/abstract_request_scheduler.py} (98%)
rename iotdb-core/ainode/{ainode/core/inference/scheduler/basic_scheduler.py => iotdb/ainode/core/inference/request_scheduler/basic_request_scheduler.py} (89%)
rename iotdb-core/ainode/{ainode/core/model/sundial => iotdb/ainode/core/inference/strategy}/__init__.py (100%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/inference/strategy/abstract_inference_pipeline.py (100%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/inference/strategy/timer_sundial_inference_pipeline.py (88%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/inference/strategy/timerxl_inference_pipeline.py (71%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/inference/utils.py (100%)
rename iotdb-core/ainode/{ainode/core/model/timerxl => iotdb/ainode/core/ingress}/__init__.py (100%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/ingress/dataset.py (100%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/ingress/iotdb.py (95%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/log.py (96%)
rename iotdb-core/ainode/{ainode/core/rpc => iotdb/ainode/core/manager}/__init__.py (100%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/manager/cluster_manager.py (88%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/manager/inference_manager.py (60%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/manager/model_manager.py (82%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/manager/utils.py (77%)
rename iotdb-core/ainode/{ainode/core/util => iotdb/ainode/core/model}/__init__.py (100%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/model/built_in_model_factory.py (96%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/model/model_enums.py (100%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/model/model_factory.py (96%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/model/model_info.py (98%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/model/model_storage.py (93%)
copy {iotdb-client/client-py/iotdb => iotdb-core/ainode/iotdb/ainode/core/model/sundial}/__init__.py (100%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/model/sundial/configuration_sundial.py (100%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/model/sundial/flow_loss.py (100%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/model/sundial/modeling_sundial.py (97%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/model/sundial/ts_generation_mixin.py (100%)
copy {iotdb-client/client-py/iotdb => iotdb-core/ainode/iotdb/ainode/core/model/timerxl}/__init__.py (100%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/model/timerxl/configuration_timer.py (100%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/model/timerxl/modeling_timer.py (98%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/model/timerxl/ts_generation_mixin.py (100%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/model/uri_utils.py (94%)
copy {iotdb-client/client-py/iotdb => iotdb-core/ainode/iotdb/ainode/core/rpc}/__init__.py (100%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/rpc/client.py (80%)
create mode 100644 iotdb-core/ainode/iotdb/ainode/core/rpc/handler.py
rename iotdb-core/ainode/{ => iotdb}/ainode/core/rpc/service.py (69%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/rpc/status.py (89%)
create mode 100644 iotdb-core/ainode/iotdb/ainode/core/script.py
copy {iotdb-client/client-py/iotdb => iotdb-core/ainode/iotdb/ainode/core/util}/__init__.py (100%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/util/activation.py (100%)
create mode 100644 iotdb-core/ainode/iotdb/ainode/core/util/atmoic_int.py
create mode 100644 iotdb-core/ainode/iotdb/ainode/core/util/batch_executor.py
rename iotdb-core/ainode/{ => iotdb}/ainode/core/util/cache.py (96%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/util/decorator.py (79%)
create mode 100644 iotdb-core/ainode/iotdb/ainode/core/util/gpu_mapping.py
rename iotdb-core/ainode/{ => iotdb}/ainode/core/util/huggingface_cache.py (100%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/util/lock.py (100%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/util/masking.py (100%)
rename iotdb-core/ainode/{ => iotdb}/ainode/core/util/serde.py (98%)
rename iotdb-core/ainode/iotdb/ainode/{conf/pom.properties => core/util/thread_name.py} (88%)
delete mode 100644 iotdb-core/ainode/poetry.lock
copy iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/{DatabaseNotExistsException.java => NoAvailableAINodeException.java} (79%)
create mode 100644 iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/AINodeClientFactory.java
rename iotdb-core/{node-commons/src/main/java/org/apache/iotdb/commons => datanode/src/main/java/org/apache/iotdb/db/protocol}/client/ainode/AINodeClient.java (67%)
create mode 100644 iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ainode/AINodeClientManager.java
rename iotdb-core/{node-commons/src/main/java/org/apache/iotdb/commons => datanode/src/main/java/org/apache/iotdb/db/protocol}/client/ainode/AsyncAINodeServiceClient.java (98%)
copy iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/ai/{CreateModelTask.java => LoadModelTask.java} (82%)
copy iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/{ShowClusterIdTask.java => ai/ShowAIDevicesTask.java} (75%)
copy iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/{ShowAINodesTask.java => ai/ShowLoadedModelsTask.java} (68%)
copy iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/ai/{CreateModelTask.java => UnloadModelTask.java} (82%)
copy iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/{CreateModel.java => LoadModel.java} (70%)
copy iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/{NaturalJoin.java => ShowAIDevices.java} (80%)
copy iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/{RemoveAINode.java => ShowLoadedModels.java} (70%)
copy iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/{CreateModel.java => UnloadModel.java} (73%)
copy iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/model/{DropModelStatement.java => LoadModelStatement.java} (62%)
copy iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/{ShowTTLStatement.java => model/ShowAIDevicesStatement.java} (74%)
copy iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/{sys/SetSqlDialectStatement.java => metadata/model/ShowLoadedModelsStatement.java} (65%)
copy iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/model/{CreateModelStatement.java => UnloadModelStatement.java} (62%)
create mode 100644 iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/udf/UDTFForecast.java
delete mode 100644 iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/ainode/AINodeClientManager.java
delete mode 100644 scripts/conf/ainode-env.sh
delete mode 100644 scripts/conf/windows/ainode-env.bat
(iotdb) 15/15: [AINode] Bump version to 2.0.6
Posted by yo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
yongzao pushed a commit to branch rc/2.0.6
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 8f6d4b5076eaf05660fa2139b980bc3887093ab6
Author: Yongzao <53...@qq.com>
AuthorDate: Tue Dec 16 16:44:40 2025 +0800
[AINode] Bump version to 2.0.6
---
iotdb-core/ainode/pom.xml | 12 ++++++------
iotdb-core/ainode/pyproject.toml | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/iotdb-core/ainode/pom.xml b/iotdb-core/ainode/pom.xml
index 1a3be76b633..e9353db65a3 100644
--- a/iotdb-core/ainode/pom.xml
+++ b/iotdb-core/ainode/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-core</artifactId>
- <version>2.0.6-SNAPSHOT</version>
+ <version>2.0.6</version>
</parent>
<artifactId>iotdb-ainode</artifactId>
<name>IoTDB: Core: AINode</name>
@@ -33,31 +33,31 @@
<dependency>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-thrift</artifactId>
- <version>2.0.6-SNAPSHOT</version>
+ <version>2.0.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-thrift-confignode</artifactId>
- <version>2.0.6-SNAPSHOT</version>
+ <version>2.0.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-thrift-commons</artifactId>
- <version>2.0.6-SNAPSHOT</version>
+ <version>2.0.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-thrift-ainode</artifactId>
- <version>2.0.6-SNAPSHOT</version>
+ <version>2.0.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-python-api</artifactId>
- <version>2.0.6-SNAPSHOT</version>
+ <version>2.0.6</version>
<scope>provided</scope>
</dependency>
</dependencies>
diff --git a/iotdb-core/ainode/pyproject.toml b/iotdb-core/ainode/pyproject.toml
index 1dc4c7f61e7..151eeebb757 100644
--- a/iotdb-core/ainode/pyproject.toml
+++ b/iotdb-core/ainode/pyproject.toml
@@ -21,7 +21,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "apache-iotdb-ainode"
-version = "2.0.6.dev"
+version = "2.0.6"
description = "Apache IoTDB AINode"
readme = "README.md"
authors = ["Apache Software Foundation <de...@iotdb.apache.org>"]
(iotdb) 06/15: [AINode] Concurrent inference bug fix (#16595)
Posted by yo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
yongzao pushed a commit to branch rc/2.0.6
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 68e44cca1913cbaf965ae63644cbe359981f48de
Author: Yongzao <53...@qq.com>
AuthorDate: Fri Oct 17 08:53:19 2025 +0800
[AINode] Concurrent inference bug fix (#16595)
(cherry picked from commit 46a0c6ac0b13e0ff504662f957ea987647265589)
---
.../ainode/it/AINodeConcurrentInferenceIT.java | 71 +++++++++++-----------
.../iotdb/ainode/it/AINodeInferenceSQLIT.java | 4 +-
.../iotdb/ainode/core/inference/pool_controller.py | 21 +++++--
.../iotdb/ainode/core/inference/pool_group.py | 6 ++
.../iotdb/ainode/core/manager/model_manager.py | 3 +
.../iotdb/ainode/core/model/model_storage.py | 7 +++
.../consensus/response/model/GetModelInfoResp.java | 8 ---
.../iotdb/confignode/manager/ModelManager.java | 38 +++---------
.../iotdb/confignode/persistence/ModelInfo.java | 2 -
.../queryengine/plan/analyze/AnalyzeVisitor.java | 10 +--
.../db/queryengine/plan/analyze/ModelFetcher.java | 23 +------
.../parameter/model/ModelInferenceDescriptor.java | 5 +-
.../function/tvf/ForecastTableFunction.java | 14 +----
.../schema/column/ColumnHeaderConstant.java | 4 +-
14 files changed, 90 insertions(+), 126 deletions(-)
diff --git a/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeConcurrentInferenceIT.java b/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeConcurrentInferenceIT.java
index b5b987594d9..a5884a3dc8d 100644
--- a/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeConcurrentInferenceIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeConcurrentInferenceIT.java
@@ -20,14 +20,17 @@
package org.apache.iotdb.ainode.it;
import org.apache.iotdb.it.env.EnvFactory;
+import org.apache.iotdb.it.framework.IoTDBTestRunner;
+import org.apache.iotdb.itbase.category.AIClusterIT;
import org.apache.iotdb.itbase.env.BaseEnv;
-import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -36,21 +39,17 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.HashSet;
-import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import static org.apache.iotdb.ainode.utils.AINodeTestUtils.concurrentInference;
+@RunWith(IoTDBTestRunner.class)
+@Category({AIClusterIT.class})
public class AINodeConcurrentInferenceIT {
private static final Logger LOGGER = LoggerFactory.getLogger(AINodeConcurrentInferenceIT.class);
- private static final Map<String, String> MODEL_ID_TO_TYPE_MAP =
- ImmutableMap.of(
- "timer_xl", "Timer-XL",
- "sundial", "Timer-Sundial");
-
@BeforeClass
public static void setUp() throws Exception {
// Init 1C1D1A cluster environment
@@ -86,13 +85,12 @@ public class AINodeConcurrentInferenceIT {
for (int i = 0; i < 2880; i++) {
statement.execute(
String.format(
- "INSERT INTO root.AI(timestamp, s) VALUES(%d, %f)",
- i, Math.sin(i * Math.PI / 1440)));
+ "INSERT INTO root.AI(time, s) VALUES(%d, %f)", i, Math.sin(i * Math.PI / 1440)));
}
}
}
- @Test
+ // @Test
public void concurrentCPUCallInferenceTest() throws SQLException, InterruptedException {
concurrentCPUCallInferenceTest("timer_xl");
concurrentCPUCallInferenceTest("sundial");
@@ -105,21 +103,21 @@ public class AINodeConcurrentInferenceIT {
final int threadCnt = 4;
final int loop = 10;
final int predictLength = 96;
- statement.execute(String.format("LOAD MODEL %s TO DEVICES \"cpu\"", modelId));
- checkModelOnSpecifiedDevice(statement, MODEL_ID_TO_TYPE_MAP.get(modelId), "cpu");
+ statement.execute(String.format("LOAD MODEL %s TO DEVICES 'cpu'", modelId));
+ checkModelOnSpecifiedDevice(statement, modelId, "cpu");
concurrentInference(
statement,
String.format(
- "CALL INFERENCE(%s, \"SELECT s FROM root.AI\", predict_length=%d)",
+ "CALL INFERENCE(%s, 'SELECT s FROM root.AI', predict_length=%d)",
modelId, predictLength),
threadCnt,
loop,
predictLength);
- statement.execute(String.format("UNLOAD MODEL %s FROM DEVICES \"cpu\"", modelId));
+ statement.execute(String.format("UNLOAD MODEL %s FROM DEVICES 'cpu'", modelId));
}
}
- @Test
+ // @Test
public void concurrentGPUCallInferenceTest() throws SQLException, InterruptedException {
concurrentGPUCallInferenceTest("timer_xl");
concurrentGPUCallInferenceTest("sundial");
@@ -133,17 +131,17 @@ public class AINodeConcurrentInferenceIT {
final int loop = 100;
final int predictLength = 512;
final String devices = "0,1";
- statement.execute(String.format("LOAD MODEL %s TO DEVICES \"%s\"", modelId, devices));
- checkModelOnSpecifiedDevice(statement, MODEL_ID_TO_TYPE_MAP.get(modelId), devices);
+ statement.execute(String.format("LOAD MODEL %s TO DEVICES '%s'", modelId, devices));
+ checkModelOnSpecifiedDevice(statement, modelId, devices);
concurrentInference(
statement,
String.format(
- "CALL INFERENCE(%s, \"SELECT s FROM root.AI\", predict_length=%d)",
+ "CALL INFERENCE(%s, 'SELECT s FROM root.AI', predict_length=%d)",
modelId, predictLength),
threadCnt,
loop,
predictLength);
- statement.execute(String.format("UNLOAD MODEL %s FROM DEVICES \"0,1\"", modelId));
+ statement.execute(String.format("UNLOAD MODEL %s FROM DEVICES '0,1'", modelId));
}
}
@@ -159,8 +157,8 @@ public class AINodeConcurrentInferenceIT {
final int threadCnt = 4;
final int loop = 10;
final int predictLength = 96;
- statement.execute(String.format("LOAD MODEL %s TO DEVICES \"cpu\"", modelId));
- checkModelOnSpecifiedDevice(statement, MODEL_ID_TO_TYPE_MAP.get(modelId), "cpu");
+ statement.execute(String.format("LOAD MODEL %s TO DEVICES 'cpu'", modelId));
+ checkModelOnSpecifiedDevice(statement, modelId, "cpu");
long startTime = System.currentTimeMillis();
concurrentInference(
statement,
@@ -175,7 +173,7 @@ public class AINodeConcurrentInferenceIT {
String.format(
"Model %s concurrent inference %d reqs (%d threads, %d loops) in CPU takes time: %dms",
modelId, threadCnt * loop, threadCnt, loop, endTime - startTime));
- statement.execute(String.format("UNLOAD MODEL %s FROM DEVICES \"cpu\"", modelId));
+ statement.execute(String.format("UNLOAD MODEL %s FROM DEVICES 'cpu'", modelId));
}
}
@@ -192,8 +190,8 @@ public class AINodeConcurrentInferenceIT {
final int loop = 100;
final int predictLength = 512;
final String devices = "0,1";
- statement.execute(String.format("LOAD MODEL %s TO DEVICES \"%s\"", modelId, devices));
- checkModelOnSpecifiedDevice(statement, MODEL_ID_TO_TYPE_MAP.get(modelId), devices);
+ statement.execute(String.format("LOAD MODEL %s TO DEVICES '%s'", modelId, devices));
+ checkModelOnSpecifiedDevice(statement, modelId, devices);
long startTime = System.currentTimeMillis();
concurrentInference(
statement,
@@ -208,32 +206,35 @@ public class AINodeConcurrentInferenceIT {
String.format(
"Model %s concurrent inference %d reqs (%d threads, %d loops) in GPU takes time: %dms",
modelId, threadCnt * loop, threadCnt, loop, endTime - startTime));
- statement.execute(String.format("UNLOAD MODEL %s FROM DEVICES \"0,1\"", modelId));
+ statement.execute(String.format("UNLOAD MODEL %s FROM DEVICES '0,1'", modelId));
}
}
- private void checkModelOnSpecifiedDevice(Statement statement, String modelType, String device)
+ private void checkModelOnSpecifiedDevice(Statement statement, String modelId, String device)
throws SQLException, InterruptedException {
- for (int retry = 0; retry < 10; retry++) {
- Set<String> targetDevices = ImmutableSet.copyOf(device.split(","));
+ Set<String> targetDevices = ImmutableSet.copyOf(device.split(","));
+ LOGGER.info("Checking model: {} on target devices: {}", modelId, targetDevices);
+ for (int retry = 0; retry < 20; retry++) {
Set<String> foundDevices = new HashSet<>();
try (final ResultSet resultSet =
- statement.executeQuery(String.format("SHOW LOADED MODELS %s", device))) {
+ statement.executeQuery(String.format("SHOW LOADED MODELS '%s'", device))) {
while (resultSet.next()) {
- String deviceId = resultSet.getString(1);
- String loadedModelType = resultSet.getString(2);
- int count = resultSet.getInt(3);
- if (loadedModelType.equals(modelType) && targetDevices.contains(deviceId)) {
- Assert.assertTrue(count > 1);
+ String deviceId = resultSet.getString("DeviceId");
+ String loadedModelId = resultSet.getString("ModelId");
+ int count = resultSet.getInt("Count(instances)");
+ LOGGER.info("Model {} found in device {}, count {}", loadedModelId, deviceId, count);
+ if (loadedModelId.equals(modelId) && targetDevices.contains(deviceId) && count > 0) {
foundDevices.add(deviceId);
+ LOGGER.info("Model {} is loaded to device {}", modelId, device);
}
}
if (foundDevices.containsAll(targetDevices)) {
+ LOGGER.info("Model {} is loaded to devices {}, start testing", modelId, targetDevices);
return;
}
}
TimeUnit.SECONDS.sleep(3);
}
- Assert.fail("Model " + modelType + " is not loaded on device " + device);
+ Assert.fail("Model " + modelId + " is not loaded on device " + device);
}
}
diff --git a/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeInferenceSQLIT.java b/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeInferenceSQLIT.java
index 2fcc180a3e3..70f7a1d9f9e 100644
--- a/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeInferenceSQLIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeInferenceSQLIT.java
@@ -95,7 +95,7 @@ public class AINodeInferenceSQLIT {
EnvFactory.getEnv().cleanClusterEnvironment();
}
- @Test
+ // @Test
public void callInferenceTestInTree() throws SQLException {
try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TREE_SQL_DIALECT);
Statement statement = connection.createStatement()) {
@@ -209,7 +209,7 @@ public class AINodeInferenceSQLIT {
// }
}
- @Test
+ // @Test
public void errorCallInferenceTestInTree() throws SQLException {
try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TREE_SQL_DIALECT);
Statement statement = connection.createStatement()) {
diff --git a/iotdb-core/ainode/iotdb/ainode/core/inference/pool_controller.py b/iotdb-core/ainode/iotdb/ainode/core/inference/pool_controller.py
index ce04120474e..069a6b9ced6 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/inference/pool_controller.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/inference/pool_controller.py
@@ -40,6 +40,8 @@ from iotdb.ainode.core.inference.pool_scheduler.basic_pool_scheduler import (
ScaleActionType,
)
from iotdb.ainode.core.log import Logger
+from iotdb.ainode.core.manager.model_manager import ModelManager
+from iotdb.ainode.core.model.model_enums import BuiltInModelType
from iotdb.ainode.core.model.sundial.configuration_sundial import SundialConfig
from iotdb.ainode.core.model.timerxl.configuration_timer import TimerConfig
from iotdb.ainode.core.util.atmoic_int import AtomicInt
@@ -48,6 +50,7 @@ from iotdb.ainode.core.util.decorator import synchronized
from iotdb.ainode.core.util.thread_name import ThreadName
logger = Logger()
+MODEL_MANAGER = ModelManager()
class PoolController:
@@ -169,7 +172,7 @@ class PoolController:
for model_id, device_map in self._request_pool_map.items():
if device_id in device_map:
pool_group = device_map[device_id]
- device_models[model_id] = pool_group.get_pool_count()
+ device_models[model_id] = pool_group.get_running_pool_count()
result[device_id] = device_models
return result
@@ -191,7 +194,7 @@ class PoolController:
def _load_model_on_device_task(device_id: str):
if not self.has_request_pools(model_id, device_id):
actions = self._pool_scheduler.schedule_load_model_to_device(
- model_id, device_id
+ MODEL_MANAGER.get_model_info(model_id), device_id
)
for action in actions:
if action.action == ScaleActionType.SCALE_UP:
@@ -218,7 +221,7 @@ class PoolController:
def _unload_model_on_device_task(device_id: str):
if self.has_request_pools(model_id, device_id):
actions = self._pool_scheduler.schedule_unload_model_from_device(
- model_id, device_id
+ MODEL_MANAGER.get_model_info(model_id), device_id
)
for action in actions:
if action.action == ScaleActionType.SCALE_DOWN:
@@ -253,13 +256,19 @@ class PoolController:
def _expand_pool_on_device(*_):
result_queue = mp.Queue()
pool_id = self._new_pool_id.get_and_increment()
- if model_id == "sundial":
+ model_info = MODEL_MANAGER.get_model_info(model_id)
+ model_type = model_info.model_type
+ if model_type == BuiltInModelType.SUNDIAL.value:
config = SundialConfig()
- elif model_id == "timer_xl":
+ elif model_type == BuiltInModelType.TIMER_XL.value:
config = TimerConfig()
+ else:
+ raise InferenceModelInternalError(
+ f"Unsupported model type {model_type} for loading model {model_id}"
+ )
pool = InferenceRequestPool(
pool_id=pool_id,
- model_id=model_id,
+ model_info=model_info,
device=device_id,
config=config,
request_queue=result_queue,
diff --git a/iotdb-core/ainode/iotdb/ainode/core/inference/pool_group.py b/iotdb-core/ainode/iotdb/ainode/core/inference/pool_group.py
index 96dce845585..a700dcee473 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/inference/pool_group.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/inference/pool_group.py
@@ -70,6 +70,12 @@ class PoolGroup:
def get_pool_count(self) -> int:
return len(self.pool_group)
+ def get_running_pool_count(self) -> int:
+ count = 0
+ for _, state in self.pool_states.items():
+ count += 1 if state == PoolState.RUNNING else 0
+ return count
+
def dispatch_request(
self, req: InferenceRequest, infer_proxy: InferenceRequestProxy
):
diff --git a/iotdb-core/ainode/iotdb/ainode/core/manager/model_manager.py b/iotdb-core/ainode/iotdb/ainode/core/manager/model_manager.py
index 6917f28065e..086ab69a465 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/manager/model_manager.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/manager/model_manager.py
@@ -147,6 +147,9 @@ class ModelManager:
def register_built_in_model(self, model_info: ModelInfo):
self.model_storage.register_built_in_model(model_info)
+ def get_model_info(self, model_id: str) -> ModelInfo:
+ return self.model_storage.get_model_info(model_id)
+
def update_model_state(self, model_id: str, state: ModelStates):
self.model_storage.update_model_state(model_id, state)
diff --git a/iotdb-core/ainode/iotdb/ainode/core/model/model_storage.py b/iotdb-core/ainode/iotdb/ainode/core/model/model_storage.py
index 467c99e00a9..1f23c57ff64 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/model/model_storage.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/model/model_storage.py
@@ -423,6 +423,13 @@ class ModelStorage(object):
with self._lock_pool.get_lock(model_info.model_id).write_lock():
self._model_info_map[model_info.model_id] = model_info
+ def get_model_info(self, model_id: str) -> ModelInfo:
+ with self._lock_pool.get_lock(model_id).read_lock():
+ if model_id in self._model_info_map:
+ return self._model_info_map[model_id]
+ else:
+ raise ValueError(f"Model {model_id} does not exist.")
+
def update_model_state(self, model_id: str, state: ModelStates):
with self._lock_pool.get_lock(model_id).write_lock():
if model_id in self._model_info_map:
diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/consensus/response/model/GetModelInfoResp.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/consensus/response/model/GetModelInfoResp.java
index 14101b95d12..cebc1301b89 100644
--- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/consensus/response/model/GetModelInfoResp.java
+++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/consensus/response/model/GetModelInfoResp.java
@@ -25,12 +25,9 @@ import org.apache.iotdb.common.rpc.thrift.TSStatus;
import org.apache.iotdb.confignode.rpc.thrift.TGetModelInfoResp;
import org.apache.iotdb.consensus.common.DataSet;
-import java.nio.ByteBuffer;
-
public class GetModelInfoResp implements DataSet {
private final TSStatus status;
- private ByteBuffer serializedModelInformation;
private int targetAINodeId;
private TEndPoint targetAINodeAddress;
@@ -43,10 +40,6 @@ public class GetModelInfoResp implements DataSet {
this.status = status;
}
- public void setModelInfo(ByteBuffer serializedModelInformation) {
- this.serializedModelInformation = serializedModelInformation;
- }
-
public int getTargetAINodeId() {
return targetAINodeId;
}
@@ -64,7 +57,6 @@ public class GetModelInfoResp implements DataSet {
public TGetModelInfoResp convertToThriftResponse() {
TGetModelInfoResp resp = new TGetModelInfoResp(status);
- resp.setModelInfo(serializedModelInformation);
resp.setAiNodeAddress(targetAINodeAddress);
return resp;
}
diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ModelManager.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ModelManager.java
index 88143af03e9..4c1f94eab9e 100644
--- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ModelManager.java
+++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ModelManager.java
@@ -31,10 +31,8 @@ import org.apache.iotdb.commons.client.exception.ClientManagerException;
import org.apache.iotdb.commons.model.ModelInformation;
import org.apache.iotdb.commons.model.ModelStatus;
import org.apache.iotdb.commons.model.ModelType;
-import org.apache.iotdb.confignode.consensus.request.read.model.GetModelInfoPlan;
import org.apache.iotdb.confignode.consensus.request.write.model.CreateModelPlan;
import org.apache.iotdb.confignode.consensus.request.write.model.UpdateModelInfoPlan;
-import org.apache.iotdb.confignode.consensus.response.model.GetModelInfoResp;
import org.apache.iotdb.confignode.exception.NoAvailableAINodeException;
import org.apache.iotdb.confignode.persistence.ModelInfo;
import org.apache.iotdb.confignode.rpc.thrift.TAINodeInfo;
@@ -186,33 +184,15 @@ public class ModelManager {
}
public TGetModelInfoResp getModelInfo(TGetModelInfoReq req) {
- try {
- GetModelInfoResp response =
- (GetModelInfoResp) configManager.getConsensusManager().read(new GetModelInfoPlan(req));
- if (response.getStatus().getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
- return new TGetModelInfoResp(response.getStatus());
- }
- int aiNodeId = response.getTargetAINodeId();
- if (aiNodeId != 0) {
- response.setTargetAINodeAddress(
- configManager.getNodeManager().getRegisteredAINode(aiNodeId));
- } else {
- if (configManager.getNodeManager().getRegisteredAINodes().isEmpty()) {
- return new TGetModelInfoResp(
- new TSStatus(TSStatusCode.GET_MODEL_INFO_ERROR.getStatusCode())
- .setMessage("There is no AINode available"));
- }
- response.setTargetAINodeAddress(
- configManager.getNodeManager().getRegisteredAINodes().get(0));
- }
- return response.convertToThriftResponse();
- } catch (ConsensusException e) {
- LOGGER.warn("Unexpected error happened while getting model: ", e);
- // consensus layer related errors
- TSStatus res = new TSStatus(TSStatusCode.EXECUTE_STATEMENT_ERROR.getStatusCode());
- res.setMessage(e.getMessage());
- return new TGetModelInfoResp(res);
- }
+ return new TGetModelInfoResp()
+ .setStatus(new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode()))
+ .setAiNodeAddress(
+ configManager
+ .getNodeManager()
+ .getRegisteredAINodes()
+ .get(0)
+ .getLocation()
+ .getInternalEndPoint());
}
// Currently this method is only used by built-in timer_xl
diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/ModelInfo.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/ModelInfo.java
index 7f0eb6b4e88..aeada03d15c 100644
--- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/ModelInfo.java
+++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/ModelInfo.java
@@ -46,7 +46,6 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
-import java.nio.ByteBuffer;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
@@ -282,7 +281,6 @@ public class ModelInfo implements SnapshotProcessor {
PublicBAOS buffer = new PublicBAOS();
DataOutputStream stream = new DataOutputStream(buffer);
modelInformation.serialize(stream);
- getModelInfoResp.setModelInfo(ByteBuffer.wrap(buffer.getBuf(), 0, buffer.size()));
// select the nodeId to process the task, currently we default use the first one.
int aiNodeId = getAvailableAINodeForModel(modelName, modelType);
if (aiNodeId == -1) {
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/AnalyzeVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/AnalyzeVisitor.java
index d35188d95ca..5b7f653425c 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/AnalyzeVisitor.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/AnalyzeVisitor.java
@@ -434,17 +434,13 @@ public class AnalyzeVisitor extends StatementVisitor<Analysis, MPPQueryContext>
if (status.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
throw new GetModelInfoException(status.getMessage());
}
- ModelInformation modelInformation = analysis.getModelInformation();
- if (modelInformation == null || !modelInformation.available()) {
- throw new SemanticException("Model " + modelId + " is not active");
- }
// set inference window if there is
if (queryStatement.isSetInferenceWindow()) {
InferenceWindow window = queryStatement.getInferenceWindow();
if (InferenceWindowType.HEAD == window.getType()) {
long windowSize = ((HeadInferenceWindow) window).getWindowSize();
- checkWindowSize(windowSize, modelInformation);
+ // checkWindowSize(windowSize, modelInformation);
if (queryStatement.hasLimit() && queryStatement.getRowLimit() < windowSize) {
throw new SemanticException(
"Limit in Sql should be larger than window size in inference");
@@ -453,7 +449,7 @@ public class AnalyzeVisitor extends StatementVisitor<Analysis, MPPQueryContext>
queryStatement.setRowLimit(windowSize);
} else if (InferenceWindowType.TAIL == window.getType()) {
long windowSize = ((TailInferenceWindow) window).getWindowSize();
- checkWindowSize(windowSize, modelInformation);
+ // checkWindowSize(windowSize, modelInformation);
InferenceWindowParameter inferenceWindowParameter =
new BottomInferenceWindowParameter(windowSize);
analysis
@@ -461,7 +457,7 @@ public class AnalyzeVisitor extends StatementVisitor<Analysis, MPPQueryContext>
.setInferenceWindowParameter(inferenceWindowParameter);
} else if (InferenceWindowType.COUNT == window.getType()) {
CountInferenceWindow countInferenceWindow = (CountInferenceWindow) window;
- checkWindowSize(countInferenceWindow.getInterval(), modelInformation);
+ // checkWindowSize(countInferenceWindow.getInterval(), modelInformation);
InferenceWindowParameter inferenceWindowParameter =
new CountInferenceWindowParameter(
countInferenceWindow.getInterval(), countInferenceWindow.getStep());
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/ModelFetcher.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/ModelFetcher.java
index 36382348b8e..dbeee4e8ed4 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/ModelFetcher.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/ModelFetcher.java
@@ -24,7 +24,6 @@ import org.apache.iotdb.commons.client.IClientManager;
import org.apache.iotdb.commons.client.exception.ClientManagerException;
import org.apache.iotdb.commons.consensus.ConfigRegionId;
import org.apache.iotdb.commons.exception.IoTDBRuntimeException;
-import org.apache.iotdb.commons.model.ModelInformation;
import org.apache.iotdb.confignode.rpc.thrift.TGetModelInfoReq;
import org.apache.iotdb.confignode.rpc.thrift.TGetModelInfoResp;
import org.apache.iotdb.db.exception.ainode.ModelNotFoundException;
@@ -61,17 +60,7 @@ public class ModelFetcher implements IModelFetcher {
configNodeClientManager.borrowClient(ConfigNodeInfo.CONFIG_REGION_ID)) {
TGetModelInfoResp getModelInfoResp = client.getModelInfo(new TGetModelInfoReq(modelName));
if (getModelInfoResp.getStatus().getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
- if (getModelInfoResp.modelInfo != null && getModelInfoResp.isSetAiNodeAddress()) {
- analysis.setModelInferenceDescriptor(
- new ModelInferenceDescriptor(
- getModelInfoResp.aiNodeAddress,
- ModelInformation.deserialize(getModelInfoResp.modelInfo)));
- return new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode());
- } else {
- TSStatus status = new TSStatus(TSStatusCode.GET_MODEL_INFO_ERROR.getStatusCode());
- status.setMessage(String.format("model [%s] is not available", modelName));
- return status;
- }
+ return new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode());
} else {
throw new ModelNotFoundException(getModelInfoResp.getStatus().getMessage());
}
@@ -86,15 +75,7 @@ public class ModelFetcher implements IModelFetcher {
configNodeClientManager.borrowClient(ConfigNodeInfo.CONFIG_REGION_ID)) {
TGetModelInfoResp getModelInfoResp = client.getModelInfo(new TGetModelInfoReq(modelName));
if (getModelInfoResp.getStatus().getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
- if (getModelInfoResp.modelInfo != null && getModelInfoResp.isSetAiNodeAddress()) {
- return new ModelInferenceDescriptor(
- getModelInfoResp.aiNodeAddress,
- ModelInformation.deserialize(getModelInfoResp.modelInfo));
- } else {
- throw new IoTDBRuntimeException(
- String.format("model [%s] is not available", modelName),
- TSStatusCode.GET_MODEL_INFO_ERROR.getStatusCode());
- }
+ return new ModelInferenceDescriptor(getModelInfoResp.aiNodeAddress);
} else {
throw new ModelNotFoundException(getModelInfoResp.getStatus().getMessage());
}
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/parameter/model/ModelInferenceDescriptor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/parameter/model/ModelInferenceDescriptor.java
index bf5f391d9e4..b7c6aaa4f4b 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/parameter/model/ModelInferenceDescriptor.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/parameter/model/ModelInferenceDescriptor.java
@@ -37,14 +37,13 @@ import java.util.Objects;
public class ModelInferenceDescriptor {
private final TEndPoint targetAINode;
- private final ModelInformation modelInformation;
+ private ModelInformation modelInformation;
private List<String> outputColumnNames;
private InferenceWindowParameter inferenceWindowParameter;
private Map<String, String> inferenceAttributes;
- public ModelInferenceDescriptor(TEndPoint targetAINode, ModelInformation modelInformation) {
+ public ModelInferenceDescriptor(TEndPoint targetAINode) {
this.targetAINode = targetAINode;
- this.modelInformation = modelInformation;
}
private ModelInferenceDescriptor(ByteBuffer buffer) {
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/function/tvf/ForecastTableFunction.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/function/tvf/ForecastTableFunction.java
index afe47a96e64..b7dc5053c3f 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/function/tvf/ForecastTableFunction.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/function/tvf/ForecastTableFunction.java
@@ -207,6 +207,7 @@ public class ForecastTableFunction implements TableFunction {
private static final String IS_INPUT_COLUMN_NAME = "is_input";
private static final String OPTIONS_PARAMETER_NAME = "MODEL_OPTIONS";
private static final String DEFAULT_OPTIONS = "";
+ private static final int MAX_INPUT_LENGTH = 1440;
private static final String INVALID_OPTIONS_FORMAT = "Invalid options: %s";
@@ -284,16 +285,7 @@ public class ForecastTableFunction implements TableFunction {
String.format("%s should never be null or empty", MODEL_ID_PARAMETER_NAME));
}
- // make sure modelId exists
- ModelInferenceDescriptor descriptor = getModelInfo(modelId);
- if (descriptor == null || !descriptor.getModelInformation().available()) {
- throw new IoTDBRuntimeException(
- String.format("model [%s] is not available", modelId),
- TSStatusCode.GET_MODEL_INFO_ERROR.getStatusCode());
- }
-
- int maxInputLength = descriptor.getModelInformation().getInputShape()[0];
- TEndPoint targetAINode = descriptor.getTargetAINode();
+ TEndPoint targetAINode = getModelInfo(modelId).getTargetAINode();
int outputLength =
(int) ((ScalarArgument) arguments.get(OUTPUT_LENGTH_PARAMETER_NAME)).getValue();
@@ -393,7 +385,7 @@ public class ForecastTableFunction implements TableFunction {
ForecastTableFunctionHandle functionHandle =
new ForecastTableFunctionHandle(
keepInput,
- maxInputLength,
+ MAX_INPUT_LENGTH,
modelId,
parseOptions(options),
outputLength,
diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/column/ColumnHeaderConstant.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/column/ColumnHeaderConstant.java
index 1e2812fe9b3..89749a491ac 100644
--- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/column/ColumnHeaderConstant.java
+++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/column/ColumnHeaderConstant.java
@@ -35,7 +35,7 @@ public class ColumnHeaderConstant {
public static final String ENDTIME = "__endTime";
public static final String VALUE = "Value";
public static final String DEVICE = "Device";
- public static final String DEVICE_ID = "DeviceID";
+ public static final String DEVICE_ID = "DeviceId";
public static final String EXPLAIN_ANALYZE = "Explain Analyze";
// column names for schema statement
@@ -627,7 +627,7 @@ public class ColumnHeaderConstant {
public static final List<ColumnHeader> showLoadedModelsColumnHeaders =
ImmutableList.of(
new ColumnHeader(DEVICE_ID, TSDataType.TEXT),
- new ColumnHeader(MODEL_TYPE, TSDataType.TEXT),
+ new ColumnHeader(MODEL_ID, TSDataType.TEXT),
new ColumnHeader(COUNT_INSTANCES, TSDataType.INT32));
public static final List<ColumnHeader> showAIDevicesColumnHeaders =
(iotdb) 03/15: [AINode] Fix bugs for SHOW LOADED MODELS (#16410)
Posted by yo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
yongzao pushed a commit to branch rc/2.0.6
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 49fbdbcbda732285c71b356017607a6c0796f69d
Author: Yongzao <53...@qq.com>
AuthorDate: Sat Sep 13 19:46:18 2025 +0800
[AINode] Fix bugs for SHOW LOADED MODELS (#16410)
(cherry picked from commit 40b2b33964e647f3bbcce4d5bc05fc6df2ed7653)
---
iotdb-core/ainode/iotdb/ainode/core/constant.py | 6 +++---
.../plan/execution/config/executor/ClusterConfigTaskExecutor.java | 2 ++
iotdb-protocol/thrift-ainode/src/main/thrift/ainode.thrift | 2 +-
iotdb-protocol/thrift-confignode/src/main/thrift/confignode.thrift | 2 +-
4 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/iotdb-core/ainode/iotdb/ainode/core/constant.py b/iotdb-core/ainode/iotdb/ainode/core/constant.py
index c351d74db02..9b3952b431d 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/constant.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/constant.py
@@ -35,11 +35,11 @@ AINODE_SYSTEM_FILE_NAME = "system.properties"
# AINode cluster configuration
AINODE_CLUSTER_NAME = "defaultCluster"
-AINODE_TARGET_CONFIG_NODE_LIST = TEndPoint("127.0.0.1", 10910)
+AINODE_TARGET_CONFIG_NODE_LIST = TEndPoint("127.0.0.1", 10710)
AINODE_RPC_ADDRESS = "127.0.0.1"
-AINODE_RPC_PORT = 20810
+AINODE_RPC_PORT = 10810
AINODE_CLUSTER_INGRESS_ADDRESS = "127.0.0.1"
-AINODE_CLUSTER_INGRESS_PORT = 9667
+AINODE_CLUSTER_INGRESS_PORT = 6667
AINODE_CLUSTER_INGRESS_USERNAME = "root"
AINODE_CLUSTER_INGRESS_PASSWORD = "root"
AINODE_CLUSTER_INGRESS_TIME_ZONE = "UTC+8"
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
index aa5f3034703..3be231b8c10 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
@@ -3397,6 +3397,8 @@ public class ClusterConfigTaskExecutor implements IConfigTaskExecutor {
final TShowLoadedModelReq req = new TShowLoadedModelReq();
if (deviceIdList != null) {
req.setDeviceIdList(deviceIdList);
+ } else {
+ req.setDeviceIdList(new ArrayList<>());
}
final TShowLoadedModelResp resp = client.showLoadedModel(req);
if (resp.getStatus().getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
diff --git a/iotdb-protocol/thrift-ainode/src/main/thrift/ainode.thrift b/iotdb-protocol/thrift-ainode/src/main/thrift/ainode.thrift
index c53b482ef77..e0680cd29b7 100644
--- a/iotdb-protocol/thrift-ainode/src/main/thrift/ainode.thrift
+++ b/iotdb-protocol/thrift-ainode/src/main/thrift/ainode.thrift
@@ -112,7 +112,7 @@ struct TShowModelsResp {
}
struct TShowLoadedModelsReq {
- 1: optional list<string> deviceIdList
+ 1: required list<string> deviceIdList
}
struct TShowLoadedModelsResp {
diff --git a/iotdb-protocol/thrift-confignode/src/main/thrift/confignode.thrift b/iotdb-protocol/thrift-confignode/src/main/thrift/confignode.thrift
index 18655a31a11..3df6ad74df7 100644
--- a/iotdb-protocol/thrift-confignode/src/main/thrift/confignode.thrift
+++ b/iotdb-protocol/thrift-confignode/src/main/thrift/confignode.thrift
@@ -1071,7 +1071,7 @@ struct TShowModelResp {
}
struct TShowLoadedModelReq {
- 1: optional list<string> deviceIdList
+ 1: required list<string> deviceIdList
}
struct TShowLoadedModelResp {
(iotdb) 09/15: [AINode] Package AINode via PyInstaller (#16707)
Posted by yo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
yongzao pushed a commit to branch rc/2.0.6
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 6ec4bcfc5413b3a3135e434b34aa0ee13b8de962
Author: Yongzao <yo...@apache.org>
AuthorDate: Wed Nov 12 16:41:41 2025 +0800
[AINode] Package AINode via PyInstaller (#16707)
(cherry picked from commit 49c625bb83ec28f1c11303504766416f59381a45)
---
.github/workflows/cluster-it-1c1d1a.yml | 2 +-
integration-test/src/assembly/mpp-test.xml | 2 +-
.../iotdb/it/env/cluster/node/AINodeWrapper.java | 25 +-
.../ainode/it/AINodeConcurrentInferenceIT.java | 61 +--
iotdb-core/ainode/.gitignore | 6 +-
iotdb-core/ainode/ainode.spec | 199 +++++++
iotdb-core/ainode/ainode.xml | 17 +-
iotdb-core/ainode/build_binary.py | 596 +++++++++++++++++++++
iotdb-core/ainode/iotdb/ainode/core/config.py | 28 +-
iotdb-core/ainode/iotdb/ainode/core/constant.py | 18 +-
.../iotdb/ainode/core/inference/pool_controller.py | 47 +-
iotdb-core/ainode/iotdb/ainode/core/log.py | 4 +-
iotdb-core/ainode/pom.xml | 92 +---
.../ainode/resources/syncPythonVersion.groovy | 33 --
scripts/conf/ainode-env.sh | 138 -----
scripts/conf/windows/ainode-env.bat | 129 -----
scripts/sbin/start-ainode.sh | 41 +-
scripts/sbin/windows/start-ainode.bat | 48 +-
18 files changed, 885 insertions(+), 601 deletions(-)
diff --git a/.github/workflows/cluster-it-1c1d1a.yml b/.github/workflows/cluster-it-1c1d1a.yml
index f1b583f8efe..d4c40fa7ad8 100644
--- a/.github/workflows/cluster-it-1c1d1a.yml
+++ b/.github/workflows/cluster-it-1c1d1a.yml
@@ -59,5 +59,5 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: cluster-log-ainode-${{ matrix.os }}
- path: integration-test/target/ainode-logs
+ path: integration-test/target/*-logs
retention-days: 30
diff --git a/integration-test/src/assembly/mpp-test.xml b/integration-test/src/assembly/mpp-test.xml
index 4bcd32c7ee0..3915c4593a9 100644
--- a/integration-test/src/assembly/mpp-test.xml
+++ b/integration-test/src/assembly/mpp-test.xml
@@ -63,7 +63,7 @@
</fileSet>
<fileSet>
<outputDirectory>lib</outputDirectory>
- <directory>${project.basedir}/../iotdb-core/ainode/dist/</directory>
+ <directory>${project.basedir}/../iotdb-core/ainode/dist/ainode/</directory>
<fileMode>0755</fileMode>
</fileSet>
</fileSets>
diff --git a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/AINodeWrapper.java b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/AINodeWrapper.java
index 359c9d1c921..c30de2f19fe 100644
--- a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/AINodeWrapper.java
+++ b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/AINodeWrapper.java
@@ -25,9 +25,9 @@ import org.apache.iotdb.it.framework.IoTDBTestLogger;
import org.apache.commons.io.file.PathUtils;
import org.slf4j.Logger;
-import java.io.BufferedWriter;
import java.io.File;
-import java.io.FileWriter;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.LinkOption;
@@ -37,6 +37,7 @@ import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.util.ArrayList;
import java.util.List;
+import java.util.Properties;
import java.util.stream.Stream;
import static org.apache.iotdb.it.env.cluster.ClusterConstant.AI_NODE_NAME;
@@ -62,15 +63,19 @@ public class AINodeWrapper extends AbstractNodeWrapper {
public static final String CACHE_BUILT_IN_MODEL_PATH = "/data/ainode/models/weights";
private void replaceAttribute(String[] keys, String[] values, String filePath) {
- try (BufferedWriter writer = new BufferedWriter(new FileWriter(filePath, true))) {
- for (int i = 0; i < keys.length; i++) {
- String line = keys[i] + "=" + values[i];
- writer.newLine();
- writer.write(line);
- }
+ Properties props = new Properties();
+ try (FileInputStream in = new FileInputStream(filePath)) {
+ props.load(in);
+ } catch (IOException e) {
+ logger.warn("Failed to load existing AINode properties from {}, because: ", filePath, e);
+ }
+ for (int i = 0; i < keys.length; i++) {
+ props.setProperty(keys[i], values[i]);
+ }
+ try (FileOutputStream out = new FileOutputStream(filePath)) {
+ props.store(out, "Updated by AINode integration-test env");
} catch (IOException e) {
- logger.error(
- "Failed to set attribute for AINode in file: {} because {}", filePath, e.getMessage());
+ logger.error("Failed to save properties to {}, because:", filePath, e);
}
}
diff --git a/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeConcurrentInferenceIT.java b/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeConcurrentInferenceIT.java
index a5884a3dc8d..782a56f6d73 100644
--- a/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeConcurrentInferenceIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeConcurrentInferenceIT.java
@@ -90,33 +90,6 @@ public class AINodeConcurrentInferenceIT {
}
}
- // @Test
- public void concurrentCPUCallInferenceTest() throws SQLException, InterruptedException {
- concurrentCPUCallInferenceTest("timer_xl");
- concurrentCPUCallInferenceTest("sundial");
- }
-
- private void concurrentCPUCallInferenceTest(String modelId)
- throws SQLException, InterruptedException {
- try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TREE_SQL_DIALECT);
- Statement statement = connection.createStatement()) {
- final int threadCnt = 4;
- final int loop = 10;
- final int predictLength = 96;
- statement.execute(String.format("LOAD MODEL %s TO DEVICES 'cpu'", modelId));
- checkModelOnSpecifiedDevice(statement, modelId, "cpu");
- concurrentInference(
- statement,
- String.format(
- "CALL INFERENCE(%s, 'SELECT s FROM root.AI', predict_length=%d)",
- modelId, predictLength),
- threadCnt,
- loop,
- predictLength);
- statement.execute(String.format("UNLOAD MODEL %s FROM DEVICES 'cpu'", modelId));
- }
- }
-
// @Test
public void concurrentGPUCallInferenceTest() throws SQLException, InterruptedException {
concurrentGPUCallInferenceTest("timer_xl");
@@ -145,38 +118,6 @@ public class AINodeConcurrentInferenceIT {
}
}
- @Test
- public void concurrentCPUForecastTest() throws SQLException, InterruptedException {
- concurrentCPUForecastTest("timer_xl");
- concurrentCPUForecastTest("sundial");
- }
-
- private void concurrentCPUForecastTest(String modelId) throws SQLException, InterruptedException {
- try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TABLE_SQL_DIALECT);
- Statement statement = connection.createStatement()) {
- final int threadCnt = 4;
- final int loop = 10;
- final int predictLength = 96;
- statement.execute(String.format("LOAD MODEL %s TO DEVICES 'cpu'", modelId));
- checkModelOnSpecifiedDevice(statement, modelId, "cpu");
- long startTime = System.currentTimeMillis();
- concurrentInference(
- statement,
- String.format(
- "SELECT * FROM FORECAST(model_id=>'%s', input=>(SELECT time,s FROM root.AI) ORDER BY time), predict_length=>%d",
- modelId, predictLength),
- threadCnt,
- loop,
- predictLength);
- long endTime = System.currentTimeMillis();
- LOGGER.info(
- String.format(
- "Model %s concurrent inference %d reqs (%d threads, %d loops) in CPU takes time: %dms",
- modelId, threadCnt * loop, threadCnt, loop, endTime - startTime));
- statement.execute(String.format("UNLOAD MODEL %s FROM DEVICES 'cpu'", modelId));
- }
- }
-
@Test
public void concurrentGPUForecastTest() throws SQLException, InterruptedException {
concurrentGPUForecastTest("timer_xl");
@@ -214,7 +155,7 @@ public class AINodeConcurrentInferenceIT {
throws SQLException, InterruptedException {
Set<String> targetDevices = ImmutableSet.copyOf(device.split(","));
LOGGER.info("Checking model: {} on target devices: {}", modelId, targetDevices);
- for (int retry = 0; retry < 20; retry++) {
+ for (int retry = 0; retry < 200; retry++) {
Set<String> foundDevices = new HashSet<>();
try (final ResultSet resultSet =
statement.executeQuery(String.format("SHOW LOADED MODELS '%s'", device))) {
diff --git a/iotdb-core/ainode/.gitignore b/iotdb-core/ainode/.gitignore
index 8cc2098c3fd..bdb2698ec78 100644
--- a/iotdb-core/ainode/.gitignore
+++ b/iotdb-core/ainode/.gitignore
@@ -14,8 +14,6 @@
# generated by maven
/iotdb/ainode/conf/
-# .whl of ainode, generated by Poetry
+# generated by pyinstaller
/dist/
-
-# the config to build ainode, it will be generated automatically
-pyproject.toml
+/build/
diff --git a/iotdb-core/ainode/ainode.spec b/iotdb-core/ainode/ainode.spec
new file mode 100644
index 00000000000..a131b2bcff2
--- /dev/null
+++ b/iotdb-core/ainode/ainode.spec
@@ -0,0 +1,199 @@
+# -*- mode: python ; coding: utf-8 -*-
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under this License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+from pathlib import Path
+
+# Get project root directory
+project_root = Path(SPECPATH).parent
+
+block_cipher = None
+
+# Auto-collect all submodules of large dependency libraries
+# Using collect_all automatically includes all dependencies and avoids manual maintenance of hiddenimports
+from PyInstaller.utils.hooks import collect_all, collect_submodules, collect_data_files
+
+# Collect only essential data files and binaries for large libraries
+# Using collect_all for all submodules slows down startup significantly.
+# However, for certain libraries with many dynamic imports (e.g., torch, transformers, safetensors),
+# collect_all is necessary to ensure all required modules are included.
+# For other libraries, we use lighter-weight collection methods to improve startup time.
+all_datas = []
+all_binaries = []
+all_hiddenimports = []
+
+# Only collect essential data files and binaries for critical libraries
+# This reduces startup time by avoiding unnecessary module imports
+essential_libraries = {
+ 'torch': True, # Keep collect_all for torch as it has many dynamic imports
+ 'transformers': True, # Keep collect_all for transformers
+ 'safetensors': True, # Keep collect_all for safetensors
+}
+
+# For other libraries, use selective collection to speed up startup
+other_libraries = ['sktime', 'scipy', 'pandas', 'sklearn', 'statsmodels', 'optuna']
+
+for lib in essential_libraries:
+ try:
+ lib_datas, lib_binaries, lib_hiddenimports = collect_all(lib)
+ all_datas.extend(lib_datas)
+ all_binaries.extend(lib_binaries)
+ all_hiddenimports.extend(lib_hiddenimports)
+ except Exception:
+ pass
+
+# For other libraries, only collect submodules (lighter weight)
+# This relies on PyInstaller's dependency analysis to include what's actually used
+for lib in other_libraries:
+ try:
+ submodules = collect_submodules(lib)
+ all_hiddenimports.extend(submodules)
+ # Only collect essential data files and binaries, not all submodules
+ # This significantly reduces startup time
+ try:
+ lib_datas, lib_binaries, _ = collect_all(lib)
+ all_datas.extend(lib_datas)
+ all_binaries.extend(lib_binaries)
+ except Exception:
+ # If collect_all fails, try collect_data_files for essential data only
+ try:
+ lib_datas = collect_data_files(lib)
+ all_datas.extend(lib_datas)
+ except Exception:
+ pass
+ except Exception:
+ pass
+
+# Project-specific packages that need their submodules collected
+# Only list top-level packages - collect_submodules will recursively collect all submodules
+TOP_LEVEL_PACKAGES = [
+ 'iotdb.ainode.core', # This will include all sub-packages: manager, model, inference, etc.
+ 'iotdb.thrift', # This will include all thrift sub-packages
+]
+
+# Collect all submodules for project packages automatically
+# Using top-level packages avoids duplicate collection
+for package in TOP_LEVEL_PACKAGES:
+ try:
+ submodules = collect_submodules(package)
+ all_hiddenimports.extend(submodules)
+ except Exception:
+ # If package doesn't exist or collection fails, add the package itself
+ all_hiddenimports.append(package)
+
+# Add parent packages to ensure they are included
+all_hiddenimports.extend(['iotdb', 'iotdb.ainode'])
+
+# Multiprocessing support for PyInstaller
+# When using multiprocessing with PyInstaller, we need to ensure proper handling
+multiprocessing_modules = [
+ 'multiprocessing',
+ 'multiprocessing.spawn',
+ 'multiprocessing.popen_spawn_posix',
+ 'multiprocessing.popen_spawn_win32',
+ 'multiprocessing.popen_fork',
+ 'multiprocessing.popen_forkserver',
+ 'multiprocessing.context',
+ 'multiprocessing.reduction',
+ 'multiprocessing.util',
+ 'torch.multiprocessing',
+ 'torch.multiprocessing.spawn',
+]
+
+# Additional dependencies that may need explicit import
+# These are external libraries that might use dynamic imports
+external_dependencies = [
+ 'huggingface_hub',
+ 'tokenizers',
+ 'hf_xet',
+ 'einops',
+ 'dynaconf',
+ 'tzlocal',
+ 'thrift',
+ 'psutil',
+ 'requests',
+]
+
+all_hiddenimports.extend(multiprocessing_modules)
+all_hiddenimports.extend(external_dependencies)
+
+# Analyze main entry file
+# Note: Do NOT add virtual environment site-packages to pathex manually.
+# When PyInstaller is run from the virtual environment's Python, it automatically
+# detects and uses the virtual environment's site-packages.
+a = Analysis(
+ ['iotdb/ainode/core/script.py'],
+ pathex=[str(project_root)],
+ binaries=all_binaries,
+ datas=all_datas,
+ hiddenimports=all_hiddenimports,
+ hookspath=[],
+ hooksconfig={},
+ runtime_hooks=[],
+ excludes=[
+ # Exclude unnecessary modules to reduce size and improve startup time
+ # Note: Do not exclude unittest, as torch and other libraries require it
+ # Only exclude modules that are definitely not used and not required by dependencies
+ 'matplotlib',
+ 'IPython',
+ 'jupyter',
+ 'notebook',
+ 'pytest',
+ 'test',
+ 'tests'
+ ],
+ win_no_prefer_redirects=False,
+ win_private_assemblies=False,
+ cipher=block_cipher,
+ noarchive=True, # Set to True to speed up startup - files are not archived into PYZ
+)
+
+# Package all PYZ files
+pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
+
+# Create executable (onedir mode for faster startup)
+exe = EXE(
+ pyz,
+ a.scripts,
+ [],
+ exclude_binaries=True,
+ name='ainode',
+ debug=False,
+ bootloader_ignore_signals=False,
+ strip=False,
+ upx=True,
+ console=True,
+ disable_windowed_traceback=False,
+ argv_emulation=False,
+ target_arch=None,
+ codesign_identity=None,
+ entitlements_file=None,
+)
+
+# Collect all files into a directory (onedir mode)
+coll = COLLECT(
+ exe,
+ a.binaries,
+ a.zipfiles,
+ a.datas,
+ strip=False,
+ upx=True,
+ upx_exclude=[],
+ name='ainode',
+)
\ No newline at end of file
diff --git a/iotdb-core/ainode/ainode.xml b/iotdb-core/ainode/ainode.xml
index beab4b69c01..6de635c1338 100644
--- a/iotdb-core/ainode/ainode.xml
+++ b/iotdb-core/ainode/ainode.xml
@@ -42,6 +42,10 @@
</file>
</files>
<fileSets>
+ <fileSet>
+ <directory>iotdb/ainode/conf</directory>
+ <outputDirectory>conf</outputDirectory>
+ </fileSet>
<fileSet>
<directory>resources/conf</directory>
<outputDirectory>conf</outputDirectory>
@@ -52,19 +56,8 @@
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
- <directory>dist</directory>
+ <directory>dist/ainode</directory>
<outputDirectory>lib</outputDirectory>
- <includes>
- <include>*.whl</include>
- </includes>
- </fileSet>
- <fileSet>
- <directory>${project.basedir}/../../scripts/conf</directory>
- <outputDirectory>conf</outputDirectory>
- <includes>
- <include>ainode-env.*</include>
- <include>**/ainode-env.*</include>
- </includes>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
diff --git a/iotdb-core/ainode/build_binary.py b/iotdb-core/ainode/build_binary.py
new file mode 100644
index 00000000000..1b5f99da214
--- /dev/null
+++ b/iotdb-core/ainode/build_binary.py
@@ -0,0 +1,596 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+
+"""
+PyInstaller build script (Python version)
+"""
+
+import os
+import shutil
+import subprocess
+import sys
+from pathlib import Path
+
+
+def get_venv_base_dir():
+ """
+ Get the base directory for virtual environments outside the project.
+
+ Returns:
+ Path: Base directory path
+ - Linux/macOS: ~/.cache/iotdb-ainode-build/
+ - Windows: %LOCALAPPDATA%\\iotdb-ainode-build\\
+ """
+ if sys.platform == "win32":
+ localappdata = os.environ.get("LOCALAPPDATA") or os.environ.get(
+ "APPDATA", os.path.expanduser("~")
+ )
+ base_dir = Path(localappdata) / "iotdb-ainode-build"
+ else:
+ base_dir = Path.home() / ".cache" / "iotdb-ainode-build"
+
+ return base_dir
+
+
+def setup_venv():
+ """
+ Create virtual environment outside the project directory.
+
+ The virtual environment is created in a platform-specific location:
+ - Linux/macOS: ~/.cache/iotdb-ainode-build/<project-name>/
+ - Windows: %LOCALAPPDATA%\\iotdb-ainode-build\\<project-name>\\
+
+ The same venv is reused across multiple builds of the same project.
+
+ Returns:
+ Path: Path to the virtual environment directory
+ """
+ script_dir = Path(__file__).parent
+ venv_base_dir = get_venv_base_dir()
+ venv_dir = venv_base_dir / script_dir.name
+
+ if venv_dir.exists():
+ print(f"Virtual environment already exists at: {venv_dir}")
+ return venv_dir
+
+ venv_base_dir.mkdir(parents=True, exist_ok=True)
+ print(f"Creating virtual environment at: {venv_dir}")
+ subprocess.run([sys.executable, "-m", "venv", str(venv_dir)], check=True)
+ print("Virtual environment created successfully")
+ return venv_dir
+
+
+def get_venv_python(venv_dir):
+ """Get Python executable path in virtual environment"""
+ if sys.platform == "win32":
+ return venv_dir / "Scripts" / "python.exe"
+ else:
+ return venv_dir / "bin" / "python"
+
+
+def update_pip(venv_python):
+ """Update pip in the virtual environment to the latest version."""
+ print("Updating pip...")
+ subprocess.run(
+ [str(venv_python), "-m", "pip", "install", "--upgrade", "pip"], check=True
+ )
+ print("pip updated successfully")
+
+
+def install_poetry(venv_python):
+ """Install poetry 2.2.1 in the virtual environment."""
+ print("Installing poetry 2.2.1...")
+ subprocess.run(
+ [
+ str(venv_python),
+ "-m",
+ "pip",
+ "install",
+ "poetry==2.2.1",
+ ],
+ check=True,
+ )
+ # Get installed version
+ version_result = subprocess.run(
+ [str(venv_python), "-m", "poetry", "--version"],
+ capture_output=True,
+ text=True,
+ check=True,
+ )
+ print(f"Poetry installed: {version_result.stdout.strip()}")
+
+
+def get_venv_env(venv_dir):
+ """
+ Get environment variables configured for the virtual environment.
+
+ Sets VIRTUAL_ENV and prepends the venv's bin/Scripts directory to PATH
+ so that tools installed in the venv take precedence.
+ Also sets POETRY_VIRTUALENVS_PATH to force poetry to use our venv.
+
+ Returns:
+ dict: Environment variables dictionary
+ """
+ env = os.environ.copy()
+ env["VIRTUAL_ENV"] = str(venv_dir.absolute())
+
+ venv_bin = str(venv_dir / ("Scripts" if sys.platform == "win32" else "bin"))
+ env["PATH"] = f"{venv_bin}{os.pathsep}{env.get('PATH', '')}"
+
+ # Force poetry to use our virtual environment by setting POETRY_VIRTUALENVS_PATH
+ # This tells poetry where to look for/create virtual environments
+ env["POETRY_VIRTUALENVS_PATH"] = str(venv_dir.parent.absolute())
+
+ return env
+
+
+def get_poetry_executable(venv_dir):
+ """Get poetry executable path in the virtual environment."""
+ if sys.platform == "win32":
+ return venv_dir / "Scripts" / "poetry.exe"
+ else:
+ return venv_dir / "bin" / "poetry"
+
+
+def install_dependencies(venv_python, venv_dir, script_dir):
+ """
+ Install project dependencies using poetry.
+
+ Configures poetry to use the external virtual environment and installs
+ all dependencies from pyproject.toml.
+ """
+ print("Installing dependencies with poetry...")
+ venv_env = get_venv_env(venv_dir)
+ poetry_exe = get_poetry_executable(venv_dir)
+
+ # Configure poetry settings
+ print("Configuring poetry settings...")
+ try:
+ # Set poetry to not create venvs in project directory
+ subprocess.run(
+ [str(poetry_exe), "config", "virtualenvs.in-project", "false"],
+ cwd=str(script_dir),
+ env=venv_env,
+ check=True,
+ capture_output=True,
+ text=True,
+ )
+ # Set poetry virtualenvs path to our venv directory's parent
+ # This forces poetry to look for/create venvs in the same location as our venv
+ subprocess.run(
+ [
+ str(poetry_exe),
+ "config",
+ "virtualenvs.path",
+ str(venv_dir.parent.absolute()),
+ ],
+ cwd=str(script_dir),
+ env=venv_env,
+ check=True,
+ capture_output=True,
+ text=True,
+ )
+ # Ensure poetry can use virtual environments
+ subprocess.run(
+ [str(poetry_exe), "config", "virtualenvs.create", "true"],
+ cwd=str(script_dir),
+ env=venv_env,
+ check=True,
+ capture_output=True,
+ text=True,
+ )
+ except Exception as e:
+ print(f"Warning: Failed to configure poetry settings: {e}")
+ # Continue anyway, as these may not be critical
+
+ # Remove any existing poetry virtual environments for this project
+ # This ensures poetry will use our specified virtual environment
+ print("Removing any existing poetry virtual environments...")
+ remove_result = subprocess.run(
+ [str(poetry_exe), "env", "remove", "--all"],
+ cwd=str(script_dir),
+ env=venv_env,
+ check=False, # Don't fail if no venv exists
+ capture_output=True,
+ text=True,
+ )
+ if remove_result.stdout:
+ print(remove_result.stdout.strip())
+ if remove_result.stderr:
+ stderr = remove_result.stderr.strip()
+ # Ignore "No virtualenv has been activated" error
+ if "no virtualenv" not in stderr.lower():
+ print(remove_result.stderr.strip())
+
+ # Verify the virtual environment Python is valid before configuring poetry
+ print(f"Verifying virtual environment Python at: {venv_python}")
+ if not venv_python.exists():
+ print(f"ERROR: Virtual environment Python not found at: {venv_python}")
+ sys.exit(1)
+
+ python_version_result = subprocess.run(
+ [str(venv_python), "--version"],
+ capture_output=True,
+ text=True,
+ check=False,
+ )
+ if python_version_result.returncode != 0:
+ print(f"ERROR: Virtual environment Python is not executable: {venv_python}")
+ sys.exit(1)
+ print(f" Python version: {python_version_result.stdout.strip()}")
+
+ # Instead of using poetry env use (which creates new venvs), we'll use a different approach:
+ # 1. Create a symlink from poetry's expected venv location to our venv
+ # 2. Or, directly use poetry install with VIRTUAL_ENV set (poetry should detect it)
+ #
+ # The issue is that poetry env use creates venvs with hash-based names in its cache.
+ # We need to work around this by either:
+ # - Creating a symlink from poetry's expected location to our venv
+ # - Or bypassing poetry env use entirely and using poetry install directly
+
+ # Strategy: Create a symlink from poetry's expected venv location to our venv
+ # Poetry creates venvs with names like: <project-name>-<hash>-py<python-version>
+ # We need to find out what poetry would name our venv, then create a symlink
+
+ print(f"Configuring poetry to use virtual environment at: {venv_dir}")
+
+ # Get poetry's expected venv name by checking what it would create
+ # First, let's try poetry env use, but catch if it tries to create a new venv
+ result = subprocess.run(
+ [str(poetry_exe), "env", "use", str(venv_python)],
+ cwd=str(script_dir),
+ env=venv_env,
+ check=False,
+ capture_output=True,
+ text=True,
+ )
+
+ output_text = (result.stdout or "") + (result.stderr or "")
+
+ # If poetry is creating a new venv, we need to stop it and use a different approach
+ if (
+ "Creating virtualenv" in output_text
+ or "Creating virtual environment" in output_text
+ or "Using virtualenv:" in output_text
+ ):
+ print("Poetry is attempting to create/use a new virtual environment.")
+ print(
+ "Stopping this and using alternative approach: creating symlink to our venv..."
+ )
+
+ # Extract the venv path poetry is trying to create/use
+ # Look for patterns like "Using virtualenv: /path/to/venv" or "Creating virtualenv name in /path"
+ import re
+
+ poetry_venv_path = None
+
+ # Try to extract from "Using virtualenv: /path/to/venv"
+ using_match = re.search(r"Using virtualenv:\s*([^\s\n]+)", output_text)
+ if using_match:
+ poetry_venv_path = Path(using_match.group(1))
+
+ # If not found, try to extract from "Creating virtualenv name in /path"
+ if not poetry_venv_path:
+ creating_match = re.search(
+ r"Creating virtualenv[^\n]*in\s+([^\s\n]+)", output_text
+ )
+ if creating_match:
+ venv_dir_path = Path(creating_match.group(1))
+ # Extract venv name from the output
+ name_match = re.search(r"Creating virtualenv\s+([^\s]+)", output_text)
+ if name_match:
+ venv_name = name_match.group(1)
+ poetry_venv_path = venv_dir_path / venv_name
+
+ # If still not found, try to find any path in pypoetry/virtualenvs
+ if not poetry_venv_path:
+ pypoetry_match = re.search(
+ r"([^\s]+pypoetry[^\s]*virtualenvs[^\s]+)", output_text
+ )
+ if pypoetry_match:
+ poetry_venv_path = Path(pypoetry_match.group(1))
+
+ if poetry_venv_path:
+ print(f"Poetry wants to create/use venv at: {poetry_venv_path}")
+
+ # Remove the venv poetry just created (if it exists)
+ if poetry_venv_path.exists() and poetry_venv_path.is_dir():
+ print(f"Removing poetry's newly created venv: {poetry_venv_path}")
+ shutil.rmtree(poetry_venv_path, ignore_errors=True)
+
+ # Create a symlink from poetry's expected location to our venv
+ print(f"Creating symlink from {poetry_venv_path} to {venv_dir}")
+ try:
+ if poetry_venv_path.exists() or poetry_venv_path.is_symlink():
+ if poetry_venv_path.is_symlink():
+ poetry_venv_path.unlink()
+ elif poetry_venv_path.is_dir():
+ shutil.rmtree(poetry_venv_path, ignore_errors=True)
+ poetry_venv_path.parent.mkdir(parents=True, exist_ok=True)
+ poetry_venv_path.symlink_to(venv_dir)
+ print(f"✓ Symlink created successfully")
+ except Exception as e:
+ print(f"WARNING: Failed to create symlink: {e}")
+ print("Will try to use poetry install directly with VIRTUAL_ENV set")
+ else:
+ print("Could not determine poetry's venv path from output")
+ print(f"Output was: {output_text}")
+ else:
+ if result.stdout:
+ print(result.stdout.strip())
+ if result.stderr:
+ stderr = result.stderr.strip()
+ if stderr:
+ print(f"Poetry output: {stderr}")
+
+ # Verify poetry is using the correct virtual environment BEFORE running lock/install
+ # This is critical - if poetry uses the wrong venv, dependencies won't be installed correctly
+ print("Verifying poetry virtual environment...")
+
+ # Wait a moment for symlink to be recognized (if we created one)
+ import time
+
+ time.sleep(0.5)
+
+ verify_result = subprocess.run(
+ [str(poetry_exe), "env", "info", "--path"],
+ cwd=str(script_dir),
+ env=venv_env,
+ check=False, # Don't fail if poetry hasn't activated a venv yet
+ capture_output=True,
+ text=True,
+ )
+
+ expected_venv_path_resolved = str(Path(venv_dir.absolute()).resolve())
+
+ # If poetry env info fails, it might mean poetry hasn't activated the venv yet
+ if verify_result.returncode != 0:
+ print(
+ "Warning: poetry env info failed, poetry may not have activated the virtual environment yet"
+ )
+ print(
+ "This may be okay if we created a symlink - poetry should use it when running commands"
+ )
+ poetry_venv_path_resolved = None
+ else:
+ poetry_venv_path = verify_result.stdout.strip()
+
+ # Normalize paths for comparison (resolve symlinks, etc.)
+ poetry_venv_path_resolved = str(Path(poetry_venv_path).resolve())
+
+ # Only verify path if we successfully got poetry's venv path
+ if poetry_venv_path_resolved is not None:
+ if poetry_venv_path_resolved != expected_venv_path_resolved:
+ print(
+ f"ERROR: Poetry is using {poetry_venv_path}, but expected {expected_venv_path_resolved}"
+ )
+ print(
+ "Poetry must use the virtual environment we created for the build to work correctly."
+ )
+ print("The symlink approach may not have worked. Please check the symlink.")
+ sys.exit(1)
+ else:
+ print(
+ f"✓ Poetry is correctly using virtual environment: {poetry_venv_path}"
+ )
+ else:
+ print("Warning: Could not verify poetry virtual environment path")
+ print(
+ "Continuing anyway - poetry should use the venv via symlink or VIRTUAL_ENV"
+ )
+
+ # Update lock file and install dependencies
+ # Re-verify environment before each command to ensure poetry doesn't switch venvs
+ def verify_poetry_env():
+ verify_result = subprocess.run(
+ [str(poetry_exe), "env", "info", "--path"],
+ cwd=str(script_dir),
+ env=venv_env,
+ check=False, # Don't fail if poetry env info is not available
+ capture_output=True,
+ text=True,
+ )
+ if verify_result.returncode == 0:
+ current_path = str(Path(verify_result.stdout.strip()).resolve())
+ expected_path = str(Path(venv_dir.absolute()).resolve())
+ if current_path != expected_path:
+ print(
+ f"ERROR: Poetry switched to different virtual environment: {current_path}"
+ )
+ print(f"Expected: {expected_path}")
+ sys.exit(1)
+ # If poetry env info fails, we can't verify, but continue anyway
+ # Poetry should still use the Python we specified via env use
+ return True
+
+ print("Running poetry lock...")
+ verify_poetry_env() # Verify before lock
+ result = subprocess.run(
+ [str(poetry_exe), "lock"],
+ cwd=str(script_dir),
+ env=venv_env,
+ check=True,
+ capture_output=True,
+ text=True,
+ )
+ if result.stdout:
+ print(result.stdout)
+ if result.stderr:
+ print(result.stderr)
+ verify_poetry_env() # Verify after lock
+
+ print("Running poetry install...")
+ verify_poetry_env() # Verify before install
+ result = subprocess.run(
+ [str(poetry_exe), "install"],
+ cwd=str(script_dir),
+ env=venv_env,
+ check=True,
+ capture_output=True,
+ text=True,
+ )
+ if result.stdout:
+ print(result.stdout)
+ if result.stderr:
+ print(result.stderr)
+ verify_poetry_env() # Verify after install
+
+ # Verify installation by checking if key packages are installed
+ # This is critical - if packages aren't installed, PyInstaller won't find them
+ print("Verifying package installation...")
+ test_packages = ["torch", "transformers", "tokenizers"]
+ missing_packages = []
+ for package in test_packages:
+ test_result = subprocess.run(
+ [str(venv_python), "-c", f"import {package}; print({package}.__version__)"],
+ capture_output=True,
+ text=True,
+ check=False,
+ )
+ if test_result.returncode == 0:
+ version = test_result.stdout.strip()
+ print(f" ✓ {package} {version} installed")
+ else:
+ error_msg = (
+ test_result.stderr.strip() if test_result.stderr else "Unknown error"
+ )
+ print(f" ✗ {package} NOT found in virtual environment: {error_msg}")
+ missing_packages.append(package)
+
+ if missing_packages:
+ print(
+ f"\nERROR: Required packages are missing from virtual environment: {', '.join(missing_packages)}"
+ )
+ print("This indicates that poetry did not install dependencies correctly.")
+ print("Please check the poetry install output above for errors.")
+ sys.exit(1)
+
+ print("Dependencies installed successfully")
+
+
+def check_pyinstaller(venv_python):
+ """
+ Check if PyInstaller is installed.
+
+ PyInstaller should be installed via poetry install from pyproject.toml.
+ If it's missing, it means poetry install failed or didn't complete.
+ """
+ try:
+ result = subprocess.run(
+ [
+ str(venv_python),
+ "-c",
+ "import PyInstaller; print(PyInstaller.__version__)",
+ ],
+ capture_output=True,
+ text=True,
+ check=True,
+ )
+ version = result.stdout.strip()
+ print(f"PyInstaller version: {version}")
+ return True
+ except (subprocess.CalledProcessError, FileNotFoundError):
+ print("ERROR: PyInstaller is not installed in the virtual environment")
+ print("PyInstaller should be installed via poetry install from pyproject.toml")
+ print(
+ "This indicates that poetry install may have failed or didn't complete correctly."
+ )
+ return False
+
+
+def build():
+ """
+ Execute the complete build process.
+
+ Steps:
+ 1. Setup virtual environment (outside project directory)
+ 2. Update pip and install 2.2.1 poetry
+ 3. Install project dependencies (including PyInstaller from pyproject.toml)
+ 4. Build executable using PyInstaller
+ """
+ script_dir = Path(__file__).parent
+
+ venv_dir = setup_venv()
+ venv_python = get_venv_python(venv_dir)
+
+ update_pip(venv_python)
+ install_poetry(venv_python)
+ install_dependencies(venv_python, venv_dir, script_dir)
+
+ if not check_pyinstaller(venv_python):
+ sys.exit(1)
+
+ print("=" * 50)
+ print("IoTDB AINode PyInstaller Build Script")
+ print("=" * 50)
+ print()
+
+ print("Starting build...")
+ print()
+
+ spec_file = script_dir / "ainode.spec"
+ if not spec_file.exists():
+ print(f"Error: Spec file not found: {spec_file}")
+ sys.exit(1)
+
+ # Set up environment for PyInstaller
+ # When using venv_python, PyInstaller should automatically detect the virtual environment
+ # and use its site-packages. We should NOT manually add site-packages to pathex.
+ pyinstaller_env = get_venv_env(venv_dir)
+
+ # Verify we're using the correct Python
+ python_prefix_result = subprocess.run(
+ [str(venv_python), "-c", "import sys; print(sys.prefix)"],
+ capture_output=True,
+ text=True,
+ check=True,
+ )
+ python_prefix = python_prefix_result.stdout.strip()
+ print(f"Using Python from: {python_prefix}")
+
+ # Ensure PyInstaller runs from the virtual environment
+ # The venv_python should automatically set up the correct environment
+ cmd = [
+ str(venv_python),
+ "-m",
+ "PyInstaller",
+ "--noconfirm",
+ str(spec_file),
+ ]
+
+ try:
+ subprocess.run(cmd, check=True, env=pyinstaller_env)
+ except subprocess.CalledProcessError as e:
+ print(f"\nError: Build failed: {e}")
+ sys.exit(1)
+
+ print()
+ print("=" * 50)
+ print("Build completed!")
+ print("=" * 50)
+ print()
+ print("Executable location: dist/ainode/ainode")
+ print()
+ print("Usage:")
+ print(" ./dist/ainode/ainode start # Start AINode")
+ print()
+
+
+if __name__ == "__main__":
+ build()
diff --git a/iotdb-core/ainode/iotdb/ainode/core/config.py b/iotdb-core/ainode/iotdb/ainode/core/config.py
index 4e9843c143e..43b6ce7ccda 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/config.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/config.py
@@ -16,6 +16,7 @@
# under the License.
#
import os
+import re
from ainode.core.constant import (
AINODE_BUILD_INFO,
@@ -37,8 +38,6 @@ from ainode.core.constant import (
AINODE_INFERENCE_MODEL_MEM_USAGE_MAP,
AINODE_LOG_DIR,
AINODE_MODELS_DIR,
- AINODE_ROOT_CONF_DIRECTORY_NAME,
- AINODE_ROOT_DIR,
AINODE_RPC_ADDRESS,
AINODE_RPC_PORT,
AINODE_SYSTEM_DIR,
@@ -283,9 +282,7 @@ class AINodeDescriptor(object):
if "ainode_id" in system_configs:
self._config.set_ainode_id(int(system_configs["ainode_id"]))
- git_file = os.path.join(
- AINODE_ROOT_DIR, AINODE_ROOT_CONF_DIRECTORY_NAME, AINODE_CONF_GIT_FILE_NAME
- )
+ git_file = os.path.join(AINODE_CONF_DIRECTORY_NAME, AINODE_CONF_GIT_FILE_NAME)
if os.path.exists(git_file):
git_configs = load_properties(git_file)
if "git.commit.id.abbrev" in git_configs:
@@ -295,9 +292,7 @@ class AINodeDescriptor(object):
build_info += "-dev"
self._config.set_build_info(build_info)
- pom_file = os.path.join(
- AINODE_ROOT_DIR, AINODE_ROOT_CONF_DIRECTORY_NAME, AINODE_CONF_POM_FILE_NAME
- )
+ pom_file = os.path.join(AINODE_CONF_DIRECTORY_NAME, AINODE_CONF_POM_FILE_NAME)
if os.path.exists(pom_file):
pom_configs = load_properties(pom_file)
if "version" in pom_configs:
@@ -406,18 +401,29 @@ class AINodeDescriptor(object):
return self._config
+def unescape_java_properties(value: str) -> str:
+ """Undo Java Properties escaping rules"""
+ value = value.replace("\\t", "\t")
+ value = value.replace("\\n", "\n")
+ value = value.replace("\\r", "\r")
+ value = value.replace("\\\\", "\\")
+ value = re.sub(r"\\([:=\s])", r"\1", value)
+ return value
+
+
def load_properties(filepath, sep="=", comment_char="#"):
"""
Read the file passed as parameter as a properties file.
"""
props = {}
- with open(filepath, "rt") as f:
+ with open(filepath, "rt", encoding="utf-8") as f:
for line in f:
l = line.strip()
if l and not l.startswith(comment_char):
- key_value = l.split(sep)
+ key_value = l.split(sep, 1)
key = key_value[0].strip()
- value = sep.join(key_value[1:]).strip().strip('"')
+ value = key_value[1].strip().strip('"')
+ value = unescape_java_properties(value)
props[key] = value
return props
diff --git a/iotdb-core/ainode/iotdb/ainode/core/constant.py b/iotdb-core/ainode/iotdb/ainode/core/constant.py
index 9b3952b431d..fd8f10177a9 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/constant.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/constant.py
@@ -15,7 +15,6 @@
# specific language governing permissions and limitations
# under the License.
#
-import inspect
import logging
import os
from enum import Enum
@@ -24,10 +23,10 @@ from typing import List
from iotdb.ainode.core.model.model_enums import BuiltInModelType
from ainode.thrift.common.ttypes import TEndPoint
+IOTDB_AINODE_HOME = os.getenv("IOTDB_AINODE_HOME", "")
AINODE_VERSION_INFO = "UNKNOWN"
AINODE_BUILD_INFO = "UNKNOWN"
-AINODE_CONF_DIRECTORY_NAME = "conf"
-AINODE_ROOT_CONF_DIRECTORY_NAME = "conf"
+AINODE_CONF_DIRECTORY_NAME = os.path.join(IOTDB_AINODE_HOME, "conf")
AINODE_CONF_FILE_NAME = "iotdb-ainode.properties"
AINODE_CONF_GIT_FILE_NAME = "git.properties"
AINODE_CONF_POM_FILE_NAME = "pom.properties"
@@ -62,13 +61,12 @@ AINODE_INFERENCE_EXTRA_MEMORY_RATIO = (
)
# AINode folder structure
-AINODE_ROOT_DIR = os.path.dirname(
- os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
-)
-AINODE_MODELS_DIR = "data/ainode/models"
-AINODE_BUILTIN_MODELS_DIR = "data/ainode/models/weights" # For built-in models, we only need to store their weights and config.
-AINODE_SYSTEM_DIR = "data/ainode/system"
-AINODE_LOG_DIR = "logs"
+AINODE_MODELS_DIR = os.path.join(IOTDB_AINODE_HOME, "data/ainode/models")
+AINODE_BUILTIN_MODELS_DIR = os.path.join(
+ IOTDB_AINODE_HOME, "data/ainode/models/weights"
+) # For built-in models, we only need to store their weights and config.
+AINODE_SYSTEM_DIR = os.path.join(IOTDB_AINODE_HOME, "data/ainode/system")
+AINODE_LOG_DIR = os.path.join(IOTDB_AINODE_HOME, "logs")
# AINode log
LOG_FILE_TYPE = ["all", "info", "warn", "error"]
diff --git a/iotdb-core/ainode/iotdb/ainode/core/inference/pool_controller.py b/iotdb-core/ainode/iotdb/ainode/core/inference/pool_controller.py
index 069a6b9ced6..00bb3b5568b 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/inference/pool_controller.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/inference/pool_controller.py
@@ -50,7 +50,6 @@ from iotdb.ainode.core.util.decorator import synchronized
from iotdb.ainode.core.util.thread_name import ThreadName
logger = Logger()
-MODEL_MANAGER = ModelManager()
class PoolController:
@@ -59,6 +58,7 @@ class PoolController:
"""
def __init__(self, result_queue: mp.Queue):
+ self._model_manager = ModelManager()
# structure: {model_id: {device_id: PoolGroup}}
self._request_pool_map: Dict[str, Dict[str, PoolGroup]] = {}
self._new_pool_id = AtomicInt()
@@ -82,24 +82,25 @@ class PoolController:
"""
Initialize the pools when the first request for the given model_id arrives.
"""
- if not self.has_request_pools(model_id, device.index):
- # TODO: choose a device based on some strategy
- device = self.DEFAULT_DEVICE
- actions = self._pool_scheduler.schedule(model_id, device)
- for action in actions:
- if action.action == ScaleActionType.SCALE_UP:
- # initialize the first pool
- self._first_pool_init(action.model_id, str(device))
- # start a background thread to expand pools
- expand_thread = threading.Thread(
- target=self._expand_pools_on_device,
- args=(action.model_id, str(device), action.amount - 1),
- daemon=True,
- )
- expand_thread.start()
- elif action.action == ScaleActionType.SCALE_DOWN:
- # TODO: implement scale down logic
- pass
+ pass
+ # if not self.has_request_pools(model_id, device.index):
+ # # TODO: choose a device based on some strategy
+ # device = self.DEFAULT_DEVICE
+ # actions = self._pool_scheduler.schedule(model_id, device)
+ # for action in actions:
+ # if action.action == ScaleActionType.SCALE_UP:
+ # # initialize the first pool
+ # self._first_pool_init(action.model_id, str(device))
+ # # start a background thread to expand pools
+ # expand_thread = threading.Thread(
+ # target=self._expand_pools_on_device,
+ # args=(action.model_id, str(device), action.amount - 1),
+ # daemon=True,
+ # )
+ # expand_thread.start()
+ # elif action.action == ScaleActionType.SCALE_DOWN:
+ # # TODO: implement scale down logic
+ # pass
def _first_pool_init(self, model_id: str, device_str: str):
"""
@@ -194,7 +195,7 @@ class PoolController:
def _load_model_on_device_task(device_id: str):
if not self.has_request_pools(model_id, device_id):
actions = self._pool_scheduler.schedule_load_model_to_device(
- MODEL_MANAGER.get_model_info(model_id), device_id
+ self._model_manager.get_model_info(model_id), device_id
)
for action in actions:
if action.action == ScaleActionType.SCALE_UP:
@@ -221,7 +222,7 @@ class PoolController:
def _unload_model_on_device_task(device_id: str):
if self.has_request_pools(model_id, device_id):
actions = self._pool_scheduler.schedule_unload_model_from_device(
- MODEL_MANAGER.get_model_info(model_id), device_id
+ self._model_manager.get_model_info(model_id), device_id
)
for action in actions:
if action.action == ScaleActionType.SCALE_DOWN:
@@ -256,7 +257,7 @@ class PoolController:
def _expand_pool_on_device(*_):
result_queue = mp.Queue()
pool_id = self._new_pool_id.get_and_increment()
- model_info = MODEL_MANAGER.get_model_info(model_id)
+ model_info = self._model_manager.get_model_info(model_id)
model_type = model_info.model_type
if model_type == BuiltInModelType.SUNDIAL.value:
config = SundialConfig()
@@ -277,7 +278,7 @@ class PoolController:
)
pool.start()
self._register_pool(model_id, device_id, pool_id, pool, result_queue)
- if not pool.ready_event.wait(timeout=30):
+ if not pool.ready_event.wait(timeout=300):
logger.error(
f"[Inference][Device-{device_id}][Pool-{pool_id}] Pool failed to be ready in time"
)
diff --git a/iotdb-core/ainode/iotdb/ainode/core/log.py b/iotdb-core/ainode/iotdb/ainode/core/log.py
index 0e428b36f7f..947fe820c30 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/log.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/log.py
@@ -116,7 +116,9 @@ class BaseLogger:
file_handler.setFormatter(self.logger_format)
self.logger.addHandler(file_handler)
- self.info(f"Logger init successfully.")
+ self.info(
+ f"Logger init successfully, log file prefix name {log_file_name_prefix}."
+ )
# interfaces
def debug(self, *msg):
diff --git a/iotdb-core/ainode/pom.xml b/iotdb-core/ainode/pom.xml
index 533e7cabf7e..c59c719c747 100644
--- a/iotdb-core/ainode/pom.xml
+++ b/iotdb-core/ainode/pom.xml
@@ -87,9 +87,6 @@
<fileset>
<directory>target</directory>
</fileset>
- <fileset>
- <directory>venv</directory>
- </fileset>
</filesets>
</configuration>
</plugin>
@@ -142,6 +139,9 @@
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
<executions>
+ <!--
+ Copy the python api of IoTDB from iotdb-client.
+ -->
<execution>
<id>copy-python-dependencies</id>
<phase>generate-sources</phase>
@@ -212,55 +212,6 @@
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
- <!-- Prepare a local installation of python -->
- <execution>
- <id>python-venv</id>
- <phase>initialize</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- <configuration>
- <executable>${python.exe.bin}</executable>
- <arguments>
- <argument>-m</argument>
- <argument>venv</argument>
- <argument>./venv</argument>
- </arguments>
- </configuration>
- </execution>
- <!-- Update pip in our local working environment -->
- <execution>
- <id>python-upgrade-pip</id>
- <phase>initialize</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- <configuration>
- <executable>${python.venv.bin}${python.exe.bin}</executable>
- <arguments>
- <argument>-m</argument>
- <argument>pip</argument>
- <argument>install</argument>
- <argument>--upgrade</argument>
- <argument>pip</argument>
- </arguments>
- </configuration>
- </execution>
- <!-- Install poetry in our local working environment -->
- <execution>
- <id>python-install-poetry</id>
- <phase>initialize</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- <configuration>
- <executable>${python.venv.bin}pip3</executable>
- <arguments>
- <argument>install</argument>
- <argument>poetry</argument>
- </arguments>
- </configuration>
- </execution>
<execution>
<id>python-compile</id>
<phase>compile</phase>
@@ -268,44 +219,13 @@
<goal>exec</goal>
</goals>
<configuration>
- <executable>${python.venv.bin}poetry</executable>
+ <executable>${python.exe.bin}</executable>
+ <workingDirectory>${project.basedir}</workingDirectory>
<arguments>
- <argument>build</argument>
+ <argument>build_binary.py</argument>
</arguments>
</configuration>
</execution>
- <!--execution>
- <id>python-test</id>
- <phase>test</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- <configuration>
- <executable>${python.venv.bin}${python.exe.bin}</executable>
- <arguments>
- <argument>-m</argument>
- <argument>pytest</argument>
- <argument>tests</argument>
- </arguments>
- </configuration>
- </execution-->
- <!--execution>
- <id>python-package</id>
- <phase>package</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- <configuration>
- <executable>${python.venv.bin}pip3</executable>
- <arguments>
- <argument>wheel</argument>
- <argument>.</argument>
- <argument>-w</argument>
- <argument>dist</argument>
- <argument>- -no-deps</argument>
- </arguments>
- </configuration>
- </execution-->
</executions>
</plugin>
<plugin>
diff --git a/iotdb-core/ainode/resources/syncPythonVersion.groovy b/iotdb-core/ainode/resources/syncPythonVersion.groovy
index 0061930bfca..ecd0f2bdf21 100644
--- a/iotdb-core/ainode/resources/syncPythonVersion.groovy
+++ b/iotdb-core/ainode/resources/syncPythonVersion.groovy
@@ -120,41 +120,8 @@ def checkPython() {
}
}
-
-// On Ubuntu it seems that venv is generally available, but the 'ensurepip' command fails.
-// In this case we need to install the python3-venv package. Unfortunately checking the
-// venv is successful in this case, so we need this slightly odd test.
-def checkPythonVenv() {
- print "Detecting venv: "
- try {
- def python = project.properties['python.exe.bin']
- def cmdArray = [python, "-Im", "ensurepip"]
- def process = cmdArray.execute()
- def stdOut = new StringBuilder()
- def stdErr = new StringBuilder()
- process.waitForProcessOutput(stdOut, stdErr)
- if (stdErr.contains("No module named")) {
- println "missing"
- println "--- output of version `python -Im \"ensurepip\"` command ---"
- println output
- println "------------------------------------------------------------"
- allConditionsMet = false
- } else {
- println " OK"
- }
- } catch (Exception e) {
- println "missing"
- println "--- failed with exception ---"
- println e
- e.printStackTrace()
- println "----------------------------------------------------"
- allConditionsMet = false
- }
-}
-
// Check the python environment is setup correctly.
checkPython()
-checkPythonVenv()
if (!allConditionsMet) {
throw new RuntimeException("Not all conditions met, see log for details.")
diff --git a/scripts/conf/ainode-env.sh b/scripts/conf/ainode-env.sh
deleted file mode 100644
index 1ec434ad2d9..00000000000
--- a/scripts/conf/ainode-env.sh
+++ /dev/null
@@ -1,138 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-# The defaulte venv environment is used if ain_interpreter_dir is not set. Please use absolute path without quotation mark
-# ain_interpreter_dir=
-
-# Set ain_force_reinstall to 1 to force reinstall AINode
-ain_force_reinstall=0
-
-# don't install dependencies online
-ain_install_offline=0
-
-SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
-
-# fetch parameters with names
-while getopts "i:t:rnm:" opt; do
- case $opt in
- i)
- p_ain_interpreter_dir="$OPTARG"
- ;;
- r)
- p_ain_force_reinstall=1
- ;;
- t) ;;
- n)
- p_ain_no_dependencies="--no-dependencies"
- ;;
- m)
- p_pypi_mirror="$OPTARG"
- ;;
- \?)
- echo "Invalid option -$OPTARG" >&2
- exit 1
- ;;
- esac
-done
-
-if [ -z "$p_ain_interpreter_dir" ]; then
- echo "No interpreter_dir is set, use default value."
-else
- ain_interpreter_dir="$p_ain_interpreter_dir"
-fi
-
-if [ -z "$p_ain_force_reinstall" ]; then
- echo "No check_version is set, use default value."
-else
- ain_force_reinstall="$p_ain_force_reinstall"
-fi
-echo Script got inputs: "ain_interpreter_dir: $ain_interpreter_dir", "ain_force_reinstall: $ain_force_reinstall"
-
-if [ -z $ain_interpreter_dir ]; then
- $(dirname "$0")/../venv/bin/python3 -c "import sys; print(sys.executable)" &&
- echo "Activate default venv environment" || (
- echo "Creating default venv environment" && python3 -m venv "$(dirname "$0")/../venv"
- )
- ain_interpreter_dir="$SCRIPT_DIR/../venv/bin/python3"
-fi
-echo "Calling venv to check: $ain_interpreter_dir"
-
-# Change the working directory to the parent directory
-cd "$SCRIPT_DIR/.."
-
-echo "Confirming AINode..."
-$ain_interpreter_dir -m pip config set global.disable-pip-version-check true
-$ain_interpreter_dir -m pip list | grep "apache-iotdb-ainode" >/dev/null
-if [ $? -eq 0 ]; then
- if [ $ain_force_reinstall -eq 0 ]; then
- echo "AINode is already installed"
- exit 0
- fi
-fi
-
-ain_only_ainode=1
-
-# if $ain_install_offline is 1 then do not install dependencies
-if [ $ain_install_offline -eq 1 ]; then
- # if offline and not -n, then install dependencies
- if [ -z "$p_ain_no_dependencies" ]; then
- ain_only_ainode=0
- else
- ain_only_ainode=1
- fi
- p_ain_no_dependencies="--no-dependencies"
- echo "Installing AINode offline----without dependencies..."
-fi
-
-if [ $ain_force_reinstall -eq 1 ]; then
- p_ain_force_reinstall="--force-reinstall"
-else
- p_ain_force_reinstall=""
-fi
-
-echo "Installing AINode..."
-cd "$SCRIPT_DIR/../lib/"
-shopt -s nullglob
-for i in *.whl; do
- if [[ $i =~ "ainode" ]]; then
- echo Installing AINode body: $i
- if [ -z "$p_pypi_mirror" ]; then
- $ain_interpreter_dir -m pip install "$i" $p_ain_force_reinstall --no-warn-script-location $p_ain_no_dependencies --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
- else
- $ain_interpreter_dir -m pip install "$i" $p_ain_force_reinstall -i $p_pypi_mirror --no-warn-script-location $p_ain_no_dependencies --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
- fi
- else
- # if ain_only_ainode is 0 then install dependencies
- if [ $ain_only_ainode -eq 0 ]; then
- echo Installing dependencies $i
- if [ -z "$p_pypi_mirror" ]; then
- $ain_interpreter_dir -m pip install "$i" $p_ain_force_reinstall --no-warn-script-location $p_ain_no_dependencies
- else
- $ain_interpreter_dir -m pip install "$i" $p_ain_force_reinstall -i $p_pypi_mirror --no-warn-script-location $p_ain_no_dependencies
- fi
- fi
- fi
- if [ $? -eq 1 ]; then
- echo "Failed to install AINode"
- exit 1
- fi
-done
-echo "AINode is installed successfully"
-exit 0
diff --git a/scripts/conf/windows/ainode-env.bat b/scripts/conf/windows/ainode-env.bat
deleted file mode 100644
index 2c01d411a2c..00000000000
--- a/scripts/conf/windows/ainode-env.bat
+++ /dev/null
@@ -1,129 +0,0 @@
-@REM
-@REM Licensed to the Apache Software Foundation (ASF) under one
-@REM or more contributor license agreements. See the NOTICE file
-@REM distributed with this work for additional information
-@REM regarding copyright ownership. The ASF licenses this file
-@REM to you under the Apache License, Version 2.0 (the
-@REM "License"); you may not use this file except in compliance
-@REM with the License. You may obtain a copy of the License at
-@REM
-@REM http://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM Unless required by applicable law or agreed to in writing,
-@REM software distributed under the License is distributed on an
-@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-@REM KIND, either express or implied. See the License for the
-@REM specific language governing permissions and limitations
-@REM under the License.
-@REM
-
-@echo off
-
-@REM The defaulte venv environment is used if ain_interpreter_dir is not set. Please use absolute path without quotation mark
-@REM set ain_interpreter_dir=
-
-@REM Set ain_force_reinstall to 1 to force reinstall ainode
-set ain_force_reinstall=0
-
-@REM don't install dependencies online
-set ain_install_offline=0
-
-pushd %~dp0..\..
-if NOT DEFINED IOTDB_AINODE_HOME set IOTDB_AINODE_HOME=%cd%
-
-:initial
-if "%1"=="" goto done
-set aux=%1
-if "%aux:~0,2%"=="-r" (
- set ain_force_reinstall=1
- shift
- goto initial
-)
-if "%aux:~0,2%"=="-n" (
- set ain_no_dependencies=--no-dependencies
- shift
- goto initial
-)
-if "%aux:~0,1%"=="-" (
- set nome=%aux:~1,250%
-) else (
- set "%nome%=%1"
- set nome=
-)
-shift
-goto initial
-
-:done
-@REM check if the parameters are set
-if "%i%"=="" (
- echo No interpreter_dir is set, use default value.
-) else (
- set ain_interpreter_dir=%i%
-)
-
-echo Script got inputs: ain_interpreter_dir: %ain_interpreter_dir% , ain_force_reinstall: %ain_force_reinstall%
-if "%ain_interpreter_dir%"=="" (
- %IOTDB_AINODE_HOME%//venv//Scripts//python.exe -c "import sys; print(sys.executable)" && (
- echo Activate default venv environment
- ) || (
- echo Creating default venv environment
- python -m venv "%IOTDB_AINODE_HOME%//venv"
- )
- set ain_interpreter_dir="%IOTDB_AINODE_HOME%//venv//Scripts//python.exe"
-)
-
-@REM Switch the working directory to the directory one level above the script
-cd %IOTDB_AINODE_HOME%
-
-echo Confirming ainode
-%ain_interpreter_dir% -m pip config set global.disable-pip-version-check true
-%ain_interpreter_dir% -m pip list | findstr /C:"apache-iotdb-ainode" >nul
-if %errorlevel% == 0 (
- if %ain_force_reinstall% == 0 (
- echo ainode is already installed
- exit /b 0
- )
-)
-
-set ain_only_ainode=1
-@REM if $ain_install_offline is 1 then do not install dependencies
-if %ain_install_offline% == 1 (
- @REM if offline and not -n, then install dependencies
- if "%ain_no_dependencies%"=="" (
- set ain_only_ainode=0
- ) else (
- set ain_only_ainode=1
- )
- set ain_no_dependencies=--no-dependencies
- echo Installing ainode offline----without dependencies...
-)
-
-if %ain_force_reinstall% == 1 (
- set ain_force_reinstall=--force-reinstall
-) else (
- set ain_force_reinstall=
-)
-
-echo Installing ainode...
-@REM Print current work dir
-cd lib
-for %%i in (*.whl *.tar.gz) do (
- echo %%i | findstr "ainode" >nul && (
- echo Installing ainode body: %%i
- %ain_interpreter_dir% -m pip install %%i %ain_force_reinstall% --no-warn-script-location %ain_no_dependencies% --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
- ) || (
- @REM if ain_only_ainode is 0 then install dependencies
- if %ain_only_ainode% == 0 (
- echo Installing dependencies: %%i
- set ain_force_reinstall=--force-reinstall
- %ain_interpreter_dir% -m pip install %%i %ain_force_reinstall% --no-warn-script-location %ain_no_dependencies% --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
- )
- )
- if %errorlevel% == 1 (
- echo Failed to install ainode
- exit /b 1
- )
-)
-echo ainode is installed successfully
-cd ..
-exit /b 0
diff --git a/scripts/sbin/start-ainode.sh b/scripts/sbin/start-ainode.sh
index 4ab202a209e..671de54ba1a 100644
--- a/scripts/sbin/start-ainode.sh
+++ b/scripts/sbin/start-ainode.sh
@@ -23,24 +23,12 @@ echo Starting IoTDB AINode
echo ---------------------------
IOTDB_AINODE_HOME="$(cd "`dirname "$0"`"/..; pwd)"
-
+export IOTDB_AINODE_HOME
echo "IOTDB_AINODE_HOME: $IOTDB_AINODE_HOME"
-chmod u+x $IOTDB_AINODE_HOME/conf/ainode-env.sh
-ain_interpreter_dir=$(sed -n 's/^ain_interpreter_dir=\(.*\)$/\1/p' $IOTDB_AINODE_HOME/conf/ainode-env.sh)
-bash $IOTDB_AINODE_HOME/conf/ainode-env.sh $*
-if [ $? -eq 1 ]; then
- echo "Environment check failed. Exiting..."
- exit 1
-fi
-
# fetch parameters with names
while getopts "i:rn" opt; do
case $opt in
- i) p_ain_interpreter_dir="$OPTARG"
- ;;
- r) p_ain_force_reinstall="$OPTARG"
- ;;
n)
;;
\?) echo "Invalid option -$OPTARG" >&2
@@ -49,31 +37,10 @@ while getopts "i:rn" opt; do
esac
done
-# If ain_interpreter_dir in parameters is empty:
-if [ -z "$p_ain_interpreter_dir" ]; then
- # If ain_interpreter_dir in ../conf/ainode-env.sh is empty, set default value to ../venv/bin/python3
- if [ -z "$ain_interpreter_dir" ]; then
- ain_interpreter_dir="$IOTDB_AINODE_HOME/venv/bin/python3"
- fi
-else
- # If ain_interpreter_dir in parameters is not empty, set ain_interpreter_dir to the value in parameters
- ain_interpreter_dir="$p_ain_interpreter_dir"
-fi
-
-# check if ain_interpreter_dir is an absolute path
-if [[ "$ain_interpreter_dir" != /* ]]; then
- ain_interpreter_dir="$IOTDB_AINODE_HOME/$ain_interpreter_dir"
-fi
-
-echo Script got parameter: ain_interpreter_dir: $ain_interpreter_dir
-
-# Change the working directory to the parent directory
-cd "$IOTDB_AINODE_HOME"
-
-ain_ainode_dir=$(dirname "$ain_interpreter_dir")/ainode
+ain_ainode_executable="$IOTDB_AINODE_HOME/lib/ainode"
-echo Script got ainode dir: ain_ainode_dir: $ain_ainode_dir
+echo Script got ainode executable: "$ain_ainode_executable"
echo Starting AINode...
-$ain_ainode_dir start
+$ain_ainode_executable start
diff --git a/scripts/sbin/windows/start-ainode.bat b/scripts/sbin/windows/start-ainode.bat
index 0a83865fd23..1d9a4306baf 100644
--- a/scripts/sbin/windows/start-ainode.bat
+++ b/scripts/sbin/windows/start-ainode.bat
@@ -26,54 +26,12 @@ echo ```````````````````````````
pushd %~dp0..\..
if NOT DEFINED IOTDB_AINODE_HOME set IOTDB_AINODE_HOME=%cd%
-call %IOTDB_AINODE_HOME%\\conf\\windows\\ainode-env.bat %*
-if %errorlevel% neq 0 (
- echo Environment check failed. Exiting...
- exit /b 1
-)
+set ain_ainode_executable=%IOTDB_AINODE_HOME%\lib\ainode
-for /f "tokens=2 delims==" %%a in ('findstr /i /c:"^ain_interpreter_dir" "%IOTDB_AINODE_HOME%\\conf\\windows\\ainode-env.bat"') do (
- set _ain_interpreter_dir=%%a
- goto :done
-)
-
-:initial
-if "%1"=="" goto done
-set aux=%1
-if "%aux:~0,1%"=="-" (
- set nome=%aux:~1,250%
-) else (
- set "%nome%=%1"
- set nome=
-)
-shift
-goto initial
-
-:done
-if "%i%"=="" (
- if "%_ain_interpreter_dir%"=="" (
- set _ain_interpreter_dir=%IOTDB_AINODE_HOME%\\venv\\Scripts\\python.exe
- )
-) else (
- set _ain_interpreter_dir=%i%
-)
-
-echo Script got parameter: ain_interpreter_dir: %_ain_interpreter_dir%
-
-cd %IOTDB_AINODE_HOME%
-
-for %%i in ("%_ain_interpreter_dir%") do set "parent=%%~dpi"
-
-set ain_ainode_dir=%parent%\ainode.exe
-
-set ain_ainode_dir_new=%parent%\Scripts\\ainode.exe
+echo Script got ainode executable: %ain_ainode_executable%
echo Starting AINode...
-%ain_ainode_dir% start
-if %errorlevel% neq 0 (
- echo ain_ainode_dir_new is %ain_ainode_dir_new%
- %ain_ainode_dir_new% start
-)
+%$ain_ainode_executable% start
pause
\ No newline at end of file
(iotdb) 11/15: [AINode] Update AINodeClient for DataNode to borrow (#16647)
Posted by yo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
yongzao pushed a commit to branch rc/2.0.6
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit c163b93165f4a6149d8d5c8ae645327300b332f6
Author: Zeyu Zhang <11...@users.noreply.github.com>
AuthorDate: Tue Nov 18 00:02:24 2025 +0800
[AINode] Update AINodeClient for DataNode to borrow (#16647)
(cherry picked from commit d49d7dd77115aaf951b2f7896ea4347cb1a77bfb)
---
.../async/AsyncAINodeHeartbeatClientPool.java | 7 +-
.../request/read/model/ShowModelPlan.java | 4 +-
.../iotdb/confignode/manager/ConfigManager.java | 26 ++--
.../apache/iotdb/confignode/manager/IManager.java | 18 +--
.../iotdb/confignode/manager/ModelManager.java | 37 ++---
.../procedure/impl/model/CreateModelProcedure.java | 4 +-
.../procedure/impl/model/DropModelProcedure.java | 7 +-
.../procedure/impl/node/RemoveAINodeProcedure.java | 4 +-
.../thrift/ConfigNodeRPCServiceProcessor.java | 69 ++++-----
.../db/protocol/client/AINodeClientFactory.java | 133 ++++++++++++++++
.../iotdb/db/protocol/client/ConfigNodeClient.java | 51 +------
.../db/protocol}/client/ainode/AINodeClient.java | 169 ++++++++++++---------
.../client/ainode/AINodeClientManager.java | 75 +++++++++
.../client/ainode/AsyncAINodeServiceClient.java | 2 +-
.../operator/process/ai/InferenceOperator.java | 4 +-
.../InformationSchemaContentSupplierFactory.java | 18 ++-
.../config/executor/ClusterConfigTaskExecutor.java | 109 ++++++-------
.../config/metadata/ai/ShowAIDevicesTask.java | 2 +-
.../config/metadata/ai/ShowLoadedModelsTask.java | 4 +-
.../config/metadata/ai/ShowModelsTask.java | 4 +-
.../function/tvf/ForecastTableFunction.java | 8 +-
iotdb-core/node-commons/pom.xml | 6 -
.../iotdb/commons/client/ClientPoolFactory.java | 52 -------
.../commons/client/ainode/AINodeClientManager.java | 40 -----
.../src/main/thrift/confignode.thrift | 83 ++--------
25 files changed, 486 insertions(+), 450 deletions(-)
diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/client/async/AsyncAINodeHeartbeatClientPool.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/client/async/AsyncAINodeHeartbeatClientPool.java
index e09ccc79bec..2721fedafb1 100644
--- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/client/async/AsyncAINodeHeartbeatClientPool.java
+++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/client/async/AsyncAINodeHeartbeatClientPool.java
@@ -21,10 +21,10 @@ package org.apache.iotdb.confignode.client.async;
import org.apache.iotdb.ainode.rpc.thrift.TAIHeartbeatReq;
import org.apache.iotdb.common.rpc.thrift.TEndPoint;
-import org.apache.iotdb.commons.client.ClientPoolFactory;
import org.apache.iotdb.commons.client.IClientManager;
-import org.apache.iotdb.commons.client.ainode.AsyncAINodeServiceClient;
import org.apache.iotdb.confignode.client.async.handlers.heartbeat.AINodeHeartbeatHandler;
+import org.apache.iotdb.db.protocol.client.AINodeClientFactory;
+import org.apache.iotdb.db.protocol.client.ainode.AsyncAINodeServiceClient;
public class AsyncAINodeHeartbeatClientPool {
@@ -33,8 +33,7 @@ public class AsyncAINodeHeartbeatClientPool {
private AsyncAINodeHeartbeatClientPool() {
clientManager =
new IClientManager.Factory<TEndPoint, AsyncAINodeServiceClient>()
- .createClientManager(
- new ClientPoolFactory.AsyncAINodeHeartbeatServiceClientPoolFactory());
+ .createClientManager(new AINodeClientFactory.AINodeHeartbeatClientPoolFactory());
}
public void getAINodeHeartBeat(
diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/consensus/request/read/model/ShowModelPlan.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/consensus/request/read/model/ShowModelPlan.java
index 16bc16bc872..eca00e8827d 100644
--- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/consensus/request/read/model/ShowModelPlan.java
+++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/consensus/request/read/model/ShowModelPlan.java
@@ -19,9 +19,9 @@
package org.apache.iotdb.confignode.consensus.request.read.model;
+import org.apache.iotdb.ainode.rpc.thrift.TShowModelsReq;
import org.apache.iotdb.confignode.consensus.request.ConfigPhysicalPlanType;
import org.apache.iotdb.confignode.consensus.request.read.ConfigPhysicalReadPlan;
-import org.apache.iotdb.confignode.rpc.thrift.TShowModelReq;
import java.util.Objects;
@@ -33,7 +33,7 @@ public class ShowModelPlan extends ConfigPhysicalReadPlan {
super(ConfigPhysicalPlanType.ShowModel);
}
- public ShowModelPlan(final TShowModelReq showModelReq) {
+ public ShowModelPlan(final TShowModelsReq showModelReq) {
super(ConfigPhysicalPlanType.ShowModel);
if (showModelReq.isSetModelId()) {
this.modelName = showModelReq.getModelId();
diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConfigManager.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConfigManager.java
index 56d4663094e..2b90eace388 100644
--- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConfigManager.java
+++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConfigManager.java
@@ -20,7 +20,14 @@
package org.apache.iotdb.confignode.manager;
import org.apache.iotdb.ainode.rpc.thrift.IDataSchema;
+import org.apache.iotdb.ainode.rpc.thrift.TLoadModelReq;
+import org.apache.iotdb.ainode.rpc.thrift.TShowAIDevicesResp;
+import org.apache.iotdb.ainode.rpc.thrift.TShowLoadedModelsReq;
+import org.apache.iotdb.ainode.rpc.thrift.TShowLoadedModelsResp;
+import org.apache.iotdb.ainode.rpc.thrift.TShowModelsReq;
+import org.apache.iotdb.ainode.rpc.thrift.TShowModelsResp;
import org.apache.iotdb.ainode.rpc.thrift.TTrainingReq;
+import org.apache.iotdb.ainode.rpc.thrift.TUnloadModelReq;
import org.apache.iotdb.common.rpc.thrift.TAINodeConfiguration;
import org.apache.iotdb.common.rpc.thrift.TAINodeLocation;
import org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation;
@@ -41,8 +48,6 @@ import org.apache.iotdb.common.rpc.thrift.TShowConfigurationResp;
import org.apache.iotdb.common.rpc.thrift.TTimePartitionSlot;
import org.apache.iotdb.commons.auth.AuthException;
import org.apache.iotdb.commons.auth.entity.PrivilegeUnion;
-import org.apache.iotdb.commons.client.ainode.AINodeClient;
-import org.apache.iotdb.commons.client.ainode.AINodeClientManager;
import org.apache.iotdb.commons.cluster.NodeStatus;
import org.apache.iotdb.commons.cluster.NodeType;
import org.apache.iotdb.commons.conf.CommonConfig;
@@ -210,7 +215,6 @@ import org.apache.iotdb.confignode.rpc.thrift.TGetTimeSlotListResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetTriggerTableResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetUDFTableResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetUdfTableReq;
-import org.apache.iotdb.confignode.rpc.thrift.TLoadModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TMigrateRegionReq;
import org.apache.iotdb.confignode.rpc.thrift.TNodeVersionInfo;
import org.apache.iotdb.confignode.rpc.thrift.TPermissionInfoResp;
@@ -223,7 +227,6 @@ import org.apache.iotdb.confignode.rpc.thrift.TSchemaNodeManagementResp;
import org.apache.iotdb.confignode.rpc.thrift.TSchemaPartitionTableResp;
import org.apache.iotdb.confignode.rpc.thrift.TSetDataNodeStatusReq;
import org.apache.iotdb.confignode.rpc.thrift.TSetSchemaTemplateReq;
-import org.apache.iotdb.confignode.rpc.thrift.TShowAIDevicesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowAINodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowCQResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowClusterResp;
@@ -232,10 +235,6 @@ import org.apache.iotdb.confignode.rpc.thrift.TShowConfigNodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDataNodes4InformationSchemaResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDataNodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDatabaseResp;
-import org.apache.iotdb.confignode.rpc.thrift.TShowLoadedModelReq;
-import org.apache.iotdb.confignode.rpc.thrift.TShowLoadedModelResp;
-import org.apache.iotdb.confignode.rpc.thrift.TShowModelReq;
-import org.apache.iotdb.confignode.rpc.thrift.TShowModelResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowPipePluginReq;
import org.apache.iotdb.confignode.rpc.thrift.TShowPipeReq;
import org.apache.iotdb.confignode.rpc.thrift.TShowPipeResp;
@@ -253,12 +252,13 @@ import org.apache.iotdb.confignode.rpc.thrift.TStopPipeReq;
import org.apache.iotdb.confignode.rpc.thrift.TSubscribeReq;
import org.apache.iotdb.confignode.rpc.thrift.TThrottleQuotaResp;
import org.apache.iotdb.confignode.rpc.thrift.TTimeSlotList;
-import org.apache.iotdb.confignode.rpc.thrift.TUnloadModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TUnsetSchemaTemplateReq;
import org.apache.iotdb.confignode.rpc.thrift.TUnsubscribeReq;
import org.apache.iotdb.confignode.rpc.thrift.TUpdateModelInfoReq;
import org.apache.iotdb.consensus.common.DataSet;
import org.apache.iotdb.consensus.exception.ConsensusException;
+import org.apache.iotdb.db.protocol.client.ainode.AINodeClient;
+import org.apache.iotdb.db.protocol.client.ainode.AINodeClientManager;
import org.apache.iotdb.db.schemaengine.template.Template;
import org.apache.iotdb.db.schemaengine.template.TemplateAlterOperationType;
import org.apache.iotdb.db.schemaengine.template.alter.TemplateAlterOperationUtil;
@@ -2753,19 +2753,19 @@ public class ConfigManager implements IManager {
}
@Override
- public TShowModelResp showModel(TShowModelReq req) {
+ public TShowModelsResp showModel(TShowModelsReq req) {
TSStatus status = confirmLeader();
return status.getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode()
? modelManager.showModel(req)
- : new TShowModelResp(status);
+ : new TShowModelsResp(status);
}
@Override
- public TShowLoadedModelResp showLoadedModel(TShowLoadedModelReq req) {
+ public TShowLoadedModelsResp showLoadedModel(TShowLoadedModelsReq req) {
TSStatus status = confirmLeader();
return status.getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode()
? modelManager.showLoadedModel(req)
- : new TShowLoadedModelResp(status, Collections.emptyMap());
+ : new TShowLoadedModelsResp(status, Collections.emptyMap());
}
@Override
diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/IManager.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/IManager.java
index 348d973adf8..2e7936f48b7 100644
--- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/IManager.java
+++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/IManager.java
@@ -19,6 +19,13 @@
package org.apache.iotdb.confignode.manager;
+import org.apache.iotdb.ainode.rpc.thrift.TLoadModelReq;
+import org.apache.iotdb.ainode.rpc.thrift.TShowAIDevicesResp;
+import org.apache.iotdb.ainode.rpc.thrift.TShowLoadedModelsReq;
+import org.apache.iotdb.ainode.rpc.thrift.TShowLoadedModelsResp;
+import org.apache.iotdb.ainode.rpc.thrift.TShowModelsReq;
+import org.apache.iotdb.ainode.rpc.thrift.TShowModelsResp;
+import org.apache.iotdb.ainode.rpc.thrift.TUnloadModelReq;
import org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation;
import org.apache.iotdb.common.rpc.thrift.TDataNodeLocation;
import org.apache.iotdb.common.rpc.thrift.TFlushReq;
@@ -124,7 +131,6 @@ import org.apache.iotdb.confignode.rpc.thrift.TGetTimeSlotListResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetTriggerTableResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetUDFTableResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetUdfTableReq;
-import org.apache.iotdb.confignode.rpc.thrift.TLoadModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TMigrateRegionReq;
import org.apache.iotdb.confignode.rpc.thrift.TPermissionInfoResp;
import org.apache.iotdb.confignode.rpc.thrift.TPipeConfigTransferReq;
@@ -136,7 +142,6 @@ import org.apache.iotdb.confignode.rpc.thrift.TSchemaNodeManagementResp;
import org.apache.iotdb.confignode.rpc.thrift.TSchemaPartitionTableResp;
import org.apache.iotdb.confignode.rpc.thrift.TSetDataNodeStatusReq;
import org.apache.iotdb.confignode.rpc.thrift.TSetSchemaTemplateReq;
-import org.apache.iotdb.confignode.rpc.thrift.TShowAIDevicesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowAINodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowCQResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowClusterResp;
@@ -145,10 +150,6 @@ import org.apache.iotdb.confignode.rpc.thrift.TShowConfigNodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDataNodes4InformationSchemaResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDataNodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDatabaseResp;
-import org.apache.iotdb.confignode.rpc.thrift.TShowLoadedModelReq;
-import org.apache.iotdb.confignode.rpc.thrift.TShowLoadedModelResp;
-import org.apache.iotdb.confignode.rpc.thrift.TShowModelReq;
-import org.apache.iotdb.confignode.rpc.thrift.TShowModelResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowPipePluginReq;
import org.apache.iotdb.confignode.rpc.thrift.TShowPipeReq;
import org.apache.iotdb.confignode.rpc.thrift.TShowPipeResp;
@@ -162,7 +163,6 @@ import org.apache.iotdb.confignode.rpc.thrift.TShowVariablesResp;
import org.apache.iotdb.confignode.rpc.thrift.TStartPipeReq;
import org.apache.iotdb.confignode.rpc.thrift.TStopPipeReq;
import org.apache.iotdb.confignode.rpc.thrift.TSubscribeReq;
-import org.apache.iotdb.confignode.rpc.thrift.TUnloadModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TUnsetSchemaTemplateReq;
import org.apache.iotdb.confignode.rpc.thrift.TUnsubscribeReq;
import org.apache.iotdb.consensus.common.DataSet;
@@ -874,10 +874,10 @@ public interface IManager {
TSStatus unloadModel(TUnloadModelReq req);
/** Return the model table. */
- TShowModelResp showModel(TShowModelReq req);
+ TShowModelsResp showModel(TShowModelsReq req);
/** Return the loaded model instances. */
- TShowLoadedModelResp showLoadedModel(TShowLoadedModelReq req);
+ TShowLoadedModelsResp showLoadedModel(TShowLoadedModelsReq req);
/** Return all available AI devices. */
TShowAIDevicesResp showAIDevices();
diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ModelManager.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ModelManager.java
index 4c1f94eab9e..3efdbc222b6 100644
--- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ModelManager.java
+++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ModelManager.java
@@ -19,14 +19,15 @@
package org.apache.iotdb.confignode.manager;
+import org.apache.iotdb.ainode.rpc.thrift.TLoadModelReq;
+import org.apache.iotdb.ainode.rpc.thrift.TShowAIDevicesResp;
import org.apache.iotdb.ainode.rpc.thrift.TShowLoadedModelsReq;
import org.apache.iotdb.ainode.rpc.thrift.TShowLoadedModelsResp;
import org.apache.iotdb.ainode.rpc.thrift.TShowModelsReq;
import org.apache.iotdb.ainode.rpc.thrift.TShowModelsResp;
+import org.apache.iotdb.ainode.rpc.thrift.TUnloadModelReq;
import org.apache.iotdb.common.rpc.thrift.TEndPoint;
import org.apache.iotdb.common.rpc.thrift.TSStatus;
-import org.apache.iotdb.commons.client.ainode.AINodeClient;
-import org.apache.iotdb.commons.client.ainode.AINodeClientManager;
import org.apache.iotdb.commons.client.exception.ClientManagerException;
import org.apache.iotdb.commons.model.ModelInformation;
import org.apache.iotdb.commons.model.ModelStatus;
@@ -40,15 +41,10 @@ import org.apache.iotdb.confignode.rpc.thrift.TCreateModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TDropModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TGetModelInfoReq;
import org.apache.iotdb.confignode.rpc.thrift.TGetModelInfoResp;
-import org.apache.iotdb.confignode.rpc.thrift.TLoadModelReq;
-import org.apache.iotdb.confignode.rpc.thrift.TShowAIDevicesResp;
-import org.apache.iotdb.confignode.rpc.thrift.TShowLoadedModelReq;
-import org.apache.iotdb.confignode.rpc.thrift.TShowLoadedModelResp;
-import org.apache.iotdb.confignode.rpc.thrift.TShowModelReq;
-import org.apache.iotdb.confignode.rpc.thrift.TShowModelResp;
-import org.apache.iotdb.confignode.rpc.thrift.TUnloadModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TUpdateModelInfoReq;
import org.apache.iotdb.consensus.exception.ConsensusException;
+import org.apache.iotdb.db.protocol.client.ainode.AINodeClient;
+import org.apache.iotdb.db.protocol.client.ainode.AINodeClientManager;
import org.apache.iotdb.rpc.TSStatusCode;
import org.slf4j.Logger;
@@ -124,15 +120,16 @@ public class ModelManager {
}
}
- public TShowModelResp showModel(final TShowModelReq req) {
+ public TShowModelsResp showModel(final TShowModelsReq req) {
try (AINodeClient client = getAINodeClient()) {
TShowModelsReq showModelsReq = new TShowModelsReq();
if (req.isSetModelId()) {
showModelsReq.setModelId(req.getModelId());
}
TShowModelsResp resp = client.showModels(showModelsReq);
- TShowModelResp res =
- new TShowModelResp().setStatus(new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode()));
+ TShowModelsResp res =
+ new TShowModelsResp()
+ .setStatus(new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode()));
res.setModelIdList(resp.getModelIdList());
res.setModelTypeMap(resp.getModelTypeMap());
res.setCategoryMap(resp.getCategoryMap());
@@ -140,26 +137,26 @@ public class ModelManager {
return res;
} catch (Exception e) {
LOGGER.warn("Failed to show models due to", e);
- return new TShowModelResp()
+ return new TShowModelsResp()
.setStatus(
new TSStatus(TSStatusCode.AI_NODE_INTERNAL_ERROR.getStatusCode())
.setMessage(e.getMessage()));
}
}
- public TShowLoadedModelResp showLoadedModel(final TShowLoadedModelReq req) {
+ public TShowLoadedModelsResp showLoadedModel(final TShowLoadedModelsReq req) {
try (AINodeClient client = getAINodeClient()) {
TShowLoadedModelsReq showModelsReq =
new TShowLoadedModelsReq().setDeviceIdList(req.getDeviceIdList());
TShowLoadedModelsResp resp = client.showLoadedModels(showModelsReq);
- TShowLoadedModelResp res =
- new TShowLoadedModelResp()
+ TShowLoadedModelsResp res =
+ new TShowLoadedModelsResp()
.setStatus(new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode()));
res.setDeviceLoadedModelsMap(resp.getDeviceLoadedModelsMap());
return res;
} catch (Exception e) {
LOGGER.warn("Failed to show loaded models due to", e);
- return new TShowLoadedModelResp()
+ return new TShowLoadedModelsResp()
.setStatus(
new TSStatus(TSStatusCode.AI_NODE_INTERNAL_ERROR.getStatusCode())
.setMessage(e.getMessage()));
@@ -235,7 +232,11 @@ public class ModelManager {
}
TEndPoint targetAINodeEndPoint =
new TEndPoint(aiNodeInfo.get(0).getInternalAddress(), aiNodeInfo.get(0).getInternalPort());
- return AINodeClientManager.getInstance().borrowClient(targetAINodeEndPoint);
+ try {
+ return AINodeClientManager.getInstance().borrowClient(targetAINodeEndPoint);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
}
public List<Integer> getModelDistributions(String modelName) {
diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/model/CreateModelProcedure.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/model/CreateModelProcedure.java
index 8282608466d..98906161021 100644
--- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/model/CreateModelProcedure.java
+++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/model/CreateModelProcedure.java
@@ -21,8 +21,6 @@ package org.apache.iotdb.confignode.procedure.impl.model;
import org.apache.iotdb.common.rpc.thrift.TAINodeConfiguration;
import org.apache.iotdb.common.rpc.thrift.TSStatus;
-import org.apache.iotdb.commons.client.ainode.AINodeClient;
-import org.apache.iotdb.commons.client.ainode.AINodeClientManager;
import org.apache.iotdb.commons.exception.ainode.LoadModelException;
import org.apache.iotdb.commons.model.ModelInformation;
import org.apache.iotdb.commons.model.ModelStatus;
@@ -36,6 +34,8 @@ import org.apache.iotdb.confignode.procedure.impl.node.AbstractNodeProcedure;
import org.apache.iotdb.confignode.procedure.state.model.CreateModelState;
import org.apache.iotdb.confignode.procedure.store.ProcedureType;
import org.apache.iotdb.consensus.exception.ConsensusException;
+import org.apache.iotdb.db.protocol.client.ainode.AINodeClient;
+import org.apache.iotdb.db.protocol.client.ainode.AINodeClientManager;
import org.apache.iotdb.rpc.TSStatusCode;
import org.apache.tsfile.utils.ReadWriteIOUtils;
diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/model/DropModelProcedure.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/model/DropModelProcedure.java
index 23e02ea2e1d..daa029e04dd 100644
--- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/model/DropModelProcedure.java
+++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/model/DropModelProcedure.java
@@ -19,10 +19,9 @@
package org.apache.iotdb.confignode.procedure.impl.model;
+import org.apache.iotdb.ainode.rpc.thrift.TDeleteModelReq;
import org.apache.iotdb.common.rpc.thrift.TAINodeConfiguration;
import org.apache.iotdb.common.rpc.thrift.TSStatus;
-import org.apache.iotdb.commons.client.ainode.AINodeClient;
-import org.apache.iotdb.commons.client.ainode.AINodeClientManager;
import org.apache.iotdb.commons.model.exception.ModelManagementException;
import org.apache.iotdb.confignode.consensus.request.write.model.DropModelPlan;
import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
@@ -30,6 +29,8 @@ import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
import org.apache.iotdb.confignode.procedure.impl.node.AbstractNodeProcedure;
import org.apache.iotdb.confignode.procedure.state.model.DropModelState;
import org.apache.iotdb.confignode.procedure.store.ProcedureType;
+import org.apache.iotdb.db.protocol.client.ainode.AINodeClient;
+import org.apache.iotdb.db.protocol.client.ainode.AINodeClientManager;
import org.apache.iotdb.rpc.TSStatusCode;
import org.apache.thrift.TException;
@@ -115,7 +116,7 @@ public class DropModelProcedure extends AbstractNodeProcedure<DropModelState> {
.getRegisteredAINode(nodeId)
.getLocation()
.getInternalEndPoint())) {
- TSStatus status = client.deleteModel(modelName);
+ TSStatus status = client.deleteModel(new TDeleteModelReq(modelName));
if (status.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
LOGGER.warn(
"Failed to drop model [{}] on AINode [{}], status: {}",
diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/node/RemoveAINodeProcedure.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/node/RemoveAINodeProcedure.java
index 5f98930d074..2cab08c2824 100644
--- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/node/RemoveAINodeProcedure.java
+++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/node/RemoveAINodeProcedure.java
@@ -21,8 +21,6 @@ package org.apache.iotdb.confignode.procedure.impl.node;
import org.apache.iotdb.common.rpc.thrift.TAINodeLocation;
import org.apache.iotdb.common.rpc.thrift.TSStatus;
-import org.apache.iotdb.commons.client.ainode.AINodeClient;
-import org.apache.iotdb.commons.client.ainode.AINodeClientManager;
import org.apache.iotdb.commons.utils.ThriftCommonsSerDeUtils;
import org.apache.iotdb.confignode.consensus.request.write.ainode.RemoveAINodePlan;
import org.apache.iotdb.confignode.consensus.request.write.model.DropModelInNodePlan;
@@ -30,6 +28,8 @@ import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv;
import org.apache.iotdb.confignode.procedure.exception.ProcedureException;
import org.apache.iotdb.confignode.procedure.state.RemoveAINodeState;
import org.apache.iotdb.confignode.procedure.store.ProcedureType;
+import org.apache.iotdb.db.protocol.client.ainode.AINodeClient;
+import org.apache.iotdb.db.protocol.client.ainode.AINodeClientManager;
import org.apache.iotdb.rpc.TSStatusCode;
import org.slf4j.Logger;
diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/ConfigNodeRPCServiceProcessor.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/ConfigNodeRPCServiceProcessor.java
index 0de826ef542..431d0d4f952 100644
--- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/ConfigNodeRPCServiceProcessor.java
+++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/ConfigNodeRPCServiceProcessor.java
@@ -19,6 +19,8 @@
package org.apache.iotdb.confignode.service.thrift;
+import org.apache.iotdb.common.rpc.thrift.TAINodeConfiguration;
+import org.apache.iotdb.common.rpc.thrift.TAINodeLocation;
import org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation;
import org.apache.iotdb.common.rpc.thrift.TDataNodeLocation;
import org.apache.iotdb.common.rpc.thrift.TFlushReq;
@@ -116,7 +118,6 @@ import org.apache.iotdb.confignode.rpc.thrift.TCreatePipeReq;
import org.apache.iotdb.confignode.rpc.thrift.TCreateSchemaTemplateReq;
import org.apache.iotdb.confignode.rpc.thrift.TCreateTableViewReq;
import org.apache.iotdb.confignode.rpc.thrift.TCreateTopicReq;
-import org.apache.iotdb.confignode.rpc.thrift.TCreateTrainingReq;
import org.apache.iotdb.confignode.rpc.thrift.TCreateTriggerReq;
import org.apache.iotdb.confignode.rpc.thrift.TDataNodeConfigurationResp;
import org.apache.iotdb.confignode.rpc.thrift.TDataNodeRegisterReq;
@@ -148,6 +149,7 @@ import org.apache.iotdb.confignode.rpc.thrift.TDropTopicReq;
import org.apache.iotdb.confignode.rpc.thrift.TDropTriggerReq;
import org.apache.iotdb.confignode.rpc.thrift.TExtendRegionReq;
import org.apache.iotdb.confignode.rpc.thrift.TFetchTableResp;
+import org.apache.iotdb.confignode.rpc.thrift.TGetAINodeLocationResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetAllPipeInfoResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetAllSubscriptionInfoResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetAllTemplatesResp;
@@ -173,7 +175,6 @@ import org.apache.iotdb.confignode.rpc.thrift.TGetTimeSlotListResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetTriggerTableResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetUDFTableResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetUdfTableReq;
-import org.apache.iotdb.confignode.rpc.thrift.TLoadModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TLoginReq;
import org.apache.iotdb.confignode.rpc.thrift.TMigrateRegionReq;
import org.apache.iotdb.confignode.rpc.thrift.TPermissionInfoResp;
@@ -191,7 +192,6 @@ import org.apache.iotdb.confignode.rpc.thrift.TSetDataReplicationFactorReq;
import org.apache.iotdb.confignode.rpc.thrift.TSetSchemaReplicationFactorReq;
import org.apache.iotdb.confignode.rpc.thrift.TSetSchemaTemplateReq;
import org.apache.iotdb.confignode.rpc.thrift.TSetTimePartitionIntervalReq;
-import org.apache.iotdb.confignode.rpc.thrift.TShowAIDevicesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowAINodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowCQResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowClusterResp;
@@ -200,10 +200,6 @@ import org.apache.iotdb.confignode.rpc.thrift.TShowConfigNodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDataNodes4InformationSchemaResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDataNodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDatabaseResp;
-import org.apache.iotdb.confignode.rpc.thrift.TShowLoadedModelReq;
-import org.apache.iotdb.confignode.rpc.thrift.TShowLoadedModelResp;
-import org.apache.iotdb.confignode.rpc.thrift.TShowModelReq;
-import org.apache.iotdb.confignode.rpc.thrift.TShowModelResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowPipePluginReq;
import org.apache.iotdb.confignode.rpc.thrift.TShowPipeReq;
import org.apache.iotdb.confignode.rpc.thrift.TShowPipeResp;
@@ -225,7 +221,6 @@ import org.apache.iotdb.confignode.rpc.thrift.TSubscribeReq;
import org.apache.iotdb.confignode.rpc.thrift.TSystemConfigurationResp;
import org.apache.iotdb.confignode.rpc.thrift.TTestOperation;
import org.apache.iotdb.confignode.rpc.thrift.TThrottleQuotaResp;
-import org.apache.iotdb.confignode.rpc.thrift.TUnloadModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TUnsetSchemaTemplateReq;
import org.apache.iotdb.confignode.rpc.thrift.TUnsubscribeReq;
import org.apache.iotdb.confignode.rpc.thrift.TUpdateModelInfoReq;
@@ -642,6 +637,34 @@ public class ConfigNodeRPCServiceProcessor implements IConfigNodeRPCService.Ifac
AuthUtils.deserializePartialPathList(ByteBuffer.wrap(req.getNodeNameList()))));
}
+ @Override
+ public TGetAINodeLocationResp getAINodeLocation() throws TException {
+ final TGetAINodeLocationResp resp = new TGetAINodeLocationResp();
+ final TSStatus status = new TSStatus();
+ try {
+ final List<TAINodeConfiguration> registeredAINodes =
+ configManager.getNodeManager().getRegisteredAINodes();
+
+ if (registeredAINodes == null || registeredAINodes.isEmpty()) {
+ status.setCode(TSStatusCode.NO_REGISTERED_AI_NODE_ERROR.getStatusCode());
+ status.setMessage("No registered AINode found");
+ resp.setStatus(status);
+ return resp;
+ }
+
+ final TAINodeLocation loc = registeredAINodes.get(0).getLocation();
+ resp.setAiNodeLocation(loc);
+ status.setCode(TSStatusCode.SUCCESS_STATUS.getStatusCode());
+ status.setMessage("AINode location resolved");
+
+ } catch (Exception e) {
+ status.setCode(TSStatusCode.INTERNAL_SERVER_ERROR.getStatusCode());
+ status.setMessage("getAINodeLocation failed: " + e.getMessage());
+ }
+ resp.setStatus(status);
+ return resp;
+ }
+
@Override
public TAuthorizerResp queryPermission(final TAuthorizerReq req) {
if (req.getAuthorType() < 0 || req.getAuthorType() >= AuthorType.values().length) {
@@ -1328,31 +1351,6 @@ public class ConfigNodeRPCServiceProcessor implements IConfigNodeRPCService.Ifac
return configManager.dropModel(req);
}
- @Override
- public TSStatus loadModel(TLoadModelReq req) {
- return configManager.loadModel(req);
- }
-
- @Override
- public TSStatus unloadModel(TUnloadModelReq req) {
- return configManager.unloadModel(req);
- }
-
- @Override
- public TShowModelResp showModel(TShowModelReq req) {
- return configManager.showModel(req);
- }
-
- @Override
- public TShowLoadedModelResp showLoadedModel(TShowLoadedModelReq req) {
- return configManager.showLoadedModel(req);
- }
-
- @Override
- public TShowAIDevicesResp showAIDevices() {
- return configManager.showAIDevices();
- }
-
@Override
public TGetModelInfoResp getModelInfo(TGetModelInfoReq req) {
return configManager.getModelInfo(req);
@@ -1363,11 +1361,6 @@ public class ConfigNodeRPCServiceProcessor implements IConfigNodeRPCService.Ifac
return configManager.updateModelInfo(req);
}
- @Override
- public TSStatus createTraining(TCreateTrainingReq req) throws TException {
- return configManager.createTraining(req);
- }
-
@Override
public TSStatus setSpaceQuota(final TSetSpaceQuotaReq req) throws TException {
return configManager.setSpaceQuota(req);
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/AINodeClientFactory.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/AINodeClientFactory.java
new file mode 100644
index 00000000000..0d784617c09
--- /dev/null
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/AINodeClientFactory.java
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.db.protocol.client;
+
+import org.apache.iotdb.common.rpc.thrift.TEndPoint;
+import org.apache.iotdb.commons.client.ClientManager;
+import org.apache.iotdb.commons.client.ClientManagerMetrics;
+import org.apache.iotdb.commons.client.IClientPoolFactory;
+import org.apache.iotdb.commons.client.factory.ThriftClientFactory;
+import org.apache.iotdb.commons.client.property.ClientPoolProperty;
+import org.apache.iotdb.commons.client.property.ThriftClientProperty;
+import org.apache.iotdb.commons.concurrent.ThreadName;
+import org.apache.iotdb.commons.conf.CommonConfig;
+import org.apache.iotdb.commons.conf.CommonDescriptor;
+import org.apache.iotdb.db.protocol.client.ainode.AINodeClient;
+import org.apache.iotdb.db.protocol.client.ainode.AsyncAINodeServiceClient;
+
+import org.apache.commons.pool2.PooledObject;
+import org.apache.commons.pool2.impl.DefaultPooledObject;
+import org.apache.commons.pool2.impl.GenericKeyedObjectPool;
+
+import java.util.Optional;
+
+/** Dedicated factory for AINodeClient + AINodeClientPoolFactory. */
+public class AINodeClientFactory extends ThriftClientFactory<TEndPoint, AINodeClient> {
+
+ private static final int connectionTimeout =
+ CommonDescriptor.getInstance().getConfig().getDnConnectionTimeoutInMS();
+
+ public AINodeClientFactory(
+ ClientManager<TEndPoint, AINodeClient> manager, ThriftClientProperty thriftProperty) {
+ super(manager, thriftProperty);
+ }
+
+ @Override
+ public PooledObject<AINodeClient> makeObject(TEndPoint endPoint) throws Exception {
+ return new DefaultPooledObject<>(
+ new AINodeClient(thriftClientProperty, endPoint, clientManager));
+ }
+
+ @Override
+ public void destroyObject(TEndPoint key, PooledObject<AINodeClient> pooled) throws Exception {
+ pooled.getObject().invalidate();
+ }
+
+ @Override
+ public boolean validateObject(TEndPoint key, PooledObject<AINodeClient> pooledObject) {
+ return Optional.ofNullable(pooledObject.getObject().getTransport())
+ .map(org.apache.thrift.transport.TTransport::isOpen)
+ .orElse(false);
+ }
+
+ /** The PoolFactory originally inside ClientPoolFactory — now moved here. */
+ public static class AINodeClientPoolFactory
+ implements IClientPoolFactory<TEndPoint, AINodeClient> {
+
+ @Override
+ public GenericKeyedObjectPool<TEndPoint, AINodeClient> createClientPool(
+ ClientManager<TEndPoint, AINodeClient> manager) {
+
+ // Build thrift client properties
+ ThriftClientProperty thriftProperty =
+ new ThriftClientProperty.Builder()
+ .setConnectionTimeoutMs(connectionTimeout)
+ .setRpcThriftCompressionEnabled(
+ CommonDescriptor.getInstance().getConfig().isRpcThriftCompressionEnabled())
+ .build();
+
+ GenericKeyedObjectPool<TEndPoint, AINodeClient> pool =
+ new GenericKeyedObjectPool<>(
+ new AINodeClientFactory(manager, thriftProperty),
+ new ClientPoolProperty.Builder<AINodeClient>()
+ .setMaxClientNumForEachNode(
+ CommonDescriptor.getInstance().getConfig().getMaxClientNumForEachNode())
+ .build()
+ .getConfig());
+
+ ClientManagerMetrics.getInstance()
+ .registerClientManager(this.getClass().getSimpleName(), pool);
+
+ return pool;
+ }
+ }
+
+ public static class AINodeHeartbeatClientPoolFactory
+ implements IClientPoolFactory<TEndPoint, AsyncAINodeServiceClient> {
+
+ @Override
+ public GenericKeyedObjectPool<TEndPoint, AsyncAINodeServiceClient> createClientPool(
+ ClientManager<TEndPoint, AsyncAINodeServiceClient> manager) {
+
+ final CommonConfig conf = CommonDescriptor.getInstance().getConfig();
+
+ GenericKeyedObjectPool<TEndPoint, AsyncAINodeServiceClient> clientPool =
+ new GenericKeyedObjectPool<>(
+ new AsyncAINodeServiceClient.Factory(
+ manager,
+ new ThriftClientProperty.Builder()
+ .setConnectionTimeoutMs(conf.getCnConnectionTimeoutInMS())
+ .setRpcThriftCompressionEnabled(conf.isRpcThriftCompressionEnabled())
+ .setSelectorNumOfAsyncClientManager(conf.getSelectorNumOfClientManager())
+ .setPrintLogWhenEncounterException(false)
+ .build(),
+ ThreadName.ASYNC_DATANODE_HEARTBEAT_CLIENT_POOL.getName()),
+ new ClientPoolProperty.Builder<AsyncAINodeServiceClient>()
+ .setMaxClientNumForEachNode(conf.getMaxClientNumForEachNode())
+ .build()
+ .getConfig());
+
+ ClientManagerMetrics.getInstance()
+ .registerClientManager(this.getClass().getSimpleName(), clientPool);
+
+ return clientPool;
+ }
+ }
+}
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ConfigNodeClient.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ConfigNodeClient.java
index a21127b1d7d..b02e2b57de7 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ConfigNodeClient.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ConfigNodeClient.java
@@ -75,7 +75,6 @@ import org.apache.iotdb.confignode.rpc.thrift.TCreatePipeReq;
import org.apache.iotdb.confignode.rpc.thrift.TCreateSchemaTemplateReq;
import org.apache.iotdb.confignode.rpc.thrift.TCreateTableViewReq;
import org.apache.iotdb.confignode.rpc.thrift.TCreateTopicReq;
-import org.apache.iotdb.confignode.rpc.thrift.TCreateTrainingReq;
import org.apache.iotdb.confignode.rpc.thrift.TCreateTriggerReq;
import org.apache.iotdb.confignode.rpc.thrift.TDataNodeConfigurationResp;
import org.apache.iotdb.confignode.rpc.thrift.TDataNodeRegisterReq;
@@ -107,6 +106,7 @@ import org.apache.iotdb.confignode.rpc.thrift.TDropTopicReq;
import org.apache.iotdb.confignode.rpc.thrift.TDropTriggerReq;
import org.apache.iotdb.confignode.rpc.thrift.TExtendRegionReq;
import org.apache.iotdb.confignode.rpc.thrift.TFetchTableResp;
+import org.apache.iotdb.confignode.rpc.thrift.TGetAINodeLocationResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetAllPipeInfoResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetAllSubscriptionInfoResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetAllTemplatesResp;
@@ -132,7 +132,6 @@ import org.apache.iotdb.confignode.rpc.thrift.TGetTimeSlotListResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetTriggerTableResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetUDFTableResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetUdfTableReq;
-import org.apache.iotdb.confignode.rpc.thrift.TLoadModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TLoginReq;
import org.apache.iotdb.confignode.rpc.thrift.TMigrateRegionReq;
import org.apache.iotdb.confignode.rpc.thrift.TPermissionInfoResp;
@@ -150,7 +149,6 @@ import org.apache.iotdb.confignode.rpc.thrift.TSetDataReplicationFactorReq;
import org.apache.iotdb.confignode.rpc.thrift.TSetSchemaReplicationFactorReq;
import org.apache.iotdb.confignode.rpc.thrift.TSetSchemaTemplateReq;
import org.apache.iotdb.confignode.rpc.thrift.TSetTimePartitionIntervalReq;
-import org.apache.iotdb.confignode.rpc.thrift.TShowAIDevicesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowAINodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowCQResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowClusterResp;
@@ -159,10 +157,6 @@ import org.apache.iotdb.confignode.rpc.thrift.TShowConfigNodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDataNodes4InformationSchemaResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDataNodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDatabaseResp;
-import org.apache.iotdb.confignode.rpc.thrift.TShowLoadedModelReq;
-import org.apache.iotdb.confignode.rpc.thrift.TShowLoadedModelResp;
-import org.apache.iotdb.confignode.rpc.thrift.TShowModelReq;
-import org.apache.iotdb.confignode.rpc.thrift.TShowModelResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowPipePluginReq;
import org.apache.iotdb.confignode.rpc.thrift.TShowPipeReq;
import org.apache.iotdb.confignode.rpc.thrift.TShowPipeResp;
@@ -184,7 +178,6 @@ import org.apache.iotdb.confignode.rpc.thrift.TSubscribeReq;
import org.apache.iotdb.confignode.rpc.thrift.TSystemConfigurationResp;
import org.apache.iotdb.confignode.rpc.thrift.TTestOperation;
import org.apache.iotdb.confignode.rpc.thrift.TThrottleQuotaResp;
-import org.apache.iotdb.confignode.rpc.thrift.TUnloadModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TUnsetSchemaTemplateReq;
import org.apache.iotdb.confignode.rpc.thrift.TUnsubscribeReq;
import org.apache.iotdb.confignode.rpc.thrift.TUpdateModelInfoReq;
@@ -505,6 +498,11 @@ public class ConfigNodeClient implements IConfigNodeRPCService.Iface, ThriftClie
throw new UnsupportedOperationException(UNSUPPORTED_INVOCATION);
}
+ @Override
+ public TGetAINodeLocationResp getAINodeLocation() throws TException {
+ return client.getAINodeLocation();
+ }
+
@Override
public TSStatus removeAINode(TAINodeRemoveReq req) throws TException {
return executeRemoteCallWithRetry(
@@ -1313,53 +1311,16 @@ public class ConfigNodeClient implements IConfigNodeRPCService.Iface, ThriftClie
() -> client.dropModel(req), status -> !updateConfigNodeLeader(status));
}
- @Override
- public TShowModelResp showModel(TShowModelReq req) throws TException {
- return executeRemoteCallWithRetry(
- () -> client.showModel(req), resp -> !updateConfigNodeLeader(resp.status));
- }
-
- @Override
- public TShowLoadedModelResp showLoadedModel(TShowLoadedModelReq req) throws TException {
- return executeRemoteCallWithRetry(
- () -> client.showLoadedModel(req), resp -> !updateConfigNodeLeader(resp.status));
- }
-
- @Override
- public TShowAIDevicesResp showAIDevices() throws TException {
- return executeRemoteCallWithRetry(
- () -> client.showAIDevices(), resp -> !updateConfigNodeLeader(resp.status));
- }
-
- @Override
- public TSStatus loadModel(TLoadModelReq req) throws TException {
- return executeRemoteCallWithRetry(
- () -> client.loadModel(req), status -> !updateConfigNodeLeader(status));
- }
-
- public TSStatus unloadModel(TUnloadModelReq req) throws TException {
- return executeRemoteCallWithRetry(
- () -> client.unloadModel(req), status -> !updateConfigNodeLeader(status));
- }
-
- @Override
public TGetModelInfoResp getModelInfo(TGetModelInfoReq req) throws TException {
return executeRemoteCallWithRetry(
() -> client.getModelInfo(req), resp -> !updateConfigNodeLeader(resp.getStatus()));
}
- @Override
public TSStatus updateModelInfo(TUpdateModelInfoReq req) throws TException {
return executeRemoteCallWithRetry(
() -> client.updateModelInfo(req), status -> !updateConfigNodeLeader(status));
}
- @Override
- public TSStatus createTraining(TCreateTrainingReq req) throws TException {
- return executeRemoteCallWithRetry(
- () -> client.createTraining(req), status -> !updateConfigNodeLeader(status));
- }
-
@Override
public TSStatus setSpaceQuota(TSetSpaceQuotaReq req) throws TException {
return executeRemoteCallWithRetry(
diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/ainode/AINodeClient.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ainode/AINodeClient.java
similarity index 72%
rename from iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/ainode/AINodeClient.java
rename to iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ainode/AINodeClient.java
index d82647c141a..fbb6a862c36 100644
--- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/ainode/AINodeClient.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ainode/AINodeClient.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.iotdb.commons.client.ainode;
+package org.apache.iotdb.db.protocol.client.ainode;
import org.apache.iotdb.ainode.rpc.thrift.IAINodeRPCService;
import org.apache.iotdb.ainode.rpc.thrift.TConfigs;
@@ -37,14 +37,20 @@ import org.apache.iotdb.ainode.rpc.thrift.TShowModelsResp;
import org.apache.iotdb.ainode.rpc.thrift.TTrainingReq;
import org.apache.iotdb.ainode.rpc.thrift.TUnloadModelReq;
import org.apache.iotdb.ainode.rpc.thrift.TWindowParams;
+import org.apache.iotdb.common.rpc.thrift.TAINodeLocation;
import org.apache.iotdb.common.rpc.thrift.TEndPoint;
import org.apache.iotdb.common.rpc.thrift.TSStatus;
import org.apache.iotdb.commons.client.ClientManager;
+import org.apache.iotdb.commons.client.IClientManager;
import org.apache.iotdb.commons.client.ThriftClient;
import org.apache.iotdb.commons.client.factory.ThriftClientFactory;
import org.apache.iotdb.commons.client.property.ThriftClientProperty;
import org.apache.iotdb.commons.exception.ainode.LoadModelException;
import org.apache.iotdb.commons.model.ModelInformation;
+import org.apache.iotdb.confignode.rpc.thrift.TGetAINodeLocationResp;
+import org.apache.iotdb.db.protocol.client.ConfigNodeClient;
+import org.apache.iotdb.db.protocol.client.ConfigNodeClientManager;
+import org.apache.iotdb.db.protocol.client.ConfigNodeInfo;
import org.apache.iotdb.rpc.TConfigurationConst;
import org.apache.iotdb.rpc.TSStatusCode;
@@ -64,6 +70,7 @@ import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.util.Map;
import java.util.Optional;
+import java.util.concurrent.atomic.AtomicReference;
import static org.apache.iotdb.rpc.TSStatusCode.CAN_NOT_CONNECT_AINODE;
import static org.apache.iotdb.rpc.TSStatusCode.INTERNAL_SERVER_ERROR;
@@ -72,7 +79,9 @@ public class AINodeClient implements AutoCloseable, ThriftClient {
private static final Logger logger = LoggerFactory.getLogger(AINodeClient.class);
- private final TEndPoint endPoint;
+ private static final CommonConfig commonConfig = CommonDescriptor.getInstance().getConfig();
+
+ private TEndPoint endPoint;
private TTransport transport;
@@ -81,11 +90,90 @@ public class AINodeClient implements AutoCloseable, ThriftClient {
public static final String MSG_CONNECTION_FAIL =
"Fail to connect to AINode. Please check status of AINode";
+ private static final int MAX_RETRY = 3;
+
+ @FunctionalInterface
+ private interface RemoteCall<R> {
+ R apply(IAINodeRPCService.Client c) throws TException;
+ }
private final TsBlockSerde tsBlockSerde = new TsBlockSerde();
ClientManager<TEndPoint, AINodeClient> clientManager;
+ private static final IClientManager<ConfigRegionId, ConfigNodeClient> CONFIG_NODE_CLIENT_MANAGER =
+ ConfigNodeClientManager.getInstance();
+
+ private static final AtomicReference<TAINodeLocation> CURRENT_LOCATION = new AtomicReference<>();
+
+ public static TEndPoint getCurrentEndpoint() {
+ TAINodeLocation loc = CURRENT_LOCATION.get();
+ if (loc == null) {
+ loc = refreshFromConfigNode();
+ }
+ return (loc == null) ? null : pickEndpointFrom(loc);
+ }
+
+ public static void updateGlobalAINodeLocation(final TAINodeLocation loc) {
+ if (loc != null) {
+ CURRENT_LOCATION.set(loc);
+ }
+ }
+
+ private <R> R executeRemoteCallWithRetry(RemoteCall<R> call) throws TException {
+ TException last = null;
+ for (int attempt = 1; attempt <= MAX_RETRY; attempt++) {
+ try {
+ if (transport == null || !transport.isOpen()) {
+ final TEndPoint ep = getCurrentEndpoint();
+ if (ep == null) {
+ throw new TException("AINode endpoint unavailable");
+ }
+ this.endPoint = ep;
+ init();
+ }
+ return call.apply(client);
+ } catch (TException e) {
+ last = e;
+ invalidate();
+ final TAINodeLocation loc = refreshFromConfigNode();
+ if (loc != null) {
+ this.endPoint = pickEndpointFrom(loc);
+ }
+ try {
+ Thread.sleep(1000L * attempt);
+ } catch (InterruptedException ie) {
+ Thread.currentThread().interrupt();
+ }
+ }
+ }
+ throw (last != null ? last : new TException(MSG_CONNECTION_FAIL));
+ }
+
+ private static TAINodeLocation refreshFromConfigNode() {
+ try (final ConfigNodeClient cn =
+ CONFIG_NODE_CLIENT_MANAGER.borrowClient(ConfigNodeInfo.CONFIG_REGION_ID)) {
+ final TGetAINodeLocationResp resp = cn.getAINodeLocation();
+ if (resp != null && resp.isSetAiNodeLocation()) {
+ final TAINodeLocation loc = resp.getAiNodeLocation();
+ CURRENT_LOCATION.set(loc);
+ return loc;
+ }
+ } catch (Exception e) {
+ LoggerFactory.getLogger(AINodeClient.class)
+ .debug("[AINodeClient] refreshFromConfigNode failed: {}", e.toString());
+ }
+ return null;
+ }
+
+ private static TEndPoint pickEndpointFrom(final TAINodeLocation loc) {
+ if (loc == null) return null;
+ if (loc.isSetInternalEndPoint() && loc.getInternalEndPoint() != null) {
+ return loc.getInternalEndPoint();
+ }
+ return null;
+ }
+
public AINodeClient(
ThriftClientProperty property,
TEndPoint endPoint,
@@ -93,6 +181,7 @@ public class AINodeClient implements AutoCloseable, ThriftClient {
throws TException {
this.property = property;
this.clientManager = clientManager;
+ // Instance default endpoint (pool key). Global location can override it on retries.
this.endPoint = endPoint;
init();
}
@@ -168,76 +257,28 @@ public class AINodeClient implements AutoCloseable, ThriftClient {
modelName, inputShape, outputShape, inputType, outputType, attributes);
}
- public TSStatus deleteModel(String modelId) throws TException {
- try {
- return client.deleteModel(new TDeleteModelReq(modelId));
- } catch (TException e) {
- logger.warn(
- "Failed to connect to AINode from ConfigNode when executing {}: {}",
- Thread.currentThread().getStackTrace()[1].getMethodName(),
- e.getMessage());
- throw new TException(MSG_CONNECTION_FAIL);
- }
+ public TSStatus deleteModel(TDeleteModelReq req) throws TException {
+ return executeRemoteCallWithRetry(c -> c.deleteModel(req));
}
public TSStatus loadModel(TLoadModelReq req) throws TException {
- try {
- return client.loadModel(req);
- } catch (TException e) {
- logger.warn(
- "Failed to connect to AINode from ConfigNode when executing {}: {}",
- Thread.currentThread().getStackTrace()[1].getMethodName(),
- e.getMessage());
- throw new TException(MSG_CONNECTION_FAIL);
- }
+ return executeRemoteCallWithRetry(c -> c.loadModel(req));
}
public TSStatus unloadModel(TUnloadModelReq req) throws TException {
- try {
- return client.unloadModel(req);
- } catch (TException e) {
- logger.warn(
- "Failed to connect to AINode from ConfigNode when executing {}: {}",
- Thread.currentThread().getStackTrace()[1].getMethodName(),
- e.getMessage());
- throw new TException(MSG_CONNECTION_FAIL);
- }
+ return executeRemoteCallWithRetry(c -> c.unloadModel(req));
}
public TShowModelsResp showModels(TShowModelsReq req) throws TException {
- try {
- return client.showModels(req);
- } catch (TException e) {
- logger.warn(
- "Failed to connect to AINode from ConfigNode when executing {}: {}",
- Thread.currentThread().getStackTrace()[1].getMethodName(),
- e.getMessage());
- throw new TException(MSG_CONNECTION_FAIL);
- }
+ return executeRemoteCallWithRetry(c -> c.showModels(req));
}
public TShowLoadedModelsResp showLoadedModels(TShowLoadedModelsReq req) throws TException {
- try {
- return client.showLoadedModels(req);
- } catch (TException e) {
- logger.warn(
- "Failed to connect to AINode from ConfigNode when executing {}: {}",
- Thread.currentThread().getStackTrace()[1].getMethodName(),
- e.getMessage());
- throw new TException(MSG_CONNECTION_FAIL);
- }
+ return executeRemoteCallWithRetry(c -> c.showLoadedModels(req));
}
public TShowAIDevicesResp showAIDevices() throws TException {
- try {
- return client.showAIDevices();
- } catch (TException e) {
- logger.warn(
- "Failed to connect to AINode from ConfigNode when executing {}: {}",
- Thread.currentThread().getStackTrace()[1].getMethodName(),
- e.getMessage());
- throw new TException(MSG_CONNECTION_FAIL);
- }
+ return executeRemoteCallWithRetry(IAINodeRPCService.Client::showAIDevices);
}
public TInferenceResp inference(
@@ -254,7 +295,7 @@ public class AINodeClient implements AutoCloseable, ThriftClient {
if (inferenceAttributes != null) {
inferenceReq.setInferenceAttributes(inferenceAttributes);
}
- return client.inference(inferenceReq);
+ return executeRemoteCallWithRetry(c -> c.inference(inferenceReq));
} catch (IOException e) {
throw new TException("An exception occurred while serializing input data", e);
} catch (TException e) {
@@ -272,7 +313,7 @@ public class AINodeClient implements AutoCloseable, ThriftClient {
TForecastReq forecastReq =
new TForecastReq(modelId, tsBlockSerde.serialize(inputTsBlock), outputLength);
forecastReq.setOptions(options);
- return client.forecast(forecastReq);
+ return executeRemoteCallWithRetry(c -> c.forecast(forecastReq));
} catch (IOException e) {
TSStatus tsStatus = new TSStatus(INTERNAL_SERVER_ERROR.getStatusCode());
tsStatus.setMessage(String.format("Failed to serialize input tsblock %s", e.getMessage()));
@@ -288,15 +329,7 @@ public class AINodeClient implements AutoCloseable, ThriftClient {
}
public TSStatus createTrainingTask(TTrainingReq req) throws TException {
- try {
- return client.createTrainingTask(req);
- } catch (TException e) {
- logger.warn(
- "Failed to connect to AINode when executing {}: {}",
- Thread.currentThread().getStackTrace()[1].getMethodName(),
- e.getMessage());
- throw new TException(MSG_CONNECTION_FAIL);
- }
+ return executeRemoteCallWithRetry(c -> c.createTrainingTask(req));
}
@Override
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ainode/AINodeClientManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ainode/AINodeClientManager.java
new file mode 100644
index 00000000000..faef1c1ae7b
--- /dev/null
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ainode/AINodeClientManager.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.db.protocol.client.ainode;
+
+import org.apache.iotdb.common.rpc.thrift.TEndPoint;
+import org.apache.iotdb.commons.client.IClientManager;
+import org.apache.iotdb.db.protocol.client.AINodeClientFactory;
+
+public class AINodeClientManager {
+
+ public static final int DEFAULT_AINODE_ID = 0;
+
+ private static final AINodeClientManager INSTANCE = new AINodeClientManager();
+
+ private final IClientManager<TEndPoint, AINodeClient> clientManager;
+
+ private volatile TEndPoint defaultAINodeEndPoint;
+
+ private AINodeClientManager() {
+ this.clientManager =
+ new IClientManager.Factory<TEndPoint, AINodeClient>()
+ .createClientManager(new AINodeClientFactory.AINodeClientPoolFactory());
+ }
+
+ public static AINodeClientManager getInstance() {
+ return INSTANCE;
+ }
+
+ public void updateDefaultAINodeLocation(TEndPoint endPoint) {
+ this.defaultAINodeEndPoint = endPoint;
+ }
+
+ public AINodeClient borrowClient(TEndPoint endPoint) throws Exception {
+ return clientManager.borrowClient(endPoint);
+ }
+
+ public AINodeClient borrowClient(int aiNodeId) throws Exception {
+ if (aiNodeId != DEFAULT_AINODE_ID) {
+ throw new IllegalArgumentException("Unsupported AINodeId: " + aiNodeId);
+ }
+ if (defaultAINodeEndPoint == null) {
+ defaultAINodeEndPoint = AINodeClient.getCurrentEndpoint();
+ }
+ return clientManager.borrowClient(defaultAINodeEndPoint);
+ }
+
+ public void clear(TEndPoint endPoint) {
+ clientManager.clear(endPoint);
+ }
+
+ public void clearAll() {
+ clientManager.close();
+ }
+
+ public IClientManager<TEndPoint, AINodeClient> getRawClientManager() {
+ return clientManager;
+ }
+}
diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/ainode/AsyncAINodeServiceClient.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ainode/AsyncAINodeServiceClient.java
similarity index 98%
rename from iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/ainode/AsyncAINodeServiceClient.java
rename to iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ainode/AsyncAINodeServiceClient.java
index 3276923deb7..5973fad4447 100644
--- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/ainode/AsyncAINodeServiceClient.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ainode/AsyncAINodeServiceClient.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.iotdb.commons.client.ainode;
+package org.apache.iotdb.db.protocol.client.ainode;
import org.apache.iotdb.ainode.rpc.thrift.IAINodeRPCService;
import org.apache.iotdb.common.rpc.thrift.TEndPoint;
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/ai/InferenceOperator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/ai/InferenceOperator.java
index ccdef60aaf0..7126af78b8b 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/ai/InferenceOperator.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/ai/InferenceOperator.java
@@ -21,9 +21,9 @@ package org.apache.iotdb.db.queryengine.execution.operator.process.ai;
import org.apache.iotdb.ainode.rpc.thrift.TInferenceResp;
import org.apache.iotdb.ainode.rpc.thrift.TWindowParams;
-import org.apache.iotdb.commons.client.ainode.AINodeClient;
-import org.apache.iotdb.commons.client.ainode.AINodeClientManager;
import org.apache.iotdb.db.exception.runtime.ModelInferenceProcessException;
+import org.apache.iotdb.db.protocol.client.ainode.AINodeClient;
+import org.apache.iotdb.db.protocol.client.ainode.AINodeClientManager;
import org.apache.iotdb.db.queryengine.execution.MemoryEstimationHelper;
import org.apache.iotdb.db.queryengine.execution.operator.Operator;
import org.apache.iotdb.db.queryengine.execution.operator.OperatorContext;
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/InformationSchemaContentSupplierFactory.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/InformationSchemaContentSupplierFactory.java
index e813a8d494a..3f5ee055649 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/InformationSchemaContentSupplierFactory.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/InformationSchemaContentSupplierFactory.java
@@ -19,11 +19,15 @@
package org.apache.iotdb.db.queryengine.execution.operator.source.relational;
+import org.apache.iotdb.ainode.rpc.thrift.TShowModelsReq;
+import org.apache.iotdb.ainode.rpc.thrift.TShowModelsResp;
import org.apache.iotdb.common.rpc.thrift.Model;
import org.apache.iotdb.common.rpc.thrift.TAINodeLocation;
import org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation;
import org.apache.iotdb.common.rpc.thrift.TConsensusGroupType;
import org.apache.iotdb.common.rpc.thrift.TDataNodeLocation;
+import org.apache.iotdb.common.rpc.thrift.TEndPoint;
+import org.apache.iotdb.commons.audit.UserEntity;
import org.apache.iotdb.commons.conf.IoTDBConstant;
import org.apache.iotdb.commons.exception.IoTDBRuntimeException;
import org.apache.iotdb.commons.exception.auth.AccessDeniedException;
@@ -50,8 +54,6 @@ import org.apache.iotdb.confignode.rpc.thrift.TGetUdfTableReq;
import org.apache.iotdb.confignode.rpc.thrift.TNodeVersionInfo;
import org.apache.iotdb.confignode.rpc.thrift.TRegionInfo;
import org.apache.iotdb.confignode.rpc.thrift.TShowClusterResp;
-import org.apache.iotdb.confignode.rpc.thrift.TShowModelReq;
-import org.apache.iotdb.confignode.rpc.thrift.TShowModelResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowPipeInfo;
import org.apache.iotdb.confignode.rpc.thrift.TShowPipeReq;
import org.apache.iotdb.confignode.rpc.thrift.TShowRegionReq;
@@ -64,6 +66,8 @@ import org.apache.iotdb.db.pipe.metric.overview.PipeDataNodeSinglePipeMetrics;
import org.apache.iotdb.db.protocol.client.ConfigNodeClient;
import org.apache.iotdb.db.protocol.client.ConfigNodeClientManager;
import org.apache.iotdb.db.protocol.client.ConfigNodeInfo;
+import org.apache.iotdb.db.protocol.client.ainode.AINodeClient;
+import org.apache.iotdb.db.protocol.client.ainode.AINodeClientManager;
import org.apache.iotdb.db.protocol.session.IClientSession;
import org.apache.iotdb.db.queryengine.plan.Coordinator;
import org.apache.iotdb.db.queryengine.plan.execution.IQueryExecution;
@@ -776,18 +780,18 @@ public class InformationSchemaContentSupplierFactory {
private ModelsSupplier(final List<TSDataType> dataTypes) throws Exception {
super(dataTypes);
- try (final ConfigNodeClient client =
- ConfigNodeClientManager.getInstance().borrowClient(ConfigNodeInfo.CONFIG_REGION_ID)) {
- iterator = new ModelIterator(client.showModel(new TShowModelReq()));
+ final TEndPoint ep = AINodeClient.getCurrentEndpoint();
+ try (final AINodeClient ai = AINodeClientManager.getInstance().borrowClient(ep)) {
+ iterator = new ModelIterator(ai.showModels(new TShowModelsReq()));
}
}
private static class ModelIterator implements Iterator<ModelInfoInString> {
private int index = 0;
- private final TShowModelResp resp;
+ private final TShowModelsResp resp;
- private ModelIterator(TShowModelResp resp) {
+ private ModelIterator(TShowModelsResp resp) {
this.resp = resp;
}
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
index 3be231b8c10..6a1d7fb5c10 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
@@ -19,6 +19,14 @@
package org.apache.iotdb.db.queryengine.plan.execution.config.executor;
+import org.apache.iotdb.ainode.rpc.thrift.TLoadModelReq;
+import org.apache.iotdb.ainode.rpc.thrift.TShowAIDevicesResp;
+import org.apache.iotdb.ainode.rpc.thrift.TShowLoadedModelsReq;
+import org.apache.iotdb.ainode.rpc.thrift.TShowLoadedModelsResp;
+import org.apache.iotdb.ainode.rpc.thrift.TShowModelsReq;
+import org.apache.iotdb.ainode.rpc.thrift.TShowModelsResp;
+import org.apache.iotdb.ainode.rpc.thrift.TTrainingReq;
+import org.apache.iotdb.ainode.rpc.thrift.TUnloadModelReq;
import org.apache.iotdb.common.rpc.thrift.FunctionType;
import org.apache.iotdb.common.rpc.thrift.Model;
import org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation;
@@ -89,12 +97,9 @@ import org.apache.iotdb.confignode.rpc.thrift.TCreatePipePluginReq;
import org.apache.iotdb.confignode.rpc.thrift.TCreatePipeReq;
import org.apache.iotdb.confignode.rpc.thrift.TCreateTableViewReq;
import org.apache.iotdb.confignode.rpc.thrift.TCreateTopicReq;
-import org.apache.iotdb.confignode.rpc.thrift.TCreateTrainingReq;
import org.apache.iotdb.confignode.rpc.thrift.TCreateTriggerReq;
import org.apache.iotdb.confignode.rpc.thrift.TDataNodeRemoveReq;
import org.apache.iotdb.confignode.rpc.thrift.TDataNodeRemoveResp;
-import org.apache.iotdb.confignode.rpc.thrift.TDataSchemaForTable;
-import org.apache.iotdb.confignode.rpc.thrift.TDataSchemaForTree;
import org.apache.iotdb.confignode.rpc.thrift.TDatabaseSchema;
import org.apache.iotdb.confignode.rpc.thrift.TDeactivateSchemaTemplateReq;
import org.apache.iotdb.confignode.rpc.thrift.TDeleteDatabasesReq;
@@ -125,24 +130,18 @@ import org.apache.iotdb.confignode.rpc.thrift.TGetTimeSlotListResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetTriggerTableResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetUDFTableResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetUdfTableReq;
-import org.apache.iotdb.confignode.rpc.thrift.TLoadModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TMigrateRegionReq;
import org.apache.iotdb.confignode.rpc.thrift.TPipeConfigTransferReq;
import org.apache.iotdb.confignode.rpc.thrift.TPipeConfigTransferResp;
import org.apache.iotdb.confignode.rpc.thrift.TReconstructRegionReq;
import org.apache.iotdb.confignode.rpc.thrift.TRegionInfo;
import org.apache.iotdb.confignode.rpc.thrift.TRemoveRegionReq;
-import org.apache.iotdb.confignode.rpc.thrift.TShowAIDevicesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowAINodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowCQResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowClusterResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowConfigNodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDataNodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDatabaseResp;
-import org.apache.iotdb.confignode.rpc.thrift.TShowLoadedModelReq;
-import org.apache.iotdb.confignode.rpc.thrift.TShowLoadedModelResp;
-import org.apache.iotdb.confignode.rpc.thrift.TShowModelReq;
-import org.apache.iotdb.confignode.rpc.thrift.TShowModelResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowPipeInfo;
import org.apache.iotdb.confignode.rpc.thrift.TShowPipePluginReq;
import org.apache.iotdb.confignode.rpc.thrift.TShowPipeReq;
@@ -160,7 +159,6 @@ import org.apache.iotdb.confignode.rpc.thrift.TSpaceQuotaResp;
import org.apache.iotdb.confignode.rpc.thrift.TStartPipeReq;
import org.apache.iotdb.confignode.rpc.thrift.TStopPipeReq;
import org.apache.iotdb.confignode.rpc.thrift.TThrottleQuotaResp;
-import org.apache.iotdb.confignode.rpc.thrift.TUnloadModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TUnsetSchemaTemplateReq;
import org.apache.iotdb.db.conf.IoTDBDescriptor;
import org.apache.iotdb.db.exception.BatchProcessException;
@@ -173,6 +171,8 @@ import org.apache.iotdb.db.protocol.client.ConfigNodeClient;
import org.apache.iotdb.db.protocol.client.ConfigNodeClientManager;
import org.apache.iotdb.db.protocol.client.ConfigNodeInfo;
import org.apache.iotdb.db.protocol.client.DataNodeClientPoolFactory;
+import org.apache.iotdb.db.protocol.client.ainode.AINodeClient;
+import org.apache.iotdb.db.protocol.client.ainode.AINodeClientManager;
import org.apache.iotdb.db.protocol.session.IClientSession;
import org.apache.iotdb.db.protocol.session.SessionManager;
import org.apache.iotdb.db.queryengine.common.MPPQueryContext;
@@ -3370,20 +3370,19 @@ public class ClusterConfigTaskExecutor implements IConfigTaskExecutor {
@Override
public SettableFuture<ConfigTaskResult> showModels(final String modelId) {
final SettableFuture<ConfigTaskResult> future = SettableFuture.create();
- try (final ConfigNodeClient client =
- CONFIG_NODE_CLIENT_MANAGER.borrowClient(ConfigNodeInfo.CONFIG_REGION_ID)) {
- final TShowModelReq req = new TShowModelReq();
+ try (final AINodeClient ai =
+ AINodeClientManager.getInstance().borrowClient(AINodeClientManager.DEFAULT_AINODE_ID)) {
+ final TShowModelsReq req = new TShowModelsReq();
if (modelId != null) {
req.setModelId(modelId);
}
- final TShowModelResp showModelResp = client.showModel(req);
- if (showModelResp.getStatus().getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
- future.setException(new IoTDBException(showModelResp.getStatus()));
+ final TShowModelsResp resp = ai.showModels(req);
+ if (resp.getStatus().getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
+ future.setException(new IoTDBException(resp.getStatus()));
return future;
}
- // convert model info list and buildTsBlock
- ShowModelsTask.buildTsBlock(showModelResp, future);
- } catch (final ClientManagerException | TException e) {
+ ShowModelsTask.buildTsBlock(resp, future);
+ } catch (final Exception e) {
future.setException(e);
}
return future;
@@ -3392,21 +3391,17 @@ public class ClusterConfigTaskExecutor implements IConfigTaskExecutor {
@Override
public SettableFuture<ConfigTaskResult> showLoadedModels(List<String> deviceIdList) {
final SettableFuture<ConfigTaskResult> future = SettableFuture.create();
- try (final ConfigNodeClient client =
- CONFIG_NODE_CLIENT_MANAGER.borrowClient(ConfigNodeInfo.CONFIG_REGION_ID)) {
- final TShowLoadedModelReq req = new TShowLoadedModelReq();
- if (deviceIdList != null) {
- req.setDeviceIdList(deviceIdList);
- } else {
- req.setDeviceIdList(new ArrayList<>());
- }
- final TShowLoadedModelResp resp = client.showLoadedModel(req);
+ try (final AINodeClient ai =
+ AINodeClientManager.getInstance().borrowClient(AINodeClientManager.DEFAULT_AINODE_ID)) {
+ final TShowLoadedModelsReq req = new TShowLoadedModelsReq();
+ req.setDeviceIdList(deviceIdList != null ? deviceIdList : new ArrayList<>());
+ final TShowLoadedModelsResp resp = ai.showLoadedModels(req);
if (resp.getStatus().getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
future.setException(new IoTDBException(resp.getStatus()));
return future;
}
ShowLoadedModelsTask.buildTsBlock(resp, future);
- } catch (final ClientManagerException | TException e) {
+ } catch (final Exception e) {
future.setException(e);
}
return future;
@@ -3415,15 +3410,15 @@ public class ClusterConfigTaskExecutor implements IConfigTaskExecutor {
@Override
public SettableFuture<ConfigTaskResult> showAIDevices() {
final SettableFuture<ConfigTaskResult> future = SettableFuture.create();
- try (final ConfigNodeClient client =
- CONFIG_NODE_CLIENT_MANAGER.borrowClient(ConfigNodeInfo.CONFIG_REGION_ID)) {
- final TShowAIDevicesResp resp = client.showAIDevices();
+ try (final AINodeClient ai =
+ AINodeClientManager.getInstance().borrowClient(AINodeClientManager.DEFAULT_AINODE_ID)) {
+ final TShowAIDevicesResp resp = ai.showAIDevices();
if (resp.getStatus().getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
future.setException(new IoTDBException(resp.getStatus()));
return future;
}
ShowAIDevicesTask.buildTsBlock(resp, future);
- } catch (final ClientManagerException | TException e) {
+ } catch (final Exception e) {
future.setException(e);
}
return future;
@@ -3433,16 +3428,16 @@ public class ClusterConfigTaskExecutor implements IConfigTaskExecutor {
public SettableFuture<ConfigTaskResult> loadModel(
String existingModelId, List<String> deviceIdList) {
final SettableFuture<ConfigTaskResult> future = SettableFuture.create();
- try (final ConfigNodeClient client =
- CONFIG_NODE_CLIENT_MANAGER.borrowClient(ConfigNodeInfo.CONFIG_REGION_ID)) {
+ try (final AINodeClient ai =
+ AINodeClientManager.getInstance().borrowClient(AINodeClientManager.DEFAULT_AINODE_ID)) {
final TLoadModelReq req = new TLoadModelReq(existingModelId, deviceIdList);
- final TSStatus result = client.loadModel(req);
+ final TSStatus result = ai.loadModel(req);
if (TSStatusCode.SUCCESS_STATUS.getStatusCode() != result.getCode()) {
future.setException(new IoTDBException(result));
} else {
future.set(new ConfigTaskResult(TSStatusCode.SUCCESS_STATUS));
}
- } catch (final ClientManagerException | TException e) {
+ } catch (final Exception e) {
future.setException(e);
}
return future;
@@ -3452,16 +3447,16 @@ public class ClusterConfigTaskExecutor implements IConfigTaskExecutor {
public SettableFuture<ConfigTaskResult> unloadModel(
String existingModelId, List<String> deviceIdList) {
final SettableFuture<ConfigTaskResult> future = SettableFuture.create();
- try (final ConfigNodeClient client =
- CONFIG_NODE_CLIENT_MANAGER.borrowClient(ConfigNodeInfo.CONFIG_REGION_ID)) {
+ try (final AINodeClient ai =
+ AINodeClientManager.getInstance().borrowClient(AINodeClientManager.DEFAULT_AINODE_ID)) {
final TUnloadModelReq req = new TUnloadModelReq(existingModelId, deviceIdList);
- final TSStatus result = client.unloadModel(req);
+ final TSStatus result = ai.unloadModel(req);
if (TSStatusCode.SUCCESS_STATUS.getStatusCode() != result.getCode()) {
future.setException(new IoTDBException(result));
} else {
future.set(new ConfigTaskResult(TSStatusCode.SUCCESS_STATUS));
}
- } catch (final ClientManagerException | TException e) {
+ } catch (final Exception e) {
future.setException(e);
}
return future;
@@ -3477,28 +3472,24 @@ public class ClusterConfigTaskExecutor implements IConfigTaskExecutor {
@Nullable String targetSql,
@Nullable List<String> pathList) {
final SettableFuture<ConfigTaskResult> future = SettableFuture.create();
- try (final ConfigNodeClient client =
- CONFIG_NODE_CLIENT_MANAGER.borrowClient(ConfigNodeInfo.CONFIG_REGION_ID)) {
- final TCreateTrainingReq req = new TCreateTrainingReq(modelId, isTableModel, existingModelId);
-
- if (isTableModel) {
- TDataSchemaForTable dataSchemaForTable = new TDataSchemaForTable();
- dataSchemaForTable.setTargetSql(targetSql);
- req.setDataSchemaForTable(dataSchemaForTable);
- } else {
- TDataSchemaForTree dataSchemaForTree = new TDataSchemaForTree();
- dataSchemaForTree.setPath(pathList);
- req.setDataSchemaForTree(dataSchemaForTree);
- }
+ try (final AINodeClient ai =
+ AINodeClientManager.getInstance().borrowClient(AINodeClientManager.DEFAULT_AINODE_ID)) {
+ final TTrainingReq req = new TTrainingReq();
+ req.setModelId(modelId);
req.setParameters(parameters);
- req.setTimeRanges(timeRanges);
- final TSStatus executionStatus = client.createTraining(req);
- if (TSStatusCode.SUCCESS_STATUS.getStatusCode() != executionStatus.getCode()) {
- future.setException(new IoTDBException(executionStatus));
+ if (existingModelId != null) {
+ req.setExistingModelId(existingModelId);
+ }
+ if (existingModelId != null) {
+ req.setExistingModelId(existingModelId);
+ }
+ final TSStatus status = ai.createTrainingTask(req);
+ if (TSStatusCode.SUCCESS_STATUS.getStatusCode() != status.getCode()) {
+ future.setException(new IoTDBException(status));
} else {
future.set(new ConfigTaskResult(TSStatusCode.SUCCESS_STATUS));
}
- } catch (final ClientManagerException | TException e) {
+ } catch (final Exception e) {
future.setException(e);
}
return future;
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/ai/ShowAIDevicesTask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/ai/ShowAIDevicesTask.java
index d2cdd967595..690f6f9485f 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/ai/ShowAIDevicesTask.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/ai/ShowAIDevicesTask.java
@@ -19,9 +19,9 @@
package org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ai;
+import org.apache.iotdb.ainode.rpc.thrift.TShowAIDevicesResp;
import org.apache.iotdb.commons.schema.column.ColumnHeader;
import org.apache.iotdb.commons.schema.column.ColumnHeaderConstant;
-import org.apache.iotdb.confignode.rpc.thrift.TShowAIDevicesResp;
import org.apache.iotdb.db.queryengine.common.header.DatasetHeader;
import org.apache.iotdb.db.queryengine.common.header.DatasetHeaderFactory;
import org.apache.iotdb.db.queryengine.plan.execution.config.ConfigTaskResult;
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/ai/ShowLoadedModelsTask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/ai/ShowLoadedModelsTask.java
index 5beb8a6a5aa..c8c6f8938f7 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/ai/ShowLoadedModelsTask.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/ai/ShowLoadedModelsTask.java
@@ -19,9 +19,9 @@
package org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ai;
+import org.apache.iotdb.ainode.rpc.thrift.TShowLoadedModelsResp;
import org.apache.iotdb.commons.schema.column.ColumnHeader;
import org.apache.iotdb.commons.schema.column.ColumnHeaderConstant;
-import org.apache.iotdb.confignode.rpc.thrift.TShowLoadedModelResp;
import org.apache.iotdb.db.queryengine.common.header.DatasetHeader;
import org.apache.iotdb.db.queryengine.common.header.DatasetHeaderFactory;
import org.apache.iotdb.db.queryengine.plan.execution.config.ConfigTaskResult;
@@ -54,7 +54,7 @@ public class ShowLoadedModelsTask implements IConfigTask {
}
public static void buildTsBlock(
- TShowLoadedModelResp resp, SettableFuture<ConfigTaskResult> future) {
+ TShowLoadedModelsResp resp, SettableFuture<ConfigTaskResult> future) {
List<TSDataType> outputDataTypes =
ColumnHeaderConstant.showLoadedModelsColumnHeaders.stream()
.map(ColumnHeader::getColumnType)
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/ai/ShowModelsTask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/ai/ShowModelsTask.java
index 73c5b1b6f7d..c0d7f4ef203 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/ai/ShowModelsTask.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/ai/ShowModelsTask.java
@@ -19,9 +19,9 @@
package org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ai;
+import org.apache.iotdb.ainode.rpc.thrift.TShowModelsResp;
import org.apache.iotdb.commons.schema.column.ColumnHeader;
import org.apache.iotdb.commons.schema.column.ColumnHeaderConstant;
-import org.apache.iotdb.confignode.rpc.thrift.TShowModelResp;
import org.apache.iotdb.db.queryengine.common.header.DatasetHeader;
import org.apache.iotdb.db.queryengine.common.header.DatasetHeaderFactory;
import org.apache.iotdb.db.queryengine.plan.execution.config.ConfigTaskResult;
@@ -59,7 +59,7 @@ public class ShowModelsTask implements IConfigTask {
return configTaskExecutor.showModels(modelName);
}
- public static void buildTsBlock(TShowModelResp resp, SettableFuture<ConfigTaskResult> future) {
+ public static void buildTsBlock(TShowModelsResp resp, SettableFuture<ConfigTaskResult> future) {
List<String> modelIdList = resp.getModelIdList();
Map<String, String> modelTypeMap = resp.getModelTypeMap();
Map<String, String> categoryMap = resp.getCategoryMap();
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/function/tvf/ForecastTableFunction.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/function/tvf/ForecastTableFunction.java
index 5521062a24e..887d7c26d30 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/function/tvf/ForecastTableFunction.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/function/tvf/ForecastTableFunction.java
@@ -21,11 +21,10 @@ package org.apache.iotdb.db.queryengine.plan.relational.function.tvf;
import org.apache.iotdb.ainode.rpc.thrift.TForecastResp;
import org.apache.iotdb.common.rpc.thrift.TEndPoint;
-import org.apache.iotdb.commons.client.IClientManager;
-import org.apache.iotdb.commons.client.ainode.AINodeClient;
-import org.apache.iotdb.commons.client.ainode.AINodeClientManager;
import org.apache.iotdb.commons.exception.IoTDBRuntimeException;
import org.apache.iotdb.db.exception.sql.SemanticException;
+import org.apache.iotdb.db.protocol.client.ainode.AINodeClient;
+import org.apache.iotdb.db.protocol.client.ainode.AINodeClientManager;
import org.apache.iotdb.db.queryengine.plan.analyze.IModelFetcher;
import org.apache.iotdb.db.queryengine.plan.planner.plan.parameter.model.ModelInferenceDescriptor;
import org.apache.iotdb.rpc.TSStatusCode;
@@ -457,8 +456,7 @@ public class ForecastTableFunction implements TableFunction {
private static class ForecastDataProcessor implements TableFunctionDataProcessor {
private static final TsBlockSerde SERDE = new TsBlockSerde();
- private static final IClientManager<TEndPoint, AINodeClient> CLIENT_MANAGER =
- AINodeClientManager.getInstance();
+ private static final AINodeClientManager CLIENT_MANAGER = AINodeClientManager.getInstance();
private final TEndPoint targetAINode;
private final String modelId;
diff --git a/iotdb-core/node-commons/pom.xml b/iotdb-core/node-commons/pom.xml
index 91ea3e6e079..cbc07cdf181 100644
--- a/iotdb-core/node-commons/pom.xml
+++ b/iotdb-core/node-commons/pom.xml
@@ -194,12 +194,6 @@
<groupId>com.timecho.ratis</groupId>
<artifactId>ratis-common</artifactId>
</dependency>
- <dependency>
- <groupId>org.apache.iotdb</groupId>
- <artifactId>iotdb-thrift-ainode</artifactId>
- <version>2.0.6-SNAPSHOT</version>
- <scope>compile</scope>
- </dependency>
</dependencies>
<build>
<resources>
diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/ClientPoolFactory.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/ClientPoolFactory.java
index 32c6345dc27..106d67b6279 100644
--- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/ClientPoolFactory.java
+++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/ClientPoolFactory.java
@@ -20,8 +20,6 @@
package org.apache.iotdb.commons.client;
import org.apache.iotdb.common.rpc.thrift.TEndPoint;
-import org.apache.iotdb.commons.client.ainode.AINodeClient;
-import org.apache.iotdb.commons.client.ainode.AsyncAINodeServiceClient;
import org.apache.iotdb.commons.client.async.AsyncConfigNodeInternalServiceClient;
import org.apache.iotdb.commons.client.async.AsyncDataNodeExternalServiceClient;
import org.apache.iotdb.commons.client.async.AsyncDataNodeInternalServiceClient;
@@ -325,56 +323,6 @@ public class ClientPoolFactory {
}
}
- public static class AsyncAINodeHeartbeatServiceClientPoolFactory
- implements IClientPoolFactory<TEndPoint, AsyncAINodeServiceClient> {
- @Override
- public GenericKeyedObjectPool<TEndPoint, AsyncAINodeServiceClient> createClientPool(
- ClientManager<TEndPoint, AsyncAINodeServiceClient> manager) {
- GenericKeyedObjectPool<TEndPoint, AsyncAINodeServiceClient> clientPool =
- new GenericKeyedObjectPool<>(
- new AsyncAINodeServiceClient.Factory(
- manager,
- new ThriftClientProperty.Builder()
- .setConnectionTimeoutMs(conf.getCnConnectionTimeoutInMS())
- .setRpcThriftCompressionEnabled(conf.isRpcThriftCompressionEnabled())
- .setSelectorNumOfAsyncClientManager(conf.getSelectorNumOfClientManager())
- .setPrintLogWhenEncounterException(false)
- .build(),
- ThreadName.ASYNC_DATANODE_HEARTBEAT_CLIENT_POOL.getName()),
- new ClientPoolProperty.Builder<AsyncAINodeServiceClient>()
- .setMaxClientNumForEachNode(conf.getMaxClientNumForEachNode())
- .build()
- .getConfig());
- ClientManagerMetrics.getInstance()
- .registerClientManager(this.getClass().getSimpleName(), clientPool);
- return clientPool;
- }
- }
-
- public static class AINodeClientPoolFactory
- implements IClientPoolFactory<TEndPoint, AINodeClient> {
-
- @Override
- public GenericKeyedObjectPool<TEndPoint, AINodeClient> createClientPool(
- ClientManager<TEndPoint, AINodeClient> manager) {
- GenericKeyedObjectPool<TEndPoint, AINodeClient> clientPool =
- new GenericKeyedObjectPool<>(
- new AINodeClient.Factory(
- manager,
- new ThriftClientProperty.Builder()
- .setConnectionTimeoutMs(conf.getDnConnectionTimeoutInMS())
- .setRpcThriftCompressionEnabled(conf.isRpcThriftCompressionEnabled())
- .build()),
- new ClientPoolProperty.Builder<AINodeClient>()
- .setMaxClientNumForEachNode(conf.getMaxClientNumForEachNode())
- .build()
- .getConfig());
- ClientManagerMetrics.getInstance()
- .registerClientManager(this.getClass().getSimpleName(), clientPool);
- return clientPool;
- }
- }
-
public static class SyncPipeConsensusServiceClientPoolFactory
implements IClientPoolFactory<TEndPoint, SyncPipeConsensusServiceClient> {
diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/ainode/AINodeClientManager.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/ainode/AINodeClientManager.java
deleted file mode 100644
index 3a06e478e7b..00000000000
--- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/ainode/AINodeClientManager.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.iotdb.commons.client.ainode;
-
-import org.apache.iotdb.common.rpc.thrift.TEndPoint;
-import org.apache.iotdb.commons.client.ClientPoolFactory;
-import org.apache.iotdb.commons.client.IClientManager;
-
-public class AINodeClientManager {
- private AINodeClientManager() {
- // Empty constructor
- }
-
- private static final class AINodeClientManagerHolder {
- private static final IClientManager<TEndPoint, AINodeClient> INSTANCE =
- new IClientManager.Factory<TEndPoint, AINodeClient>()
- .createClientManager(new ClientPoolFactory.AINodeClientPoolFactory());
- }
-
- public static IClientManager<TEndPoint, AINodeClient> getInstance() {
- return AINodeClientManagerHolder.INSTANCE;
- }
-}
diff --git a/iotdb-protocol/thrift-confignode/src/main/thrift/confignode.thrift b/iotdb-protocol/thrift-confignode/src/main/thrift/confignode.thrift
index 3df6ad74df7..37f60c9a206 100644
--- a/iotdb-protocol/thrift-confignode/src/main/thrift/confignode.thrift
+++ b/iotdb-protocol/thrift-confignode/src/main/thrift/confignode.thrift
@@ -632,6 +632,13 @@ struct TAINodeInfo {
4: required i32 internalPort
}
+// ----------- New messages -----------
+
+struct TGetAINodeLocationResp {
+ 1: required common.TSStatus status
+ 2: optional common.TAINodeLocation aiNodeLocation
+}
+
struct TShowDataNodes4InformationSchemaResp {
1: required common.TSStatus status
2: optional list<TDataNodeInfo4InformationSchema> dataNodesInfoList
@@ -1058,42 +1065,6 @@ struct TDropModelReq {
1: required string modelId
}
-struct TShowModelReq {
- 1: optional string modelId
-}
-
-struct TShowModelResp {
- 1: required common.TSStatus status
- 2: optional list<string> modelIdList
- 3: optional map<string, string> modelTypeMap
- 4: optional map<string, string> categoryMap
- 5: optional map<string, string> stateMap
-}
-
-struct TShowLoadedModelReq {
- 1: required list<string> deviceIdList
-}
-
-struct TShowLoadedModelResp {
- 1: required common.TSStatus status
- 2: required map<string, map<string, i32>> deviceLoadedModelsMap
-}
-
-struct TShowAIDevicesResp {
- 1: required common.TSStatus status
- 2: required list<string> deviceIdList
-}
-
-struct TLoadModelReq {
- 1: required string existingModelId
- 2: required list<string> deviceIdList
-}
-
-struct TUnloadModelReq {
- 1: required string modelId
- 2: required list<string> deviceIdList
-}
-
struct TGetModelInfoReq {
1: required string modelId
}
@@ -1331,6 +1302,11 @@ service IConfigNodeRPCService {
TAINodeConfigurationResp getAINodeConfiguration(i32 aiNodeId)
+ /**
+ * Return a reachable AINode location.
+ */
+ TGetAINodeLocationResp getAINodeLocation()
+
/**
* Get system configurations. i.e. configurations that is not associated with the DataNodeId
*/
@@ -2004,43 +1980,12 @@ service IConfigNodeRPCService {
common.TSStatus dropModel(TDropModelReq req)
/**
- * Return the model table
- */
- TShowModelResp showModel(TShowModelReq req)
-
- /**
- * Return the loaded model table
- */
- TShowLoadedModelResp showLoadedModel(TShowLoadedModelReq req)
-
- /**
- * Return the available ai devices
- */
- TShowAIDevicesResp showAIDevices()
-
- /**
- * Load an existing model to specific devices
- *
- * @return SUCCESS_STATUS if the model loading task was submitted successfully
- */
- common.TSStatus loadModel(TLoadModelReq req)
-
- /**
- * Unload an existing model to specific devices
- *
- * @return SUCCESS_STATUS if the model unloading task was submitted successfully
- */
- common.TSStatus unloadModel(TUnloadModelReq req)
-
- /**
- * Return the model info by model_id
- */
+ * Return the model info by model_id
+ */
TGetModelInfoResp getModelInfo(TGetModelInfoReq req)
common.TSStatus updateModelInfo(TUpdateModelInfoReq req)
- common.TSStatus createTraining(TCreateTrainingReq req)
-
// ======================================================
// Quota
// ======================================================
(iotdb) 12/15: [AINode] Fix bug that AINode cannot compile in Windows (#16767)
Posted by yo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
yongzao pushed a commit to branch rc/2.0.6
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 3eecb8adcdd9b1367486ea209ba8665ea8cf592f
Author: Yongzao <yo...@apache.org>
AuthorDate: Tue Nov 18 00:15:32 2025 +0800
[AINode] Fix bug that AINode cannot compile in Windows (#16767)
(cherry picked from commit cd443ba9996abe1366b389e3d10f9ecb72cd8d12)
---
iotdb-core/ainode/build_binary.py | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/iotdb-core/ainode/build_binary.py b/iotdb-core/ainode/build_binary.py
index 1b5f99da214..ff99fda0933 100644
--- a/iotdb-core/ainode/build_binary.py
+++ b/iotdb-core/ainode/build_binary.py
@@ -324,7 +324,7 @@ def install_dependencies(venv_python, venv_dir, script_dir):
shutil.rmtree(poetry_venv_path, ignore_errors=True)
poetry_venv_path.parent.mkdir(parents=True, exist_ok=True)
poetry_venv_path.symlink_to(venv_dir)
- print(f"✓ Symlink created successfully")
+ print(f"Symlink created successfully")
except Exception as e:
print(f"WARNING: Failed to create symlink: {e}")
print("Will try to use poetry install directly with VIRTUAL_ENV set")
@@ -386,9 +386,7 @@ def install_dependencies(venv_python, venv_dir, script_dir):
print("The symlink approach may not have worked. Please check the symlink.")
sys.exit(1)
else:
- print(
- f"✓ Poetry is correctly using virtual environment: {poetry_venv_path}"
- )
+ print(f"Poetry is correctly using virtual environment: {poetry_venv_path}")
else:
print("Warning: Could not verify poetry virtual environment path")
print(
@@ -465,12 +463,12 @@ def install_dependencies(venv_python, venv_dir, script_dir):
)
if test_result.returncode == 0:
version = test_result.stdout.strip()
- print(f" ✓ {package} {version} installed")
+ print(f"{package} {version} installed")
else:
error_msg = (
test_result.stderr.strip() if test_result.stderr else "Unknown error"
)
- print(f" ✗ {package} NOT found in virtual environment: {error_msg}")
+ print(f"{package} NOT found in virtual environment: {error_msg}")
missing_packages.append(package)
if missing_packages:
(iotdb) 13/15: [AINode] Delete poetry.lock for easier maintain different operating systems (#16793)
Posted by yo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
yongzao pushed a commit to branch rc/2.0.6
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit e70b66dc09b3e595054691585661eec495abeaa5
Author: Yongzao <53...@qq.com>
AuthorDate: Tue Nov 25 19:43:14 2025 +0800
[AINode] Delete poetry.lock for easier maintain different operating systems (#16793)
(cherry picked from commit 50f92e48cf6f34cb29d733ba3df586c6ff62b481)
---
iotdb-core/ainode/.gitignore | 3 +
iotdb-core/ainode/build_binary.py | 8 +
iotdb-core/ainode/poetry.lock | 2402 -------------------------------------
3 files changed, 11 insertions(+), 2402 deletions(-)
diff --git a/iotdb-core/ainode/.gitignore b/iotdb-core/ainode/.gitignore
index bdb2698ec78..e4947e516d3 100644
--- a/iotdb-core/ainode/.gitignore
+++ b/iotdb-core/ainode/.gitignore
@@ -14,6 +14,9 @@
# generated by maven
/iotdb/ainode/conf/
+# generated by poetry
+poetry.lock
+
# generated by pyinstaller
/dist/
/build/
diff --git a/iotdb-core/ainode/build_binary.py b/iotdb-core/ainode/build_binary.py
index ff99fda0933..01b0ef67e8f 100644
--- a/iotdb-core/ainode/build_binary.py
+++ b/iotdb-core/ainode/build_binary.py
@@ -434,6 +434,14 @@ def install_dependencies(venv_python, venv_dir, script_dir):
verify_poetry_env() # Verify after lock
print("Running poetry install...")
+ subprocess.run(
+ [str(poetry_exe), "lock"],
+ cwd=str(script_dir),
+ env=venv_env,
+ check=True,
+ capture_output=True,
+ text=True,
+ )
verify_poetry_env() # Verify before install
result = subprocess.run(
[str(poetry_exe), "install"],
diff --git a/iotdb-core/ainode/poetry.lock b/iotdb-core/ainode/poetry.lock
deleted file mode 100644
index 3131c697f09..00000000000
--- a/iotdb-core/ainode/poetry.lock
+++ /dev/null
@@ -1,2402 +0,0 @@
-# This file is automatically @generated by Poetry 2.1.2 and should not be changed by hand.
-
-[[package]]
-name = "alembic"
-version = "1.13.2"
-description = "A database migration tool for SQLAlchemy."
-optional = false
-python-versions = ">=3.8"
-groups = ["main"]
-files = [
- {file = "alembic-1.13.2-py3-none-any.whl", hash = "sha256:6b8733129a6224a9a711e17c99b08462dbf7cc9670ba8f2e2ae9af860ceb1953"},
- {file = "alembic-1.13.2.tar.gz", hash = "sha256:1ff0ae32975f4fd96028c39ed9bb3c867fe3af956bd7bb37343b54c9fe7445ef"},
-]
-
-[package.dependencies]
-Mako = "*"
-SQLAlchemy = ">=1.3.0"
-typing-extensions = ">=4"
-
-[package.extras]
-tz = ["backports.zoneinfo ; python_version < \"3.9\""]
-
-[[package]]
-name = "black"
-version = "25.1.0"
-description = "The uncompromising code formatter."
-optional = false
-python-versions = ">=3.9"
-groups = ["main"]
-files = [
- {file = "black-25.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:759e7ec1e050a15f89b770cefbf91ebee8917aac5c20483bc2d80a6c3a04df32"},
- {file = "black-25.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0e519ecf93120f34243e6b0054db49c00a35f84f195d5bce7e9f5cfc578fc2da"},
- {file = "black-25.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:055e59b198df7ac0b7efca5ad7ff2516bca343276c466be72eb04a3bcc1f82d7"},
- {file = "black-25.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:db8ea9917d6f8fc62abd90d944920d95e73c83a5ee3383493e35d271aca872e9"},
- {file = "black-25.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a39337598244de4bae26475f77dda852ea00a93bd4c728e09eacd827ec929df0"},
- {file = "black-25.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:96c1c7cd856bba8e20094e36e0f948718dc688dba4a9d78c3adde52b9e6c2299"},
- {file = "black-25.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bce2e264d59c91e52d8000d507eb20a9aca4a778731a08cfff7e5ac4a4bb7096"},
- {file = "black-25.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:172b1dbff09f86ce6f4eb8edf9dede08b1fce58ba194c87d7a4f1a5aa2f5b3c2"},
- {file = "black-25.1.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4b60580e829091e6f9238c848ea6750efed72140b91b048770b64e74fe04908b"},
- {file = "black-25.1.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1e2978f6df243b155ef5fa7e558a43037c3079093ed5d10fd84c43900f2d8ecc"},
- {file = "black-25.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3b48735872ec535027d979e8dcb20bf4f70b5ac75a8ea99f127c106a7d7aba9f"},
- {file = "black-25.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:ea0213189960bda9cf99be5b8c8ce66bb054af5e9e861249cd23471bd7b0b3ba"},
- {file = "black-25.1.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8f0b18a02996a836cc9c9c78e5babec10930862827b1b724ddfe98ccf2f2fe4f"},
- {file = "black-25.1.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:afebb7098bfbc70037a053b91ae8437c3857482d3a690fefc03e9ff7aa9a5fd3"},
- {file = "black-25.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:030b9759066a4ee5e5aca28c3c77f9c64789cdd4de8ac1df642c40b708be6171"},
- {file = "black-25.1.0-cp313-cp313-win_amd64.whl", hash = "sha256:a22f402b410566e2d1c950708c77ebf5ebd5d0d88a6a2e87c86d9fb48afa0d18"},
- {file = "black-25.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a1ee0a0c330f7b5130ce0caed9936a904793576ef4d2b98c40835d6a65afa6a0"},
- {file = "black-25.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f3df5f1bf91d36002b0a75389ca8663510cf0531cca8aa5c1ef695b46d98655f"},
- {file = "black-25.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d9e6827d563a2c820772b32ce8a42828dc6790f095f441beef18f96aa6f8294e"},
- {file = "black-25.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:bacabb307dca5ebaf9c118d2d2f6903da0d62c9faa82bd21a33eecc319559355"},
- {file = "black-25.1.0-py3-none-any.whl", hash = "sha256:95e8176dae143ba9097f351d174fdaf0ccd29efb414b362ae3fd72bf0f710717"},
- {file = "black-25.1.0.tar.gz", hash = "sha256:33496d5cd1222ad73391352b4ae8da15253c5de89b93a80b3e2c8d9a19ec2666"},
-]
-
-[package.dependencies]
-click = ">=8.0.0"
-mypy-extensions = ">=0.4.3"
-packaging = ">=22.0"
-pathspec = ">=0.9.0"
-platformdirs = ">=2"
-tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""}
-typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""}
-
-[package.extras]
-colorama = ["colorama (>=0.4.3)"]
-d = ["aiohttp (>=3.10)"]
-jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"]
-uvloop = ["uvloop (>=0.15.2)"]
-
-[[package]]
-name = "certifi"
-version = "2024.7.4"
-description = "Python package for providing Mozilla's CA Bundle."
-optional = false
-python-versions = ">=3.6"
-groups = ["main"]
-files = [
- {file = "certifi-2024.7.4-py3-none-any.whl", hash = "sha256:c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90"},
- {file = "certifi-2024.7.4.tar.gz", hash = "sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b"},
-]
-
-[[package]]
-name = "charset-normalizer"
-version = "3.3.2"
-description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet."
-optional = false
-python-versions = ">=3.7.0"
-groups = ["main"]
-files = [
- {file = "charset-normalizer-3.3.2.tar.gz", hash = "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-win32.whl", hash = "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-win32.whl", hash = "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-win32.whl", hash = "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-win32.whl", hash = "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-win_amd64.whl", hash = "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-win32.whl", hash = "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-win_amd64.whl", hash = "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-win32.whl", hash = "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-win_amd64.whl", hash = "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d"},
- {file = "charset_normalizer-3.3.2-py3-none-any.whl", hash = "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc"},
-]
-
-[[package]]
-name = "click"
-version = "8.1.8"
-description = "Composable command line interface toolkit"
-optional = false
-python-versions = ">=3.7"
-groups = ["main"]
-markers = "python_version < \"3.11\""
-files = [
- {file = "click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2"},
- {file = "click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a"},
-]
-
-[package.dependencies]
-colorama = {version = "*", markers = "platform_system == \"Windows\""}
-
-[[package]]
-name = "click"
-version = "8.2.1"
-description = "Composable command line interface toolkit"
-optional = false
-python-versions = ">=3.10"
-groups = ["main"]
-markers = "python_version >= \"3.11\""
-files = [
- {file = "click-8.2.1-py3-none-any.whl", hash = "sha256:61a3265b914e850b85317d0b3109c7f8cd35a670f963866005d6ef1d5175a12b"},
- {file = "click-8.2.1.tar.gz", hash = "sha256:27c491cc05d968d271d5a1db13e3b5a184636d9d930f148c50b038f0d0646202"},
-]
-
-[package.dependencies]
-colorama = {version = "*", markers = "platform_system == \"Windows\""}
-
-[[package]]
-name = "colorama"
-version = "0.4.6"
-description = "Cross-platform colored terminal text."
-optional = false
-python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
-groups = ["main"]
-markers = "sys_platform == \"win32\" or platform_system == \"Windows\""
-files = [
- {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"},
- {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"},
-]
-
-[[package]]
-name = "colorlog"
-version = "6.8.2"
-description = "Add colours to the output of Python's logging module."
-optional = false
-python-versions = ">=3.6"
-groups = ["main"]
-files = [
- {file = "colorlog-6.8.2-py3-none-any.whl", hash = "sha256:4dcbb62368e2800cb3c5abd348da7e53f6c362dda502ec27c560b2e58a66bd33"},
- {file = "colorlog-6.8.2.tar.gz", hash = "sha256:3e3e079a41feb5a1b64f978b5ea4f46040a94f11f0e8bbb8261e3dbbeca64d44"},
-]
-
-[package.dependencies]
-colorama = {version = "*", markers = "sys_platform == \"win32\""}
-
-[package.extras]
-development = ["black", "flake8", "mypy", "pytest", "types-colorama"]
-
-[[package]]
-name = "dynaconf"
-version = "3.2.6"
-description = "The dynamic configurator for your Python Project"
-optional = false
-python-versions = ">=3.8"
-groups = ["main"]
-files = [
- {file = "dynaconf-3.2.6-py2.py3-none-any.whl", hash = "sha256:3911c740d717df4576ed55f616c7cbad6e06bc8ef23ffca444b6e2a12fb1c34c"},
- {file = "dynaconf-3.2.6.tar.gz", hash = "sha256:74cc1897396380bb957730eb341cc0976ee9c38bbcb53d3307c50caed0aedfb8"},
-]
-
-[package.extras]
-all = ["configobj", "hvac", "redis", "ruamel.yaml"]
-configobj = ["configobj"]
-ini = ["configobj"]
-redis = ["redis"]
-test = ["configobj", "django", "flask (>=0.12)", "hvac (>=1.1.0)", "pytest", "pytest-cov", "pytest-mock", "pytest-xdist", "python-dotenv", "radon", "redis", "toml"]
-toml = ["toml"]
-vault = ["hvac"]
-yaml = ["ruamel.yaml"]
-
-[[package]]
-name = "einops"
-version = "0.8.1"
-description = "A new flavour of deep learning operations"
-optional = false
-python-versions = ">=3.8"
-groups = ["main"]
-files = [
- {file = "einops-0.8.1-py3-none-any.whl", hash = "sha256:919387eb55330f5757c6bea9165c5ff5cfe63a642682ea788a6d472576d81737"},
- {file = "einops-0.8.1.tar.gz", hash = "sha256:de5d960a7a761225532e0f1959e5315ebeafc0cd43394732f103ca44b9837e84"},
-]
-
-[[package]]
-name = "filelock"
-version = "3.15.4"
-description = "A platform independent file lock."
-optional = false
-python-versions = ">=3.8"
-groups = ["main"]
-files = [
- {file = "filelock-3.15.4-py3-none-any.whl", hash = "sha256:6ca1fffae96225dab4c6eaf1c4f4f28cd2568d3ec2a44e15a08520504de468e7"},
- {file = "filelock-3.15.4.tar.gz", hash = "sha256:2207938cbc1844345cb01a5a95524dae30f0ce089eba5b00378295a17e3e90cb"},
-]
-
-[package.extras]
-docs = ["furo (>=2023.9.10)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"]
-testing = ["covdefaults (>=2.3)", "coverage (>=7.3.2)", "diff-cover (>=8.0.1)", "pytest (>=7.4.3)", "pytest-asyncio (>=0.21)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)", "pytest-timeout (>=2.2)", "virtualenv (>=20.26.2)"]
-typing = ["typing-extensions (>=4.8) ; python_version < \"3.11\""]
-
-[[package]]
-name = "fsspec"
-version = "2024.6.1"
-description = "File-system specification"
-optional = false
-python-versions = ">=3.8"
-groups = ["main"]
-files = [
- {file = "fsspec-2024.6.1-py3-none-any.whl", hash = "sha256:3cb443f8bcd2efb31295a5b9fdb02aee81d8452c80d28f97a6d0959e6cee101e"},
- {file = "fsspec-2024.6.1.tar.gz", hash = "sha256:fad7d7e209dd4c1208e3bbfda706620e0da5142bebbd9c384afb95b07e798e49"},
-]
-
-[package.extras]
-abfs = ["adlfs"]
-adl = ["adlfs"]
-arrow = ["pyarrow (>=1)"]
-dask = ["dask", "distributed"]
-dev = ["pre-commit", "ruff"]
-doc = ["numpydoc", "sphinx", "sphinx-design", "sphinx-rtd-theme", "yarl"]
-dropbox = ["dropbox", "dropboxdrivefs", "requests"]
-full = ["adlfs", "aiohttp (!=4.0.0a0,!=4.0.0a1)", "dask", "distributed", "dropbox", "dropboxdrivefs", "fusepy", "gcsfs", "libarchive-c", "ocifs", "panel", "paramiko", "pyarrow (>=1)", "pygit2", "requests", "s3fs", "smbprotocol", "tqdm"]
-fuse = ["fusepy"]
-gcs = ["gcsfs"]
-git = ["pygit2"]
-github = ["requests"]
-gs = ["gcsfs"]
-gui = ["panel"]
-hdfs = ["pyarrow (>=1)"]
-http = ["aiohttp (!=4.0.0a0,!=4.0.0a1)"]
-libarchive = ["libarchive-c"]
-oci = ["ocifs"]
-s3 = ["s3fs"]
-sftp = ["paramiko"]
-smb = ["smbprotocol"]
-ssh = ["paramiko"]
-test = ["aiohttp (!=4.0.0a0,!=4.0.0a1)", "numpy", "pytest", "pytest-asyncio (!=0.22.0)", "pytest-benchmark", "pytest-cov", "pytest-mock", "pytest-recording", "pytest-rerunfailures", "requests"]
-test-downstream = ["aiobotocore (>=2.5.4,<3.0.0)", "dask-expr", "dask[dataframe,test]", "moto[server] (>4,<5)", "pytest-timeout", "xarray"]
-test-full = ["adlfs", "aiohttp (!=4.0.0a0,!=4.0.0a1)", "cloudpickle", "dask", "distributed", "dropbox", "dropboxdrivefs", "fastparquet", "fusepy", "gcsfs", "jinja2", "kerchunk", "libarchive-c", "lz4", "notebook", "numpy", "ocifs", "pandas", "panel", "paramiko", "pyarrow", "pyarrow (>=1)", "pyftpdlib", "pygit2", "pytest", "pytest-asyncio (!=0.22.0)", "pytest-benchmark", "pytest-cov", "pytest-mock", "pytest-recording", "pytest-rerunfailures", "python-snappy", "requests", "smbprotocol", "tq [...]
-tqdm = ["tqdm"]
-
-[[package]]
-name = "greenlet"
-version = "3.0.3"
-description = "Lightweight in-process concurrent programming"
-optional = false
-python-versions = ">=3.7"
-groups = ["main"]
-markers = "platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\""
-files = [
- {file = "greenlet-3.0.3-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:9da2bd29ed9e4f15955dd1595ad7bc9320308a3b766ef7f837e23ad4b4aac31a"},
- {file = "greenlet-3.0.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d353cadd6083fdb056bb46ed07e4340b0869c305c8ca54ef9da3421acbdf6881"},
- {file = "greenlet-3.0.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dca1e2f3ca00b84a396bc1bce13dd21f680f035314d2379c4160c98153b2059b"},
- {file = "greenlet-3.0.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3ed7fb269f15dc662787f4119ec300ad0702fa1b19d2135a37c2c4de6fadfd4a"},
- {file = "greenlet-3.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd4f49ae60e10adbc94b45c0b5e6a179acc1736cf7a90160b404076ee283cf83"},
- {file = "greenlet-3.0.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:73a411ef564e0e097dbe7e866bb2dda0f027e072b04da387282b02c308807405"},
- {file = "greenlet-3.0.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:7f362975f2d179f9e26928c5b517524e89dd48530a0202570d55ad6ca5d8a56f"},
- {file = "greenlet-3.0.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:649dde7de1a5eceb258f9cb00bdf50e978c9db1b996964cd80703614c86495eb"},
- {file = "greenlet-3.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:68834da854554926fbedd38c76e60c4a2e3198c6fbed520b106a8986445caaf9"},
- {file = "greenlet-3.0.3-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:b1b5667cced97081bf57b8fa1d6bfca67814b0afd38208d52538316e9422fc61"},
- {file = "greenlet-3.0.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:52f59dd9c96ad2fc0d5724107444f76eb20aaccb675bf825df6435acb7703559"},
- {file = "greenlet-3.0.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:afaff6cf5200befd5cec055b07d1c0a5a06c040fe5ad148abcd11ba6ab9b114e"},
- {file = "greenlet-3.0.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fe754d231288e1e64323cfad462fcee8f0288654c10bdf4f603a39ed923bef33"},
- {file = "greenlet-3.0.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2797aa5aedac23af156bbb5a6aa2cd3427ada2972c828244eb7d1b9255846379"},
- {file = "greenlet-3.0.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b7f009caad047246ed379e1c4dbcb8b020f0a390667ea74d2387be2998f58a22"},
- {file = "greenlet-3.0.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:c5e1536de2aad7bf62e27baf79225d0d64360d4168cf2e6becb91baf1ed074f3"},
- {file = "greenlet-3.0.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:894393ce10ceac937e56ec00bb71c4c2f8209ad516e96033e4b3b1de270e200d"},
- {file = "greenlet-3.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:1ea188d4f49089fc6fb283845ab18a2518d279c7cd9da1065d7a84e991748728"},
- {file = "greenlet-3.0.3-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:70fb482fdf2c707765ab5f0b6655e9cfcf3780d8d87355a063547b41177599be"},
- {file = "greenlet-3.0.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d4d1ac74f5c0c0524e4a24335350edad7e5f03b9532da7ea4d3c54d527784f2e"},
- {file = "greenlet-3.0.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:149e94a2dd82d19838fe4b2259f1b6b9957d5ba1b25640d2380bea9c5df37676"},
- {file = "greenlet-3.0.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:15d79dd26056573940fcb8c7413d84118086f2ec1a8acdfa854631084393efcc"},
- {file = "greenlet-3.0.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:881b7db1ebff4ba09aaaeae6aa491daeb226c8150fc20e836ad00041bcb11230"},
- {file = "greenlet-3.0.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fcd2469d6a2cf298f198f0487e0a5b1a47a42ca0fa4dfd1b6862c999f018ebbf"},
- {file = "greenlet-3.0.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:1f672519db1796ca0d8753f9e78ec02355e862d0998193038c7073045899f305"},
- {file = "greenlet-3.0.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:2516a9957eed41dd8f1ec0c604f1cdc86758b587d964668b5b196a9db5bfcde6"},
- {file = "greenlet-3.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:bba5387a6975598857d86de9eac14210a49d554a77eb8261cc68b7d082f78ce2"},
- {file = "greenlet-3.0.3-cp37-cp37m-macosx_11_0_universal2.whl", hash = "sha256:5b51e85cb5ceda94e79d019ed36b35386e8c37d22f07d6a751cb659b180d5274"},
- {file = "greenlet-3.0.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:daf3cb43b7cf2ba96d614252ce1684c1bccee6b2183a01328c98d36fcd7d5cb0"},
- {file = "greenlet-3.0.3-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:99bf650dc5d69546e076f413a87481ee1d2d09aaaaaca058c9251b6d8c14783f"},
- {file = "greenlet-3.0.3-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2dd6e660effd852586b6a8478a1d244b8dc90ab5b1321751d2ea15deb49ed414"},
- {file = "greenlet-3.0.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e3391d1e16e2a5a1507d83e4a8b100f4ee626e8eca43cf2cadb543de69827c4c"},
- {file = "greenlet-3.0.3-cp37-cp37m-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e1f145462f1fa6e4a4ae3c0f782e580ce44d57c8f2c7aae1b6fa88c0b2efdb41"},
- {file = "greenlet-3.0.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:1a7191e42732df52cb5f39d3527217e7ab73cae2cb3694d241e18f53d84ea9a7"},
- {file = "greenlet-3.0.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:0448abc479fab28b00cb472d278828b3ccca164531daab4e970a0458786055d6"},
- {file = "greenlet-3.0.3-cp37-cp37m-win32.whl", hash = "sha256:b542be2440edc2d48547b5923c408cbe0fc94afb9f18741faa6ae970dbcb9b6d"},
- {file = "greenlet-3.0.3-cp37-cp37m-win_amd64.whl", hash = "sha256:01bc7ea167cf943b4c802068e178bbf70ae2e8c080467070d01bfa02f337ee67"},
- {file = "greenlet-3.0.3-cp38-cp38-macosx_11_0_universal2.whl", hash = "sha256:1996cb9306c8595335bb157d133daf5cf9f693ef413e7673cb07e3e5871379ca"},
- {file = "greenlet-3.0.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3ddc0f794e6ad661e321caa8d2f0a55ce01213c74722587256fb6566049a8b04"},
- {file = "greenlet-3.0.3-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c9db1c18f0eaad2f804728c67d6c610778456e3e1cc4ab4bbd5eeb8e6053c6fc"},
- {file = "greenlet-3.0.3-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7170375bcc99f1a2fbd9c306f5be8764eaf3ac6b5cb968862cad4c7057756506"},
- {file = "greenlet-3.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b66c9c1e7ccabad3a7d037b2bcb740122a7b17a53734b7d72a344ce39882a1b"},
- {file = "greenlet-3.0.3-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:098d86f528c855ead3479afe84b49242e174ed262456c342d70fc7f972bc13c4"},
- {file = "greenlet-3.0.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:81bb9c6d52e8321f09c3d165b2a78c680506d9af285bfccbad9fb7ad5a5da3e5"},
- {file = "greenlet-3.0.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:fd096eb7ffef17c456cfa587523c5f92321ae02427ff955bebe9e3c63bc9f0da"},
- {file = "greenlet-3.0.3-cp38-cp38-win32.whl", hash = "sha256:d46677c85c5ba00a9cb6f7a00b2bfa6f812192d2c9f7d9c4f6a55b60216712f3"},
- {file = "greenlet-3.0.3-cp38-cp38-win_amd64.whl", hash = "sha256:419b386f84949bf0e7c73e6032e3457b82a787c1ab4a0e43732898a761cc9dbf"},
- {file = "greenlet-3.0.3-cp39-cp39-macosx_11_0_universal2.whl", hash = "sha256:da70d4d51c8b306bb7a031d5cff6cc25ad253affe89b70352af5f1cb68e74b53"},
- {file = "greenlet-3.0.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:086152f8fbc5955df88382e8a75984e2bb1c892ad2e3c80a2508954e52295257"},
- {file = "greenlet-3.0.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d73a9fe764d77f87f8ec26a0c85144d6a951a6c438dfe50487df5595c6373eac"},
- {file = "greenlet-3.0.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b7dcbe92cc99f08c8dd11f930de4d99ef756c3591a5377d1d9cd7dd5e896da71"},
- {file = "greenlet-3.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1551a8195c0d4a68fac7a4325efac0d541b48def35feb49d803674ac32582f61"},
- {file = "greenlet-3.0.3-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:64d7675ad83578e3fc149b617a444fab8efdafc9385471f868eb5ff83e446b8b"},
- {file = "greenlet-3.0.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b37eef18ea55f2ffd8f00ff8fe7c8d3818abd3e25fb73fae2ca3b672e333a7a6"},
- {file = "greenlet-3.0.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:77457465d89b8263bca14759d7c1684df840b6811b2499838cc5b040a8b5b113"},
- {file = "greenlet-3.0.3-cp39-cp39-win32.whl", hash = "sha256:57e8974f23e47dac22b83436bdcf23080ade568ce77df33159e019d161ce1d1e"},
- {file = "greenlet-3.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:c5ee858cfe08f34712f548c3c363e807e7186f03ad7a5039ebadb29e8c6be067"},
- {file = "greenlet-3.0.3.tar.gz", hash = "sha256:43374442353259554ce33599da8b692d5aa96f8976d567d4badf263371fbe491"},
-]
-
-[package.extras]
-docs = ["Sphinx", "furo"]
-test = ["objgraph", "psutil"]
-
-[[package]]
-name = "hf-xet"
-version = "1.1.7"
-description = "Fast transfer of large files with the Hugging Face Hub."
-optional = false
-python-versions = ">=3.8"
-groups = ["main"]
-files = [
- {file = "hf_xet-1.1.7-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:60dae4b44d520819e54e216a2505685248ec0adbdb2dd4848b17aa85a0375cde"},
- {file = "hf_xet-1.1.7-cp37-abi3-macosx_11_0_arm64.whl", hash = "sha256:b109f4c11e01c057fc82004c9e51e6cdfe2cb230637644ade40c599739067b2e"},
- {file = "hf_xet-1.1.7-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6efaaf1a5a9fc3a501d3e71e88a6bfebc69ee3a716d0e713a931c8b8d920038f"},
- {file = "hf_xet-1.1.7-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:751571540f9c1fbad9afcf222a5fb96daf2384bf821317b8bfb0c59d86078513"},
- {file = "hf_xet-1.1.7-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:18b61bbae92d56ae731b92087c44efcac216071182c603fc535f8e29ec4b09b8"},
- {file = "hf_xet-1.1.7-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:713f2bff61b252f8523739969f247aa354ad8e6d869b8281e174e2ea1bb8d604"},
- {file = "hf_xet-1.1.7-cp37-abi3-win_amd64.whl", hash = "sha256:2e356da7d284479ae0f1dea3cf5a2f74fdf925d6dca84ac4341930d892c7cb34"},
- {file = "hf_xet-1.1.7.tar.gz", hash = "sha256:20cec8db4561338824a3b5f8c19774055b04a8df7fff0cb1ff2cb1a0c1607b80"},
-]
-
-[package.extras]
-tests = ["pytest"]
-
-[[package]]
-name = "hmmlearn"
-version = "0.3.2"
-description = "Hidden Markov Models in Python with scikit-learn like API"
-optional = false
-python-versions = ">=3.8"
-groups = ["main"]
-files = [
- {file = "hmmlearn-0.3.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:428eb8a60d5455bacf391d54abff876931ea5cf234cd10e0a4a921546652b466"},
- {file = "hmmlearn-0.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d1e54a15b3fb47e1ba72c3e40dce9368b3aa2f3f8d4d94ed6684b999cd9e1528"},
- {file = "hmmlearn-0.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:19124c22b7579d76b07be8c2128153de9071281bff7a0bc29cc3bd83baf0c4cf"},
- {file = "hmmlearn-0.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:011b1aaa67551151b9442670b58fa692e135ea6fd5dc76022e595964594a3654"},
- {file = "hmmlearn-0.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:3c4d643a40c21732df9eea70d1a0ed256a6aa28ed631762c062c6cce2ee6cb47"},
- {file = "hmmlearn-0.3.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:02df950f8ee4de9226bef55c1a7a947f706720990bf38e5e6da84b7418af9095"},
- {file = "hmmlearn-0.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ced6acc12ffadb3d2b03fdf0e52bc8211977202db170f5b0f62014199cffc224"},
- {file = "hmmlearn-0.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:16d6b05065963155a0294b0ef3643f01a1897c0e00ab258e5155537e05027a2f"},
- {file = "hmmlearn-0.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:16535843dfa38f619355f4f082d1e37622198a8df315c932f406d31f5786821b"},
- {file = "hmmlearn-0.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:c8c2511fb5c7ed31c98fe46b150991c20abb5d95e3c450bb449adfe792f4f9ee"},
- {file = "hmmlearn-0.3.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:29106ab096c1bd9a8dba8de5e6a8da763d899e4294de5db4a47be2fd28c73a41"},
- {file = "hmmlearn-0.3.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:5ffe17028c881b0213803db604a7051384179877ee74ded76c02f797ccfe2c34"},
- {file = "hmmlearn-0.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:25572410c59f4d278b56c1bdc8196f9efe4672b4bf135e3593c6e879cea94518"},
- {file = "hmmlearn-0.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b30a8b380916ccc299984594a55829131d2da1d66bbd6861bfc548e5d9b6984"},
- {file = "hmmlearn-0.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:b042bbb90488ccaaf5616b2ecd7687b17d733016df68192ad6f2a8d58bb96291"},
- {file = "hmmlearn-0.3.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:42308b50c2eb68ab541573c196c1123c64a50d0dba2b30b1e21e355084041738"},
- {file = "hmmlearn-0.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:47ef458bbae23f1b80bf923eca8a838778e550aa9397a39655aa97304fbeba69"},
- {file = "hmmlearn-0.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e8a92724d2c7b7f8c2b8f54c8bfe061b75dc018d81041172ce435d24456232ed"},
- {file = "hmmlearn-0.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e99980c9a92ed4fd62307d6a91e3ff136ee7233f9f02a62038b68473741204e1"},
- {file = "hmmlearn-0.3.2-cp38-cp38-win_amd64.whl", hash = "sha256:4375627550c0282587ec404cb1e2b59d5bff70522bfac3dc57f1a2912e4af9c4"},
- {file = "hmmlearn-0.3.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:81cc7f0cf33d8d114423347f00d45cd2fba926a66dd563e97bb0c9b3790e3ae2"},
- {file = "hmmlearn-0.3.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9c55c09ef8dee1deae31a51de9a99ceea0f86cfeb5eba879b1b6c7722d29eb95"},
- {file = "hmmlearn-0.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:722a0f116c11160c97362f343d7ba0a78b03dd647cb0e2240127520d5d8d1580"},
- {file = "hmmlearn-0.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:01b10877f21f6faab8b01ff63e92e93f614097d03a9fb7fc27a26a16227cd980"},
- {file = "hmmlearn-0.3.2-cp39-cp39-win_amd64.whl", hash = "sha256:160c0018f71b6cbe79644ea743888c6e2d1bec6b09bec5e9b389e1796b57eec5"},
- {file = "hmmlearn-0.3.2.tar.gz", hash = "sha256:edaf485fdb1ea88da9ac642b2006c63d9950dd15d4d132f7205305d383e6f745"},
-]
-
-[package.dependencies]
-numpy = ">=1.10"
-scikit-learn = ">=0.16,<0.22.0 || >0.22.0"
-scipy = ">=0.19"
-
-[package.extras]
-docs = ["matplotlib", "pydata-sphinx-theme", "sphinx (>=2.0)", "sphinx-gallery"]
-tests = ["pytest"]
-
-[[package]]
-name = "huggingface-hub"
-version = "0.30.2"
-description = "Client library to download and publish models, datasets and other repos on the huggingface.co hub"
-optional = false
-python-versions = ">=3.8.0"
-groups = ["main"]
-files = [
- {file = "huggingface_hub-0.30.2-py3-none-any.whl", hash = "sha256:68ff05969927058cfa41df4f2155d4bb48f5f54f719dd0390103eefa9b191e28"},
- {file = "huggingface_hub-0.30.2.tar.gz", hash = "sha256:9a7897c5b6fd9dad3168a794a8998d6378210f5b9688d0dfc180b1a228dc2466"},
-]
-
-[package.dependencies]
-filelock = "*"
-fsspec = ">=2023.5.0"
-packaging = ">=20.9"
-pyyaml = ">=5.1"
-requests = "*"
-tqdm = ">=4.42.1"
-typing-extensions = ">=3.7.4.3"
-
-[package.extras]
-all = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "fastapi", "gradio (>=4.0.0)", "jedi", "libcst (==1.4.0)", "mypy (==1.5.1)", "numpy", "pytest (>=8.1.1,<8.2.2)", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-mock", "pytest-rerunfailures", "pytest-vcr", "pytest-xdist", "ruff (>=0.9.0)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "typing-extensions (>=4.8.0)", "urllib3 (<2.0)"]
-cli = ["InquirerPy (==0.3.4)"]
-dev = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "fastapi", "gradio (>=4.0.0)", "jedi", "libcst (==1.4.0)", "mypy (==1.5.1)", "numpy", "pytest (>=8.1.1,<8.2.2)", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-mock", "pytest-rerunfailures", "pytest-vcr", "pytest-xdist", "ruff (>=0.9.0)", "soundfile", "types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "typing-extensions (>=4.8.0)", "urllib3 (<2.0)"]
-fastai = ["fastai (>=2.4)", "fastcore (>=1.3.27)", "toml"]
-hf-transfer = ["hf-transfer (>=0.1.4)"]
-hf-xet = ["hf-xet (>=0.1.4)"]
-inference = ["aiohttp"]
-quality = ["libcst (==1.4.0)", "mypy (==1.5.1)", "ruff (>=0.9.0)"]
-tensorflow = ["graphviz", "pydot", "tensorflow"]
-tensorflow-testing = ["keras (<3.0)", "tensorflow"]
-testing = ["InquirerPy (==0.3.4)", "Jinja2", "Pillow", "aiohttp", "fastapi", "gradio (>=4.0.0)", "jedi", "numpy", "pytest (>=8.1.1,<8.2.2)", "pytest-asyncio", "pytest-cov", "pytest-env", "pytest-mock", "pytest-rerunfailures", "pytest-vcr", "pytest-xdist", "soundfile", "urllib3 (<2.0)"]
-torch = ["safetensors[torch]", "torch"]
-typing = ["types-PyYAML", "types-requests", "types-simplejson", "types-toml", "types-tqdm", "types-urllib3", "typing-extensions (>=4.8.0)"]
-
-[[package]]
-name = "idna"
-version = "3.8"
-description = "Internationalized Domain Names in Applications (IDNA)"
-optional = false
-python-versions = ">=3.6"
-groups = ["main"]
-files = [
- {file = "idna-3.8-py3-none-any.whl", hash = "sha256:050b4e5baadcd44d760cedbd2b8e639f2ff89bbc7a5730fcc662954303377aac"},
- {file = "idna-3.8.tar.gz", hash = "sha256:d838c2c0ed6fced7693d5e8ab8e734d5f8fda53a039c0164afb0b82e771e3603"},
-]
-
-[[package]]
-name = "isort"
-version = "6.0.1"
-description = "A Python utility / library to sort Python imports."
-optional = false
-python-versions = ">=3.9.0"
-groups = ["main"]
-files = [
- {file = "isort-6.0.1-py3-none-any.whl", hash = "sha256:2dc5d7f65c9678d94c88dfc29161a320eec67328bc97aad576874cb4be1e9615"},
- {file = "isort-6.0.1.tar.gz", hash = "sha256:1cb5df28dfbc742e490c5e41bad6da41b805b0a8be7bc93cd0fb2a8a890ac450"},
-]
-
-[package.extras]
-colors = ["colorama"]
-plugins = ["setuptools"]
-
-[[package]]
-name = "jinja2"
-version = "3.1.6"
-description = "A very fast and expressive template engine."
-optional = false
-python-versions = ">=3.7"
-groups = ["main"]
-files = [
- {file = "jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67"},
- {file = "jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d"},
-]
-
-[package.dependencies]
-MarkupSafe = ">=2.0"
-
-[package.extras]
-i18n = ["Babel (>=2.7)"]
-
-[[package]]
-name = "joblib"
-version = "1.4.2"
-description = "Lightweight pipelining with Python functions"
-optional = false
-python-versions = ">=3.8"
-groups = ["main"]
-files = [
- {file = "joblib-1.4.2-py3-none-any.whl", hash = "sha256:06d478d5674cbc267e7496a410ee875abd68e4340feff4490bcb7afb88060ae6"},
- {file = "joblib-1.4.2.tar.gz", hash = "sha256:2382c5816b2636fbd20a09e0f4e9dad4736765fdfb7dca582943b9c1366b3f0e"},
-]
-
-[[package]]
-name = "lightning-utilities"
-version = "0.14.3"
-description = "Lightning toolbox for across the our ecosystem."
-optional = false
-python-versions = ">=3.9"
-groups = ["main"]
-files = [
- {file = "lightning_utilities-0.14.3-py3-none-any.whl", hash = "sha256:4ab9066aa36cd7b93a05713808901909e96cc3f187ea6fd3052b2fd91313b468"},
- {file = "lightning_utilities-0.14.3.tar.gz", hash = "sha256:37e2f83f273890052955a44054382c211a303012ee577619efbaa5df9e65e9f5"},
-]
-
-[package.dependencies]
-packaging = ">=17.1"
-setuptools = "*"
-typing_extensions = "*"
-
-[package.extras]
-cli = ["fire"]
-docs = ["requests (>=2.0.0)"]
-typing = ["fire", "mypy (>=1.0.0)", "types-setuptools"]
-
-[[package]]
-name = "mako"
-version = "1.3.5"
-description = "A super-fast templating language that borrows the best ideas from the existing templating languages."
-optional = false
-python-versions = ">=3.8"
-groups = ["main"]
-files = [
- {file = "Mako-1.3.5-py3-none-any.whl", hash = "sha256:260f1dbc3a519453a9c856dedfe4beb4e50bd5a26d96386cb6c80856556bb91a"},
- {file = "Mako-1.3.5.tar.gz", hash = "sha256:48dbc20568c1d276a2698b36d968fa76161bf127194907ea6fc594fa81f943bc"},
-]
-
-[package.dependencies]
-MarkupSafe = ">=0.9.2"
-
-[package.extras]
-babel = ["Babel"]
-lingua = ["lingua"]
-testing = ["pytest"]
-
-[[package]]
-name = "markupsafe"
-version = "2.1.5"
-description = "Safely add untrusted strings to HTML/XML markup."
-optional = false
-python-versions = ">=3.7"
-groups = ["main"]
-files = [
- {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc"},
- {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5"},
- {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e61659ba32cf2cf1481e575d0462554625196a1f2fc06a1c777d3f48e8865d46"},
- {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2174c595a0d73a3080ca3257b40096db99799265e1c27cc5a610743acd86d62f"},
- {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ae2ad8ae6ebee9d2d94b17fb62763125f3f374c25618198f40cbb8b525411900"},
- {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff"},
- {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:598e3276b64aff0e7b3451b72e94fa3c238d452e7ddcd893c3ab324717456bad"},
- {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fce659a462a1be54d2ffcacea5e3ba2d74daa74f30f5f143fe0c58636e355fdd"},
- {file = "MarkupSafe-2.1.5-cp310-cp310-win32.whl", hash = "sha256:d9fad5155d72433c921b782e58892377c44bd6252b5af2f67f16b194987338a4"},
- {file = "MarkupSafe-2.1.5-cp310-cp310-win_amd64.whl", hash = "sha256:bf50cd79a75d181c9181df03572cdce0fbb75cc353bc350712073108cba98de5"},
- {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:629ddd2ca402ae6dbedfceeba9c46d5f7b2a61d9749597d4307f943ef198fc1f"},
- {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5b7b716f97b52c5a14bffdf688f971b2d5ef4029127f1ad7a513973cfd818df2"},
- {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ec585f69cec0aa07d945b20805be741395e28ac1627333b1c5b0105962ffced"},
- {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b91c037585eba9095565a3556f611e3cbfaa42ca1e865f7b8015fe5c7336d5a5"},
- {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7502934a33b54030eaf1194c21c692a534196063db72176b0c4028e140f8f32c"},
- {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0e397ac966fdf721b2c528cf028494e86172b4feba51d65f81ffd65c63798f3f"},
- {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c061bb86a71b42465156a3ee7bd58c8c2ceacdbeb95d05a99893e08b8467359a"},
- {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3a57fdd7ce31c7ff06cdfbf31dafa96cc533c21e443d57f5b1ecc6cdc668ec7f"},
- {file = "MarkupSafe-2.1.5-cp311-cp311-win32.whl", hash = "sha256:397081c1a0bfb5124355710fe79478cdbeb39626492b15d399526ae53422b906"},
- {file = "MarkupSafe-2.1.5-cp311-cp311-win_amd64.whl", hash = "sha256:2b7c57a4dfc4f16f7142221afe5ba4e093e09e728ca65c51f5620c9aaeb9a617"},
- {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:8dec4936e9c3100156f8a2dc89c4b88d5c435175ff03413b443469c7c8c5f4d1"},
- {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:3c6b973f22eb18a789b1460b4b91bf04ae3f0c4234a0a6aa6b0a92f6f7b951d4"},
- {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac07bad82163452a6884fe8fa0963fb98c2346ba78d779ec06bd7a6262132aee"},
- {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5dfb42c4604dddc8e4305050aa6deb084540643ed5804d7455b5df8fe16f5e5"},
- {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ea3d8a3d18833cf4304cd2fc9cbb1efe188ca9b5efef2bdac7adc20594a0e46b"},
- {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d050b3361367a06d752db6ead6e7edeb0009be66bc3bae0ee9d97fb326badc2a"},
- {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:bec0a414d016ac1a18862a519e54b2fd0fc8bbfd6890376898a6c0891dd82e9f"},
- {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:58c98fee265677f63a4385256a6d7683ab1832f3ddd1e66fe948d5880c21a169"},
- {file = "MarkupSafe-2.1.5-cp312-cp312-win32.whl", hash = "sha256:8590b4ae07a35970728874632fed7bd57b26b0102df2d2b233b6d9d82f6c62ad"},
- {file = "MarkupSafe-2.1.5-cp312-cp312-win_amd64.whl", hash = "sha256:823b65d8706e32ad2df51ed89496147a42a2a6e01c13cfb6ffb8b1e92bc910bb"},
- {file = "MarkupSafe-2.1.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c8b29db45f8fe46ad280a7294f5c3ec36dbac9491f2d1c17345be8e69cc5928f"},
- {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ec6a563cff360b50eed26f13adc43e61bc0c04d94b8be985e6fb24b81f6dcfdf"},
- {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a549b9c31bec33820e885335b451286e2969a2d9e24879f83fe904a5ce59d70a"},
- {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4f11aa001c540f62c6166c7726f71f7573b52c68c31f014c25cc7901deea0b52"},
- {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7b2e5a267c855eea6b4283940daa6e88a285f5f2a67f2220203786dfa59b37e9"},
- {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2d2d793e36e230fd32babe143b04cec8a8b3eb8a3122d2aceb4a371e6b09b8df"},
- {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ce409136744f6521e39fd8e2a24c53fa18ad67aa5bc7c2cf83645cce5b5c4e50"},
- {file = "MarkupSafe-2.1.5-cp37-cp37m-win32.whl", hash = "sha256:4096e9de5c6fdf43fb4f04c26fb114f61ef0bf2e5604b6ee3019d51b69e8c371"},
- {file = "MarkupSafe-2.1.5-cp37-cp37m-win_amd64.whl", hash = "sha256:4275d846e41ecefa46e2015117a9f491e57a71ddd59bbead77e904dc02b1bed2"},
- {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:656f7526c69fac7f600bd1f400991cc282b417d17539a1b228617081106feb4a"},
- {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:97cafb1f3cbcd3fd2b6fbfb99ae11cdb14deea0736fc2b0952ee177f2b813a46"},
- {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f3fbcb7ef1f16e48246f704ab79d79da8a46891e2da03f8783a5b6fa41a9532"},
- {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fa9db3f79de01457b03d4f01b34cf91bc0048eb2c3846ff26f66687c2f6d16ab"},
- {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffee1f21e5ef0d712f9033568f8344d5da8cc2869dbd08d87c84656e6a2d2f68"},
- {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:5dedb4db619ba5a2787a94d877bc8ffc0566f92a01c0ef214865e54ecc9ee5e0"},
- {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:30b600cf0a7ac9234b2638fbc0fb6158ba5bdcdf46aeb631ead21248b9affbc4"},
- {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8dd717634f5a044f860435c1d8c16a270ddf0ef8588d4887037c5028b859b0c3"},
- {file = "MarkupSafe-2.1.5-cp38-cp38-win32.whl", hash = "sha256:daa4ee5a243f0f20d528d939d06670a298dd39b1ad5f8a72a4275124a7819eff"},
- {file = "MarkupSafe-2.1.5-cp38-cp38-win_amd64.whl", hash = "sha256:619bc166c4f2de5caa5a633b8b7326fbe98e0ccbfacabd87268a2b15ff73a029"},
- {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7a68b554d356a91cce1236aa7682dc01df0edba8d043fd1ce607c49dd3c1edcf"},
- {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:db0b55e0f3cc0be60c1f19efdde9a637c32740486004f20d1cff53c3c0ece4d2"},
- {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e53af139f8579a6d5f7b76549125f0d94d7e630761a2111bc431fd820e163b8"},
- {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:17b950fccb810b3293638215058e432159d2b71005c74371d784862b7e4683f3"},
- {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4c31f53cdae6ecfa91a77820e8b151dba54ab528ba65dfd235c80b086d68a465"},
- {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:bff1b4290a66b490a2f4719358c0cdcd9bafb6b8f061e45c7a2460866bf50c2e"},
- {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:bc1667f8b83f48511b94671e0e441401371dfd0f0a795c7daa4a3cd1dde55bea"},
- {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5049256f536511ee3f7e1b3f87d1d1209d327e818e6ae1365e8653d7e3abb6a6"},
- {file = "MarkupSafe-2.1.5-cp39-cp39-win32.whl", hash = "sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf"},
- {file = "MarkupSafe-2.1.5-cp39-cp39-win_amd64.whl", hash = "sha256:fa173ec60341d6bb97a89f5ea19c85c5643c1e7dedebc22f5181eb73573142c5"},
- {file = "MarkupSafe-2.1.5.tar.gz", hash = "sha256:d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b"},
-]
-
-[[package]]
-name = "mpmath"
-version = "1.3.0"
-description = "Python library for arbitrary-precision floating-point arithmetic"
-optional = false
-python-versions = "*"
-groups = ["main"]
-files = [
- {file = "mpmath-1.3.0-py3-none-any.whl", hash = "sha256:a0b2b9fe80bbcd81a6647ff13108738cfb482d481d826cc0e02f5b35e5c88d2c"},
- {file = "mpmath-1.3.0.tar.gz", hash = "sha256:7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f"},
-]
-
-[package.extras]
-develop = ["codecov", "pycodestyle", "pytest (>=4.6)", "pytest-cov", "wheel"]
-docs = ["sphinx"]
-gmpy = ["gmpy2 (>=2.1.0a4) ; platform_python_implementation != \"PyPy\""]
-tests = ["pytest (>=4.6)"]
-
-[[package]]
-name = "mypy-extensions"
-version = "1.1.0"
-description = "Type system extensions for programs checked with the mypy type checker."
-optional = false
-python-versions = ">=3.8"
-groups = ["main"]
-files = [
- {file = "mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505"},
- {file = "mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558"},
-]
-
-[[package]]
-name = "networkx"
-version = "3.1"
-description = "Python package for creating and manipulating graphs and networks"
-optional = false
-python-versions = ">=3.8"
-groups = ["main"]
-files = [
- {file = "networkx-3.1-py3-none-any.whl", hash = "sha256:4f33f68cb2afcf86f28a45f43efc27a9386b535d567d2127f8f61d51dec58d36"},
- {file = "networkx-3.1.tar.gz", hash = "sha256:de346335408f84de0eada6ff9fafafff9bcda11f0a0dfaa931133debb146ab61"},
-]
-
-[package.extras]
-default = ["matplotlib (>=3.4)", "numpy (>=1.20)", "pandas (>=1.3)", "scipy (>=1.8)"]
-developer = ["mypy (>=1.1)", "pre-commit (>=3.2)"]
-doc = ["nb2plots (>=0.6)", "numpydoc (>=1.5)", "pillow (>=9.4)", "pydata-sphinx-theme (>=0.13)", "sphinx (>=6.1)", "sphinx-gallery (>=0.12)", "texext (>=0.6.7)"]
-extra = ["lxml (>=4.6)", "pydot (>=1.4.2)", "pygraphviz (>=1.10)", "sympy (>=1.10)"]
-test = ["codecov (>=2.1)", "pytest (>=7.2)", "pytest-cov (>=4.0)"]
-
-[[package]]
-name = "numpy"
-version = "1.24.4"
-description = "Fundamental package for array computing in Python"
-optional = false
-python-versions = ">=3.8"
-groups = ["main"]
-markers = "python_version < \"3.11\""
-files = [
- {file = "numpy-1.24.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c0bfb52d2169d58c1cdb8cc1f16989101639b34c7d3ce60ed70b19c63eba0b64"},
- {file = "numpy-1.24.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ed094d4f0c177b1b8e7aa9cba7d6ceed51c0e569a5318ac0ca9a090680a6a1b1"},
- {file = "numpy-1.24.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:79fc682a374c4a8ed08b331bef9c5f582585d1048fa6d80bc6c35bc384eee9b4"},
- {file = "numpy-1.24.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7ffe43c74893dbf38c2b0a1f5428760a1a9c98285553c89e12d70a96a7f3a4d6"},
- {file = "numpy-1.24.4-cp310-cp310-win32.whl", hash = "sha256:4c21decb6ea94057331e111a5bed9a79d335658c27ce2adb580fb4d54f2ad9bc"},
- {file = "numpy-1.24.4-cp310-cp310-win_amd64.whl", hash = "sha256:b4bea75e47d9586d31e892a7401f76e909712a0fd510f58f5337bea9572c571e"},
- {file = "numpy-1.24.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f136bab9c2cfd8da131132c2cf6cc27331dd6fae65f95f69dcd4ae3c3639c810"},
- {file = "numpy-1.24.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e2926dac25b313635e4d6cf4dc4e51c8c0ebfed60b801c799ffc4c32bf3d1254"},
- {file = "numpy-1.24.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:222e40d0e2548690405b0b3c7b21d1169117391c2e82c378467ef9ab4c8f0da7"},
- {file = "numpy-1.24.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7215847ce88a85ce39baf9e89070cb860c98fdddacbaa6c0da3ffb31b3350bd5"},
- {file = "numpy-1.24.4-cp311-cp311-win32.whl", hash = "sha256:4979217d7de511a8d57f4b4b5b2b965f707768440c17cb70fbf254c4b225238d"},
- {file = "numpy-1.24.4-cp311-cp311-win_amd64.whl", hash = "sha256:b7b1fc9864d7d39e28f41d089bfd6353cb5f27ecd9905348c24187a768c79694"},
- {file = "numpy-1.24.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1452241c290f3e2a312c137a9999cdbf63f78864d63c79039bda65ee86943f61"},
- {file = "numpy-1.24.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:04640dab83f7c6c85abf9cd729c5b65f1ebd0ccf9de90b270cd61935eef0197f"},
- {file = "numpy-1.24.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5425b114831d1e77e4b5d812b69d11d962e104095a5b9c3b641a218abcc050e"},
- {file = "numpy-1.24.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd80e219fd4c71fc3699fc1dadac5dcf4fd882bfc6f7ec53d30fa197b8ee22dc"},
- {file = "numpy-1.24.4-cp38-cp38-win32.whl", hash = "sha256:4602244f345453db537be5314d3983dbf5834a9701b7723ec28923e2889e0bb2"},
- {file = "numpy-1.24.4-cp38-cp38-win_amd64.whl", hash = "sha256:692f2e0f55794943c5bfff12b3f56f99af76f902fc47487bdfe97856de51a706"},
- {file = "numpy-1.24.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2541312fbf09977f3b3ad449c4e5f4bb55d0dbf79226d7724211acc905049400"},
- {file = "numpy-1.24.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:9667575fb6d13c95f1b36aca12c5ee3356bf001b714fc354eb5465ce1609e62f"},
- {file = "numpy-1.24.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f3a86ed21e4f87050382c7bc96571755193c4c1392490744ac73d660e8f564a9"},
- {file = "numpy-1.24.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d11efb4dbecbdf22508d55e48d9c8384db795e1b7b51ea735289ff96613ff74d"},
- {file = "numpy-1.24.4-cp39-cp39-win32.whl", hash = "sha256:6620c0acd41dbcb368610bb2f4d83145674040025e5536954782467100aa8835"},
- {file = "numpy-1.24.4-cp39-cp39-win_amd64.whl", hash = "sha256:befe2bf740fd8373cf56149a5c23a0f601e82869598d41f8e188a0e9869926f8"},
- {file = "numpy-1.24.4-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:31f13e25b4e304632a4619d0e0777662c2ffea99fcae2029556b17d8ff958aef"},
- {file = "numpy-1.24.4-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95f7ac6540e95bc440ad77f56e520da5bf877f87dca58bd095288dce8940532a"},
- {file = "numpy-1.24.4-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:e98f220aa76ca2a977fe435f5b04d7b3470c0a2e6312907b37ba6068f26787f2"},
- {file = "numpy-1.24.4.tar.gz", hash = "sha256:80f5e3a4e498641401868df4208b74581206afbee7cf7b8329daae82676d9463"},
-]
-
-[[package]]
-name = "numpy"
-version = "1.26.4"
-description = "Fundamental package for array computing in Python"
-optional = false
-python-versions = ">=3.9"
-groups = ["main"]
-markers = "python_version >= \"3.11\""
-files = [
- {file = "numpy-1.26.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9ff0f4f29c51e2803569d7a51c2304de5554655a60c5d776e35b4a41413830d0"},
- {file = "numpy-1.26.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2e4ee3380d6de9c9ec04745830fd9e2eccb3e6cf790d39d7b98ffd19b0dd754a"},
- {file = "numpy-1.26.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d209d8969599b27ad20994c8e41936ee0964e6da07478d6c35016bc386b66ad4"},
- {file = "numpy-1.26.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ffa75af20b44f8dba823498024771d5ac50620e6915abac414251bd971b4529f"},
- {file = "numpy-1.26.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:62b8e4b1e28009ef2846b4c7852046736bab361f7aeadeb6a5b89ebec3c7055a"},
- {file = "numpy-1.26.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a4abb4f9001ad2858e7ac189089c42178fcce737e4169dc61321660f1a96c7d2"},
- {file = "numpy-1.26.4-cp310-cp310-win32.whl", hash = "sha256:bfe25acf8b437eb2a8b2d49d443800a5f18508cd811fea3181723922a8a82b07"},
- {file = "numpy-1.26.4-cp310-cp310-win_amd64.whl", hash = "sha256:b97fe8060236edf3662adfc2c633f56a08ae30560c56310562cb4f95500022d5"},
- {file = "numpy-1.26.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4c66707fabe114439db9068ee468c26bbdf909cac0fb58686a42a24de1760c71"},
- {file = "numpy-1.26.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:edd8b5fe47dab091176d21bb6de568acdd906d1887a4584a15a9a96a1dca06ef"},
- {file = "numpy-1.26.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7ab55401287bfec946ced39700c053796e7cc0e3acbef09993a9ad2adba6ca6e"},
- {file = "numpy-1.26.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:666dbfb6ec68962c033a450943ded891bed2d54e6755e35e5835d63f4f6931d5"},
- {file = "numpy-1.26.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:96ff0b2ad353d8f990b63294c8986f1ec3cb19d749234014f4e7eb0112ceba5a"},
- {file = "numpy-1.26.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:60dedbb91afcbfdc9bc0b1f3f402804070deed7392c23eb7a7f07fa857868e8a"},
- {file = "numpy-1.26.4-cp311-cp311-win32.whl", hash = "sha256:1af303d6b2210eb850fcf03064d364652b7120803a0b872f5211f5234b399f20"},
- {file = "numpy-1.26.4-cp311-cp311-win_amd64.whl", hash = "sha256:cd25bcecc4974d09257ffcd1f098ee778f7834c3ad767fe5db785be9a4aa9cb2"},
- {file = "numpy-1.26.4-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:b3ce300f3644fb06443ee2222c2201dd3a89ea6040541412b8fa189341847218"},
- {file = "numpy-1.26.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:03a8c78d01d9781b28a6989f6fa1bb2c4f2d51201cf99d3dd875df6fbd96b23b"},
- {file = "numpy-1.26.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9fad7dcb1aac3c7f0584a5a8133e3a43eeb2fe127f47e3632d43d677c66c102b"},
- {file = "numpy-1.26.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:675d61ffbfa78604709862923189bad94014bef562cc35cf61d3a07bba02a7ed"},
- {file = "numpy-1.26.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:ab47dbe5cc8210f55aa58e4805fe224dac469cde56b9f731a4c098b91917159a"},
- {file = "numpy-1.26.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:1dda2e7b4ec9dd512f84935c5f126c8bd8b9f2fc001e9f54af255e8c5f16b0e0"},
- {file = "numpy-1.26.4-cp312-cp312-win32.whl", hash = "sha256:50193e430acfc1346175fcbdaa28ffec49947a06918b7b92130744e81e640110"},
- {file = "numpy-1.26.4-cp312-cp312-win_amd64.whl", hash = "sha256:08beddf13648eb95f8d867350f6a018a4be2e5ad54c8d8caed89ebca558b2818"},
- {file = "numpy-1.26.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:7349ab0fa0c429c82442a27a9673fc802ffdb7c7775fad780226cb234965e53c"},
- {file = "numpy-1.26.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:52b8b60467cd7dd1e9ed082188b4e6bb35aa5cdd01777621a1658910745b90be"},
- {file = "numpy-1.26.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d5241e0a80d808d70546c697135da2c613f30e28251ff8307eb72ba696945764"},
- {file = "numpy-1.26.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f870204a840a60da0b12273ef34f7051e98c3b5961b61b0c2c1be6dfd64fbcd3"},
- {file = "numpy-1.26.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:679b0076f67ecc0138fd2ede3a8fd196dddc2ad3254069bcb9faf9a79b1cebcd"},
- {file = "numpy-1.26.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:47711010ad8555514b434df65f7d7b076bb8261df1ca9bb78f53d3b2db02e95c"},
- {file = "numpy-1.26.4-cp39-cp39-win32.whl", hash = "sha256:a354325ee03388678242a4d7ebcd08b5c727033fcff3b2f536aea978e15ee9e6"},
- {file = "numpy-1.26.4-cp39-cp39-win_amd64.whl", hash = "sha256:3373d5d70a5fe74a2c1bb6d2cfd9609ecf686d47a2d7b1d37a8f3b6bf6003aea"},
- {file = "numpy-1.26.4-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:afedb719a9dcfc7eaf2287b839d8198e06dcd4cb5d276a3df279231138e83d30"},
- {file = "numpy-1.26.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95a7476c59002f2f6c590b9b7b998306fba6a5aa646b1e22ddfeaf8f78c3a29c"},
- {file = "numpy-1.26.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:7e50d0a0cc3189f9cb0aeb3a6a6af18c16f59f004b866cd2be1c14b36134a4a0"},
- {file = "numpy-1.26.4.tar.gz", hash = "sha256:2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010"},
-]
-
-[[package]]
-name = "nvidia-cublas-cu12"
-version = "12.6.4.1"
-description = "CUBLAS native runtime libraries"
-optional = false
-python-versions = ">=3"
-groups = ["main"]
-markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
-files = [
- {file = "nvidia_cublas_cu12-12.6.4.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:08ed2686e9875d01b58e3cb379c6896df8e76c75e0d4a7f7dace3d7b6d9ef8eb"},
- {file = "nvidia_cublas_cu12-12.6.4.1-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:235f728d6e2a409eddf1df58d5b0921cf80cfa9e72b9f2775ccb7b4a87984668"},
- {file = "nvidia_cublas_cu12-12.6.4.1-py3-none-win_amd64.whl", hash = "sha256:9e4fa264f4d8a4eb0cdbd34beadc029f453b3bafae02401e999cf3d5a5af75f8"},
-]
-
-[[package]]
-name = "nvidia-cuda-cupti-cu12"
-version = "12.6.80"
-description = "CUDA profiling tools runtime libs."
-optional = false
-python-versions = ">=3"
-groups = ["main"]
-markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
-files = [
- {file = "nvidia_cuda_cupti_cu12-12.6.80-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:166ee35a3ff1587f2490364f90eeeb8da06cd867bd5b701bf7f9a02b78bc63fc"},
- {file = "nvidia_cuda_cupti_cu12-12.6.80-py3-none-manylinux2014_aarch64.whl", hash = "sha256:358b4a1d35370353d52e12f0a7d1769fc01ff74a191689d3870b2123156184c4"},
- {file = "nvidia_cuda_cupti_cu12-12.6.80-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:6768bad6cab4f19e8292125e5f1ac8aa7d1718704012a0e3272a6f61c4bce132"},
- {file = "nvidia_cuda_cupti_cu12-12.6.80-py3-none-manylinux2014_x86_64.whl", hash = "sha256:a3eff6cdfcc6a4c35db968a06fcadb061cbc7d6dde548609a941ff8701b98b73"},
- {file = "nvidia_cuda_cupti_cu12-12.6.80-py3-none-win_amd64.whl", hash = "sha256:bbe6ae76e83ce5251b56e8c8e61a964f757175682bbad058b170b136266ab00a"},
-]
-
-[[package]]
-name = "nvidia-cuda-nvrtc-cu12"
-version = "12.6.77"
-description = "NVRTC native runtime libraries"
-optional = false
-python-versions = ">=3"
-groups = ["main"]
-markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
-files = [
- {file = "nvidia_cuda_nvrtc_cu12-12.6.77-py3-none-manylinux2014_aarch64.whl", hash = "sha256:5847f1d6e5b757f1d2b3991a01082a44aad6f10ab3c5c0213fa3e25bddc25a13"},
- {file = "nvidia_cuda_nvrtc_cu12-12.6.77-py3-none-manylinux2014_x86_64.whl", hash = "sha256:35b0cc6ee3a9636d5409133e79273ce1f3fd087abb0532d2d2e8fff1fe9efc53"},
- {file = "nvidia_cuda_nvrtc_cu12-12.6.77-py3-none-win_amd64.whl", hash = "sha256:f7007dbd914c56bd80ea31bc43e8e149da38f68158f423ba845fc3292684e45a"},
-]
-
-[[package]]
-name = "nvidia-cuda-runtime-cu12"
-version = "12.6.77"
-description = "CUDA Runtime native Libraries"
-optional = false
-python-versions = ">=3"
-groups = ["main"]
-markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
-files = [
- {file = "nvidia_cuda_runtime_cu12-12.6.77-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:6116fad3e049e04791c0256a9778c16237837c08b27ed8c8401e2e45de8d60cd"},
- {file = "nvidia_cuda_runtime_cu12-12.6.77-py3-none-manylinux2014_aarch64.whl", hash = "sha256:d461264ecb429c84c8879a7153499ddc7b19b5f8d84c204307491989a365588e"},
- {file = "nvidia_cuda_runtime_cu12-12.6.77-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ba3b56a4f896141e25e19ab287cd71e52a6a0f4b29d0d31609f60e3b4d5219b7"},
- {file = "nvidia_cuda_runtime_cu12-12.6.77-py3-none-manylinux2014_x86_64.whl", hash = "sha256:a84d15d5e1da416dd4774cb42edf5e954a3e60cc945698dc1d5be02321c44dc8"},
- {file = "nvidia_cuda_runtime_cu12-12.6.77-py3-none-win_amd64.whl", hash = "sha256:86c58044c824bf3c173c49a2dbc7a6c8b53cb4e4dca50068be0bf64e9dab3f7f"},
-]
-
-[[package]]
-name = "nvidia-cudnn-cu12"
-version = "9.5.1.17"
-description = "cuDNN runtime libraries"
-optional = false
-python-versions = ">=3"
-groups = ["main"]
-markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
-files = [
- {file = "nvidia_cudnn_cu12-9.5.1.17-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:9fd4584468533c61873e5fda8ca41bac3a38bcb2d12350830c69b0a96a7e4def"},
- {file = "nvidia_cudnn_cu12-9.5.1.17-py3-none-manylinux_2_28_x86_64.whl", hash = "sha256:30ac3869f6db17d170e0e556dd6cc5eee02647abc31ca856634d5a40f82c15b2"},
- {file = "nvidia_cudnn_cu12-9.5.1.17-py3-none-win_amd64.whl", hash = "sha256:d7af0f8a4f3b4b9dbb3122f2ef553b45694ed9c384d5a75bab197b8eefb79ab8"},
-]
-
-[package.dependencies]
-nvidia-cublas-cu12 = "*"
-
-[[package]]
-name = "nvidia-cufft-cu12"
-version = "11.3.0.4"
-description = "CUFFT native runtime libraries"
-optional = false
-python-versions = ">=3"
-groups = ["main"]
-markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
-files = [
- {file = "nvidia_cufft_cu12-11.3.0.4-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d16079550df460376455cba121db6564089176d9bac9e4f360493ca4741b22a6"},
- {file = "nvidia_cufft_cu12-11.3.0.4-py3-none-manylinux2014_aarch64.whl", hash = "sha256:8510990de9f96c803a051822618d42bf6cb8f069ff3f48d93a8486efdacb48fb"},
- {file = "nvidia_cufft_cu12-11.3.0.4-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ccba62eb9cef5559abd5e0d54ceed2d9934030f51163df018532142a8ec533e5"},
- {file = "nvidia_cufft_cu12-11.3.0.4-py3-none-manylinux2014_x86_64.whl", hash = "sha256:768160ac89f6f7b459bee747e8d175dbf53619cfe74b2a5636264163138013ca"},
- {file = "nvidia_cufft_cu12-11.3.0.4-py3-none-win_amd64.whl", hash = "sha256:6048ebddfb90d09d2707efb1fd78d4e3a77cb3ae4dc60e19aab6be0ece2ae464"},
-]
-
-[package.dependencies]
-nvidia-nvjitlink-cu12 = "*"
-
-[[package]]
-name = "nvidia-cufile-cu12"
-version = "1.11.1.6"
-description = "cuFile GPUDirect libraries"
-optional = false
-python-versions = ">=3"
-groups = ["main"]
-markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
-files = [
- {file = "nvidia_cufile_cu12-1.11.1.6-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:cc23469d1c7e52ce6c1d55253273d32c565dd22068647f3aa59b3c6b005bf159"},
- {file = "nvidia_cufile_cu12-1.11.1.6-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:8f57a0051dcf2543f6dc2b98a98cb2719c37d3cee1baba8965d57f3bbc90d4db"},
-]
-
-[[package]]
-name = "nvidia-curand-cu12"
-version = "10.3.7.77"
-description = "CURAND native runtime libraries"
-optional = false
-python-versions = ">=3"
-groups = ["main"]
-markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
-files = [
- {file = "nvidia_curand_cu12-10.3.7.77-py3-none-manylinux2014_aarch64.whl", hash = "sha256:6e82df077060ea28e37f48a3ec442a8f47690c7499bff392a5938614b56c98d8"},
- {file = "nvidia_curand_cu12-10.3.7.77-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:a42cd1344297f70b9e39a1e4f467a4e1c10f1da54ff7a85c12197f6c652c8bdf"},
- {file = "nvidia_curand_cu12-10.3.7.77-py3-none-manylinux2014_x86_64.whl", hash = "sha256:99f1a32f1ac2bd134897fc7a203f779303261268a65762a623bf30cc9fe79117"},
- {file = "nvidia_curand_cu12-10.3.7.77-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:7b2ed8e95595c3591d984ea3603dd66fe6ce6812b886d59049988a712ed06b6e"},
- {file = "nvidia_curand_cu12-10.3.7.77-py3-none-win_amd64.whl", hash = "sha256:6d6d935ffba0f3d439b7cd968192ff068fafd9018dbf1b85b37261b13cfc9905"},
-]
-
-[[package]]
-name = "nvidia-cusolver-cu12"
-version = "11.7.1.2"
-description = "CUDA solver native runtime libraries"
-optional = false
-python-versions = ">=3"
-groups = ["main"]
-markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
-files = [
- {file = "nvidia_cusolver_cu12-11.7.1.2-py3-none-manylinux2014_aarch64.whl", hash = "sha256:0ce237ef60acde1efc457335a2ddadfd7610b892d94efee7b776c64bb1cac9e0"},
- {file = "nvidia_cusolver_cu12-11.7.1.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:e9e49843a7707e42022babb9bcfa33c29857a93b88020c4e4434656a655b698c"},
- {file = "nvidia_cusolver_cu12-11.7.1.2-py3-none-manylinux2014_x86_64.whl", hash = "sha256:6cf28f17f64107a0c4d7802be5ff5537b2130bfc112f25d5a30df227058ca0e6"},
- {file = "nvidia_cusolver_cu12-11.7.1.2-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:dbbe4fc38ec1289c7e5230e16248365e375c3673c9c8bac5796e2e20db07f56e"},
- {file = "nvidia_cusolver_cu12-11.7.1.2-py3-none-win_amd64.whl", hash = "sha256:6813f9d8073f555444a8705f3ab0296d3e1cb37a16d694c5fc8b862a0d8706d7"},
-]
-
-[package.dependencies]
-nvidia-cublas-cu12 = "*"
-nvidia-cusparse-cu12 = "*"
-nvidia-nvjitlink-cu12 = "*"
-
-[[package]]
-name = "nvidia-cusparse-cu12"
-version = "12.5.4.2"
-description = "CUSPARSE native runtime libraries"
-optional = false
-python-versions = ">=3"
-groups = ["main"]
-markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
-files = [
- {file = "nvidia_cusparse_cu12-12.5.4.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d25b62fb18751758fe3c93a4a08eff08effedfe4edf1c6bb5afd0890fe88f887"},
- {file = "nvidia_cusparse_cu12-12.5.4.2-py3-none-manylinux2014_aarch64.whl", hash = "sha256:7aa32fa5470cf754f72d1116c7cbc300b4e638d3ae5304cfa4a638a5b87161b1"},
- {file = "nvidia_cusparse_cu12-12.5.4.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:7556d9eca156e18184b94947ade0fba5bb47d69cec46bf8660fd2c71a4b48b73"},
- {file = "nvidia_cusparse_cu12-12.5.4.2-py3-none-manylinux2014_x86_64.whl", hash = "sha256:23749a6571191a215cb74d1cdbff4a86e7b19f1200c071b3fcf844a5bea23a2f"},
- {file = "nvidia_cusparse_cu12-12.5.4.2-py3-none-win_amd64.whl", hash = "sha256:4acb8c08855a26d737398cba8fb6f8f5045d93f82612b4cfd84645a2332ccf20"},
-]
-
-[package.dependencies]
-nvidia-nvjitlink-cu12 = "*"
-
-[[package]]
-name = "nvidia-cusparselt-cu12"
-version = "0.6.3"
-description = "NVIDIA cuSPARSELt"
-optional = false
-python-versions = "*"
-groups = ["main"]
-markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
-files = [
- {file = "nvidia_cusparselt_cu12-0.6.3-py3-none-manylinux2014_aarch64.whl", hash = "sha256:8371549623ba601a06322af2133c4a44350575f5a3108fb75f3ef20b822ad5f1"},
- {file = "nvidia_cusparselt_cu12-0.6.3-py3-none-manylinux2014_x86_64.whl", hash = "sha256:e5c8a26c36445dd2e6812f1177978a24e2d37cacce7e090f297a688d1ec44f46"},
- {file = "nvidia_cusparselt_cu12-0.6.3-py3-none-win_amd64.whl", hash = "sha256:3b325bcbd9b754ba43df5a311488fca11a6b5dc3d11df4d190c000cf1a0765c7"},
-]
-
-[[package]]
-name = "nvidia-nccl-cu12"
-version = "2.26.2"
-description = "NVIDIA Collective Communication Library (NCCL) Runtime"
-optional = false
-python-versions = ">=3"
-groups = ["main"]
-markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
-files = [
- {file = "nvidia_nccl_cu12-2.26.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:5c196e95e832ad30fbbb50381eb3cbd1fadd5675e587a548563993609af19522"},
- {file = "nvidia_nccl_cu12-2.26.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:694cf3879a206553cc9d7dbda76b13efaf610fdb70a50cba303de1b0d1530ac6"},
-]
-
-[[package]]
-name = "nvidia-nvjitlink-cu12"
-version = "12.6.85"
-description = "Nvidia JIT LTO Library"
-optional = false
-python-versions = ">=3"
-groups = ["main"]
-markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
-files = [
- {file = "nvidia_nvjitlink_cu12-12.6.85-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl", hash = "sha256:eedc36df9e88b682efe4309aa16b5b4e78c2407eac59e8c10a6a47535164369a"},
- {file = "nvidia_nvjitlink_cu12-12.6.85-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:cf4eaa7d4b6b543ffd69d6abfb11efdeb2db48270d94dfd3a452c24150829e41"},
- {file = "nvidia_nvjitlink_cu12-12.6.85-py3-none-win_amd64.whl", hash = "sha256:e61120e52ed675747825cdd16febc6a0730537451d867ee58bee3853b1b13d1c"},
-]
-
-[[package]]
-name = "nvidia-nvtx-cu12"
-version = "12.6.77"
-description = "NVIDIA Tools Extension"
-optional = false
-python-versions = ">=3"
-groups = ["main"]
-markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
-files = [
- {file = "nvidia_nvtx_cu12-12.6.77-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:f44f8d86bb7d5629988d61c8d3ae61dddb2015dee142740536bc7481b022fe4b"},
- {file = "nvidia_nvtx_cu12-12.6.77-py3-none-manylinux2014_aarch64.whl", hash = "sha256:adcaabb9d436c9761fca2b13959a2d237c5f9fd406c8e4b723c695409ff88059"},
- {file = "nvidia_nvtx_cu12-12.6.77-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b90bed3df379fa79afbd21be8e04a0314336b8ae16768b58f2d34cb1d04cd7d2"},
- {file = "nvidia_nvtx_cu12-12.6.77-py3-none-manylinux2014_x86_64.whl", hash = "sha256:6574241a3ec5fdc9334353ab8c479fe75841dbe8f4532a8fc97ce63503330ba1"},
- {file = "nvidia_nvtx_cu12-12.6.77-py3-none-win_amd64.whl", hash = "sha256:2fb11a4af04a5e6c84073e6404d26588a34afd35379f0855a99797897efa75c0"},
-]
-
-[[package]]
-name = "optuna"
-version = "3.6.1"
-description = "A hyperparameter optimization framework"
-optional = false
-python-versions = ">=3.7"
-groups = ["main"]
-files = [
- {file = "optuna-3.6.1-py3-none-any.whl", hash = "sha256:b32e0490bd6552790b70ec94de77dd2855057c9e229cd9f4da48fe8a31c7f1cc"},
- {file = "optuna-3.6.1.tar.gz", hash = "sha256:146e530b57b4b9afd7526b3e642fbe65491f7e292b405913355f8e438e361ecf"},
-]
-
-[package.dependencies]
-alembic = ">=1.5.0"
-colorlog = "*"
-numpy = "*"
-packaging = ">=20.0"
-PyYAML = "*"
-sqlalchemy = ">=1.3.0"
-tqdm = "*"
-
-[package.extras]
-benchmark = ["asv (>=0.5.0)", "botorch", "cma", "virtualenv"]
-checking = ["black", "blackdoc", "flake8", "isort", "mypy", "mypy-boto3-s3", "types-PyYAML", "types-redis", "types-setuptools", "types-tqdm", "typing-extensions (>=3.10.0.0)"]
-document = ["ase", "cmaes (>=0.10.0)", "fvcore", "lightgbm", "matplotlib (!=3.6.0)", "pandas", "pillow", "plotly (>=4.9.0)", "scikit-learn", "sphinx", "sphinx-copybutton", "sphinx-gallery", "sphinx-plotly-directive", "sphinx-rtd-theme (>=1.2.0)", "torch", "torchvision"]
-optional = ["boto3", "cmaes (>=0.10.0)", "google-cloud-storage", "matplotlib (!=3.6.0)", "pandas", "plotly (>=4.9.0)", "redis", "scikit-learn (>=0.24.2)", "scipy", "torch"]
-test = ["coverage", "fakeredis[lua]", "kaleido", "moto", "pytest", "scipy (>=1.9.2) ; python_version >= \"3.8\"", "torch"]
-
-[[package]]
-name = "packaging"
-version = "24.1"
-description = "Core utilities for Python packages"
-optional = false
-python-versions = ">=3.8"
-groups = ["main"]
-files = [
- {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"},
- {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"},
-]
-
-[[package]]
-name = "pandas"
-version = "2.3.1"
-description = "Powerful data structures for data analysis, time series, and statistics"
-optional = false
-python-versions = ">=3.9"
-groups = ["main"]
-files = [
- {file = "pandas-2.3.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:22c2e866f7209ebc3a8f08d75766566aae02bcc91d196935a1d9e59c7b990ac9"},
- {file = "pandas-2.3.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:3583d348546201aff730c8c47e49bc159833f971c2899d6097bce68b9112a4f1"},
- {file = "pandas-2.3.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0f951fbb702dacd390561e0ea45cdd8ecfa7fb56935eb3dd78e306c19104b9b0"},
- {file = "pandas-2.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cd05b72ec02ebfb993569b4931b2e16fbb4d6ad6ce80224a3ee838387d83a191"},
- {file = "pandas-2.3.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:1b916a627919a247d865aed068eb65eb91a344b13f5b57ab9f610b7716c92de1"},
- {file = "pandas-2.3.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:fe67dc676818c186d5a3d5425250e40f179c2a89145df477dd82945eaea89e97"},
- {file = "pandas-2.3.1-cp310-cp310-win_amd64.whl", hash = "sha256:2eb789ae0274672acbd3c575b0598d213345660120a257b47b5dafdc618aec83"},
- {file = "pandas-2.3.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2b0540963d83431f5ce8870ea02a7430adca100cec8a050f0811f8e31035541b"},
- {file = "pandas-2.3.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fe7317f578c6a153912bd2292f02e40c1d8f253e93c599e82620c7f69755c74f"},
- {file = "pandas-2.3.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e6723a27ad7b244c0c79d8e7007092d7c8f0f11305770e2f4cd778b3ad5f9f85"},
- {file = "pandas-2.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3462c3735fe19f2638f2c3a40bd94ec2dc5ba13abbb032dd2fa1f540a075509d"},
- {file = "pandas-2.3.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:98bcc8b5bf7afed22cc753a28bc4d9e26e078e777066bc53fac7904ddef9a678"},
- {file = "pandas-2.3.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:4d544806b485ddf29e52d75b1f559142514e60ef58a832f74fb38e48d757b299"},
- {file = "pandas-2.3.1-cp311-cp311-win_amd64.whl", hash = "sha256:b3cd4273d3cb3707b6fffd217204c52ed92859533e31dc03b7c5008aa933aaab"},
- {file = "pandas-2.3.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:689968e841136f9e542020698ee1c4fbe9caa2ed2213ae2388dc7b81721510d3"},
- {file = "pandas-2.3.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:025e92411c16cbe5bb2a4abc99732a6b132f439b8aab23a59fa593eb00704232"},
- {file = "pandas-2.3.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9b7ff55f31c4fcb3e316e8f7fa194566b286d6ac430afec0d461163312c5841e"},
- {file = "pandas-2.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7dcb79bf373a47d2a40cf7232928eb7540155abbc460925c2c96d2d30b006eb4"},
- {file = "pandas-2.3.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:56a342b231e8862c96bdb6ab97170e203ce511f4d0429589c8ede1ee8ece48b8"},
- {file = "pandas-2.3.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ca7ed14832bce68baef331f4d7f294411bed8efd032f8109d690df45e00c4679"},
- {file = "pandas-2.3.1-cp312-cp312-win_amd64.whl", hash = "sha256:ac942bfd0aca577bef61f2bc8da8147c4ef6879965ef883d8e8d5d2dc3e744b8"},
- {file = "pandas-2.3.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:9026bd4a80108fac2239294a15ef9003c4ee191a0f64b90f170b40cfb7cf2d22"},
- {file = "pandas-2.3.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:6de8547d4fdb12421e2d047a2c446c623ff4c11f47fddb6b9169eb98ffba485a"},
- {file = "pandas-2.3.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:782647ddc63c83133b2506912cc6b108140a38a37292102aaa19c81c83db2928"},
- {file = "pandas-2.3.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ba6aff74075311fc88504b1db890187a3cd0f887a5b10f5525f8e2ef55bfdb9"},
- {file = "pandas-2.3.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e5635178b387bd2ba4ac040f82bc2ef6e6b500483975c4ebacd34bec945fda12"},
- {file = "pandas-2.3.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6f3bf5ec947526106399a9e1d26d40ee2b259c66422efdf4de63c848492d91bb"},
- {file = "pandas-2.3.1-cp313-cp313-win_amd64.whl", hash = "sha256:1c78cf43c8fde236342a1cb2c34bcff89564a7bfed7e474ed2fffa6aed03a956"},
- {file = "pandas-2.3.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:8dfc17328e8da77be3cf9f47509e5637ba8f137148ed0e9b5241e1baf526e20a"},
- {file = "pandas-2.3.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:ec6c851509364c59a5344458ab935e6451b31b818be467eb24b0fe89bd05b6b9"},
- {file = "pandas-2.3.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:911580460fc4884d9b05254b38a6bfadddfcc6aaef856fb5859e7ca202e45275"},
- {file = "pandas-2.3.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2f4d6feeba91744872a600e6edbbd5b033005b431d5ae8379abee5bcfa479fab"},
- {file = "pandas-2.3.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:fe37e757f462d31a9cd7580236a82f353f5713a80e059a29753cf938c6775d96"},
- {file = "pandas-2.3.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:5db9637dbc24b631ff3707269ae4559bce4b7fd75c1c4d7e13f40edc42df4444"},
- {file = "pandas-2.3.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4645f770f98d656f11c69e81aeb21c6fca076a44bed3dcbb9396a4311bc7f6d8"},
- {file = "pandas-2.3.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:342e59589cc454aaff7484d75b816a433350b3d7964d7847327edda4d532a2e3"},
- {file = "pandas-2.3.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1d12f618d80379fde6af007f65f0c25bd3e40251dbd1636480dfffce2cf1e6da"},
- {file = "pandas-2.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd71c47a911da120d72ef173aeac0bf5241423f9bfea57320110a978457e069e"},
- {file = "pandas-2.3.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:09e3b1587f0f3b0913e21e8b32c3119174551deb4a4eba4a89bc7377947977e7"},
- {file = "pandas-2.3.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:2323294c73ed50f612f67e2bf3ae45aea04dce5690778e08a09391897f35ff88"},
- {file = "pandas-2.3.1-cp39-cp39-win_amd64.whl", hash = "sha256:b4b0de34dc8499c2db34000ef8baad684cfa4cbd836ecee05f323ebfba348c7d"},
- {file = "pandas-2.3.1.tar.gz", hash = "sha256:0a95b9ac964fe83ce317827f80304d37388ea77616b1425f0ae41c9d2d0d7bb2"},
-]
-
-[package.dependencies]
-numpy = [
- {version = ">=1.22.4", markers = "python_version < \"3.11\""},
- {version = ">=1.23.2", markers = "python_version == \"3.11\""},
- {version = ">=1.26.0", markers = "python_version >= \"3.12\""},
-]
-python-dateutil = ">=2.8.2"
-pytz = ">=2020.1"
-tzdata = ">=2022.7"
-
-[package.extras]
-all = ["PyQt5 (>=5.15.9)", "SQLAlchemy (>=2.0.0)", "adbc-driver-postgresql (>=0.8.0)", "adbc-driver-sqlite (>=0.8.0)", "beautifulsoup4 (>=4.11.2)", "bottleneck (>=1.3.6)", "dataframe-api-compat (>=0.1.7)", "fastparquet (>=2022.12.0)", "fsspec (>=2022.11.0)", "gcsfs (>=2022.11.0)", "html5lib (>=1.1)", "hypothesis (>=6.46.1)", "jinja2 (>=3.1.2)", "lxml (>=4.9.2)", "matplotlib (>=3.6.3)", "numba (>=0.56.4)", "numexpr (>=2.8.4)", "odfpy (>=1.4.1)", "openpyxl (>=3.1.0)", "pandas-gbq (>=0.19.0 [...]
-aws = ["s3fs (>=2022.11.0)"]
-clipboard = ["PyQt5 (>=5.15.9)", "qtpy (>=2.3.0)"]
-compression = ["zstandard (>=0.19.0)"]
-computation = ["scipy (>=1.10.0)", "xarray (>=2022.12.0)"]
-consortium-standard = ["dataframe-api-compat (>=0.1.7)"]
-excel = ["odfpy (>=1.4.1)", "openpyxl (>=3.1.0)", "python-calamine (>=0.1.7)", "pyxlsb (>=1.0.10)", "xlrd (>=2.0.1)", "xlsxwriter (>=3.0.5)"]
-feather = ["pyarrow (>=10.0.1)"]
-fss = ["fsspec (>=2022.11.0)"]
-gcp = ["gcsfs (>=2022.11.0)", "pandas-gbq (>=0.19.0)"]
-hdf5 = ["tables (>=3.8.0)"]
-html = ["beautifulsoup4 (>=4.11.2)", "html5lib (>=1.1)", "lxml (>=4.9.2)"]
-mysql = ["SQLAlchemy (>=2.0.0)", "pymysql (>=1.0.2)"]
-output-formatting = ["jinja2 (>=3.1.2)", "tabulate (>=0.9.0)"]
-parquet = ["pyarrow (>=10.0.1)"]
-performance = ["bottleneck (>=1.3.6)", "numba (>=0.56.4)", "numexpr (>=2.8.4)"]
-plot = ["matplotlib (>=3.6.3)"]
-postgresql = ["SQLAlchemy (>=2.0.0)", "adbc-driver-postgresql (>=0.8.0)", "psycopg2 (>=2.9.6)"]
-pyarrow = ["pyarrow (>=10.0.1)"]
-spss = ["pyreadstat (>=1.2.0)"]
-sql-other = ["SQLAlchemy (>=2.0.0)", "adbc-driver-postgresql (>=0.8.0)", "adbc-driver-sqlite (>=0.8.0)"]
-test = ["hypothesis (>=6.46.1)", "pytest (>=7.3.2)", "pytest-xdist (>=2.2.0)"]
-xml = ["lxml (>=4.9.2)"]
-
-[[package]]
-name = "pathspec"
-version = "0.12.1"
-description = "Utility library for gitignore style pattern matching of file paths."
-optional = false
-python-versions = ">=3.8"
-groups = ["main"]
-files = [
- {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"},
- {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"},
-]
-
-[[package]]
-name = "patsy"
-version = "1.0.1"
-description = "A Python package for describing statistical models and for building design matrices."
-optional = false
-python-versions = ">=3.6"
-groups = ["main"]
-files = [
- {file = "patsy-1.0.1-py2.py3-none-any.whl", hash = "sha256:751fb38f9e97e62312e921a1954b81e1bb2bcda4f5eeabaf94db251ee791509c"},
- {file = "patsy-1.0.1.tar.gz", hash = "sha256:e786a9391eec818c054e359b737bbce692f051aee4c661f4141cc88fb459c0c4"},
-]
-
-[package.dependencies]
-numpy = ">=1.4"
-
-[package.extras]
-test = ["pytest", "pytest-cov", "scipy"]
-
-[[package]]
-name = "platformdirs"
-version = "4.3.8"
-description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`."
-optional = false
-python-versions = ">=3.9"
-groups = ["main"]
-files = [
- {file = "platformdirs-4.3.8-py3-none-any.whl", hash = "sha256:ff7059bb7eb1179e2685604f4aaf157cfd9535242bd23742eadc3c13542139b4"},
- {file = "platformdirs-4.3.8.tar.gz", hash = "sha256:3d512d96e16bcb959a814c9f348431070822a6496326a4be0911c40b5a74c2bc"},
-]
-
-[package.extras]
-docs = ["furo (>=2024.8.6)", "proselint (>=0.14)", "sphinx (>=8.1.3)", "sphinx-autodoc-typehints (>=3)"]
-test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=8.3.4)", "pytest-cov (>=6)", "pytest-mock (>=3.14)"]
-type = ["mypy (>=1.14.1)"]
-
-[[package]]
-name = "psutil"
-version = "5.9.8"
-description = "Cross-platform lib for process and system monitoring in Python."
-optional = false
-python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*"
-groups = ["main"]
-files = [
- {file = "psutil-5.9.8-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:26bd09967ae00920df88e0352a91cff1a78f8d69b3ecabbfe733610c0af486c8"},
- {file = "psutil-5.9.8-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:05806de88103b25903dff19bb6692bd2e714ccf9e668d050d144012055cbca73"},
- {file = "psutil-5.9.8-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:611052c4bc70432ec770d5d54f64206aa7203a101ec273a0cd82418c86503bb7"},
- {file = "psutil-5.9.8-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:50187900d73c1381ba1454cf40308c2bf6f34268518b3f36a9b663ca87e65e36"},
- {file = "psutil-5.9.8-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:02615ed8c5ea222323408ceba16c60e99c3f91639b07da6373fb7e6539abc56d"},
- {file = "psutil-5.9.8-cp27-none-win32.whl", hash = "sha256:36f435891adb138ed3c9e58c6af3e2e6ca9ac2f365efe1f9cfef2794e6c93b4e"},
- {file = "psutil-5.9.8-cp27-none-win_amd64.whl", hash = "sha256:bd1184ceb3f87651a67b2708d4c3338e9b10c5df903f2e3776b62303b26cb631"},
- {file = "psutil-5.9.8-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:aee678c8720623dc456fa20659af736241f575d79429a0e5e9cf88ae0605cc81"},
- {file = "psutil-5.9.8-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8cb6403ce6d8e047495a701dc7c5bd788add903f8986d523e3e20b98b733e421"},
- {file = "psutil-5.9.8-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d06016f7f8625a1825ba3732081d77c94589dca78b7a3fc072194851e88461a4"},
- {file = "psutil-5.9.8-cp36-cp36m-win32.whl", hash = "sha256:7d79560ad97af658a0f6adfef8b834b53f64746d45b403f225b85c5c2c140eee"},
- {file = "psutil-5.9.8-cp36-cp36m-win_amd64.whl", hash = "sha256:27cc40c3493bb10de1be4b3f07cae4c010ce715290a5be22b98493509c6299e2"},
- {file = "psutil-5.9.8-cp37-abi3-win32.whl", hash = "sha256:bc56c2a1b0d15aa3eaa5a60c9f3f8e3e565303b465dbf57a1b730e7a2b9844e0"},
- {file = "psutil-5.9.8-cp37-abi3-win_amd64.whl", hash = "sha256:8db4c1b57507eef143a15a6884ca10f7c73876cdf5d51e713151c1236a0e68cf"},
- {file = "psutil-5.9.8-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:d16bbddf0693323b8c6123dd804100241da461e41d6e332fb0ba6058f630f8c8"},
- {file = "psutil-5.9.8.tar.gz", hash = "sha256:6be126e3225486dff286a8fb9a06246a5253f4c7c53b475ea5f5ac934e64194c"},
-]
-
-[package.extras]
-test = ["enum34 ; python_version <= \"3.4\"", "ipaddress ; python_version < \"3.0\"", "mock ; python_version < \"3.0\"", "pywin32 ; sys_platform == \"win32\"", "wmi ; sys_platform == \"win32\""]
-
-[[package]]
-name = "python-dateutil"
-version = "2.9.0.post0"
-description = "Extensions to the standard Python datetime module"
-optional = false
-python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7"
-groups = ["main"]
-files = [
- {file = "python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3"},
- {file = "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427"},
-]
-
-[package.dependencies]
-six = ">=1.5"
-
-[[package]]
-name = "pytz"
-version = "2024.1"
-description = "World timezone definitions, modern and historical"
-optional = false
-python-versions = "*"
-groups = ["main"]
-files = [
- {file = "pytz-2024.1-py2.py3-none-any.whl", hash = "sha256:328171f4e3623139da4983451950b28e95ac706e13f3f2630a879749e7a8b319"},
- {file = "pytz-2024.1.tar.gz", hash = "sha256:2a29735ea9c18baf14b448846bde5a48030ed267578472d8955cd0e7443a9812"},
-]
-
-[[package]]
-name = "pyyaml"
-version = "6.0.2"
-description = "YAML parser and emitter for Python"
-optional = false
-python-versions = ">=3.8"
-groups = ["main"]
-files = [
- {file = "PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086"},
- {file = "PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf"},
- {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8824b5a04a04a047e72eea5cec3bc266db09e35de6bdfe34c9436ac5ee27d237"},
- {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7c36280e6fb8385e520936c3cb3b8042851904eba0e58d277dca80a5cfed590b"},
- {file = "PyYAML-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec031d5d2feb36d1d1a24380e4db6d43695f3748343d99434e6f5f9156aaa2ed"},
- {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:936d68689298c36b53b29f23c6dbb74de12b4ac12ca6cfe0e047bedceea56180"},
- {file = "PyYAML-6.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:23502f431948090f597378482b4812b0caae32c22213aecf3b55325e049a6c68"},
- {file = "PyYAML-6.0.2-cp310-cp310-win32.whl", hash = "sha256:2e99c6826ffa974fe6e27cdb5ed0021786b03fc98e5ee3c5bfe1fd5015f42b99"},
- {file = "PyYAML-6.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:a4d3091415f010369ae4ed1fc6b79def9416358877534caf6a0fdd2146c87a3e"},
- {file = "PyYAML-6.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774"},
- {file = "PyYAML-6.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee"},
- {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c"},
- {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317"},
- {file = "PyYAML-6.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85"},
- {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4"},
- {file = "PyYAML-6.0.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e"},
- {file = "PyYAML-6.0.2-cp311-cp311-win32.whl", hash = "sha256:11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5"},
- {file = "PyYAML-6.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44"},
- {file = "PyYAML-6.0.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab"},
- {file = "PyYAML-6.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725"},
- {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5"},
- {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425"},
- {file = "PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476"},
- {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48"},
- {file = "PyYAML-6.0.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b"},
- {file = "PyYAML-6.0.2-cp312-cp312-win32.whl", hash = "sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4"},
- {file = "PyYAML-6.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8"},
- {file = "PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba"},
- {file = "PyYAML-6.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1"},
- {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133"},
- {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484"},
- {file = "PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5"},
- {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc"},
- {file = "PyYAML-6.0.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652"},
- {file = "PyYAML-6.0.2-cp313-cp313-win32.whl", hash = "sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183"},
- {file = "PyYAML-6.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563"},
- {file = "PyYAML-6.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:24471b829b3bf607e04e88d79542a9d48bb037c2267d7927a874e6c205ca7e9a"},
- {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7fded462629cfa4b685c5416b949ebad6cec74af5e2d42905d41e257e0869f5"},
- {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d84a1718ee396f54f3a086ea0a66d8e552b2ab2017ef8b420e92edbc841c352d"},
- {file = "PyYAML-6.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9056c1ecd25795207ad294bcf39f2db3d845767be0ea6e6a34d856f006006083"},
- {file = "PyYAML-6.0.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:82d09873e40955485746739bcb8b4586983670466c23382c19cffecbf1fd8706"},
- {file = "PyYAML-6.0.2-cp38-cp38-win32.whl", hash = "sha256:43fa96a3ca0d6b1812e01ced1044a003533c47f6ee8aca31724f78e93ccc089a"},
- {file = "PyYAML-6.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:01179a4a8559ab5de078078f37e5c1a30d76bb88519906844fd7bdea1b7729ff"},
- {file = "PyYAML-6.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:688ba32a1cffef67fd2e9398a2efebaea461578b0923624778664cc1c914db5d"},
- {file = "PyYAML-6.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8786accb172bd8afb8be14490a16625cbc387036876ab6ba70912730faf8e1f"},
- {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8e03406cac8513435335dbab54c0d385e4a49e4945d2909a581c83647ca0290"},
- {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12"},
- {file = "PyYAML-6.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b1fdb9dc17f5a7677423d508ab4f243a726dea51fa5e70992e59a7411c89d19"},
- {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0b69e4ce7a131fe56b7e4d770c67429700908fc0752af059838b1cfb41960e4e"},
- {file = "PyYAML-6.0.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a9f8c2e67970f13b16084e04f134610fd1d374bf477b17ec1599185cf611d725"},
- {file = "PyYAML-6.0.2-cp39-cp39-win32.whl", hash = "sha256:6395c297d42274772abc367baaa79683958044e5d3835486c16da75d2a694631"},
- {file = "PyYAML-6.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:39693e1f8320ae4f43943590b49779ffb98acb81f788220ea932a6b6c51004d8"},
- {file = "pyyaml-6.0.2.tar.gz", hash = "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e"},
-]
-
-[[package]]
-name = "regex"
-version = "2024.11.6"
-description = "Alternative regular expression module, to replace re."
-optional = false
-python-versions = ">=3.8"
-groups = ["main"]
-files = [
- {file = "regex-2024.11.6-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ff590880083d60acc0433f9c3f713c51f7ac6ebb9adf889c79a261ecf541aa91"},
- {file = "regex-2024.11.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:658f90550f38270639e83ce492f27d2c8d2cd63805c65a13a14d36ca126753f0"},
- {file = "regex-2024.11.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:164d8b7b3b4bcb2068b97428060b2a53be050085ef94eca7f240e7947f1b080e"},
- {file = "regex-2024.11.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d3660c82f209655a06b587d55e723f0b813d3a7db2e32e5e7dc64ac2a9e86fde"},
- {file = "regex-2024.11.6-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d22326fcdef5e08c154280b71163ced384b428343ae16a5ab2b3354aed12436e"},
- {file = "regex-2024.11.6-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f1ac758ef6aebfc8943560194e9fd0fa18bcb34d89fd8bd2af18183afd8da3a2"},
- {file = "regex-2024.11.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:997d6a487ff00807ba810e0f8332c18b4eb8d29463cfb7c820dc4b6e7562d0cf"},
- {file = "regex-2024.11.6-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:02a02d2bb04fec86ad61f3ea7f49c015a0681bf76abb9857f945d26159d2968c"},
- {file = "regex-2024.11.6-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f02f93b92358ee3f78660e43b4b0091229260c5d5c408d17d60bf26b6c900e86"},
- {file = "regex-2024.11.6-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:06eb1be98df10e81ebaded73fcd51989dcf534e3c753466e4b60c4697a003b67"},
- {file = "regex-2024.11.6-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:040df6fe1a5504eb0f04f048e6d09cd7c7110fef851d7c567a6b6e09942feb7d"},
- {file = "regex-2024.11.6-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:fdabbfc59f2c6edba2a6622c647b716e34e8e3867e0ab975412c5c2f79b82da2"},
- {file = "regex-2024.11.6-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:8447d2d39b5abe381419319f942de20b7ecd60ce86f16a23b0698f22e1b70008"},
- {file = "regex-2024.11.6-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:da8f5fc57d1933de22a9e23eec290a0d8a5927a5370d24bda9a6abe50683fe62"},
- {file = "regex-2024.11.6-cp310-cp310-win32.whl", hash = "sha256:b489578720afb782f6ccf2840920f3a32e31ba28a4b162e13900c3e6bd3f930e"},
- {file = "regex-2024.11.6-cp310-cp310-win_amd64.whl", hash = "sha256:5071b2093e793357c9d8b2929dfc13ac5f0a6c650559503bb81189d0a3814519"},
- {file = "regex-2024.11.6-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:5478c6962ad548b54a591778e93cd7c456a7a29f8eca9c49e4f9a806dcc5d638"},
- {file = "regex-2024.11.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2c89a8cc122b25ce6945f0423dc1352cb9593c68abd19223eebbd4e56612c5b7"},
- {file = "regex-2024.11.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:94d87b689cdd831934fa3ce16cc15cd65748e6d689f5d2b8f4f4df2065c9fa20"},
- {file = "regex-2024.11.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1062b39a0a2b75a9c694f7a08e7183a80c63c0d62b301418ffd9c35f55aaa114"},
- {file = "regex-2024.11.6-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:167ed4852351d8a750da48712c3930b031f6efdaa0f22fa1933716bfcd6bf4a3"},
- {file = "regex-2024.11.6-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2d548dafee61f06ebdb584080621f3e0c23fff312f0de1afc776e2a2ba99a74f"},
- {file = "regex-2024.11.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2a19f302cd1ce5dd01a9099aaa19cae6173306d1302a43b627f62e21cf18ac0"},
- {file = "regex-2024.11.6-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bec9931dfb61ddd8ef2ebc05646293812cb6b16b60cf7c9511a832b6f1854b55"},
- {file = "regex-2024.11.6-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:9714398225f299aa85267fd222f7142fcb5c769e73d7733344efc46f2ef5cf89"},
- {file = "regex-2024.11.6-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:202eb32e89f60fc147a41e55cb086db2a3f8cb82f9a9a88440dcfc5d37faae8d"},
- {file = "regex-2024.11.6-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:4181b814e56078e9b00427ca358ec44333765f5ca1b45597ec7446d3a1ef6e34"},
- {file = "regex-2024.11.6-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:068376da5a7e4da51968ce4c122a7cd31afaaec4fccc7856c92f63876e57b51d"},
- {file = "regex-2024.11.6-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ac10f2c4184420d881a3475fb2c6f4d95d53a8d50209a2500723d831036f7c45"},
- {file = "regex-2024.11.6-cp311-cp311-win32.whl", hash = "sha256:c36f9b6f5f8649bb251a5f3f66564438977b7ef8386a52460ae77e6070d309d9"},
- {file = "regex-2024.11.6-cp311-cp311-win_amd64.whl", hash = "sha256:02e28184be537f0e75c1f9b2f8847dc51e08e6e171c6bde130b2687e0c33cf60"},
- {file = "regex-2024.11.6-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:52fb28f528778f184f870b7cf8f225f5eef0a8f6e3778529bdd40c7b3920796a"},
- {file = "regex-2024.11.6-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:fdd6028445d2460f33136c55eeb1f601ab06d74cb3347132e1c24250187500d9"},
- {file = "regex-2024.11.6-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:805e6b60c54bf766b251e94526ebad60b7de0c70f70a4e6210ee2891acb70bf2"},
- {file = "regex-2024.11.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b85c2530be953a890eaffde05485238f07029600e8f098cdf1848d414a8b45e4"},
- {file = "regex-2024.11.6-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bb26437975da7dc36b7efad18aa9dd4ea569d2357ae6b783bf1118dabd9ea577"},
- {file = "regex-2024.11.6-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:abfa5080c374a76a251ba60683242bc17eeb2c9818d0d30117b4486be10c59d3"},
- {file = "regex-2024.11.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70b7fa6606c2881c1db9479b0eaa11ed5dfa11c8d60a474ff0e095099f39d98e"},
- {file = "regex-2024.11.6-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0c32f75920cf99fe6b6c539c399a4a128452eaf1af27f39bce8909c9a3fd8cbe"},
- {file = "regex-2024.11.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:982e6d21414e78e1f51cf595d7f321dcd14de1f2881c5dc6a6e23bbbbd68435e"},
- {file = "regex-2024.11.6-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:a7c2155f790e2fb448faed6dd241386719802296ec588a8b9051c1f5c481bc29"},
- {file = "regex-2024.11.6-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:149f5008d286636e48cd0b1dd65018548944e495b0265b45e1bffecce1ef7f39"},
- {file = "regex-2024.11.6-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:e5364a4502efca094731680e80009632ad6624084aff9a23ce8c8c6820de3e51"},
- {file = "regex-2024.11.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:0a86e7eeca091c09e021db8eb72d54751e527fa47b8d5787caf96d9831bd02ad"},
- {file = "regex-2024.11.6-cp312-cp312-win32.whl", hash = "sha256:32f9a4c643baad4efa81d549c2aadefaeba12249b2adc5af541759237eee1c54"},
- {file = "regex-2024.11.6-cp312-cp312-win_amd64.whl", hash = "sha256:a93c194e2df18f7d264092dc8539b8ffb86b45b899ab976aa15d48214138e81b"},
- {file = "regex-2024.11.6-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:a6ba92c0bcdf96cbf43a12c717eae4bc98325ca3730f6b130ffa2e3c3c723d84"},
- {file = "regex-2024.11.6-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:525eab0b789891ac3be914d36893bdf972d483fe66551f79d3e27146191a37d4"},
- {file = "regex-2024.11.6-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:086a27a0b4ca227941700e0b31425e7a28ef1ae8e5e05a33826e17e47fbfdba0"},
- {file = "regex-2024.11.6-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bde01f35767c4a7899b7eb6e823b125a64de314a8ee9791367c9a34d56af18d0"},
- {file = "regex-2024.11.6-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b583904576650166b3d920d2bcce13971f6f9e9a396c673187f49811b2769dc7"},
- {file = "regex-2024.11.6-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1c4de13f06a0d54fa0d5ab1b7138bfa0d883220965a29616e3ea61b35d5f5fc7"},
- {file = "regex-2024.11.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3cde6e9f2580eb1665965ce9bf17ff4952f34f5b126beb509fee8f4e994f143c"},
- {file = "regex-2024.11.6-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0d7f453dca13f40a02b79636a339c5b62b670141e63efd511d3f8f73fba162b3"},
- {file = "regex-2024.11.6-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:59dfe1ed21aea057a65c6b586afd2a945de04fc7db3de0a6e3ed5397ad491b07"},
- {file = "regex-2024.11.6-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:b97c1e0bd37c5cd7902e65f410779d39eeda155800b65fc4d04cc432efa9bc6e"},
- {file = "regex-2024.11.6-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:f9d1e379028e0fc2ae3654bac3cbbef81bf3fd571272a42d56c24007979bafb6"},
- {file = "regex-2024.11.6-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:13291b39131e2d002a7940fb176e120bec5145f3aeb7621be6534e46251912c4"},
- {file = "regex-2024.11.6-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4f51f88c126370dcec4908576c5a627220da6c09d0bff31cfa89f2523843316d"},
- {file = "regex-2024.11.6-cp313-cp313-win32.whl", hash = "sha256:63b13cfd72e9601125027202cad74995ab26921d8cd935c25f09c630436348ff"},
- {file = "regex-2024.11.6-cp313-cp313-win_amd64.whl", hash = "sha256:2b3361af3198667e99927da8b84c1b010752fa4b1115ee30beaa332cabc3ef1a"},
- {file = "regex-2024.11.6-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:3a51ccc315653ba012774efca4f23d1d2a8a8f278a6072e29c7147eee7da446b"},
- {file = "regex-2024.11.6-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ad182d02e40de7459b73155deb8996bbd8e96852267879396fb274e8700190e3"},
- {file = "regex-2024.11.6-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:ba9b72e5643641b7d41fa1f6d5abda2c9a263ae835b917348fc3c928182ad467"},
- {file = "regex-2024.11.6-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40291b1b89ca6ad8d3f2b82782cc33807f1406cf68c8d440861da6304d8ffbbd"},
- {file = "regex-2024.11.6-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cdf58d0e516ee426a48f7b2c03a332a4114420716d55769ff7108c37a09951bf"},
- {file = "regex-2024.11.6-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a36fdf2af13c2b14738f6e973aba563623cb77d753bbbd8d414d18bfaa3105dd"},
- {file = "regex-2024.11.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d1cee317bfc014c2419a76bcc87f071405e3966da434e03e13beb45f8aced1a6"},
- {file = "regex-2024.11.6-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:50153825ee016b91549962f970d6a4442fa106832e14c918acd1c8e479916c4f"},
- {file = "regex-2024.11.6-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ea1bfda2f7162605f6e8178223576856b3d791109f15ea99a9f95c16a7636fb5"},
- {file = "regex-2024.11.6-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:df951c5f4a1b1910f1a99ff42c473ff60f8225baa1cdd3539fe2819d9543e9df"},
- {file = "regex-2024.11.6-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:072623554418a9911446278f16ecb398fb3b540147a7828c06e2011fa531e773"},
- {file = "regex-2024.11.6-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:f654882311409afb1d780b940234208a252322c24a93b442ca714d119e68086c"},
- {file = "regex-2024.11.6-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:89d75e7293d2b3e674db7d4d9b1bee7f8f3d1609428e293771d1a962617150cc"},
- {file = "regex-2024.11.6-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:f65557897fc977a44ab205ea871b690adaef6b9da6afda4790a2484b04293a5f"},
- {file = "regex-2024.11.6-cp38-cp38-win32.whl", hash = "sha256:6f44ec28b1f858c98d3036ad5d7d0bfc568bdd7a74f9c24e25f41ef1ebfd81a4"},
- {file = "regex-2024.11.6-cp38-cp38-win_amd64.whl", hash = "sha256:bb8f74f2f10dbf13a0be8de623ba4f9491faf58c24064f32b65679b021ed0001"},
- {file = "regex-2024.11.6-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:5704e174f8ccab2026bd2f1ab6c510345ae8eac818b613d7d73e785f1310f839"},
- {file = "regex-2024.11.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:220902c3c5cc6af55d4fe19ead504de80eb91f786dc102fbd74894b1551f095e"},
- {file = "regex-2024.11.6-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:5e7e351589da0850c125f1600a4c4ba3c722efefe16b297de54300f08d734fbf"},
- {file = "regex-2024.11.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5056b185ca113c88e18223183aa1a50e66507769c9640a6ff75859619d73957b"},
- {file = "regex-2024.11.6-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2e34b51b650b23ed3354b5a07aab37034d9f923db2a40519139af34f485f77d0"},
- {file = "regex-2024.11.6-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5670bce7b200273eee1840ef307bfa07cda90b38ae56e9a6ebcc9f50da9c469b"},
- {file = "regex-2024.11.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:08986dce1339bc932923e7d1232ce9881499a0e02925f7402fb7c982515419ef"},
- {file = "regex-2024.11.6-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:93c0b12d3d3bc25af4ebbf38f9ee780a487e8bf6954c115b9f015822d3bb8e48"},
- {file = "regex-2024.11.6-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:764e71f22ab3b305e7f4c21f1a97e1526a25ebdd22513e251cf376760213da13"},
- {file = "regex-2024.11.6-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:f056bf21105c2515c32372bbc057f43eb02aae2fda61052e2f7622c801f0b4e2"},
- {file = "regex-2024.11.6-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:69ab78f848845569401469da20df3e081e6b5a11cb086de3eed1d48f5ed57c95"},
- {file = "regex-2024.11.6-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:86fddba590aad9208e2fa8b43b4c098bb0ec74f15718bb6a704e3c63e2cef3e9"},
- {file = "regex-2024.11.6-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:684d7a212682996d21ca12ef3c17353c021fe9de6049e19ac8481ec35574a70f"},
- {file = "regex-2024.11.6-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:a03e02f48cd1abbd9f3b7e3586d97c8f7a9721c436f51a5245b3b9483044480b"},
- {file = "regex-2024.11.6-cp39-cp39-win32.whl", hash = "sha256:41758407fc32d5c3c5de163888068cfee69cb4c2be844e7ac517a52770f9af57"},
- {file = "regex-2024.11.6-cp39-cp39-win_amd64.whl", hash = "sha256:b2837718570f95dd41675328e111345f9b7095d821bac435aac173ac80b19983"},
- {file = "regex-2024.11.6.tar.gz", hash = "sha256:7ab159b063c52a0333c884e4679f8d7a85112ee3078fe3d9004b2dd875585519"},
-]
-
-[[package]]
-name = "requests"
-version = "2.32.3"
-description = "Python HTTP for Humans."
-optional = false
-python-versions = ">=3.8"
-groups = ["main"]
-files = [
- {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"},
- {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"},
-]
-
-[package.dependencies]
-certifi = ">=2017.4.17"
-charset-normalizer = ">=2,<4"
-idna = ">=2.5,<4"
-urllib3 = ">=1.21.1,<3"
-
-[package.extras]
-socks = ["PySocks (>=1.5.6,!=1.5.7)"]
-use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"]
-
-[[package]]
-name = "safetensors"
-version = "0.5.3"
-description = ""
-optional = false
-python-versions = ">=3.7"
-groups = ["main"]
-files = [
- {file = "safetensors-0.5.3-cp38-abi3-macosx_10_12_x86_64.whl", hash = "sha256:bd20eb133db8ed15b40110b7c00c6df51655a2998132193de2f75f72d99c7073"},
- {file = "safetensors-0.5.3-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:21d01c14ff6c415c485616b8b0bf961c46b3b343ca59110d38d744e577f9cce7"},
- {file = "safetensors-0.5.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:11bce6164887cd491ca75c2326a113ba934be596e22b28b1742ce27b1d076467"},
- {file = "safetensors-0.5.3-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4a243be3590bc3301c821da7a18d87224ef35cbd3e5f5727e4e0728b8172411e"},
- {file = "safetensors-0.5.3-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8bd84b12b1670a6f8e50f01e28156422a2bc07fb16fc4e98bded13039d688a0d"},
- {file = "safetensors-0.5.3-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:391ac8cab7c829452175f871fcaf414aa1e292b5448bd02620f675a7f3e7abb9"},
- {file = "safetensors-0.5.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cead1fa41fc54b1e61089fa57452e8834f798cb1dc7a09ba3524f1eb08e0317a"},
- {file = "safetensors-0.5.3-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1077f3e94182d72618357b04b5ced540ceb71c8a813d3319f1aba448e68a770d"},
- {file = "safetensors-0.5.3-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:799021e78287bac619c7b3f3606730a22da4cda27759ddf55d37c8db7511c74b"},
- {file = "safetensors-0.5.3-cp38-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:df26da01aaac504334644e1b7642fa000bfec820e7cef83aeac4e355e03195ff"},
- {file = "safetensors-0.5.3-cp38-abi3-musllinux_1_2_i686.whl", hash = "sha256:32c3ef2d7af8b9f52ff685ed0bc43913cdcde135089ae322ee576de93eae5135"},
- {file = "safetensors-0.5.3-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:37f1521be045e56fc2b54c606d4455573e717b2d887c579ee1dbba5f868ece04"},
- {file = "safetensors-0.5.3-cp38-abi3-win32.whl", hash = "sha256:cfc0ec0846dcf6763b0ed3d1846ff36008c6e7290683b61616c4b040f6a54ace"},
- {file = "safetensors-0.5.3-cp38-abi3-win_amd64.whl", hash = "sha256:836cbbc320b47e80acd40e44c8682db0e8ad7123209f69b093def21ec7cafd11"},
- {file = "safetensors-0.5.3.tar.gz", hash = "sha256:b6b0d6ecacec39a4fdd99cc19f4576f5219ce858e6fd8dbe7609df0b8dc56965"},
-]
-
-[package.extras]
-all = ["safetensors[jax]", "safetensors[numpy]", "safetensors[paddlepaddle]", "safetensors[pinned-tf]", "safetensors[quality]", "safetensors[testing]", "safetensors[torch]"]
-dev = ["safetensors[all]"]
-jax = ["flax (>=0.6.3)", "jax (>=0.3.25)", "jaxlib (>=0.3.25)", "safetensors[numpy]"]
-mlx = ["mlx (>=0.0.9)"]
-numpy = ["numpy (>=1.21.6)"]
-paddlepaddle = ["paddlepaddle (>=2.4.1)", "safetensors[numpy]"]
-pinned-tf = ["safetensors[numpy]", "tensorflow (==2.18.0)"]
-quality = ["black (==22.3)", "click (==8.0.4)", "flake8 (>=3.8.3)", "isort (>=5.5.4)"]
-tensorflow = ["safetensors[numpy]", "tensorflow (>=2.11.0)"]
-testing = ["h5py (>=3.7.0)", "huggingface-hub (>=0.12.1)", "hypothesis (>=6.70.2)", "pytest (>=7.2.0)", "pytest-benchmark (>=4.0.0)", "safetensors[numpy]", "setuptools-rust (>=1.5.2)"]
-torch = ["safetensors[numpy]", "torch (>=1.10)"]
-
-[[package]]
-name = "scikit-base"
-version = "0.12.4"
-description = "Base classes for sklearn-like parametric objects"
-optional = false
-python-versions = "<3.14,>=3.9"
-groups = ["main"]
-files = [
- {file = "scikit_base-0.12.4-py3-none-any.whl", hash = "sha256:ebb5338813433c86153f22e58d698061eb5442c94313ef4e6ab5c2732b6ab08f"},
- {file = "scikit_base-0.12.4.tar.gz", hash = "sha256:d452844cb898560dedc5116c5441f348c2b75312cdb8ff4a3d1310456c887591"},
-]
-
-[package.extras]
-all-extras = ["numpy", "pandas"]
-binder = ["jupyter"]
-dev = ["pre-commit", "pytest", "pytest-cov", "scikit-learn (>=0.24.0)"]
-docs = ["Sphinx (!=7.2.0,<9.0.0)", "jupyter", "myst-parser", "nbsphinx (>=0.8.6)", "numpydoc", "pydata-sphinx-theme", "sphinx-design (<0.7.0)", "sphinx-gallery (<0.20.0)", "sphinx-issues (<6.0.0)", "sphinx-panels", "tabulate"]
-linters = ["black", "doc8", "flake8", "flake8-bugbear", "flake8-builtins", "flake8-comprehensions", "flake8-print", "flake8-quotes", "isort", "mypy", "nbqa", "pandas-vet", "pep8-naming", "pydocstyle"]
-test = ["coverage", "numpy", "pandas", "pytest", "pytest-cov", "safety", "scikit-learn (>=0.24.0)", "scipy"]
-
-[[package]]
-name = "scikit-learn"
-version = "1.6.1"
-description = "A set of python modules for machine learning and data mining"
-optional = false
-python-versions = ">=3.9"
-groups = ["main"]
-markers = "python_version < \"3.11\""
-files = [
- {file = "scikit_learn-1.6.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d056391530ccd1e501056160e3c9673b4da4805eb67eb2bdf4e983e1f9c9204e"},
- {file = "scikit_learn-1.6.1-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:0c8d036eb937dbb568c6242fa598d551d88fb4399c0344d95c001980ec1c7d36"},
- {file = "scikit_learn-1.6.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8634c4bd21a2a813e0a7e3900464e6d593162a29dd35d25bdf0103b3fce60ed5"},
- {file = "scikit_learn-1.6.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:775da975a471c4f6f467725dff0ced5c7ac7bda5e9316b260225b48475279a1b"},
- {file = "scikit_learn-1.6.1-cp310-cp310-win_amd64.whl", hash = "sha256:8a600c31592bd7dab31e1c61b9bbd6dea1b3433e67d264d17ce1017dbdce8002"},
- {file = "scikit_learn-1.6.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:72abc587c75234935e97d09aa4913a82f7b03ee0b74111dcc2881cba3c5a7b33"},
- {file = "scikit_learn-1.6.1-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:b3b00cdc8f1317b5f33191df1386c0befd16625f49d979fe77a8d44cae82410d"},
- {file = "scikit_learn-1.6.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dc4765af3386811c3ca21638f63b9cf5ecf66261cc4815c1db3f1e7dc7b79db2"},
- {file = "scikit_learn-1.6.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:25fc636bdaf1cc2f4a124a116312d837148b5e10872147bdaf4887926b8c03d8"},
- {file = "scikit_learn-1.6.1-cp311-cp311-win_amd64.whl", hash = "sha256:fa909b1a36e000a03c382aade0bd2063fd5680ff8b8e501660c0f59f021a6415"},
- {file = "scikit_learn-1.6.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:926f207c804104677af4857b2c609940b743d04c4c35ce0ddc8ff4f053cddc1b"},
- {file = "scikit_learn-1.6.1-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:2c2cae262064e6a9b77eee1c8e768fc46aa0b8338c6a8297b9b6759720ec0ff2"},
- {file = "scikit_learn-1.6.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1061b7c028a8663fb9a1a1baf9317b64a257fcb036dae5c8752b2abef31d136f"},
- {file = "scikit_learn-1.6.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2e69fab4ebfc9c9b580a7a80111b43d214ab06250f8a7ef590a4edf72464dd86"},
- {file = "scikit_learn-1.6.1-cp312-cp312-win_amd64.whl", hash = "sha256:70b1d7e85b1c96383f872a519b3375f92f14731e279a7b4c6cfd650cf5dffc52"},
- {file = "scikit_learn-1.6.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:2ffa1e9e25b3d93990e74a4be2c2fc61ee5af85811562f1288d5d055880c4322"},
- {file = "scikit_learn-1.6.1-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:dc5cf3d68c5a20ad6d571584c0750ec641cc46aeef1c1507be51300e6003a7e1"},
- {file = "scikit_learn-1.6.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c06beb2e839ecc641366000ca84f3cf6fa9faa1777e29cf0c04be6e4d096a348"},
- {file = "scikit_learn-1.6.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e8ca8cb270fee8f1f76fa9bfd5c3507d60c6438bbee5687f81042e2bb98e5a97"},
- {file = "scikit_learn-1.6.1-cp313-cp313-win_amd64.whl", hash = "sha256:7a1c43c8ec9fde528d664d947dc4c0789be4077a3647f232869f41d9bf50e0fb"},
- {file = "scikit_learn-1.6.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:a17c1dea1d56dcda2fac315712f3651a1fea86565b64b48fa1bc090249cbf236"},
- {file = "scikit_learn-1.6.1-cp313-cp313t-macosx_12_0_arm64.whl", hash = "sha256:6a7aa5f9908f0f28f4edaa6963c0a6183f1911e63a69aa03782f0d924c830a35"},
- {file = "scikit_learn-1.6.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0650e730afb87402baa88afbf31c07b84c98272622aaba002559b614600ca691"},
- {file = "scikit_learn-1.6.1-cp313-cp313t-win_amd64.whl", hash = "sha256:3f59fe08dc03ea158605170eb52b22a105f238a5d512c4470ddeca71feae8e5f"},
- {file = "scikit_learn-1.6.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6849dd3234e87f55dce1db34c89a810b489ead832aaf4d4550b7ea85628be6c1"},
- {file = "scikit_learn-1.6.1-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:e7be3fa5d2eb9be7d77c3734ff1d599151bb523674be9b834e8da6abe132f44e"},
- {file = "scikit_learn-1.6.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:44a17798172df1d3c1065e8fcf9019183f06c87609b49a124ebdf57ae6cb0107"},
- {file = "scikit_learn-1.6.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8b7a3b86e411e4bce21186e1c180d792f3d99223dcfa3b4f597ecc92fa1a422"},
- {file = "scikit_learn-1.6.1-cp39-cp39-win_amd64.whl", hash = "sha256:7a73d457070e3318e32bdb3aa79a8d990474f19035464dfd8bede2883ab5dc3b"},
- {file = "scikit_learn-1.6.1.tar.gz", hash = "sha256:b4fc2525eca2c69a59260f583c56a7557c6ccdf8deafdba6e060f94c1c59738e"},
-]
-
-[package.dependencies]
-joblib = ">=1.2.0"
-numpy = ">=1.19.5"
-scipy = ">=1.6.0"
-threadpoolctl = ">=3.1.0"
-
-[package.extras]
-benchmark = ["matplotlib (>=3.3.4)", "memory_profiler (>=0.57.0)", "pandas (>=1.1.5)"]
-build = ["cython (>=3.0.10)", "meson-python (>=0.16.0)", "numpy (>=1.19.5)", "scipy (>=1.6.0)"]
-docs = ["Pillow (>=7.1.2)", "matplotlib (>=3.3.4)", "memory_profiler (>=0.57.0)", "numpydoc (>=1.2.0)", "pandas (>=1.1.5)", "plotly (>=5.14.0)", "polars (>=0.20.30)", "pooch (>=1.6.0)", "pydata-sphinx-theme (>=0.15.3)", "scikit-image (>=0.17.2)", "seaborn (>=0.9.0)", "sphinx (>=7.3.7)", "sphinx-copybutton (>=0.5.2)", "sphinx-design (>=0.5.0)", "sphinx-design (>=0.6.0)", "sphinx-gallery (>=0.17.1)", "sphinx-prompt (>=1.4.0)", "sphinx-remove-toctrees (>=1.0.0.post1)", "sphinxcontrib-sass ( [...]
-examples = ["matplotlib (>=3.3.4)", "pandas (>=1.1.5)", "plotly (>=5.14.0)", "pooch (>=1.6.0)", "scikit-image (>=0.17.2)", "seaborn (>=0.9.0)"]
-install = ["joblib (>=1.2.0)", "numpy (>=1.19.5)", "scipy (>=1.6.0)", "threadpoolctl (>=3.1.0)"]
-maintenance = ["conda-lock (==2.5.6)"]
-tests = ["black (>=24.3.0)", "matplotlib (>=3.3.4)", "mypy (>=1.9)", "numpydoc (>=1.2.0)", "pandas (>=1.1.5)", "polars (>=0.20.30)", "pooch (>=1.6.0)", "pyamg (>=4.0.0)", "pyarrow (>=12.0.0)", "pytest (>=7.1.2)", "pytest-cov (>=2.9.0)", "ruff (>=0.5.1)", "scikit-image (>=0.17.2)"]
-
-[[package]]
-name = "scikit-learn"
-version = "1.7.1"
-description = "A set of python modules for machine learning and data mining"
-optional = false
-python-versions = ">=3.10"
-groups = ["main"]
-markers = "python_version >= \"3.11\""
-files = [
- {file = "scikit_learn-1.7.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:406204dd4004f0517f0b23cf4b28c6245cbd51ab1b6b78153bc784def214946d"},
- {file = "scikit_learn-1.7.1-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:16af2e44164f05d04337fd1fc3ae7c4ea61fd9b0d527e22665346336920fe0e1"},
- {file = "scikit_learn-1.7.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:2f2e78e56a40c7587dea9a28dc4a49500fa2ead366869418c66f0fd75b80885c"},
- {file = "scikit_learn-1.7.1-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b62b76ad408a821475b43b7bb90a9b1c9a4d8d125d505c2df0539f06d6e631b1"},
- {file = "scikit_learn-1.7.1-cp310-cp310-win_amd64.whl", hash = "sha256:9963b065677a4ce295e8ccdee80a1dd62b37249e667095039adcd5bce6e90deb"},
- {file = "scikit_learn-1.7.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:90c8494ea23e24c0fb371afc474618c1019dc152ce4a10e4607e62196113851b"},
- {file = "scikit_learn-1.7.1-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:bb870c0daf3bf3be145ec51df8ac84720d9972170786601039f024bf6d61a518"},
- {file = "scikit_learn-1.7.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:40daccd1b5623f39e8943ab39735cadf0bdce80e67cdca2adcb5426e987320a8"},
- {file = "scikit_learn-1.7.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:30d1f413cfc0aa5a99132a554f1d80517563c34a9d3e7c118fde2d273c6fe0f7"},
- {file = "scikit_learn-1.7.1-cp311-cp311-win_amd64.whl", hash = "sha256:c711d652829a1805a95d7fe96654604a8f16eab5a9e9ad87b3e60173415cb650"},
- {file = "scikit_learn-1.7.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:3cee419b49b5bbae8796ecd690f97aa412ef1674410c23fc3257c6b8b85b8087"},
- {file = "scikit_learn-1.7.1-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:2fd8b8d35817b0d9ebf0b576f7d5ffbbabdb55536b0655a8aaae629d7ffd2e1f"},
- {file = "scikit_learn-1.7.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:588410fa19a96a69763202f1d6b7b91d5d7a5d73be36e189bc6396bfb355bd87"},
- {file = "scikit_learn-1.7.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e3142f0abe1ad1d1c31a2ae987621e41f6b578144a911ff4ac94781a583adad7"},
- {file = "scikit_learn-1.7.1-cp312-cp312-win_amd64.whl", hash = "sha256:3ddd9092c1bd469acab337d87930067c87eac6bd544f8d5027430983f1e1ae88"},
- {file = "scikit_learn-1.7.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:b7839687fa46d02e01035ad775982f2470be2668e13ddd151f0f55a5bf123bae"},
- {file = "scikit_learn-1.7.1-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:a10f276639195a96c86aa572ee0698ad64ee939a7b042060b98bd1930c261d10"},
- {file = "scikit_learn-1.7.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:13679981fdaebc10cc4c13c43344416a86fcbc61449cb3e6517e1df9d12c8309"},
- {file = "scikit_learn-1.7.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4f1262883c6a63f067a980a8cdd2d2e7f2513dddcef6a9eaada6416a7a7cbe43"},
- {file = "scikit_learn-1.7.1-cp313-cp313-win_amd64.whl", hash = "sha256:ca6d31fb10e04d50bfd2b50d66744729dbb512d4efd0223b864e2fdbfc4cee11"},
- {file = "scikit_learn-1.7.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:781674d096303cfe3d351ae6963ff7c958db61cde3421cd490e3a5a58f2a94ae"},
- {file = "scikit_learn-1.7.1-cp313-cp313t-macosx_12_0_arm64.whl", hash = "sha256:10679f7f125fe7ecd5fad37dd1aa2daae7e3ad8df7f3eefa08901b8254b3e12c"},
- {file = "scikit_learn-1.7.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1f812729e38c8cb37f760dce71a9b83ccfb04f59b3dca7c6079dcdc60544fa9e"},
- {file = "scikit_learn-1.7.1-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:88e1a20131cf741b84b89567e1717f27a2ced228e0f29103426102bc2e3b8ef7"},
- {file = "scikit_learn-1.7.1-cp313-cp313t-win_amd64.whl", hash = "sha256:b1bd1d919210b6a10b7554b717c9000b5485aa95a1d0f177ae0d7ee8ec750da5"},
- {file = "scikit_learn-1.7.1.tar.gz", hash = "sha256:24b3f1e976a4665aa74ee0fcaac2b8fccc6ae77c8e07ab25da3ba6d3292b9802"},
-]
-
-[package.dependencies]
-joblib = ">=1.2.0"
-numpy = ">=1.22.0"
-scipy = ">=1.8.0"
-threadpoolctl = ">=3.1.0"
-
-[package.extras]
-benchmark = ["matplotlib (>=3.5.0)", "memory_profiler (>=0.57.0)", "pandas (>=1.4.0)"]
-build = ["cython (>=3.0.10)", "meson-python (>=0.17.1)", "numpy (>=1.22.0)", "scipy (>=1.8.0)"]
-docs = ["Pillow (>=8.4.0)", "matplotlib (>=3.5.0)", "memory_profiler (>=0.57.0)", "numpydoc (>=1.2.0)", "pandas (>=1.4.0)", "plotly (>=5.14.0)", "polars (>=0.20.30)", "pooch (>=1.6.0)", "pydata-sphinx-theme (>=0.15.3)", "scikit-image (>=0.19.0)", "seaborn (>=0.9.0)", "sphinx (>=7.3.7)", "sphinx-copybutton (>=0.5.2)", "sphinx-design (>=0.5.0)", "sphinx-design (>=0.6.0)", "sphinx-gallery (>=0.17.1)", "sphinx-prompt (>=1.4.0)", "sphinx-remove-toctrees (>=1.0.0.post1)", "sphinxcontrib-sass ( [...]
-examples = ["matplotlib (>=3.5.0)", "pandas (>=1.4.0)", "plotly (>=5.14.0)", "pooch (>=1.6.0)", "scikit-image (>=0.19.0)", "seaborn (>=0.9.0)"]
-install = ["joblib (>=1.2.0)", "numpy (>=1.22.0)", "scipy (>=1.8.0)", "threadpoolctl (>=3.1.0)"]
-maintenance = ["conda-lock (==3.0.1)"]
-tests = ["matplotlib (>=3.5.0)", "mypy (>=1.15)", "numpydoc (>=1.2.0)", "pandas (>=1.4.0)", "polars (>=0.20.30)", "pooch (>=1.6.0)", "pyamg (>=4.2.1)", "pyarrow (>=12.0.0)", "pytest (>=7.1.2)", "pytest-cov (>=2.9.0)", "ruff (>=0.11.7)", "scikit-image (>=0.19.0)"]
-
-[[package]]
-name = "scipy"
-version = "1.9.3"
-description = "Fundamental algorithms for scientific computing in Python"
-optional = false
-python-versions = ">=3.8"
-groups = ["main"]
-markers = "python_version < \"3.11\""
-files = [
- {file = "scipy-1.9.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:1884b66a54887e21addf9c16fb588720a8309a57b2e258ae1c7986d4444d3bc0"},
- {file = "scipy-1.9.3-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:83b89e9586c62e787f5012e8475fbb12185bafb996a03257e9675cd73d3736dd"},
- {file = "scipy-1.9.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a72d885fa44247f92743fc20732ae55564ff2a519e8302fb7e18717c5355a8b"},
- {file = "scipy-1.9.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d01e1dd7b15bd2449c8bfc6b7cc67d630700ed655654f0dfcf121600bad205c9"},
- {file = "scipy-1.9.3-cp310-cp310-win_amd64.whl", hash = "sha256:68239b6aa6f9c593da8be1509a05cb7f9efe98b80f43a5861cd24c7557e98523"},
- {file = "scipy-1.9.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b41bc822679ad1c9a5f023bc93f6d0543129ca0f37c1ce294dd9d386f0a21096"},
- {file = "scipy-1.9.3-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:90453d2b93ea82a9f434e4e1cba043e779ff67b92f7a0e85d05d286a3625df3c"},
- {file = "scipy-1.9.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:83c06e62a390a9167da60bedd4575a14c1f58ca9dfde59830fc42e5197283dab"},
- {file = "scipy-1.9.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:abaf921531b5aeaafced90157db505e10345e45038c39e5d9b6c7922d68085cb"},
- {file = "scipy-1.9.3-cp311-cp311-win_amd64.whl", hash = "sha256:06d2e1b4c491dc7d8eacea139a1b0b295f74e1a1a0f704c375028f8320d16e31"},
- {file = "scipy-1.9.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:5a04cd7d0d3eff6ea4719371cbc44df31411862b9646db617c99718ff68d4840"},
- {file = "scipy-1.9.3-cp38-cp38-macosx_12_0_arm64.whl", hash = "sha256:545c83ffb518094d8c9d83cce216c0c32f8c04aaf28b92cc8283eda0685162d5"},
- {file = "scipy-1.9.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0d54222d7a3ba6022fdf5773931b5d7c56efe41ede7f7128c7b1637700409108"},
- {file = "scipy-1.9.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cff3a5295234037e39500d35316a4c5794739433528310e117b8a9a0c76d20fc"},
- {file = "scipy-1.9.3-cp38-cp38-win_amd64.whl", hash = "sha256:2318bef588acc7a574f5bfdff9c172d0b1bf2c8143d9582e05f878e580a3781e"},
- {file = "scipy-1.9.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d644a64e174c16cb4b2e41dfea6af722053e83d066da7343f333a54dae9bc31c"},
- {file = "scipy-1.9.3-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:da8245491d73ed0a994ed9c2e380fd058ce2fa8a18da204681f2fe1f57f98f95"},
- {file = "scipy-1.9.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4db5b30849606a95dcf519763dd3ab6fe9bd91df49eba517359e450a7d80ce2e"},
- {file = "scipy-1.9.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c68db6b290cbd4049012990d7fe71a2abd9ffbe82c0056ebe0f01df8be5436b0"},
- {file = "scipy-1.9.3-cp39-cp39-win_amd64.whl", hash = "sha256:5b88e6d91ad9d59478fafe92a7c757d00c59e3bdc3331be8ada76a4f8d683f58"},
- {file = "scipy-1.9.3.tar.gz", hash = "sha256:fbc5c05c85c1a02be77b1ff591087c83bc44579c6d2bd9fb798bb64ea5e1a027"},
-]
-
-[package.dependencies]
-numpy = ">=1.18.5,<1.26.0"
-
-[package.extras]
-dev = ["flake8", "mypy", "pycodestyle", "typing_extensions"]
-doc = ["matplotlib (>2)", "numpydoc", "pydata-sphinx-theme (==0.9.0)", "sphinx (!=4.1.0)", "sphinx-panels (>=0.5.2)", "sphinx-tabs"]
-test = ["asv", "gmpy2", "mpmath", "pytest", "pytest-cov", "pytest-xdist", "scikit-umfpack", "threadpoolctl"]
-
-[[package]]
-name = "scipy"
-version = "1.16.0"
-description = "Fundamental algorithms for scientific computing in Python"
-optional = false
-python-versions = ">=3.11"
-groups = ["main"]
-markers = "python_version >= \"3.11\""
-files = [
- {file = "scipy-1.16.0-cp311-cp311-macosx_10_14_x86_64.whl", hash = "sha256:deec06d831b8f6b5fb0b652433be6a09db29e996368ce5911faf673e78d20085"},
- {file = "scipy-1.16.0-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:d30c0fe579bb901c61ab4bb7f3eeb7281f0d4c4a7b52dbf563c89da4fd2949be"},
- {file = "scipy-1.16.0-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:b2243561b45257f7391d0f49972fca90d46b79b8dbcb9b2cb0f9df928d370ad4"},
- {file = "scipy-1.16.0-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:e6d7dfc148135e9712d87c5f7e4f2ddc1304d1582cb3a7d698bbadedb61c7afd"},
- {file = "scipy-1.16.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:90452f6a9f3fe5a2cf3748e7be14f9cc7d9b124dce19667b54f5b429d680d539"},
- {file = "scipy-1.16.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:a2f0bf2f58031c8701a8b601df41701d2a7be17c7ffac0a4816aeba89c4cdac8"},
- {file = "scipy-1.16.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:6c4abb4c11fc0b857474241b812ce69ffa6464b4bd8f4ecb786cf240367a36a7"},
- {file = "scipy-1.16.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b370f8f6ac6ef99815b0d5c9f02e7ade77b33007d74802efc8316c8db98fd11e"},
- {file = "scipy-1.16.0-cp311-cp311-win_amd64.whl", hash = "sha256:a16ba90847249bedce8aa404a83fb8334b825ec4a8e742ce6012a7a5e639f95c"},
- {file = "scipy-1.16.0-cp312-cp312-macosx_10_14_x86_64.whl", hash = "sha256:7eb6bd33cef4afb9fa5f1fb25df8feeb1e52d94f21a44f1d17805b41b1da3180"},
- {file = "scipy-1.16.0-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:1dbc8fdba23e4d80394ddfab7a56808e3e6489176d559c6c71935b11a2d59db1"},
- {file = "scipy-1.16.0-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:7dcf42c380e1e3737b343dec21095c9a9ad3f9cbe06f9c05830b44b1786c9e90"},
- {file = "scipy-1.16.0-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:26ec28675f4a9d41587266084c626b02899db373717d9312fa96ab17ca1ae94d"},
- {file = "scipy-1.16.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:952358b7e58bd3197cfbd2f2f2ba829f258404bdf5db59514b515a8fe7a36c52"},
- {file = "scipy-1.16.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:03931b4e870c6fef5b5c0970d52c9f6ddd8c8d3e934a98f09308377eba6f3824"},
- {file = "scipy-1.16.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:512c4f4f85912767c351a0306824ccca6fd91307a9f4318efe8fdbd9d30562ef"},
- {file = "scipy-1.16.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e69f798847e9add03d512eaf5081a9a5c9a98757d12e52e6186ed9681247a1ac"},
- {file = "scipy-1.16.0-cp312-cp312-win_amd64.whl", hash = "sha256:adf9b1999323ba335adc5d1dc7add4781cb5a4b0ef1e98b79768c05c796c4e49"},
- {file = "scipy-1.16.0-cp313-cp313-macosx_10_14_x86_64.whl", hash = "sha256:e9f414cbe9ca289a73e0cc92e33a6a791469b6619c240aa32ee18abdce8ab451"},
- {file = "scipy-1.16.0-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:bbba55fb97ba3cdef9b1ee973f06b09d518c0c7c66a009c729c7d1592be1935e"},
- {file = "scipy-1.16.0-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:58e0d4354eacb6004e7aa1cd350e5514bd0270acaa8d5b36c0627bb3bb486974"},
- {file = "scipy-1.16.0-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:75b2094ec975c80efc273567436e16bb794660509c12c6a31eb5c195cbf4b6dc"},
- {file = "scipy-1.16.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:6b65d232157a380fdd11a560e7e21cde34fdb69d65c09cb87f6cc024ee376351"},
- {file = "scipy-1.16.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1d8747f7736accd39289943f7fe53a8333be7f15a82eea08e4afe47d79568c32"},
- {file = "scipy-1.16.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:eb9f147a1b8529bb7fec2a85cf4cf42bdfadf9e83535c309a11fdae598c88e8b"},
- {file = "scipy-1.16.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:d2b83c37edbfa837a8923d19c749c1935ad3d41cf196006a24ed44dba2ec4358"},
- {file = "scipy-1.16.0-cp313-cp313-win_amd64.whl", hash = "sha256:79a3c13d43c95aa80b87328a46031cf52508cf5f4df2767602c984ed1d3c6bbe"},
- {file = "scipy-1.16.0-cp313-cp313t-macosx_10_14_x86_64.whl", hash = "sha256:f91b87e1689f0370690e8470916fe1b2308e5b2061317ff76977c8f836452a47"},
- {file = "scipy-1.16.0-cp313-cp313t-macosx_12_0_arm64.whl", hash = "sha256:88a6ca658fb94640079e7a50b2ad3b67e33ef0f40e70bdb7dc22017dae73ac08"},
- {file = "scipy-1.16.0-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:ae902626972f1bd7e4e86f58fd72322d7f4ec7b0cfc17b15d4b7006efc385176"},
- {file = "scipy-1.16.0-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:8cb824c1fc75ef29893bc32b3ddd7b11cf9ab13c1127fe26413a05953b8c32ed"},
- {file = "scipy-1.16.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:de2db7250ff6514366a9709c2cba35cb6d08498e961cba20d7cff98a7ee88938"},
- {file = "scipy-1.16.0-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:e85800274edf4db8dd2e4e93034f92d1b05c9421220e7ded9988b16976f849c1"},
- {file = "scipy-1.16.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:4f720300a3024c237ace1cb11f9a84c38beb19616ba7c4cdcd771047a10a1706"},
- {file = "scipy-1.16.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:aad603e9339ddb676409b104c48a027e9916ce0d2838830691f39552b38a352e"},
- {file = "scipy-1.16.0-cp313-cp313t-win_amd64.whl", hash = "sha256:f56296fefca67ba605fd74d12f7bd23636267731a72cb3947963e76b8c0a25db"},
- {file = "scipy-1.16.0.tar.gz", hash = "sha256:b5ef54021e832869c8cfb03bc3bf20366cbcd426e02a58e8a58d7584dfbb8f62"},
-]
-
-[package.dependencies]
-numpy = ">=1.25.2,<2.6"
-
-[package.extras]
-dev = ["cython-lint (>=0.12.2)", "doit (>=0.36.0)", "mypy (==1.10.0)", "pycodestyle", "pydevtool", "rich-click", "ruff (>=0.0.292)", "types-psutil", "typing_extensions"]
-doc = ["intersphinx_registry", "jupyterlite-pyodide-kernel", "jupyterlite-sphinx (>=0.19.1)", "jupytext", "linkify-it-py", "matplotlib (>=3.5)", "myst-nb (>=1.2.0)", "numpydoc", "pooch", "pydata-sphinx-theme (>=0.15.2)", "sphinx (>=5.0.0,<8.2.0)", "sphinx-copybutton", "sphinx-design (>=0.4.0)"]
-test = ["Cython", "array-api-strict (>=2.3.1)", "asv", "gmpy2", "hypothesis (>=6.30)", "meson", "mpmath", "ninja ; sys_platform != \"emscripten\"", "pooch", "pytest", "pytest-cov", "pytest-timeout", "pytest-xdist", "scikit-umfpack", "threadpoolctl"]
-
-[[package]]
-name = "setuptools"
-version = "74.0.0"
-description = "Easily download, build, install, upgrade, and uninstall Python packages"
-optional = false
-python-versions = ">=3.8"
-groups = ["main"]
-files = [
- {file = "setuptools-74.0.0-py3-none-any.whl", hash = "sha256:0274581a0037b638b9fc1c6883cc71c0210865aaa76073f7882376b641b84e8f"},
- {file = "setuptools-74.0.0.tar.gz", hash = "sha256:a85e96b8be2b906f3e3e789adec6a9323abf79758ecfa3065bd740d81158b11e"},
-]
-
-[package.extras]
-check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\"", "ruff (>=0.5.2) ; sys_platform != \"cygwin\""]
-core = ["importlib-metadata (>=6) ; python_version < \"3.10\"", "importlib-resources (>=5.10.2) ; python_version < \"3.9\"", "jaraco.text (>=3.7)", "more-itertools (>=8.8)", "packaging (>=24)", "platformdirs (>=2.6.2)", "tomli (>=2.0.1) ; python_version < \"3.11\"", "wheel (>=0.43.0)"]
-cover = ["pytest-cov"]
-doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier", "towncrier (<24.7)"]
-enabler = ["pytest-enabler (>=2.2)"]
-test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21) ; python_version >= \"3.9\" and sys_platform != \"cygwin\"", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "jaraco.test", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-home (>=0.5)", "pytest-perf ; sys_platform != \"cygwin\"", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli-w (>=1.0.0)", "virtualenv (>=13 [...]
-type = ["importlib-metadata (>=7.0.2) ; python_version < \"3.10\"", "jaraco.develop (>=7.21) ; sys_platform != \"cygwin\"", "mypy (==1.11.*)", "pytest-mypy"]
-
-[[package]]
-name = "six"
-version = "1.16.0"
-description = "Python 2 and 3 compatibility utilities"
-optional = false
-python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*"
-groups = ["main"]
-files = [
- {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"},
- {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"},
-]
-
-[[package]]
-name = "sktime"
-version = "0.38.4"
-description = "A unified framework for machine learning with time series"
-optional = false
-python-versions = "<3.14,>=3.9"
-groups = ["main"]
-files = [
- {file = "sktime-0.38.4-py3-none-any.whl", hash = "sha256:7ca8f03a4f552de6926c9f1c4a896767d7ebcc8f5ddbcba8900ac7e4a0ee9361"},
- {file = "sktime-0.38.4.tar.gz", hash = "sha256:36f98aaf7a6b0e01ada509f2c29e3d397c098d1420cbe180ff3a1b2e01b05fea"},
-]
-
-[package.dependencies]
-joblib = ">=1.2.0,<1.6"
-numpy = ">=1.21,<2.4"
-packaging = "*"
-pandas = ">=1.1,<2.4.0"
-scikit-base = ">=0.6.1,<0.13.0"
-scikit-learn = ">=0.24,<1.8.0"
-scipy = ">=1.2,<2.0.0"
-
-[package.extras]
-alignment = ["dtaidistance (<2.4) ; python_version < \"3.13\"", "dtw-python (>=1.3,<1.6) ; python_version < \"3.13\"", "numba (>=0.53,<0.62) ; python_version < \"3.13\""]
-all-extras = ["arch (>=5.6,<7.1.0) ; python_version < \"3.13\"", "autots (>=0.6.1,<0.7)", "cloudpickle ; python_version < \"3.13\"", "dash (!=2.9.0) ; python_version < \"3.13\"", "dask (>2024.8.2,<2025.2.1) ; python_version < \"3.13\"", "dtaidistance (<2.4) ; python_version < \"3.13\"", "dtw-python ; python_version < \"3.13\"", "esig (==0.9.7) ; python_version < \"3.10\" and platform_machine != \"aarch64\"", "filterpy (>=1.4.5) ; python_version < \"3.11\"", "gluonts (>=0.9) ; python_vers [...]
-all-extras-pandas2 = ["arch (>=5.6,<7.1.0) ; python_version < \"3.13\"", "autots (>=0.6.1,<0.7) ; python_version < \"3.13\"", "cloudpickle ; python_version < \"3.13\"", "dash (!=2.9.0) ; python_version < \"3.13\"", "dask (>2024.8.2,<2025.2.1) ; python_version < \"3.13\"", "dtaidistance (<2.4) ; python_version < \"3.13\"", "dtw-python ; python_version < \"3.13\"", "esig (==0.9.7) ; python_version < \"3.10\" and platform_machine != \"aarch64\"", "filterpy (>=1.4.5) ; python_version < \"3.1 [...]
-annotation = ["hmmlearn (>=0.2.7,<0.4) ; python_version < \"3.13\"", "numba (>=0.53,<0.62) ; python_version < \"3.13\"", "pyod (>=0.8,<1.2) ; python_version < \"3.12\""]
-binder = ["jupyter", "pandas (<2.0.0)", "skchange"]
-classification = ["esig (>=0.9.7,<0.10) ; python_version < \"3.11\" and platform_machine != \"aarch64\"", "numba (>=0.53,<0.62) ; python_version < \"3.13\"", "tensorflow (>=2,<2.20) ; python_version < \"3.13\"", "tsfresh (>=0.17,<0.21) ; python_version < \"3.12\""]
-clustering = ["networkx (<3.5)", "numba (>=0.53,<0.62) ; python_version < \"3.13\"", "ts2vg (<1.3) ; python_version < \"3.13\" and platform_machine != \"aarch64\"", "tslearn (>=0.5.2,!=0.6.0,<0.7.0) ; python_version < \"3.12\""]
-compatibility-tests = ["catboost ; python_version < \"3.13\""]
-cython-extras = ["mrseql (<0.0.3)", "mrsqm ; python_version < \"3.11\"", "numba (<0.62)"]
-dataframe = ["dask (>2024.8.2,<2025.2.1) ; python_version < \"3.13\"", "dask (>2024.8.2,<2025.2.1) ; python_version < \"3.13\""]
-datasets = ["rdata", "requests"]
-dependencies-lower = ["numpy (==1.25.0)", "pandas (==2.0.2)", "scikit-learn (==1.3.0)", "scipy (==1.10.1)"]
-dependencies-lowest = ["numpy (==1.21.0)", "pandas (==1.1.0)", "scikit-learn (==0.24.0)", "scipy (==1.4.0)"]
-detection = ["hmmlearn (>=0.2.7,<0.4) ; python_version < \"3.13\"", "numba (>=0.53,<0.62) ; python_version < \"3.13\"", "pyod (>=0.8,<1.2) ; python_version < \"3.12\""]
-dev = ["backoff", "httpx", "pre-commit", "pytest", "pytest-randomly", "pytest-timeout", "pytest-xdist", "wheel"]
-dl = ["FrEIA ; python_version < \"3.12\"", "accelerate", "einops (>0.7.0) ; python_version < \"3.12\"", "gluonts (>=0.14.3) ; python_version < \"3.12\"", "huggingface-hub (>=0.23.0) ; python_version < \"3.12\"", "hydra-core ; python_version < \"3.13\"", "lightning (>=2.0) ; python_version < \"3.12\"", "neuralforecast (>=1.6.4,<1.8.0) ; python_version < \"3.11\"", "peft (>=0.10.0,<0.14.0) ; python_version < \"3.12\"", "pykan (>=0.2.1,<0.2.9) ; python_version > \"3.9.7\"", "pytorch-forecas [...]
-docs = ["Sphinx (!=7.2.0,<9.0.0)", "jupyter", "myst-parser", "nbsphinx (>=0.8.6)", "numpydoc", "pydata-sphinx-theme", "sphinx-copybutton", "sphinx-design (<0.7.0)", "sphinx-gallery (<0.20.0)", "sphinx-issues (<6.0.0)", "tabulate"]
-forecasting = ["arch (>=5.6,<7.1) ; python_version < \"3.13\"", "autots (>=0.6.1,<0.7) ; python_version < \"3.13\"", "pmdarima (>=1.8,!=1.8.1,<2.1) ; python_version < \"3.12\"", "prophet (>=1.1,<1.2) ; python_version < \"3.13\"", "skforecast (>=0.12.1,<0.15) ; python_version < \"3.13\"", "skpro (>=2,<2.10.0)", "statsforecast (>=1.0.0,<2.1.0) ; python_version < \"3.13\"", "statsmodels (>=0.12.1,<0.15) ; python_version < \"3.13\"", "tbats (>=1.1,<1.2) ; python_version < \"3.12\""]
-mlflow = ["mlflow (<4.0)"]
-mlflow-tests = ["boto3", "botocore", "mlflow (<4.0)", "moto"]
-mlflow2 = ["mlflow (<3.0)"]
-networks = ["tensorflow (>=2,<2.20) ; python_version < \"3.13\""]
-numpy1 = ["numpy (<2.0.0)"]
-pandas1 = ["pandas (<2.0.0)"]
-param-est = ["seasonal (>=0.3.1,<0.4) ; python_version < \"3.13\"", "statsmodels (>=0.12.1,<0.15) ; python_version < \"3.13\""]
-regression = ["numba (>=0.53,<0.62) ; python_version < \"3.13\"", "tensorflow (>=2,<2.20) ; python_version < \"3.13\""]
-tests = ["pytest (>=7.4,<8.5)", "pytest-randomly (>=3.15,<3.17)", "pytest-timeout (>=2.1,<2.5)", "pytest-xdist (>=3.3,<3.8)"]
-transformations = ["esig (>=0.9.7,<0.10) ; python_version < \"3.11\" and platform_machine != \"aarch64\"", "filterpy (>=1.4.5,<1.5) ; python_version < \"3.13\"", "holidays (>=0.29,<0.59) ; python_version < \"3.13\"", "mne (>=1.5,<1.9) ; python_version < \"3.13\"", "numba (>=0.53,<0.62) ; python_version < \"3.13\"", "pycatch22 (>=0.4,<0.4.6) ; python_version < \"3.13\"", "simdkalman", "statsmodels (>=0.12.1,<0.15) ; python_version < \"3.13\"", "stumpy (>=1.5.1,<1.13) ; python_version < \" [...]
-
-[[package]]
-name = "sqlalchemy"
-version = "2.0.32"
-description = "Database Abstraction Library"
-optional = false
-python-versions = ">=3.7"
-groups = ["main"]
-files = [
- {file = "SQLAlchemy-2.0.32-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0c9045ecc2e4db59bfc97b20516dfdf8e41d910ac6fb667ebd3a79ea54084619"},
- {file = "SQLAlchemy-2.0.32-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1467940318e4a860afd546ef61fefb98a14d935cd6817ed07a228c7f7c62f389"},
- {file = "SQLAlchemy-2.0.32-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5954463675cb15db8d4b521f3566a017c8789222b8316b1e6934c811018ee08b"},
- {file = "SQLAlchemy-2.0.32-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:167e7497035c303ae50651b351c28dc22a40bb98fbdb8468cdc971821b1ae533"},
- {file = "SQLAlchemy-2.0.32-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:b27dfb676ac02529fb6e343b3a482303f16e6bc3a4d868b73935b8792edb52d0"},
- {file = "SQLAlchemy-2.0.32-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:bf2360a5e0f7bd75fa80431bf8ebcfb920c9f885e7956c7efde89031695cafb8"},
- {file = "SQLAlchemy-2.0.32-cp310-cp310-win32.whl", hash = "sha256:306fe44e754a91cd9d600a6b070c1f2fadbb4a1a257b8781ccf33c7067fd3e4d"},
- {file = "SQLAlchemy-2.0.32-cp310-cp310-win_amd64.whl", hash = "sha256:99db65e6f3ab42e06c318f15c98f59a436f1c78179e6a6f40f529c8cc7100b22"},
- {file = "SQLAlchemy-2.0.32-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:21b053be28a8a414f2ddd401f1be8361e41032d2ef5884b2f31d31cb723e559f"},
- {file = "SQLAlchemy-2.0.32-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b178e875a7a25b5938b53b006598ee7645172fccafe1c291a706e93f48499ff5"},
- {file = "SQLAlchemy-2.0.32-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:723a40ee2cc7ea653645bd4cf024326dea2076673fc9d3d33f20f6c81db83e1d"},
- {file = "SQLAlchemy-2.0.32-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:295ff8689544f7ee7e819529633d058bd458c1fd7f7e3eebd0f9268ebc56c2a0"},
- {file = "SQLAlchemy-2.0.32-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:49496b68cd190a147118af585173ee624114dfb2e0297558c460ad7495f9dfe2"},
- {file = "SQLAlchemy-2.0.32-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:acd9b73c5c15f0ec5ce18128b1fe9157ddd0044abc373e6ecd5ba376a7e5d961"},
- {file = "SQLAlchemy-2.0.32-cp311-cp311-win32.whl", hash = "sha256:9365a3da32dabd3e69e06b972b1ffb0c89668994c7e8e75ce21d3e5e69ddef28"},
- {file = "SQLAlchemy-2.0.32-cp311-cp311-win_amd64.whl", hash = "sha256:8bd63d051f4f313b102a2af1cbc8b80f061bf78f3d5bd0843ff70b5859e27924"},
- {file = "SQLAlchemy-2.0.32-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:6bab3db192a0c35e3c9d1560eb8332463e29e5507dbd822e29a0a3c48c0a8d92"},
- {file = "SQLAlchemy-2.0.32-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:19d98f4f58b13900d8dec4ed09dd09ef292208ee44cc9c2fe01c1f0a2fe440e9"},
- {file = "SQLAlchemy-2.0.32-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3cd33c61513cb1b7371fd40cf221256456d26a56284e7d19d1f0b9f1eb7dd7e8"},
- {file = "SQLAlchemy-2.0.32-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7d6ba0497c1d066dd004e0f02a92426ca2df20fac08728d03f67f6960271feec"},
- {file = "SQLAlchemy-2.0.32-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2b6be53e4fde0065524f1a0a7929b10e9280987b320716c1509478b712a7688c"},
- {file = "SQLAlchemy-2.0.32-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:916a798f62f410c0b80b63683c8061f5ebe237b0f4ad778739304253353bc1cb"},
- {file = "SQLAlchemy-2.0.32-cp312-cp312-win32.whl", hash = "sha256:31983018b74908ebc6c996a16ad3690301a23befb643093fcfe85efd292e384d"},
- {file = "SQLAlchemy-2.0.32-cp312-cp312-win_amd64.whl", hash = "sha256:4363ed245a6231f2e2957cccdda3c776265a75851f4753c60f3004b90e69bfeb"},
- {file = "SQLAlchemy-2.0.32-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b8afd5b26570bf41c35c0121801479958b4446751a3971fb9a480c1afd85558e"},
- {file = "SQLAlchemy-2.0.32-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c750987fc876813f27b60d619b987b057eb4896b81117f73bb8d9918c14f1cad"},
- {file = "SQLAlchemy-2.0.32-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ada0102afff4890f651ed91120c1120065663506b760da4e7823913ebd3258be"},
- {file = "SQLAlchemy-2.0.32-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:78c03d0f8a5ab4f3034c0e8482cfcc415a3ec6193491cfa1c643ed707d476f16"},
- {file = "SQLAlchemy-2.0.32-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:3bd1cae7519283ff525e64645ebd7a3e0283f3c038f461ecc1c7b040a0c932a1"},
- {file = "SQLAlchemy-2.0.32-cp37-cp37m-win32.whl", hash = "sha256:01438ebcdc566d58c93af0171c74ec28efe6a29184b773e378a385e6215389da"},
- {file = "SQLAlchemy-2.0.32-cp37-cp37m-win_amd64.whl", hash = "sha256:4979dc80fbbc9d2ef569e71e0896990bc94df2b9fdbd878290bd129b65ab579c"},
- {file = "SQLAlchemy-2.0.32-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6c742be912f57586ac43af38b3848f7688863a403dfb220193a882ea60e1ec3a"},
- {file = "SQLAlchemy-2.0.32-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:62e23d0ac103bcf1c5555b6c88c114089587bc64d048fef5bbdb58dfd26f96da"},
- {file = "SQLAlchemy-2.0.32-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:251f0d1108aab8ea7b9aadbd07fb47fb8e3a5838dde34aa95a3349876b5a1f1d"},
- {file = "SQLAlchemy-2.0.32-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0ef18a84e5116340e38eca3e7f9eeaaef62738891422e7c2a0b80feab165905f"},
- {file = "SQLAlchemy-2.0.32-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:3eb6a97a1d39976f360b10ff208c73afb6a4de86dd2a6212ddf65c4a6a2347d5"},
- {file = "SQLAlchemy-2.0.32-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:0c1c9b673d21477cec17ab10bc4decb1322843ba35b481585facd88203754fc5"},
- {file = "SQLAlchemy-2.0.32-cp38-cp38-win32.whl", hash = "sha256:c41a2b9ca80ee555decc605bd3c4520cc6fef9abde8fd66b1cf65126a6922d65"},
- {file = "SQLAlchemy-2.0.32-cp38-cp38-win_amd64.whl", hash = "sha256:8a37e4d265033c897892279e8adf505c8b6b4075f2b40d77afb31f7185cd6ecd"},
- {file = "SQLAlchemy-2.0.32-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:52fec964fba2ef46476312a03ec8c425956b05c20220a1a03703537824b5e8e1"},
- {file = "SQLAlchemy-2.0.32-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:328429aecaba2aee3d71e11f2477c14eec5990fb6d0e884107935f7fb6001632"},
- {file = "SQLAlchemy-2.0.32-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:85a01b5599e790e76ac3fe3aa2f26e1feba56270023d6afd5550ed63c68552b3"},
- {file = "SQLAlchemy-2.0.32-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aaf04784797dcdf4c0aa952c8d234fa01974c4729db55c45732520ce12dd95b4"},
- {file = "SQLAlchemy-2.0.32-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:4488120becf9b71b3ac718f4138269a6be99a42fe023ec457896ba4f80749525"},
- {file = "SQLAlchemy-2.0.32-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:14e09e083a5796d513918a66f3d6aedbc131e39e80875afe81d98a03312889e6"},
- {file = "SQLAlchemy-2.0.32-cp39-cp39-win32.whl", hash = "sha256:0d322cc9c9b2154ba7e82f7bf25ecc7c36fbe2d82e2933b3642fc095a52cfc78"},
- {file = "SQLAlchemy-2.0.32-cp39-cp39-win_amd64.whl", hash = "sha256:7dd8583df2f98dea28b5cd53a1beac963f4f9d087888d75f22fcc93a07cf8d84"},
- {file = "SQLAlchemy-2.0.32-py3-none-any.whl", hash = "sha256:e567a8793a692451f706b363ccf3c45e056b67d90ead58c3bc9471af5d212202"},
- {file = "SQLAlchemy-2.0.32.tar.gz", hash = "sha256:c1b88cc8b02b6a5f0efb0345a03672d4c897dc7d92585176f88c67346f565ea8"},
-]
-
-[package.dependencies]
-greenlet = {version = "!=0.4.17", markers = "python_version < \"3.13\" and (platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\")"}
-typing-extensions = ">=4.6.0"
-
-[package.extras]
-aiomysql = ["aiomysql (>=0.2.0)", "greenlet (!=0.4.17)"]
-aioodbc = ["aioodbc", "greenlet (!=0.4.17)"]
-aiosqlite = ["aiosqlite", "greenlet (!=0.4.17)", "typing_extensions (!=3.10.0.1)"]
-asyncio = ["greenlet (!=0.4.17)"]
-asyncmy = ["asyncmy (>=0.2.3,!=0.2.4,!=0.2.6)", "greenlet (!=0.4.17)"]
-mariadb-connector = ["mariadb (>=1.0.1,!=1.1.2,!=1.1.5)"]
-mssql = ["pyodbc"]
-mssql-pymssql = ["pymssql"]
-mssql-pyodbc = ["pyodbc"]
-mypy = ["mypy (>=0.910)"]
-mysql = ["mysqlclient (>=1.4.0)"]
-mysql-connector = ["mysql-connector-python"]
-oracle = ["cx_oracle (>=8)"]
-oracle-oracledb = ["oracledb (>=1.0.1)"]
-postgresql = ["psycopg2 (>=2.7)"]
-postgresql-asyncpg = ["asyncpg", "greenlet (!=0.4.17)"]
-postgresql-pg8000 = ["pg8000 (>=1.29.1)"]
-postgresql-psycopg = ["psycopg (>=3.0.7)"]
-postgresql-psycopg2binary = ["psycopg2-binary"]
-postgresql-psycopg2cffi = ["psycopg2cffi"]
-postgresql-psycopgbinary = ["psycopg[binary] (>=3.0.7)"]
-pymysql = ["pymysql"]
-sqlcipher = ["sqlcipher3_binary"]
-
-[[package]]
-name = "statsmodels"
-version = "0.14.5"
-description = "Statistical computations and models for Python"
-optional = false
-python-versions = ">=3.9"
-groups = ["main"]
-files = [
- {file = "statsmodels-0.14.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9fc2b5cdc0c95cba894849651fec1fa1511d365e3eb72b0cc75caac44077cd48"},
- {file = "statsmodels-0.14.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b8d96b0bbaeabd3a557c35cc7249baa9cfbc6dd305c32a9f2cbdd7f46c037e7f"},
- {file = "statsmodels-0.14.5-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:145bc39b2cb201efb6c83cc3f2163c269e63b0d4809801853dec6f440bd3bc37"},
- {file = "statsmodels-0.14.5-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d7c14fb2617bb819fb2532e1424e1da2b98a3419a80e95f33365a72d437d474e"},
- {file = "statsmodels-0.14.5-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:1e9742d8a5ac38a3bfc4b7f4b0681903920f20cbbf466d72b1fd642033846108"},
- {file = "statsmodels-0.14.5-cp310-cp310-win_amd64.whl", hash = "sha256:1cab9e6fce97caf4239cdb2df375806937da5d0b7ba2699b13af33a07f438464"},
- {file = "statsmodels-0.14.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4b7091a8442076c708c926de3603653a160955e80a2b6d931475b7bb8ddc02e5"},
- {file = "statsmodels-0.14.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:128872be8f3208f4446d91ea9e4261823902fc7997fee7e1a983eb62fd3b7c6e"},
- {file = "statsmodels-0.14.5-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f2ad5aee04ae7196c429df2174df232c057e478c5fa63193d01c8ec9aae04d31"},
- {file = "statsmodels-0.14.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f402fc793458dd6d96e099acb44cd1de1428565bf7ef3030878a8daff091f08a"},
- {file = "statsmodels-0.14.5-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:26c028832730aebfbfd4e7501694e1f9ad31ec8536e776716673f4e7afd4059a"},
- {file = "statsmodels-0.14.5-cp311-cp311-win_amd64.whl", hash = "sha256:ec56f771d9529cdc17ed2fb2a950d100b6e83a7c5372aae8ac5bb065c474b856"},
- {file = "statsmodels-0.14.5-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:37e7364a39f9aa3b51d15a208c2868b90aadb8412f868530f5cba9197cb00eaa"},
- {file = "statsmodels-0.14.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4263d7f4d0f1d5ac6eb4db22e1ee34264a14d634b9332c975c9d9109b6b46e12"},
- {file = "statsmodels-0.14.5-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:86224f6e36f38486e471e75759d241fe2912d8bc25ab157d54ee074c6aedbf45"},
- {file = "statsmodels-0.14.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c3dd760a6fa80cd5e0371685c697bb9c2c0e6e1f394d975e596a1e6d0bbb9372"},
- {file = "statsmodels-0.14.5-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:6264fb00e02f858b86bd01ef2dc05055a71d4a0cc7551b9976b07b0f0e6cf24f"},
- {file = "statsmodels-0.14.5-cp312-cp312-win_amd64.whl", hash = "sha256:b2ed065bfbaf8bb214c7201656df840457c2c8c65e1689e3eb09dc7440f9c61c"},
- {file = "statsmodels-0.14.5-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:906263134dd1a640e55ecb01fda4a9be7b9e08558dba9e4c4943a486fdb0c9c8"},
- {file = "statsmodels-0.14.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:9118f76344f77cffbb3a9cbcff8682b325be5eed54a4b3253e09da77a74263d3"},
- {file = "statsmodels-0.14.5-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9dc4ee159070557c9a6c000625d85f653de437772fe7086857cff68f501afe45"},
- {file = "statsmodels-0.14.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5a085d47c8ef5387279a991633883d0e700de2b0acc812d7032d165888627bef"},
- {file = "statsmodels-0.14.5-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9f866b2ebb2904b47c342d00def83c526ef2eb1df6a9a3c94ba5fe63d0005aec"},
- {file = "statsmodels-0.14.5-cp313-cp313-win_amd64.whl", hash = "sha256:2a06bca03b7a492f88c8106103ab75f1a5ced25de90103a89f3a287518017939"},
- {file = "statsmodels-0.14.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b23b8f646dd78ef5e8d775d879208f8dc0a73418b41c16acac37361ff9ab7738"},
- {file = "statsmodels-0.14.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4e5e26b21d2920905764fb0860957d08b5ba2fae4466ef41b1f7c53ecf9fc7fa"},
- {file = "statsmodels-0.14.5-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4a060c7e0841c549c8ce2825fd6687e6757e305d9c11c9a73f6c5a0ce849bb69"},
- {file = "statsmodels-0.14.5-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:56da20def5350d676388213a330fd40ed15d0e8dd0bb1b92c0e4b0f2a65d3ad2"},
- {file = "statsmodels-0.14.5-cp39-cp39-win_amd64.whl", hash = "sha256:afb37ca1d70d99b5fd876e8574ea46372298ae0f0a8b17e4cf0a9afd2373ae62"},
- {file = "statsmodels-0.14.5.tar.gz", hash = "sha256:de260e58cccfd2ceddf835b55a357233d6ca853a1aa4f90f7553a52cc71c6ddf"},
-]
-
-[package.dependencies]
-numpy = ">=1.22.3,<3"
-packaging = ">=21.3"
-pandas = ">=1.4,<2.1.0 || >2.1.0"
-patsy = ">=0.5.6"
-scipy = ">=1.8,<1.9.2 || >1.9.2"
-
-[package.extras]
-build = ["cython (>=3.0.10)"]
-develop = ["colorama", "cython (>=3.0.10)", "cython (>=3.0.10,<4)", "flake8", "isort", "jinja2", "joblib", "matplotlib (>=3)", "pytest (>=7.3.0,<8)", "pytest-cov", "pytest-randomly", "pytest-xdist", "pywinpty ; os_name == \"nt\"", "setuptools_scm[toml] (>=8.0,<9.0)"]
-docs = ["ipykernel", "jupyter_client", "matplotlib", "nbconvert", "nbformat", "numpydoc", "pandas-datareader", "sphinx"]
-
-[[package]]
-name = "sympy"
-version = "1.14.0"
-description = "Computer algebra system (CAS) in Python"
-optional = false
-python-versions = ">=3.9"
-groups = ["main"]
-files = [
- {file = "sympy-1.14.0-py3-none-any.whl", hash = "sha256:e091cc3e99d2141a0ba2847328f5479b05d94a6635cb96148ccb3f34671bd8f5"},
- {file = "sympy-1.14.0.tar.gz", hash = "sha256:d3d3fe8df1e5a0b42f0e7bdf50541697dbe7d23746e894990c030e2b05e72517"},
-]
-
-[package.dependencies]
-mpmath = ">=1.1.0,<1.4"
-
-[package.extras]
-dev = ["hypothesis (>=6.70.0)", "pytest (>=7.1.0)"]
-
-[[package]]
-name = "threadpoolctl"
-version = "3.5.0"
-description = "threadpoolctl"
-optional = false
-python-versions = ">=3.8"
-groups = ["main"]
-files = [
- {file = "threadpoolctl-3.5.0-py3-none-any.whl", hash = "sha256:56c1e26c150397e58c4926da8eeee87533b1e32bef131bd4bf6a2f45f3185467"},
- {file = "threadpoolctl-3.5.0.tar.gz", hash = "sha256:082433502dd922bf738de0d8bcc4fdcbf0979ff44c42bd40f5af8a282f6fa107"},
-]
-
-[[package]]
-name = "thrift"
-version = "0.22.0"
-description = "Python bindings for the Apache Thrift RPC system"
-optional = false
-python-versions = "*"
-groups = ["main"]
-files = [
- {file = "thrift-0.22.0.tar.gz", hash = "sha256:42e8276afbd5f54fe1d364858b6877bc5e5a4a5ed69f6a005b94ca4918fe1466"},
-]
-
-[package.extras]
-all = ["tornado (>=4.0)", "twisted"]
-tornado = ["tornado (>=4.0)"]
-twisted = ["twisted"]
-
-[[package]]
-name = "tokenizers"
-version = "0.19.1"
-description = ""
-optional = false
-python-versions = ">=3.7"
-groups = ["main"]
-files = [
- {file = "tokenizers-0.19.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:952078130b3d101e05ecfc7fc3640282d74ed26bcf691400f872563fca15ac97"},
- {file = "tokenizers-0.19.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:82c8b8063de6c0468f08e82c4e198763e7b97aabfe573fd4cf7b33930ca4df77"},
- {file = "tokenizers-0.19.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:f03727225feaf340ceeb7e00604825addef622d551cbd46b7b775ac834c1e1c4"},
- {file = "tokenizers-0.19.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:453e4422efdfc9c6b6bf2eae00d5e323f263fff62b29a8c9cd526c5003f3f642"},
- {file = "tokenizers-0.19.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:02e81bf089ebf0e7f4df34fa0207519f07e66d8491d963618252f2e0729e0b46"},
- {file = "tokenizers-0.19.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b07c538ba956843833fee1190cf769c60dc62e1cf934ed50d77d5502194d63b1"},
- {file = "tokenizers-0.19.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e28cab1582e0eec38b1f38c1c1fb2e56bce5dc180acb1724574fc5f47da2a4fe"},
- {file = "tokenizers-0.19.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8b01afb7193d47439f091cd8f070a1ced347ad0f9144952a30a41836902fe09e"},
- {file = "tokenizers-0.19.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:7fb297edec6c6841ab2e4e8f357209519188e4a59b557ea4fafcf4691d1b4c98"},
- {file = "tokenizers-0.19.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:2e8a3dd055e515df7054378dc9d6fa8c8c34e1f32777fb9a01fea81496b3f9d3"},
- {file = "tokenizers-0.19.1-cp310-none-win32.whl", hash = "sha256:7ff898780a155ea053f5d934925f3902be2ed1f4d916461e1a93019cc7250837"},
- {file = "tokenizers-0.19.1-cp310-none-win_amd64.whl", hash = "sha256:bea6f9947e9419c2fda21ae6c32871e3d398cba549b93f4a65a2d369662d9403"},
- {file = "tokenizers-0.19.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:5c88d1481f1882c2e53e6bb06491e474e420d9ac7bdff172610c4f9ad3898059"},
- {file = "tokenizers-0.19.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ddf672ed719b4ed82b51499100f5417d7d9f6fb05a65e232249268f35de5ed14"},
- {file = "tokenizers-0.19.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:dadc509cc8a9fe460bd274c0e16ac4184d0958117cf026e0ea8b32b438171594"},
- {file = "tokenizers-0.19.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dfedf31824ca4915b511b03441784ff640378191918264268e6923da48104acc"},
- {file = "tokenizers-0.19.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ac11016d0a04aa6487b1513a3a36e7bee7eec0e5d30057c9c0408067345c48d2"},
- {file = "tokenizers-0.19.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:76951121890fea8330d3a0df9a954b3f2a37e3ec20e5b0530e9a0044ca2e11fe"},
- {file = "tokenizers-0.19.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b342d2ce8fc8d00f376af068e3274e2e8649562e3bc6ae4a67784ded6b99428d"},
- {file = "tokenizers-0.19.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d16ff18907f4909dca9b076b9c2d899114dd6abceeb074eca0c93e2353f943aa"},
- {file = "tokenizers-0.19.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:706a37cc5332f85f26efbe2bdc9ef8a9b372b77e4645331a405073e4b3a8c1c6"},
- {file = "tokenizers-0.19.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:16baac68651701364b0289979ecec728546133e8e8fe38f66fe48ad07996b88b"},
- {file = "tokenizers-0.19.1-cp311-none-win32.whl", hash = "sha256:9ed240c56b4403e22b9584ee37d87b8bfa14865134e3e1c3fb4b2c42fafd3256"},
- {file = "tokenizers-0.19.1-cp311-none-win_amd64.whl", hash = "sha256:ad57d59341710b94a7d9dbea13f5c1e7d76fd8d9bcd944a7a6ab0b0da6e0cc66"},
- {file = "tokenizers-0.19.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:621d670e1b1c281a1c9698ed89451395d318802ff88d1fc1accff0867a06f153"},
- {file = "tokenizers-0.19.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d924204a3dbe50b75630bd16f821ebda6a5f729928df30f582fb5aade90c818a"},
- {file = "tokenizers-0.19.1-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:4f3fefdc0446b1a1e6d81cd4c07088ac015665d2e812f6dbba4a06267d1a2c95"},
- {file = "tokenizers-0.19.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9620b78e0b2d52ef07b0d428323fb34e8ea1219c5eac98c2596311f20f1f9266"},
- {file = "tokenizers-0.19.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:04ce49e82d100594715ac1b2ce87d1a36e61891a91de774755f743babcd0dd52"},
- {file = "tokenizers-0.19.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c5c2ff13d157afe413bf7e25789879dd463e5a4abfb529a2d8f8473d8042e28f"},
- {file = "tokenizers-0.19.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3174c76efd9d08f836bfccaca7cfec3f4d1c0a4cf3acbc7236ad577cc423c840"},
- {file = "tokenizers-0.19.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7c9d5b6c0e7a1e979bec10ff960fae925e947aab95619a6fdb4c1d8ff3708ce3"},
- {file = "tokenizers-0.19.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:a179856d1caee06577220ebcfa332af046d576fb73454b8f4d4b0ba8324423ea"},
- {file = "tokenizers-0.19.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:952b80dac1a6492170f8c2429bd11fcaa14377e097d12a1dbe0ef2fb2241e16c"},
- {file = "tokenizers-0.19.1-cp312-none-win32.whl", hash = "sha256:01d62812454c188306755c94755465505836fd616f75067abcae529c35edeb57"},
- {file = "tokenizers-0.19.1-cp312-none-win_amd64.whl", hash = "sha256:b70bfbe3a82d3e3fb2a5e9b22a39f8d1740c96c68b6ace0086b39074f08ab89a"},
- {file = "tokenizers-0.19.1-cp37-cp37m-macosx_10_12_x86_64.whl", hash = "sha256:bb9dfe7dae85bc6119d705a76dc068c062b8b575abe3595e3c6276480e67e3f1"},
- {file = "tokenizers-0.19.1-cp37-cp37m-macosx_11_0_arm64.whl", hash = "sha256:1f0360cbea28ea99944ac089c00de7b2e3e1c58f479fb8613b6d8d511ce98267"},
- {file = "tokenizers-0.19.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:71e3ec71f0e78780851fef28c2a9babe20270404c921b756d7c532d280349214"},
- {file = "tokenizers-0.19.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b82931fa619dbad979c0ee8e54dd5278acc418209cc897e42fac041f5366d626"},
- {file = "tokenizers-0.19.1-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e8ff5b90eabdcdaa19af697885f70fe0b714ce16709cf43d4952f1f85299e73a"},
- {file = "tokenizers-0.19.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e742d76ad84acbdb1a8e4694f915fe59ff6edc381c97d6dfdd054954e3478ad4"},
- {file = "tokenizers-0.19.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d8c5d59d7b59885eab559d5bc082b2985555a54cda04dda4c65528d90ad252ad"},
- {file = "tokenizers-0.19.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b2da5c32ed869bebd990c9420df49813709e953674c0722ff471a116d97b22d"},
- {file = "tokenizers-0.19.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:638e43936cc8b2cbb9f9d8dde0fe5e7e30766a3318d2342999ae27f68fdc9bd6"},
- {file = "tokenizers-0.19.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:78e769eb3b2c79687d9cb0f89ef77223e8e279b75c0a968e637ca7043a84463f"},
- {file = "tokenizers-0.19.1-cp37-none-win32.whl", hash = "sha256:72791f9bb1ca78e3ae525d4782e85272c63faaef9940d92142aa3eb79f3407a3"},
- {file = "tokenizers-0.19.1-cp37-none-win_amd64.whl", hash = "sha256:f3bbb7a0c5fcb692950b041ae11067ac54826204318922da754f908d95619fbc"},
- {file = "tokenizers-0.19.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:07f9295349bbbcedae8cefdbcfa7f686aa420be8aca5d4f7d1ae6016c128c0c5"},
- {file = "tokenizers-0.19.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:10a707cc6c4b6b183ec5dbfc5c34f3064e18cf62b4a938cb41699e33a99e03c1"},
- {file = "tokenizers-0.19.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:6309271f57b397aa0aff0cbbe632ca9d70430839ca3178bf0f06f825924eca22"},
- {file = "tokenizers-0.19.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4ad23d37d68cf00d54af184586d79b84075ada495e7c5c0f601f051b162112dc"},
- {file = "tokenizers-0.19.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:427c4f0f3df9109314d4f75b8d1f65d9477033e67ffaec4bca53293d3aca286d"},
- {file = "tokenizers-0.19.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e83a31c9cf181a0a3ef0abad2b5f6b43399faf5da7e696196ddd110d332519ee"},
- {file = "tokenizers-0.19.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c27b99889bd58b7e301468c0838c5ed75e60c66df0d4db80c08f43462f82e0d3"},
- {file = "tokenizers-0.19.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bac0b0eb952412b0b196ca7a40e7dce4ed6f6926489313414010f2e6b9ec2adf"},
- {file = "tokenizers-0.19.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8a6298bde623725ca31c9035a04bf2ef63208d266acd2bed8c2cb7d2b7d53ce6"},
- {file = "tokenizers-0.19.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:08a44864e42fa6d7d76d7be4bec62c9982f6f6248b4aa42f7302aa01e0abfd26"},
- {file = "tokenizers-0.19.1-cp38-none-win32.whl", hash = "sha256:1de5bc8652252d9357a666e609cb1453d4f8e160eb1fb2830ee369dd658e8975"},
- {file = "tokenizers-0.19.1-cp38-none-win_amd64.whl", hash = "sha256:0bcce02bf1ad9882345b34d5bd25ed4949a480cf0e656bbd468f4d8986f7a3f1"},
- {file = "tokenizers-0.19.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:0b9394bd204842a2a1fd37fe29935353742be4a3460b6ccbaefa93f58a8df43d"},
- {file = "tokenizers-0.19.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4692ab92f91b87769d950ca14dbb61f8a9ef36a62f94bad6c82cc84a51f76f6a"},
- {file = "tokenizers-0.19.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:6258c2ef6f06259f70a682491c78561d492e885adeaf9f64f5389f78aa49a051"},
- {file = "tokenizers-0.19.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c85cf76561fbd01e0d9ea2d1cbe711a65400092bc52b5242b16cfd22e51f0c58"},
- {file = "tokenizers-0.19.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:670b802d4d82bbbb832ddb0d41df7015b3e549714c0e77f9bed3e74d42400fbe"},
- {file = "tokenizers-0.19.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:85aa3ab4b03d5e99fdd31660872249df5e855334b6c333e0bc13032ff4469c4a"},
- {file = "tokenizers-0.19.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cbf001afbbed111a79ca47d75941e9e5361297a87d186cbfc11ed45e30b5daba"},
- {file = "tokenizers-0.19.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b4c89aa46c269e4e70c4d4f9d6bc644fcc39bb409cb2a81227923404dd6f5227"},
- {file = "tokenizers-0.19.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:39c1ec76ea1027438fafe16ecb0fb84795e62e9d643444c1090179e63808c69d"},
- {file = "tokenizers-0.19.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c2a0d47a89b48d7daa241e004e71fb5a50533718897a4cd6235cb846d511a478"},
- {file = "tokenizers-0.19.1-cp39-none-win32.whl", hash = "sha256:61b7fe8886f2e104d4caf9218b157b106207e0f2a4905c9c7ac98890688aabeb"},
- {file = "tokenizers-0.19.1-cp39-none-win_amd64.whl", hash = "sha256:f97660f6c43efd3e0bfd3f2e3e5615bf215680bad6ee3d469df6454b8c6e8256"},
- {file = "tokenizers-0.19.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3b11853f17b54c2fe47742c56d8a33bf49ce31caf531e87ac0d7d13d327c9334"},
- {file = "tokenizers-0.19.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d26194ef6c13302f446d39972aaa36a1dda6450bc8949f5eb4c27f51191375bd"},
- {file = "tokenizers-0.19.1-pp310-pypy310_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:e8d1ed93beda54bbd6131a2cb363a576eac746d5c26ba5b7556bc6f964425594"},
- {file = "tokenizers-0.19.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca407133536f19bdec44b3da117ef0d12e43f6d4b56ac4c765f37eca501c7bda"},
- {file = "tokenizers-0.19.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce05fde79d2bc2e46ac08aacbc142bead21614d937aac950be88dc79f9db9022"},
- {file = "tokenizers-0.19.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:35583cd46d16f07c054efd18b5d46af4a2f070a2dd0a47914e66f3ff5efb2b1e"},
- {file = "tokenizers-0.19.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:43350270bfc16b06ad3f6f07eab21f089adb835544417afda0f83256a8bf8b75"},
- {file = "tokenizers-0.19.1-pp37-pypy37_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b4399b59d1af5645bcee2072a463318114c39b8547437a7c2d6a186a1b5a0e2d"},
- {file = "tokenizers-0.19.1-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:6852c5b2a853b8b0ddc5993cd4f33bfffdca4fcc5d52f89dd4b8eada99379285"},
- {file = "tokenizers-0.19.1-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bcd266ae85c3d39df2f7e7d0e07f6c41a55e9a3123bb11f854412952deacd828"},
- {file = "tokenizers-0.19.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ecb2651956eea2aa0a2d099434134b1b68f1c31f9a5084d6d53f08ed43d45ff2"},
- {file = "tokenizers-0.19.1-pp37-pypy37_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:b279ab506ec4445166ac476fb4d3cc383accde1ea152998509a94d82547c8e2a"},
- {file = "tokenizers-0.19.1-pp37-pypy37_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:89183e55fb86e61d848ff83753f64cded119f5d6e1f553d14ffee3700d0a4a49"},
- {file = "tokenizers-0.19.1-pp38-pypy38_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b2edbc75744235eea94d595a8b70fe279dd42f3296f76d5a86dde1d46e35f574"},
- {file = "tokenizers-0.19.1-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:0e64bfde9a723274e9a71630c3e9494ed7b4c0f76a1faacf7fe294cd26f7ae7c"},
- {file = "tokenizers-0.19.1-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0b5ca92bfa717759c052e345770792d02d1f43b06f9e790ca0a1db62838816f3"},
- {file = "tokenizers-0.19.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6f8a20266e695ec9d7a946a019c1d5ca4eddb6613d4f466888eee04f16eedb85"},
- {file = "tokenizers-0.19.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:63c38f45d8f2a2ec0f3a20073cccb335b9f99f73b3c69483cd52ebc75369d8a1"},
- {file = "tokenizers-0.19.1-pp38-pypy38_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:dd26e3afe8a7b61422df3176e06664503d3f5973b94f45d5c45987e1cb711876"},
- {file = "tokenizers-0.19.1-pp38-pypy38_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:eddd5783a4a6309ce23432353cdb36220e25cbb779bfa9122320666508b44b88"},
- {file = "tokenizers-0.19.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:56ae39d4036b753994476a1b935584071093b55c7a72e3b8288e68c313ca26e7"},
- {file = "tokenizers-0.19.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:f9939ca7e58c2758c01b40324a59c034ce0cebad18e0d4563a9b1beab3018243"},
- {file = "tokenizers-0.19.1-pp39-pypy39_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:6c330c0eb815d212893c67a032e9dc1b38a803eccb32f3e8172c19cc69fbb439"},
- {file = "tokenizers-0.19.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ec11802450a2487cdf0e634b750a04cbdc1c4d066b97d94ce7dd2cb51ebb325b"},
- {file = "tokenizers-0.19.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a2b718f316b596f36e1dae097a7d5b91fc5b85e90bf08b01ff139bd8953b25af"},
- {file = "tokenizers-0.19.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:ed69af290c2b65169f0ba9034d1dc39a5db9459b32f1dd8b5f3f32a3fcf06eab"},
- {file = "tokenizers-0.19.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f8a9c828277133af13f3859d1b6bf1c3cb6e9e1637df0e45312e6b7c2e622b1f"},
- {file = "tokenizers-0.19.1.tar.gz", hash = "sha256:ee59e6680ed0fdbe6b724cf38bd70400a0c1dd623b07ac729087270caeac88e3"},
-]
-
-[package.dependencies]
-huggingface-hub = ">=0.16.4,<1.0"
-
-[package.extras]
-dev = ["tokenizers[testing]"]
-docs = ["setuptools-rust", "sphinx", "sphinx-rtd-theme"]
-testing = ["black (==22.3)", "datasets", "numpy", "pytest", "requests", "ruff"]
-
-[[package]]
-name = "tomli"
-version = "2.2.1"
-description = "A lil' TOML parser"
-optional = false
-python-versions = ">=3.8"
-groups = ["main"]
-markers = "python_version < \"3.11\""
-files = [
- {file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"},
- {file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"},
- {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ece47d672db52ac607a3d9599a9d48dcb2f2f735c6c2d1f34130085bb12b112a"},
- {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6972ca9c9cc9f0acaa56a8ca1ff51e7af152a9f87fb64623e31d5c83700080ee"},
- {file = "tomli-2.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c954d2250168d28797dd4e3ac5cf812a406cd5a92674ee4c8f123c889786aa8e"},
- {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8dd28b3e155b80f4d54beb40a441d366adcfe740969820caf156c019fb5c7ec4"},
- {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e59e304978767a54663af13c07b3d1af22ddee3bb2fb0618ca1593e4f593a106"},
- {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:33580bccab0338d00994d7f16f4c4ec25b776af3ffaac1ed74e0b3fc95e885a8"},
- {file = "tomli-2.2.1-cp311-cp311-win32.whl", hash = "sha256:465af0e0875402f1d226519c9904f37254b3045fc5084697cefb9bdde1ff99ff"},
- {file = "tomli-2.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:2d0f2fdd22b02c6d81637a3c95f8cd77f995846af7414c5c4b8d0545afa1bc4b"},
- {file = "tomli-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4a8f6e44de52d5e6c657c9fe83b562f5f4256d8ebbfe4ff922c495620a7f6cea"},
- {file = "tomli-2.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8d57ca8095a641b8237d5b079147646153d22552f1c637fd3ba7f4b0b29167a8"},
- {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e340144ad7ae1533cb897d406382b4b6fede8890a03738ff1683af800d54192"},
- {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db2b95f9de79181805df90bedc5a5ab4c165e6ec3fe99f970d0e302f384ad222"},
- {file = "tomli-2.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40741994320b232529c802f8bc86da4e1aa9f413db394617b9a256ae0f9a7f77"},
- {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:400e720fe168c0f8521520190686ef8ef033fb19fc493da09779e592861b78c6"},
- {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd"},
- {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b82ebccc8c8a36f2094e969560a1b836758481f3dc360ce9a3277c65f374285e"},
- {file = "tomli-2.2.1-cp312-cp312-win32.whl", hash = "sha256:889f80ef92701b9dbb224e49ec87c645ce5df3fa2cc548664eb8a25e03127a98"},
- {file = "tomli-2.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:7fc04e92e1d624a4a63c76474610238576942d6b8950a2d7f908a340494e67e4"},
- {file = "tomli-2.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f4039b9cbc3048b2416cc57ab3bda989a6fcf9b36cf8937f01a6e731b64f80d7"},
- {file = "tomli-2.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:286f0ca2ffeeb5b9bd4fcc8d6c330534323ec51b2f52da063b11c502da16f30c"},
- {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a92ef1a44547e894e2a17d24e7557a5e85a9e1d0048b0b5e7541f76c5032cb13"},
- {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9316dc65bed1684c9a98ee68759ceaed29d229e985297003e494aa825ebb0281"},
- {file = "tomli-2.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e85e99945e688e32d5a35c1ff38ed0b3f41f43fad8df0bdf79f72b2ba7bc5272"},
- {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ac065718db92ca818f8d6141b5f66369833d4a80a9d74435a268c52bdfa73140"},
- {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:d920f33822747519673ee656a4b6ac33e382eca9d331c87770faa3eef562aeb2"},
- {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a198f10c4d1b1375d7687bc25294306e551bf1abfa4eace6650070a5c1ae2744"},
- {file = "tomli-2.2.1-cp313-cp313-win32.whl", hash = "sha256:d3f5614314d758649ab2ab3a62d4f2004c825922f9e370b29416484086b264ec"},
- {file = "tomli-2.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:a38aa0308e754b0e3c67e344754dff64999ff9b513e691d0e786265c93583c69"},
- {file = "tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc"},
- {file = "tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff"},
-]
-
-[[package]]
-name = "torch"
-version = "2.7.1"
-description = "Tensors and Dynamic neural networks in Python with strong GPU acceleration"
-optional = false
-python-versions = ">=3.9.0"
-groups = ["main"]
-files = [
- {file = "torch-2.7.1-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:a103b5d782af5bd119b81dbcc7ffc6fa09904c423ff8db397a1e6ea8fd71508f"},
- {file = "torch-2.7.1-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:fe955951bdf32d182ee8ead6c3186ad54781492bf03d547d31771a01b3d6fb7d"},
- {file = "torch-2.7.1-cp310-cp310-win_amd64.whl", hash = "sha256:885453d6fba67d9991132143bf7fa06b79b24352f4506fd4d10b309f53454162"},
- {file = "torch-2.7.1-cp310-none-macosx_11_0_arm64.whl", hash = "sha256:d72acfdb86cee2a32c0ce0101606f3758f0d8bb5f8f31e7920dc2809e963aa7c"},
- {file = "torch-2.7.1-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:236f501f2e383f1cb861337bdf057712182f910f10aeaf509065d54d339e49b2"},
- {file = "torch-2.7.1-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:06eea61f859436622e78dd0cdd51dbc8f8c6d76917a9cf0555a333f9eac31ec1"},
- {file = "torch-2.7.1-cp311-cp311-win_amd64.whl", hash = "sha256:8273145a2e0a3c6f9fd2ac36762d6ee89c26d430e612b95a99885df083b04e52"},
- {file = "torch-2.7.1-cp311-none-macosx_11_0_arm64.whl", hash = "sha256:aea4fc1bf433d12843eb2c6b2204861f43d8364597697074c8d38ae2507f8730"},
- {file = "torch-2.7.1-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:27ea1e518df4c9de73af7e8a720770f3628e7f667280bce2be7a16292697e3fa"},
- {file = "torch-2.7.1-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:c33360cfc2edd976c2633b3b66c769bdcbbf0e0b6550606d188431c81e7dd1fc"},
- {file = "torch-2.7.1-cp312-cp312-win_amd64.whl", hash = "sha256:d8bf6e1856ddd1807e79dc57e54d3335f2b62e6f316ed13ed3ecfe1fc1df3d8b"},
- {file = "torch-2.7.1-cp312-none-macosx_11_0_arm64.whl", hash = "sha256:787687087412c4bd68d315e39bc1223f08aae1d16a9e9771d95eabbb04ae98fb"},
- {file = "torch-2.7.1-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:03563603d931e70722dce0e11999d53aa80a375a3d78e6b39b9f6805ea0a8d28"},
- {file = "torch-2.7.1-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:d632f5417b6980f61404a125b999ca6ebd0b8b4bbdbb5fbbba44374ab619a412"},
- {file = "torch-2.7.1-cp313-cp313-win_amd64.whl", hash = "sha256:23660443e13995ee93e3d844786701ea4ca69f337027b05182f5ba053ce43b38"},
- {file = "torch-2.7.1-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:0da4f4dba9f65d0d203794e619fe7ca3247a55ffdcbd17ae8fb83c8b2dc9b585"},
- {file = "torch-2.7.1-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:e08d7e6f21a617fe38eeb46dd2213ded43f27c072e9165dc27300c9ef9570934"},
- {file = "torch-2.7.1-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:30207f672328a42df4f2174b8f426f354b2baa0b7cca3a0adb3d6ab5daf00dc8"},
- {file = "torch-2.7.1-cp313-cp313t-win_amd64.whl", hash = "sha256:79042feca1c634aaf6603fe6feea8c6b30dfa140a6bbc0b973e2260c7e79a22e"},
- {file = "torch-2.7.1-cp313-none-macosx_11_0_arm64.whl", hash = "sha256:988b0cbc4333618a1056d2ebad9eb10089637b659eb645434d0809d8d937b946"},
- {file = "torch-2.7.1-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:e0d81e9a12764b6f3879a866607c8ae93113cbcad57ce01ebde63eb48a576369"},
- {file = "torch-2.7.1-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:8394833c44484547ed4a47162318337b88c97acdb3273d85ea06e03ffff44998"},
- {file = "torch-2.7.1-cp39-cp39-win_amd64.whl", hash = "sha256:df41989d9300e6e3c19ec9f56f856187a6ef060c3662fe54f4b6baf1fc90bd19"},
- {file = "torch-2.7.1-cp39-none-macosx_11_0_arm64.whl", hash = "sha256:a737b5edd1c44a5c1ece2e9f3d00df9d1b3fb9541138bee56d83d38293fb6c9d"},
-]
-
-[package.dependencies]
-filelock = "*"
-fsspec = "*"
-jinja2 = "*"
-networkx = "*"
-nvidia-cublas-cu12 = {version = "12.6.4.1", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
-nvidia-cuda-cupti-cu12 = {version = "12.6.80", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
-nvidia-cuda-nvrtc-cu12 = {version = "12.6.77", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
-nvidia-cuda-runtime-cu12 = {version = "12.6.77", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
-nvidia-cudnn-cu12 = {version = "9.5.1.17", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
-nvidia-cufft-cu12 = {version = "11.3.0.4", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
-nvidia-cufile-cu12 = {version = "1.11.1.6", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
-nvidia-curand-cu12 = {version = "10.3.7.77", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
-nvidia-cusolver-cu12 = {version = "11.7.1.2", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
-nvidia-cusparse-cu12 = {version = "12.5.4.2", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
-nvidia-cusparselt-cu12 = {version = "0.6.3", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
-nvidia-nccl-cu12 = {version = "2.26.2", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
-nvidia-nvjitlink-cu12 = {version = "12.6.85", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
-nvidia-nvtx-cu12 = {version = "12.6.77", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
-setuptools = {version = "*", markers = "python_version >= \"3.12\""}
-sympy = ">=1.13.3"
-triton = {version = "3.3.1", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""}
-typing-extensions = ">=4.10.0"
-
-[package.extras]
-opt-einsum = ["opt-einsum (>=3.3)"]
-optree = ["optree (>=0.13.0)"]
-
-[[package]]
-name = "torchmetrics"
-version = "1.7.2"
-description = "PyTorch native Metrics"
-optional = false
-python-versions = ">=3.9"
-groups = ["main"]
-files = [
- {file = "torchmetrics-1.7.2-py3-none-any.whl", hash = "sha256:9cc3bff07a715fcb37fb04d2a1a5ae36267c36066c097578020056653a94f2a8"},
- {file = "torchmetrics-1.7.2.tar.gz", hash = "sha256:ba401cd01aeaa268e809c0e4f42ef8f95669bf9b485e1d93d54dc765e012338a"},
-]
-
-[package.dependencies]
-lightning-utilities = ">=0.8.0"
-numpy = ">1.20.0"
-packaging = ">17.1"
-torch = ">=2.0.0"
-
-[package.extras]
-all = ["SciencePlots (>=2.0.0)", "einops (>=0.7.0)", "gammatone (>=1.0.0)", "ipadic (>=1.0.0)", "librosa (>=0.10.0)", "matplotlib (>=3.6.0)", "mecab-python3 (>=1.0.6)", "mypy (==1.15.0)", "nltk (>3.8.1)", "onnxruntime (>=1.12.0)", "pesq (>=0.0.4)", "piq (<=0.8.0)", "pycocotools (>2.0.0)", "pystoi (>=0.4.0)", "regex (>=2021.9.24)", "requests (>=2.19.0)", "scipy (>1.0.0)", "sentencepiece (>=0.2.0)", "timm (>=0.9.0)", "torch (==2.7.0)", "torch-fidelity (<=0.4.0)", "torch_linear_assignment ( [...]
-audio = ["gammatone (>=1.0.0)", "librosa (>=0.10.0)", "onnxruntime (>=1.12.0)", "pesq (>=0.0.4)", "pystoi (>=0.4.0)", "requests (>=2.19.0)", "torchaudio (>=2.0.1)"]
-clustering = ["torch_linear_assignment (>=0.0.2)"]
-detection = ["pycocotools (>2.0.0)", "torchvision (>=0.15.1)"]
-dev = ["PyTDC (==0.4.1) ; python_version < \"3.12\"", "SciencePlots (>=2.0.0)", "aeon (>=1.0.0) ; python_version > \"3.10\"", "bert_score (==0.3.13)", "dists-pytorch (==0.1)", "dython (==0.7.9)", "einops (>=0.7.0)", "fairlearn", "fast-bss-eval (>=0.1.0)", "faster-coco-eval (>=1.6.3)", "gammatone (>=1.0.0)", "huggingface-hub (<0.33)", "ipadic (>=1.0.0)", "jiwer (>=2.3.0)", "kornia (>=0.6.7)", "librosa (>=0.10.0)", "lpips (<=0.1.4)", "matplotlib (>=3.6.0)", "mecab-ko (>=1.0.0,<1.1.0) ; pyt [...]
-image = ["scipy (>1.0.0)", "torch-fidelity (<=0.4.0)", "torchvision (>=0.15.1)"]
-multimodal = ["einops (>=0.7.0)", "piq (<=0.8.0)", "timm (>=0.9.0)", "transformers (>=4.42.3)"]
-text = ["ipadic (>=1.0.0)", "mecab-python3 (>=1.0.6)", "nltk (>3.8.1)", "regex (>=2021.9.24)", "sentencepiece (>=0.2.0)", "tqdm (<4.68.0)", "transformers (>4.4.0)"]
-typing = ["mypy (==1.15.0)", "torch (==2.7.0)", "types-PyYAML", "types-emoji", "types-protobuf", "types-requests", "types-setuptools", "types-six", "types-tabulate"]
-visual = ["SciencePlots (>=2.0.0)", "matplotlib (>=3.6.0)"]
-
-[[package]]
-name = "tqdm"
-version = "4.66.5"
-description = "Fast, Extensible Progress Meter"
-optional = false
-python-versions = ">=3.7"
-groups = ["main"]
-files = [
- {file = "tqdm-4.66.5-py3-none-any.whl", hash = "sha256:90279a3770753eafc9194a0364852159802111925aa30eb3f9d85b0e805ac7cd"},
- {file = "tqdm-4.66.5.tar.gz", hash = "sha256:e1020aef2e5096702d8a025ac7d16b1577279c9d63f8375b63083e9a5f0fcbad"},
-]
-
-[package.dependencies]
-colorama = {version = "*", markers = "platform_system == \"Windows\""}
-
-[package.extras]
-dev = ["pytest (>=6)", "pytest-cov", "pytest-timeout", "pytest-xdist"]
-notebook = ["ipywidgets (>=6)"]
-slack = ["slack-sdk"]
-telegram = ["requests"]
-
-[[package]]
-name = "transformers"
-version = "4.40.1"
-description = "State-of-the-art Machine Learning for JAX, PyTorch and TensorFlow"
-optional = false
-python-versions = ">=3.8.0"
-groups = ["main"]
-files = [
- {file = "transformers-4.40.1-py3-none-any.whl", hash = "sha256:9d5ee0c8142a60501faf9e49a0b42f8e9cb8611823bce4f195a9325a6816337e"},
- {file = "transformers-4.40.1.tar.gz", hash = "sha256:55e1697e6f18b58273e7117bb469cdffc11be28995462d8d5e422fef38d2de36"},
-]
-
-[package.dependencies]
-filelock = "*"
-huggingface-hub = ">=0.19.3,<1.0"
-numpy = ">=1.17"
-packaging = ">=20.0"
-pyyaml = ">=5.1"
-regex = "!=2019.12.17"
-requests = "*"
-safetensors = ">=0.4.1"
-tokenizers = ">=0.19,<0.20"
-tqdm = ">=4.27"
-
-[package.extras]
-accelerate = ["accelerate (>=0.21.0)"]
-agents = ["Pillow (>=10.0.1,<=15.0)", "accelerate (>=0.21.0)", "datasets (!=2.5.0)", "diffusers", "opencv-python", "sentencepiece (>=0.1.91,!=0.1.92)", "torch"]
-all = ["Pillow (>=10.0.1,<=15.0)", "accelerate (>=0.21.0)", "av (==9.2.0)", "codecarbon (==1.2.0)", "decord (==0.6.0)", "flax (>=0.4.1,<=0.7.0)", "jax (>=0.4.1,<=0.4.13)", "jaxlib (>=0.4.1,<=0.4.13)", "kenlm", "keras-nlp (>=0.3.1)", "librosa", "onnxconverter-common", "optax (>=0.0.8,<=0.1.4)", "optuna", "phonemizer", "protobuf", "pyctcdecode (>=0.4.0)", "ray[tune] (>=2.7.0)", "sentencepiece (>=0.1.91,!=0.1.92)", "sigopt", "tensorflow (>=2.6,<2.16)", "tensorflow-text (<2.16)", "tf2onnx", [...]
-audio = ["kenlm", "librosa", "phonemizer", "pyctcdecode (>=0.4.0)"]
-codecarbon = ["codecarbon (==1.2.0)"]
-deepspeed = ["accelerate (>=0.21.0)", "deepspeed (>=0.9.3)"]
-deepspeed-testing = ["GitPython (<3.1.19)", "accelerate (>=0.21.0)", "beautifulsoup4", "cookiecutter (==1.7.3)", "datasets (!=2.5.0)", "deepspeed (>=0.9.3)", "dill (<0.3.5)", "evaluate (>=0.2.0)", "faiss-cpu", "hf-doc-builder (>=0.3.0)", "nltk", "optuna", "parameterized", "protobuf", "psutil", "pydantic", "pytest (>=7.2.0,<8.0.0)", "pytest-timeout", "pytest-xdist", "rjieba", "rouge-score (!=0.0.7,!=0.0.8,!=0.1,!=0.1.1)", "ruff (==0.1.5)", "sacrebleu (>=1.4.12,<2.0.0)", "sacremoses", "sen [...]
-dev = ["GitPython (<3.1.19)", "Pillow (>=10.0.1,<=15.0)", "accelerate (>=0.21.0)", "av (==9.2.0)", "beautifulsoup4", "codecarbon (==1.2.0)", "cookiecutter (==1.7.3)", "datasets (!=2.5.0)", "decord (==0.6.0)", "dill (<0.3.5)", "evaluate (>=0.2.0)", "faiss-cpu", "flax (>=0.4.1,<=0.7.0)", "fugashi (>=1.0)", "hf-doc-builder", "hf-doc-builder (>=0.3.0)", "ipadic (>=1.0.0,<2.0)", "isort (>=5.5.4)", "jax (>=0.4.1,<=0.4.13)", "jaxlib (>=0.4.1,<=0.4.13)", "kenlm", "keras-nlp (>=0.3.1)", "librosa" [...]
-dev-tensorflow = ["GitPython (<3.1.19)", "Pillow (>=10.0.1,<=15.0)", "beautifulsoup4", "cookiecutter (==1.7.3)", "datasets (!=2.5.0)", "dill (<0.3.5)", "evaluate (>=0.2.0)", "faiss-cpu", "hf-doc-builder", "hf-doc-builder (>=0.3.0)", "isort (>=5.5.4)", "kenlm", "keras-nlp (>=0.3.1)", "librosa", "nltk", "onnxconverter-common", "onnxruntime (>=1.4.0)", "onnxruntime-tools (>=1.4.2)", "parameterized", "phonemizer", "protobuf", "psutil", "pyctcdecode (>=0.4.0)", "pydantic", "pytest (>=7.2.0,<8 [...]
-dev-torch = ["GitPython (<3.1.19)", "Pillow (>=10.0.1,<=15.0)", "accelerate (>=0.21.0)", "beautifulsoup4", "codecarbon (==1.2.0)", "cookiecutter (==1.7.3)", "datasets (!=2.5.0)", "dill (<0.3.5)", "evaluate (>=0.2.0)", "faiss-cpu", "fugashi (>=1.0)", "hf-doc-builder", "hf-doc-builder (>=0.3.0)", "ipadic (>=1.0.0,<2.0)", "isort (>=5.5.4)", "kenlm", "librosa", "nltk", "onnxruntime (>=1.4.0)", "onnxruntime-tools (>=1.4.2)", "optuna", "parameterized", "phonemizer", "protobuf", "psutil", "pyct [...]
-docs = ["Pillow (>=10.0.1,<=15.0)", "accelerate (>=0.21.0)", "av (==9.2.0)", "codecarbon (==1.2.0)", "decord (==0.6.0)", "flax (>=0.4.1,<=0.7.0)", "hf-doc-builder", "jax (>=0.4.1,<=0.4.13)", "jaxlib (>=0.4.1,<=0.4.13)", "kenlm", "keras-nlp (>=0.3.1)", "librosa", "onnxconverter-common", "optax (>=0.0.8,<=0.1.4)", "optuna", "phonemizer", "protobuf", "pyctcdecode (>=0.4.0)", "ray[tune] (>=2.7.0)", "sentencepiece (>=0.1.91,!=0.1.92)", "sigopt", "tensorflow (>=2.6,<2.16)", "tensorflow-text (< [...]
-docs-specific = ["hf-doc-builder"]
-flax = ["flax (>=0.4.1,<=0.7.0)", "jax (>=0.4.1,<=0.4.13)", "jaxlib (>=0.4.1,<=0.4.13)", "optax (>=0.0.8,<=0.1.4)"]
-flax-speech = ["kenlm", "librosa", "phonemizer", "pyctcdecode (>=0.4.0)"]
-ftfy = ["ftfy"]
-integrations = ["optuna", "ray[tune] (>=2.7.0)", "sigopt"]
-ja = ["fugashi (>=1.0)", "ipadic (>=1.0.0,<2.0)", "rhoknp (>=1.1.0,<1.3.1)", "sudachidict-core (>=20220729)", "sudachipy (>=0.6.6)", "unidic (>=1.0.2)", "unidic-lite (>=1.0.7)"]
-modelcreation = ["cookiecutter (==1.7.3)"]
-natten = ["natten (>=0.14.6,<0.15.0)"]
-onnx = ["onnxconverter-common", "onnxruntime (>=1.4.0)", "onnxruntime-tools (>=1.4.2)", "tf2onnx"]
-onnxruntime = ["onnxruntime (>=1.4.0)", "onnxruntime-tools (>=1.4.2)"]
-optuna = ["optuna"]
-quality = ["GitPython (<3.1.19)", "datasets (!=2.5.0)", "hf-doc-builder (>=0.3.0)", "isort (>=5.5.4)", "ruff (==0.1.5)", "urllib3 (<2.0.0)"]
-ray = ["ray[tune] (>=2.7.0)"]
-retrieval = ["datasets (!=2.5.0)", "faiss-cpu"]
-sagemaker = ["sagemaker (>=2.31.0)"]
-sentencepiece = ["protobuf", "sentencepiece (>=0.1.91,!=0.1.92)"]
-serving = ["fastapi", "pydantic", "starlette", "uvicorn"]
-sigopt = ["sigopt"]
-sklearn = ["scikit-learn"]
-speech = ["kenlm", "librosa", "phonemizer", "pyctcdecode (>=0.4.0)", "torchaudio"]
-testing = ["GitPython (<3.1.19)", "beautifulsoup4", "cookiecutter (==1.7.3)", "datasets (!=2.5.0)", "dill (<0.3.5)", "evaluate (>=0.2.0)", "faiss-cpu", "hf-doc-builder (>=0.3.0)", "nltk", "parameterized", "protobuf", "psutil", "pydantic", "pytest (>=7.2.0,<8.0.0)", "pytest-timeout", "pytest-xdist", "rjieba", "rouge-score (!=0.0.7,!=0.0.8,!=0.1,!=0.1.1)", "ruff (==0.1.5)", "sacrebleu (>=1.4.12,<2.0.0)", "sacremoses", "sentencepiece (>=0.1.91,!=0.1.92)", "tensorboard", "timeout-decorator"]
-tf = ["keras-nlp (>=0.3.1)", "onnxconverter-common", "tensorflow (>=2.6,<2.16)", "tensorflow-text (<2.16)", "tf2onnx"]
-tf-cpu = ["keras-nlp (>=0.3.1)", "onnxconverter-common", "tensorflow-cpu (>=2.6,<2.16)", "tensorflow-text (<2.16)", "tf2onnx"]
-tf-speech = ["kenlm", "librosa", "phonemizer", "pyctcdecode (>=0.4.0)"]
-timm = ["timm"]
-tokenizers = ["tokenizers (>=0.19,<0.20)"]
-torch = ["accelerate (>=0.21.0)", "torch"]
-torch-speech = ["kenlm", "librosa", "phonemizer", "pyctcdecode (>=0.4.0)", "torchaudio"]
-torch-vision = ["Pillow (>=10.0.1,<=15.0)", "torchvision"]
-torchhub = ["filelock", "huggingface-hub (>=0.19.3,<1.0)", "importlib-metadata", "numpy (>=1.17)", "packaging (>=20.0)", "protobuf", "regex (!=2019.12.17)", "requests", "sentencepiece (>=0.1.91,!=0.1.92)", "tokenizers (>=0.19,<0.20)", "torch", "tqdm (>=4.27)"]
-video = ["av (==9.2.0)", "decord (==0.6.0)"]
-vision = ["Pillow (>=10.0.1,<=15.0)"]
-
-[[package]]
-name = "triton"
-version = "3.3.1"
-description = "A language and compiler for custom Deep Learning operations"
-optional = false
-python-versions = "*"
-groups = ["main"]
-markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
-files = [
- {file = "triton-3.3.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b74db445b1c562844d3cfad6e9679c72e93fdfb1a90a24052b03bb5c49d1242e"},
- {file = "triton-3.3.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b31e3aa26f8cb3cc5bf4e187bf737cbacf17311e1112b781d4a059353dfd731b"},
- {file = "triton-3.3.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9999e83aba21e1a78c1f36f21bce621b77bcaa530277a50484a7cb4a822f6e43"},
- {file = "triton-3.3.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b89d846b5a4198317fec27a5d3a609ea96b6d557ff44b56c23176546023c4240"},
- {file = "triton-3.3.1-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a3198adb9d78b77818a5388bff89fa72ff36f9da0bc689db2f0a651a67ce6a42"},
- {file = "triton-3.3.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f6139aeb04a146b0b8e0fbbd89ad1e65861c57cfed881f21d62d3cb94a36bab7"},
-]
-
-[package.dependencies]
-setuptools = ">=40.8.0"
-
-[package.extras]
-build = ["cmake (>=3.20)", "lit"]
-tests = ["autopep8", "isort", "llnl-hatchet", "numpy", "pytest", "pytest-forked", "pytest-xdist", "scipy (>=1.7.1)"]
-tutorials = ["matplotlib", "pandas", "tabulate"]
-
-[[package]]
-name = "typing-extensions"
-version = "4.12.2"
-description = "Backported and Experimental Type Hints for Python 3.8+"
-optional = false
-python-versions = ">=3.8"
-groups = ["main"]
-files = [
- {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"},
- {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"},
-]
-
-[[package]]
-name = "tzdata"
-version = "2025.2"
-description = "Provider of IANA time zone data"
-optional = false
-python-versions = ">=2"
-groups = ["main"]
-files = [
- {file = "tzdata-2025.2-py2.py3-none-any.whl", hash = "sha256:1a403fada01ff9221ca8044d701868fa132215d84beb92242d9acd2147f667a8"},
- {file = "tzdata-2025.2.tar.gz", hash = "sha256:b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9"},
-]
-
-[[package]]
-name = "urllib3"
-version = "2.2.2"
-description = "HTTP library with thread-safe connection pooling, file post, and more."
-optional = false
-python-versions = ">=3.8"
-groups = ["main"]
-files = [
- {file = "urllib3-2.2.2-py3-none-any.whl", hash = "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472"},
- {file = "urllib3-2.2.2.tar.gz", hash = "sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168"},
-]
-
-[package.extras]
-brotli = ["brotli (>=1.0.9) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=0.8.0) ; platform_python_implementation != \"CPython\""]
-h2 = ["h2 (>=4,<5)"]
-socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"]
-zstd = ["zstandard (>=0.18.0)"]
-
-[metadata]
-lock-version = "2.1"
-python-versions = ">=3.9, <3.13"
-content-hash = "38f43b5ee0f35f4170253c1da934b253261bd5831bb72dc7ec5070427b352f12"
(iotdb) 08/15: [AINode] Fix bug of sundial and forecast udf (#16768)
Posted by yo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
yongzao pushed a commit to branch rc/2.0.6
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 048abac28f0c746035beff1c96a7da326bafde18
Author: Leo <16...@users.noreply.github.com>
AuthorDate: Wed Nov 19 09:23:19 2025 +0800
[AINode] Fix bug of sundial and forecast udf (#16768)
(cherry picked from commit 2b47be756ad8703ce3673973260983f10c4f94e3)
---
.../ainode/core/model/sundial/modeling_sundial.py | 7 +-
.../ainode/core/model/timerxl/modeling_timer.py | 6 +-
.../db/queryengine/plan/udf/UDTFForecast.java | 270 +++++++++++++++++++++
3 files changed, 279 insertions(+), 4 deletions(-)
diff --git a/iotdb-core/ainode/iotdb/ainode/core/model/sundial/modeling_sundial.py b/iotdb-core/ainode/iotdb/ainode/core/model/sundial/modeling_sundial.py
index f66b4b13f22..6a2402952db 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/model/sundial/modeling_sundial.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/model/sundial/modeling_sundial.py
@@ -645,9 +645,10 @@ class SundialForPrediction(SundialPreTrainedModel, TSGenerationMixin):
position_ids = attention_mask.long().cumsum(-1) - 1
position_ids.masked_fill_(attention_mask == 0, 1)
if past_key_values:
- position_ids = position_ids[
- :, -(input_ids.shape[1] // self.config.input_token_len) :
- ]
+ token_num = (
+ input_ids.shape[1] + self.config.input_token_len - 1
+ ) // self.config.input_token_len
+ position_ids = position_ids[:, -token_num:]
# if `inputs_embeds` are passed, we only want to use them in the 1st generation step
if inputs_embeds is not None and past_key_values is None:
diff --git a/iotdb-core/ainode/iotdb/ainode/core/model/timerxl/modeling_timer.py b/iotdb-core/ainode/iotdb/ainode/core/model/timerxl/modeling_timer.py
index 4aed1696af7..8dfddd335b7 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/model/timerxl/modeling_timer.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/model/timerxl/modeling_timer.py
@@ -613,7 +613,11 @@ class TimerForPrediction(TimerPreTrainedModel, TSGenerationMixin):
if attention_mask is not None and attention_mask.shape[1] > (
input_ids.shape[1] // self.config.input_token_len
):
- input_ids = input_ids[:, -(attention_mask.shape[1] - past_length) :]
+ input_ids = input_ids[
+ :,
+ -(attention_mask.shape[1] - past_length)
+ * self.config.input_token_len :,
+ ]
# 2 - If the past_length is smaller than input_ids', then input_ids holds all input tokens. We can discard
# input_ids based on the past_length.
elif past_length < (input_ids.shape[1] // self.config.input_token_len):
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/udf/UDTFForecast.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/udf/UDTFForecast.java
new file mode 100644
index 00000000000..260410954d4
--- /dev/null
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/udf/UDTFForecast.java
@@ -0,0 +1,270 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.db.queryengine.plan.udf;
+
+import org.apache.iotdb.ainode.rpc.thrift.TForecastResp;
+import org.apache.iotdb.common.rpc.thrift.TEndPoint;
+import org.apache.iotdb.commons.exception.IoTDBRuntimeException;
+import org.apache.iotdb.db.protocol.client.ainode.AINodeClient;
+import org.apache.iotdb.db.protocol.client.ainode.AINodeClientManager;
+import org.apache.iotdb.db.queryengine.plan.analyze.IModelFetcher;
+import org.apache.iotdb.db.queryengine.plan.analyze.ModelFetcher;
+import org.apache.iotdb.db.queryengine.plan.planner.plan.parameter.model.ModelInferenceDescriptor;
+import org.apache.iotdb.rpc.TSStatusCode;
+import org.apache.iotdb.udf.api.UDTF;
+import org.apache.iotdb.udf.api.access.Row;
+import org.apache.iotdb.udf.api.collector.PointCollector;
+import org.apache.iotdb.udf.api.customizer.config.UDTFConfigurations;
+import org.apache.iotdb.udf.api.customizer.parameter.UDFParameters;
+import org.apache.iotdb.udf.api.customizer.strategy.RowByRowAccessStrategy;
+import org.apache.iotdb.udf.api.type.Type;
+
+import org.apache.tsfile.enums.TSDataType;
+import org.apache.tsfile.read.common.block.TsBlock;
+import org.apache.tsfile.read.common.block.TsBlockBuilder;
+import org.apache.tsfile.read.common.block.column.TsBlockSerde;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+public class UDTFForecast implements UDTF {
+ private static final TsBlockSerde serde = new TsBlockSerde();
+ private static final AINodeClientManager CLIENT_MANAGER = AINodeClientManager.getInstance();
+ private TEndPoint targetAINode = new TEndPoint("127.0.0.1", 10810);
+ private String model_id;
+ private int maxInputLength;
+ private int outputLength;
+ private long outputStartTime;
+ private long outputInterval;
+ private boolean keepInput;
+ Map<String, String> options;
+ List<Type> types;
+ private LinkedList<Row> inputRows;
+ private TsBlockBuilder inputTsBlockBuilder;
+ private final IModelFetcher modelFetcher = ModelFetcher.getInstance();
+
+ private static final Set<Type> ALLOWED_INPUT_TYPES = new HashSet<>();
+
+ static {
+ ALLOWED_INPUT_TYPES.add(Type.INT32);
+ ALLOWED_INPUT_TYPES.add(Type.INT64);
+ ALLOWED_INPUT_TYPES.add(Type.FLOAT);
+ ALLOWED_INPUT_TYPES.add(Type.DOUBLE);
+ }
+
+ private static final String MODEL_ID_PARAMETER_NAME = "MODEL_ID";
+ private static final String OUTPUT_LENGTH_PARAMETER_NAME = "OUTPUT_LENGTH";
+ private static final int DEFAULT_OUTPUT_LENGTH = 96;
+ private static final String OUTPUT_START_TIME = "OUTPUT_START_TIME";
+ public static final long DEFAULT_OUTPUT_START_TIME = Long.MIN_VALUE;
+ private static final String OUTPUT_INTERVAL = "OUTPUT_INTERVAL";
+ public static final long DEFAULT_OUTPUT_INTERVAL = 0L;
+ private static final String KEEP_INPUT_PARAMETER_NAME = "PRESERVE_INPUT";
+ private static final Boolean DEFAULT_KEEP_INPUT = Boolean.FALSE;
+ private static final String OPTIONS_PARAMETER_NAME = "MODEL_OPTIONS";
+ private static final String DEFAULT_OPTIONS = "";
+
+ private void checkType() {
+ for (Type type : this.types) {
+ if (!ALLOWED_INPUT_TYPES.contains(type)) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Input data type %s is not supported, only %s are allowed.",
+ type, ALLOWED_INPUT_TYPES));
+ }
+ }
+ }
+
+ @Override
+ public void beforeStart(UDFParameters parameters, UDTFConfigurations configurations)
+ throws Exception {
+ this.types = parameters.getDataTypes();
+ checkType();
+ configurations.setAccessStrategy(new RowByRowAccessStrategy()).setOutputDataType(Type.DOUBLE);
+
+ this.model_id = parameters.getString(MODEL_ID_PARAMETER_NAME);
+ if (this.model_id == null || this.model_id.isEmpty()) {
+ throw new IllegalArgumentException(
+ "MODEL_ID parameter must be provided and cannot be empty.");
+ }
+ ModelInferenceDescriptor descriptor = modelFetcher.fetchModel(this.model_id);
+ this.targetAINode = descriptor.getTargetAINode();
+
+ this.outputInterval = parameters.getLongOrDefault(OUTPUT_INTERVAL, DEFAULT_OUTPUT_INTERVAL);
+ this.outputLength =
+ parameters.getIntOrDefault(OUTPUT_LENGTH_PARAMETER_NAME, DEFAULT_OUTPUT_LENGTH);
+ this.outputStartTime =
+ parameters.getLongOrDefault(OUTPUT_START_TIME, DEFAULT_OUTPUT_START_TIME);
+ this.keepInput = parameters.getBooleanOrDefault(KEEP_INPUT_PARAMETER_NAME, DEFAULT_KEEP_INPUT);
+ this.options =
+ Arrays.stream(
+ parameters.getStringOrDefault(OPTIONS_PARAMETER_NAME, DEFAULT_OPTIONS).split(","))
+ .map(s -> s.split("="))
+ .filter(arr -> arr.length == 2 && !arr[0].isEmpty()) // 防御性检查
+ .collect(
+ Collectors.toMap(
+ arr -> arr[0].trim(), arr -> arr[1].trim(), (v1, v2) -> v2 // 如果 key 重复,保留后一个
+ ));
+ this.inputRows = new LinkedList<>();
+ List<TSDataType> tsDataTypeList = new ArrayList<>(this.types.size() - 1);
+ for (int i = 0; i < this.types.size(); i++) {
+ tsDataTypeList.add(TSDataType.DOUBLE);
+ }
+ this.inputTsBlockBuilder = new TsBlockBuilder(tsDataTypeList);
+ }
+
+ private void setByType(Row row, PointCollector collector) throws IOException {
+ for (int i = 0; i < row.size(); i++) {
+ switch (this.types.get(i)) {
+ case INT32:
+ collector.putInt(row.getTime(), row.getInt(i));
+ break;
+ case INT64:
+ collector.putLong(row.getTime(), row.getLong(i));
+ break;
+ case FLOAT:
+ collector.putFloat(row.getTime(), row.getFloat(i));
+ break;
+ case DOUBLE:
+ collector.putDouble(row.getTime(), row.getDouble(i));
+ break;
+ default:
+ throw new IllegalArgumentException(
+ String.format("Unsupported data type %s", this.types.get(i + 1)));
+ }
+ }
+ }
+
+ private void setByType(Row row, TsBlockBuilder tsBlockBuilder) throws IOException {
+ for (int i = 0; i < row.size(); i++) {
+ if (row.isNull(i)) {
+ tsBlockBuilder.getColumnBuilder(i).appendNull();
+ continue;
+ }
+ switch (this.types.get(i)) {
+ case INT32:
+ tsBlockBuilder.getColumnBuilder(i).writeInt(row.getInt(i));
+ break;
+ case INT64:
+ tsBlockBuilder.getColumnBuilder(i).writeLong(row.getLong(i));
+ break;
+ case FLOAT:
+ tsBlockBuilder.getColumnBuilder(i).writeFloat(row.getFloat(i));
+ break;
+ case DOUBLE:
+ tsBlockBuilder.getColumnBuilder(i).writeDouble(row.getDouble(i));
+ break;
+ default:
+ throw new IllegalArgumentException(
+ String.format("Unsupported data type %s", this.types.get(i + 1)));
+ }
+ }
+ }
+
+ @Override
+ public void transform(Row row, PointCollector collector) throws Exception {
+ if (this.keepInput) {
+ setByType(row, collector);
+ }
+
+ if (maxInputLength != 0 && inputRows.size() >= maxInputLength) {
+ // If the input rows exceed the maximum length, remove the oldest row
+ inputRows.removeFirst();
+ }
+ inputRows.add(row);
+ }
+
+ private TsBlock forecast() throws Exception {
+ // Build the input data which will be sent to AINode
+ while (!inputRows.isEmpty()) {
+ Row row = inputRows.removeFirst();
+ inputTsBlockBuilder.getTimeColumnBuilder().writeLong(row.getTime());
+ setByType(row, inputTsBlockBuilder);
+ inputTsBlockBuilder.declarePosition();
+ }
+
+ TsBlock inputData = inputTsBlockBuilder.build();
+
+ TForecastResp resp;
+ try (AINodeClient client = CLIENT_MANAGER.borrowClient(targetAINode)) {
+ resp = client.forecast(model_id, inputData, outputLength, options);
+ } catch (Exception e) {
+ throw new IoTDBRuntimeException(
+ e.getMessage(), TSStatusCode.CAN_NOT_CONNECT_AINODE.getStatusCode());
+ }
+
+ if (resp.getStatus().getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
+ throw new IoTDBRuntimeException(
+ String.format(
+ "Forecast failed due to %d %s",
+ resp.getStatus().getCode(), resp.getStatus().getMessage()),
+ resp.getStatus().getCode());
+ }
+ return serde.deserialize(ByteBuffer.wrap(resp.getForecastResult()));
+ }
+
+ @Override
+ public void terminate(PointCollector collector) throws Exception {
+ long inputStartTime = inputRows.get(0).getTime();
+ long inputEndTime = inputRows.get(inputRows.size() - 1).getTime();
+ if (inputStartTime > inputEndTime) {
+ throw new IllegalArgumentException(
+ String.format(
+ "input end time should never less than start time, start time is %s, end time is %s",
+ inputStartTime, inputEndTime));
+ }
+ long interval = this.outputInterval;
+ if (outputInterval <= 0) {
+ interval = (inputEndTime - inputStartTime) / (inputRows.size() - 1);
+ }
+ long outputTime =
+ (this.outputStartTime == Long.MIN_VALUE) ? inputEndTime + interval : this.outputStartTime;
+ long[] outputTimes = new long[this.outputLength];
+ for (int i = 0; i < this.outputLength; i++) {
+ outputTimes[i] = outputTime + interval * i;
+ }
+
+ TsBlock forecastResult = forecast();
+ if (forecastResult.getPositionCount() != this.outputLength) {
+ throw new IllegalArgumentException(
+ String.format(
+ "The forecast result length %d does not match the expected output length %d",
+ forecastResult.getPositionCount(), this.outputLength));
+ }
+ if (forecastResult.getValueColumnCount() != 1) {
+ throw new IllegalArgumentException(
+ String.format(
+ "The forecast result should have only one value column, but got %d",
+ forecastResult.getValueColumnCount()));
+ }
+
+ for (int i = 0; i < forecastResult.getPositionCount(); i++) {
+ collector.putDouble(outputTimes[i], forecastResult.getValueColumns()[0].getDouble(i));
+ }
+ }
+}
(iotdb) 14/15: [AINode] Fix cp errors
Posted by yo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
yongzao pushed a commit to branch rc/2.0.6
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 3cfcc7518b0ec1b749cee7ecfd54eb00c7cc03cb
Author: Yongzao <53...@qq.com>
AuthorDate: Tue Dec 16 13:58:24 2025 +0800
[AINode] Fix cp errors
---
.github/workflows/cluster-it-1c1d1a.yml | 3 -
.../ainode/core/util/decorator.py => .flake8} | 25 +-
iotdb-core/ainode/build_binary.py | 8 +-
iotdb-core/ainode/iotdb/Session.py | 33 +-
iotdb-core/ainode/iotdb/ainode/__init__.py | 17 +
iotdb-core/ainode/iotdb/ainode/core/ai_node.py | 15 +-
iotdb-core/ainode/iotdb/ainode/core/config.py | 77 +-
iotdb-core/ainode/iotdb/ainode/core/constant.py | 12 +-
iotdb-core/ainode/iotdb/ainode/core/exception.py | 5 +-
.../ainode/iotdb/ainode/core/ingress/iotdb.py | 22 +-
iotdb-core/ainode/iotdb/ainode/core/log.py | 4 +-
.../iotdb/ainode/core/manager/cluster_manager.py | 7 +-
.../iotdb/ainode/core/manager/inference_manager.py | 244 +-
.../iotdb/ainode/core/manager/model_manager.py | 21 +-
.../ainode/iotdb/ainode/core/manager/utils.py | 33 +-
.../ainode/core/model/built_in_model_factory.py | 46 +-
.../iotdb/ainode/core/model/model_factory.py | 8 +-
.../ainode/iotdb/ainode/core/model/model_info.py | 2 +-
.../iotdb/ainode/core/model/model_storage.py | 16 +-
.../ainode/core/model/sundial/modeling_sundial.py | 11 +-
.../ainode/core/model/timerxl/modeling_timer.py | 6 +-
.../ainode/iotdb/ainode/core/model/uri_utils.py | 6 +-
iotdb-core/ainode/iotdb/ainode/core/rpc/client.py | 63 +-
iotdb-core/ainode/iotdb/ainode/core/rpc/handler.py | 79 +-
iotdb-core/ainode/iotdb/ainode/core/rpc/service.py | 39 +-
iotdb-core/ainode/iotdb/ainode/core/rpc/status.py | 6 +-
iotdb-core/ainode/iotdb/ainode/core/script.py | 87 +-
iotdb-core/ainode/iotdb/ainode/core/util/cache.py | 2 +-
.../ainode/iotdb/ainode/core/util/decorator.py | 15 +
.../ainode/iotdb/sqlalchemy/IoTDBSQLCompiler.py | 3 +-
iotdb-core/ainode/iotdb/table_session_pool.py | 2 +-
.../ainode/iotdb/template/MeasurementNode.py | 5 +-
iotdb-core/ainode/iotdb/template/Template.py | 2 +-
.../iotdb/thrift/ainode/IAINodeRPCService-remote | 6 +-
.../iotdb/thrift/ainode/IAINodeRPCService.py | 18 +-
iotdb-core/ainode/iotdb/thrift/ainode/constants.py | 11 +-
iotdb-core/ainode/iotdb/thrift/ainode/ttypes.py | 13 +-
iotdb-core/ainode/iotdb/thrift/common/constants.py | 11 +-
iotdb-core/ainode/iotdb/thrift/common/ttypes.py | 104 +-
.../thrift/confignode/IConfigNodeRPCService-remote | 70 +-
.../thrift/confignode/IConfigNodeRPCService.py | 1680 ++-----------
.../ainode/iotdb/thrift/confignode/constants.py | 11 +-
.../ainode/iotdb/thrift/confignode/ttypes.py | 2530 ++++++--------------
.../thrift/datanode/IDataNodeRPCService-remote | 31 +-
.../iotdb/thrift/datanode/IDataNodeRPCService.py | 567 +----
.../thrift/datanode/MPPDataExchangeService-remote | 6 +-
.../thrift/datanode/MPPDataExchangeService.py | 18 +-
.../ainode/iotdb/thrift/datanode/constants.py | 11 +-
iotdb-core/ainode/iotdb/thrift/datanode/ttypes.py | 319 +--
.../iotdb/thrift/rpc/IClientRPCService-remote | 13 +-
.../ainode/iotdb/thrift/rpc/IClientRPCService.py | 207 +-
iotdb-core/ainode/iotdb/thrift/rpc/constants.py | 11 +-
iotdb-core/ainode/iotdb/thrift/rpc/ttypes.py | 231 +-
.../iotdb/tsfile/utils/read_write_io_utils.py | 2 +-
.../ainode/iotdb/tsfile/utils/tsblock_serde.py | 1 -
iotdb-core/ainode/iotdb/utils/Field.py | 8 +-
iotdb-core/ainode/iotdb/utils/IoTDBConstants.py | 3 +-
iotdb-core/ainode/iotdb/utils/NumpyTablet.py | 4 +-
iotdb-core/ainode/iotdb/utils/SessionDataSet.py | 6 +-
iotdb-core/ainode/iotdb/utils/Tablet.py | 2 +-
iotdb-core/ainode/iotdb/utils/iotdb_rpc_dataset.py | 4 +-
iotdb-core/ainode/pom.xml | 2 +-
iotdb-core/ainode/pyproject.toml | 107 +-
.../db/protocol/client/ainode/AINodeClient.java | 3 +
.../InformationSchemaContentSupplierFactory.java | 1 -
65 files changed, 2275 insertions(+), 4660 deletions(-)
diff --git a/.github/workflows/cluster-it-1c1d1a.yml b/.github/workflows/cluster-it-1c1d1a.yml
index d4c40fa7ad8..67be8f1a5f6 100644
--- a/.github/workflows/cluster-it-1c1d1a.yml
+++ b/.github/workflows/cluster-it-1c1d1a.yml
@@ -41,9 +41,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- - name: Build AINode
- shell: bash
- run: mvn clean package -DskipTests -P with-ainode
- name: IT Test
shell: bash
run: |
diff --git a/iotdb-core/ainode/iotdb/ainode/core/util/decorator.py b/iotdb-core/ainode/.flake8
similarity index 71%
copy from iotdb-core/ainode/iotdb/ainode/core/util/decorator.py
copy to iotdb-core/ainode/.flake8
index 33b9f4835ac..ce062a0252e 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/util/decorator.py
+++ b/iotdb-core/ainode/.flake8
@@ -15,12 +15,19 @@
# specific language governing permissions and limitations
# under the License.
#
-def singleton(cls):
- instances = {}
-
- def get_instance(*args, **kwargs):
- if cls not in instances:
- instances[cls] = cls(*args, **kwargs)
- return instances[cls]
-
- return get_instance
+[flake8]
+ignore =
+ E203,
+ W503
+max-line-length=200
+exclude =
+ .git,
+ tests/*,
+ iotdb/thrift/**/*
+extend-exclude =
+ dist,
+ build,
+ venv
+show-source = True
+statistics = True
+format = %(path)s:%(row)d,%(col)d:%(code)s:%(text)s:https://lintlyci.github.io/Flake8Rules/rules/%(code)s.html
diff --git a/iotdb-core/ainode/build_binary.py b/iotdb-core/ainode/build_binary.py
index 01b0ef67e8f..6607521e152 100644
--- a/iotdb-core/ainode/build_binary.py
+++ b/iotdb-core/ainode/build_binary.py
@@ -31,7 +31,7 @@ from pathlib import Path
def get_venv_base_dir():
"""
Get the base directory for virtual environments outside the project.
-
+
Returns:
Path: Base directory path
- Linux/macOS: ~/.cache/iotdb-ainode-build/
@@ -51,13 +51,13 @@ def get_venv_base_dir():
def setup_venv():
"""
Create virtual environment outside the project directory.
-
+
The virtual environment is created in a platform-specific location:
- Linux/macOS: ~/.cache/iotdb-ainode-build/<project-name>/
- Windows: %LOCALAPPDATA%\\iotdb-ainode-build\\<project-name>\\
-
+
The same venv is reused across multiple builds of the same project.
-
+
Returns:
Path: Path to the virtual environment directory
"""
diff --git a/iotdb-core/ainode/iotdb/Session.py b/iotdb-core/ainode/iotdb/Session.py
index 3f44bd41584..155c0ebe87b 100644
--- a/iotdb-core/ainode/iotdb/Session.py
+++ b/iotdb-core/ainode/iotdb/Session.py
@@ -18,46 +18,48 @@
import logging
import random
-import sys
import struct
+import sys
import warnings
+
from thrift.protocol import TBinaryProtocol, TCompactProtocol
from thrift.transport import TSocket, TTransport
from tzlocal import get_localzone_name
from iotdb.utils.SessionDataSet import SessionDataSet
+
from .template.Template import Template
from .template.TemplateQueryType import TemplateQueryType
from .thrift.common.ttypes import TEndPoint
from .thrift.rpc.IClientRPCService import (
Client,
- TSCreateTimeseriesReq,
+ TSAppendSchemaTemplateReq,
+ TSCloseSessionReq,
TSCreateAlignedTimeseriesReq,
+ TSCreateMultiTimeseriesReq,
+ TSCreateSchemaTemplateReq,
+ TSCreateTimeseriesReq,
+ TSDropSchemaTemplateReq,
+ TSExecuteStatementReq,
TSInsertRecordReq,
+ TSInsertRecordsOfOneDeviceReq,
+ TSInsertRecordsReq,
TSInsertStringRecordReq,
TSInsertTabletReq,
- TSExecuteStatementReq,
- TSOpenSessionReq,
- TSCreateMultiTimeseriesReq,
- TSCloseSessionReq,
TSInsertTabletsReq,
- TSInsertRecordsReq,
- TSInsertRecordsOfOneDeviceReq,
- TSCreateSchemaTemplateReq,
- TSDropSchemaTemplateReq,
- TSAppendSchemaTemplateReq,
+ TSOpenSessionReq,
TSPruneSchemaTemplateReq,
+ TSQueryTemplateReq,
TSSetSchemaTemplateReq,
TSUnsetSchemaTemplateReq,
- TSQueryTemplateReq,
)
from .thrift.rpc.ttypes import (
TSDeleteDataReq,
+ TSInsertStringRecordsOfOneDeviceReq,
+ TSLastDataQueryReq,
TSProtocolVersion,
- TSSetTimeZoneReq,
TSRawDataQueryReq,
- TSLastDataQueryReq,
- TSInsertStringRecordsOfOneDeviceReq,
+ TSSetTimeZoneReq,
)
from .tsfile.utils.date_utils import parse_date_to_int
from .utils import rpc_utils
@@ -245,6 +247,7 @@ class Session(object):
def __get_transport(self, endpoint):
if self.__use_ssl:
import ssl
+
from thrift.transport import TSSLSocket
if sys.version_info >= (3, 10):
diff --git a/iotdb-core/ainode/iotdb/ainode/__init__.py b/iotdb-core/ainode/iotdb/ainode/__init__.py
index e69de29bb2d..2a1e720805f 100644
--- a/iotdb-core/ainode/iotdb/ainode/__init__.py
+++ b/iotdb-core/ainode/iotdb/ainode/__init__.py
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
diff --git a/iotdb-core/ainode/iotdb/ainode/core/ai_node.py b/iotdb-core/ainode/iotdb/ainode/core/ai_node.py
index 13ff1f485d4..438faf1e1c0 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/ai_node.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/ai_node.py
@@ -23,18 +23,19 @@ from datetime import datetime
import psutil
from iotdb.ainode.core.config import AINodeDescriptor
-from ainode.core.constant import AINODE_SYSTEM_FILE_NAME
-from ainode.core.log import Logger
-from ainode.core.rpc.client import ClientManager
-from ainode.core.rpc.handler import AINodeRPCServiceHandler
-from ainode.core.rpc.service import AINodeRPCService
-from ainode.thrift.common.ttypes import (
+from iotdb.ainode.core.constant import AINODE_SYSTEM_FILE_NAME
+from iotdb.ainode.core.exception import MissingConfigError
+from iotdb.ainode.core.log import Logger
+from iotdb.ainode.core.rpc.client import ClientManager
+from iotdb.ainode.core.rpc.handler import AINodeRPCServiceHandler
+from iotdb.ainode.core.rpc.service import AINodeRPCService
+from iotdb.thrift.common.ttypes import (
TAINodeConfiguration,
TAINodeLocation,
TEndPoint,
TNodeResource,
)
-from ainode.thrift.confignode.ttypes import TNodeVersionInfo
+from iotdb.thrift.confignode.ttypes import TNodeVersionInfo
logger = Logger()
diff --git a/iotdb-core/ainode/iotdb/ainode/core/config.py b/iotdb-core/ainode/iotdb/ainode/core/config.py
index 43b6ce7ccda..f5021ca2c41 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/config.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/config.py
@@ -17,8 +17,9 @@
#
import os
import re
+import threading
-from ainode.core.constant import (
+from iotdb.ainode.core.constant import (
AINODE_BUILD_INFO,
AINODE_BUILTIN_MODELS_DIR,
AINODE_CLUSTER_INGRESS_ADDRESS,
@@ -47,9 +48,9 @@ from ainode.core.constant import (
AINODE_VERSION_INFO,
)
from iotdb.ainode.core.exception import BadNodeUrlError
-from ainode.core.log import Logger
-from ainode.core.util.decorator import singleton
-from ainode.thrift.common.ttypes import TEndPoint
+from iotdb.ainode.core.log import Logger
+from iotdb.ainode.core.util.decorator import singleton
+from iotdb.thrift.common.ttypes import TEndPoint
logger = Logger()
@@ -101,15 +102,37 @@ class AINodeConfig(object):
# Whether to enable compression for thrift
self._ain_thrift_compression_enabled = AINODE_THRIFT_COMPRESSION_ENABLED
+ # use for ssl
+ self._ain_cluster_ingress_ssl_enabled = False
+ self._ain_internal_ssl_enabled = False
+ self._ain_thrift_ssl_cert_file = None
+ self._ain_thrift_ssl_key_file = None
+
# Cache number of model storage to avoid repeated loading
self._ain_model_storage_cache_size = 30
+ # activation
+ self._ain_activated = threading.Event()
+
def get_cluster_name(self) -> str:
return self._cluster_name
def set_cluster_name(self, cluster_name: str) -> None:
self._cluster_name = cluster_name
+ def is_activated(self) -> bool:
+ return self._ain_activated.is_set()
+
+ def set_activated(self, is_activated: bool) -> None:
+ if is_activated:
+ if not self._ain_activated.is_set():
+ logger.info("TimechoDB-AINode is activated.")
+ self._ain_activated.set()
+ else:
+ if self._ain_activated.is_set():
+ logger.info("TimechoDB-AINode is deactivated.")
+ self._ain_activated.clear()
+
def get_version_info(self) -> str:
return self._version_info
@@ -218,6 +241,32 @@ class AINodeConfig(object):
) -> None:
self._ain_thrift_compression_enabled = ain_thrift_compression_enabled
+ def get_ain_cluster_ingress_ssl_enabled(self) -> bool:
+ return self._ain_cluster_ingress_ssl_enabled
+
+ def set_ain_cluster_ingress_ssl_enabled(
+ self, ain_cluster_ingress_ssl_enabled: int
+ ) -> None:
+ self._ain_cluster_ingress_ssl_enabled = ain_cluster_ingress_ssl_enabled
+
+ def get_ain_internal_ssl_enabled(self) -> bool:
+ return self._ain_internal_ssl_enabled
+
+ def set_ain_internal_ssl_enabled(self, ain_internal_ssl_enabled: int) -> None:
+ self._ain_internal_ssl_enabled = ain_internal_ssl_enabled
+
+ def get_ain_thrift_ssl_cert_file(self) -> str:
+ return self._ain_thrift_ssl_cert_file
+
+ def set_ain_thrift_ssl_cert_file(self, ain_thrift_ssl_cert_file: str) -> None:
+ self._ain_thrift_ssl_cert_file = ain_thrift_ssl_cert_file
+
+ def get_ain_thrift_ssl_key_file(self) -> str:
+ return self._ain_thrift_ssl_key_file
+
+ def set_ain_thrift_ssl_key_file(self, ain_thrift_ssl_key_file: str) -> None:
+ self._ain_thrift_ssl_key_file = ain_thrift_ssl_key_file
+
def get_ain_model_storage_cache_size(self) -> int:
return self._ain_model_storage_cache_size
@@ -358,6 +407,26 @@ class AINodeDescriptor(object):
int(file_configs["ain_thrift_compression_enabled"])
)
+ if "ain_cluster_ingress_ssl_enabled" in config_keys:
+ self._config.set_ain_cluster_ingress_ssl_enabled(
+ int(file_configs["ain_cluster_ingress_ssl_enabled"])
+ )
+
+ if "ain_internal_ssl_enabled" in config_keys:
+ self._config.set_ain_internal_ssl_enabled(
+ int(file_configs["ain_internal_ssl_enabled"])
+ )
+
+ if "ain_thrift_ssl_cert_file" in config_keys:
+ self._config.set_ain_thrift_ssl_cert_file(
+ file_configs["ain_thrift_ssl_cert_file"]
+ )
+
+ if "ain_thrift_ssl_key_file" in config_keys:
+ self._config.set_ain_thrift_ssl_key_file(
+ file_configs["ain_thrift_ssl_key_file"]
+ )
+
if "ain_logs_dir" in config_keys:
log_dir = file_configs["ain_logs_dir"]
self._config.set_ain_logs_dir(log_dir)
diff --git a/iotdb-core/ainode/iotdb/ainode/core/constant.py b/iotdb-core/ainode/iotdb/ainode/core/constant.py
index fd8f10177a9..e6b213d6a5d 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/constant.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/constant.py
@@ -15,13 +15,14 @@
# specific language governing permissions and limitations
# under the License.
#
+
import logging
import os
from enum import Enum
from typing import List
from iotdb.ainode.core.model.model_enums import BuiltInModelType
-from ainode.thrift.common.ttypes import TEndPoint
+from iotdb.thrift.common.ttypes import TEndPoint
IOTDB_AINODE_HOME = os.getenv("IOTDB_AINODE_HOME", "")
AINODE_VERSION_INFO = "UNKNOWN"
@@ -40,7 +41,7 @@ AINODE_RPC_PORT = 10810
AINODE_CLUSTER_INGRESS_ADDRESS = "127.0.0.1"
AINODE_CLUSTER_INGRESS_PORT = 6667
AINODE_CLUSTER_INGRESS_USERNAME = "root"
-AINODE_CLUSTER_INGRESS_PASSWORD = "root"
+AINODE_CLUSTER_INGRESS_PASSWORD = "TimechoDB@2021"
AINODE_CLUSTER_INGRESS_TIME_ZONE = "UTC+8"
# RPC config
@@ -76,6 +77,9 @@ DEFAULT_LOG_LEVEL = logging.INFO
INFERENCE_LOG_FILE_NAME_PREFIX_TEMPLATE = (
"log_inference_rank_{}_" # example: log_inference_rank_0_all.log
)
+TRAINING_LOG_FILE_NAME_PREFIX_TEMPLATE = (
+ "log_training_rank_{}_" # example: log_training_rank_0_all.log
+)
# AINode model management
MODEL_WEIGHTS_FILE_IN_SAFETENSORS = "model.safetensors"
@@ -96,6 +100,10 @@ class TSStatusCode(Enum):
INVALID_INFERENCE_CONFIG = 1512
INFERENCE_INTERNAL_ERROR = 1520
+ # Training status codes
+ INVALID_TRAINING_CONFIG = 1550
+ TRAINING_INTERNAL_ERROR = 1551
+
def get_status_code(self) -> int:
return self.value
diff --git a/iotdb-core/ainode/iotdb/ainode/core/exception.py b/iotdb-core/ainode/iotdb/ainode/core/exception.py
index f00900e8d01..bc89cdc3066 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/exception.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/exception.py
@@ -17,7 +17,10 @@
#
import re
-from ainode.core.constant import MODEL_CONFIG_FILE_IN_YAML, MODEL_WEIGHTS_FILE_IN_PT
+from iotdb.ainode.core.constant import (
+ MODEL_CONFIG_FILE_IN_YAML,
+ MODEL_WEIGHTS_FILE_IN_PT,
+)
class _BaseError(Exception):
diff --git a/iotdb-core/ainode/iotdb/ainode/core/ingress/iotdb.py b/iotdb-core/ainode/iotdb/ainode/core/ingress/iotdb.py
index 792d64b2980..13c56ca9d2d 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/ingress/iotdb.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/ingress/iotdb.py
@@ -17,17 +17,17 @@
#
import numpy as np
import torch
+from torch.utils.data import Dataset
+
+from iotdb.ainode.core.config import AINodeDescriptor
+from iotdb.ainode.core.ingress.dataset import BasicDatabaseForecastDataset
+from iotdb.ainode.core.log import Logger
+from iotdb.ainode.core.util.cache import MemoryLRUCache
+from iotdb.ainode.core.util.decorator import singleton
from iotdb.Session import Session
from iotdb.table_session import TableSession, TableSessionConfig
from iotdb.utils.Field import Field
from iotdb.utils.IoTDBConstants import TSDataType
-from torch.utils.data import Dataset
-
-from iotdb.ainode.core.config import AINodeDescriptor
-from iotdb.ainode.core.ingress import BasicDatabaseForecastDataset
-from ainode.core.log import Logger
-from ainode.core.util.cache import MemoryLRUCache
-from ainode.core.util.decorator import singleton
logger = Logger()
@@ -91,6 +91,10 @@ class IoTDBTreeModelDataset(BasicDatabaseForecastDataset):
user=username,
password=password,
zone_id=time_zone,
+ use_ssl=AINodeDescriptor()
+ .get_config()
+ .get_ain_cluster_ingress_ssl_enabled(),
+ ca_certs=AINodeDescriptor().get_config().get_ain_thrift_ssl_cert_file(),
)
self.session.open(False)
self.use_rate = use_rate
@@ -269,6 +273,10 @@ class IoTDBTableModelDataset(BasicDatabaseForecastDataset):
username=username,
password=password,
time_zone=time_zone,
+ use_ssl=AINodeDescriptor()
+ .get_config()
+ .get_ain_cluster_ingress_ssl_enabled(),
+ ca_certs=AINodeDescriptor().get_config().get_ain_thrift_ssl_cert_file(),
)
self.session = TableSession(table_session_config)
self.use_rate = use_rate
diff --git a/iotdb-core/ainode/iotdb/ainode/core/log.py b/iotdb-core/ainode/iotdb/ainode/core/log.py
index 947fe820c30..fd121b26349 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/log.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/log.py
@@ -26,14 +26,14 @@ import sys
import threading
from logging.handlers import TimedRotatingFileHandler
-from ainode.core.constant import (
+from iotdb.ainode.core.constant import (
AINODE_LOG_DIR,
AINODE_LOG_FILE_LEVELS,
AINODE_LOG_FILE_NAME_PREFIX,
DEFAULT_LOG_LEVEL,
LOG_FILE_TYPE,
)
-from ainode.core.util.decorator import singleton
+from iotdb.ainode.core.util.decorator import singleton
class BaseLogger:
diff --git a/iotdb-core/ainode/iotdb/ainode/core/manager/cluster_manager.py b/iotdb-core/ainode/iotdb/ainode/core/manager/cluster_manager.py
index b7d65f47dc1..8b8731cb92f 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/manager/cluster_manager.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/manager/cluster_manager.py
@@ -17,8 +17,8 @@
#
import psutil
-from ainode.thrift.ainode.ttypes import TAIHeartbeatReq, TAIHeartbeatResp
-from ainode.thrift.common.ttypes import TLoadSample
+from iotdb.thrift.ainode.ttypes import TAIHeartbeatReq, TAIHeartbeatResp
+from iotdb.thrift.common.ttypes import TLoadSample
class ClusterManager:
@@ -42,5 +42,6 @@ class ClusterManager:
)
else:
return TAIHeartbeatResp(
- heartbeatTimestamp=req.heartbeatTimestamp, status="Running"
+ heartbeatTimestamp=req.heartbeatTimestamp,
+ status="Running",
)
diff --git a/iotdb-core/ainode/iotdb/ainode/core/manager/inference_manager.py b/iotdb-core/ainode/iotdb/ainode/core/manager/inference_manager.py
index 65f4abacfca..a67d576b0ec 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/manager/inference_manager.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/manager/inference_manager.py
@@ -15,54 +15,58 @@
# specific language governing permissions and limitations
# under the License.
#
+
import threading
import time
from abc import ABC, abstractmethod
-from typing import Dict, List
+from typing import Dict
import pandas as pd
import torch
import torch.multiprocessing as mp
-from iotdb.tsfile.utils.tsblock_serde import deserialize
from iotdb.ainode.core.config import AINodeDescriptor
-from ainode.core.constant import TSStatusCode
+from iotdb.ainode.core.constant import TSStatusCode
from iotdb.ainode.core.exception import (
InferenceModelInternalError,
InvalidWindowArgumentError,
NumericalRangeException,
runtime_error_extractor,
)
-from ainode.core.inference.inference_request import (
+from iotdb.ainode.core.inference.inference_request import (
InferenceRequest,
InferenceRequestProxy,
)
-from iotdb.ainode.core.inference.inference_request_pool import InferenceRequestPool
-from iotdb.ainode.core.inference.strategy import (
+from iotdb.ainode.core.inference.pool_controller import PoolController
+from iotdb.ainode.core.inference.strategy.timer_sundial_inference_pipeline import (
TimerSundialInferencePipeline,
)
-from iotdb.ainode.core.inference.strategy import (
+from iotdb.ainode.core.inference.strategy.timerxl_inference_pipeline import (
TimerXLInferencePipeline,
)
-from ainode.core.inference.utils import generate_req_id
-from ainode.core.log import Logger
-from ainode.core.manager.model_manager import ModelManager
-from ainode.core.manager.utils import (
- _estimate_pool_size,
- _measure_model_memory,
-)
-from ainode.core.model.sundial.configuration_sundial import SundialConfig
-from ainode.core.model.sundial.modeling_sundial import SundialForPrediction
-from ainode.core.model.timerxl.configuration_timer import TimerConfig
+from iotdb.ainode.core.inference.utils import generate_req_id
+from iotdb.ainode.core.log import Logger
+from iotdb.ainode.core.manager.model_manager import ModelManager
+from iotdb.ainode.core.model.model_enums import BuiltInModelType
+from iotdb.ainode.core.model.sundial.configuration_sundial import SundialConfig
+from iotdb.ainode.core.model.sundial.modeling_sundial import SundialForPrediction
+from iotdb.ainode.core.model.timerxl.configuration_timer import TimerConfig
from iotdb.ainode.core.model.timerxl.modeling_timer import TimerForPrediction
-from ainode.core.rpc.status import get_status
+from iotdb.ainode.core.rpc.status import get_status
+from iotdb.ainode.core.util.gpu_mapping import get_available_devices
from iotdb.ainode.core.util.serde import convert_to_binary
-from ainode.thrift.ainode.ttypes import (
+from iotdb.thrift.ainode.ttypes import (
TForecastReq,
TForecastResp,
TInferenceReq,
TInferenceResp,
+ TLoadModelReq,
+ TShowLoadedModelsReq,
+ TShowLoadedModelsResp,
+ TUnloadModelReq,
)
+from iotdb.thrift.common.ttypes import TSStatus
+from iotdb.tsfile.utils.tsblock_serde import deserialize
logger = Logger()
@@ -145,95 +149,79 @@ class RegisteredStrategy(InferenceStrategy):
class InferenceManager:
- ACCELERATE_MODEL_ID = ["sundial", "timer_xl"]
- DEFAULT_DEVICE = "cpu"
- # DEFAULT_DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
WAITING_INTERVAL_IN_MS = (
AINodeDescriptor().get_config().get_ain_inference_batch_interval_in_ms()
) # How often to check for requests in the result queue
def __init__(self):
self._model_manager = ModelManager()
+ self._model_mem_usage_map: Dict[str, int] = (
+ {}
+ ) # store model memory usage for each model
self._result_queue = mp.Queue()
self._result_wrapper_map = {}
self._result_wrapper_lock = threading.RLock()
- # structure: {model_id: [(InferenceRequestPool, request_queue), ...]}
- self._request_pool_map: Dict[str, List[(InferenceRequestPool, mp.Queue)]] = {}
+
self._stop_event = mp.Event()
self._result_handler_thread = threading.Thread(
target=self._handle_results, daemon=True
)
self._result_handler_thread.start()
- self._model_mem_usage_map: Dict[str, int] = (
- {}
- ) # store model memory usage for each model
- # self._preload_model_benchmarks()
-
- def _preload_model_benchmarks(self):
- if "cuda" in str(self.DEFAULT_DEVICE):
- for model_id in self.ACCELERATE_MODEL_ID:
- mem_usage = _measure_model_memory(self.DEFAULT_DEVICE, model_id)
- self._model_mem_usage_map[model_id] = mem_usage
- logger.info(
- f"[Inference] Preloaded benchmark for {model_id}, mem_usage={mem_usage/1024**2:.2f} MB"
- )
- else:
- logger.warning(
- f"[Inference] Skipped preloading benchmarks for {self.DEFAULT_DEVICE}, only supports CUDA currently"
+ self._pool_controller = PoolController(self._result_queue)
+
+ def load_model(self, req: TLoadModelReq) -> TSStatus:
+ devices_to_be_processed = []
+ devices_not_to_be_processed = []
+ for device_id in req.deviceIdList:
+ if self._pool_controller.has_request_pools(
+ model_id=req.existingModelId, device_id=device_id
+ ):
+ devices_not_to_be_processed.append(device_id)
+ else:
+ devices_to_be_processed.append(device_id)
+ if len(devices_to_be_processed) > 0:
+ self._pool_controller.load_model(
+ model_id=req.existingModelId, device_id_list=devices_to_be_processed
)
-
- def _first_pool_init(self, model_id: str):
- if model_id == "sundial":
- config = SundialConfig()
- elif model_id == "timer_xl":
- config = TimerConfig()
- first_queue = mp.Queue()
- ready_event = mp.Event()
- first_pool = InferenceRequestPool(
- pool_id=0,
- model_id=model_id,
- config=config,
- request_queue=first_queue,
- result_queue=self._result_queue,
- ready_event=ready_event,
+ logger.info(
+ f"[Inference] Start loading model [{req.existingModelId}] to devices [{devices_to_be_processed}], skipped devices [{devices_not_to_be_processed}] cause they have already loaded this model."
+ )
+ return TSStatus(
+ code=TSStatusCode.SUCCESS_STATUS.value,
+ message='Successfully submitted load model task, please use "SHOW LOADED MODELS" to check progress.',
)
- first_pool.start()
- if not ready_event.wait(timeout=30):
- logger.error(
- f"[Inference][Device-{self.DEFAULT_DEVICE}][Pool-0] First pool failed to be ready in time"
- )
- else:
- self._request_pool_map[model_id] = [(first_pool, first_queue)]
- logger.info(
- f"[Inference][Device-{self.DEFAULT_DEVICE}][Pool-0] Initialized inference request pool for model {model_id}"
- )
- def _expand_pools(self, model_id, start_idx, count):
- for idx in range(count):
- queue = mp.Queue()
- if model_id == "sundial":
- config = SundialConfig()
- elif model_id == "timer_xl":
- config = TimerConfig()
- pool = InferenceRequestPool(
- pool_id=start_idx + idx,
- model_id=model_id,
- config=config,
- request_queue=queue,
- result_queue=self._result_queue,
- ready_event=mp.Event(),
- )
- pool.start()
- if not pool.ready_event.wait(timeout=30):
- logger.error(
- f"[Inference][Device-{self.DEFAULT_DEVICE}][Pool-{start_idx + idx}] Pool failed to be ready in time"
- )
- continue
+ def unload_model(self, req: TUnloadModelReq) -> TSStatus:
+ devices_to_be_processed = []
+ devices_not_to_be_processed = []
+ for device_id in req.deviceIdList:
+ if self._pool_controller.has_request_pools(
+ model_id=req.modelId, device_id=device_id
+ ):
+ devices_to_be_processed.append(device_id)
else:
- self._request_pool_map[model_id].append((pool, queue))
- logger.info(
- f"[Inference][Device-{self.DEFAULT_DEVICE}][Pool-{pool.pool_id}] New inference request pool started for model {model_id}"
- )
+ devices_not_to_be_processed.append(device_id)
+ if len(devices_to_be_processed) > 0:
+ self._pool_controller.unload_model(
+ model_id=req.modelId, device_id_list=req.deviceIdList
+ )
+ logger.info(
+ f"[Inference] Start unloading model [{req.modelId}] from devices [{devices_to_be_processed}], skipped devices [{devices_not_to_be_processed}] cause they haven't loaded this model."
+ )
+ return TSStatus(
+ code=TSStatusCode.SUCCESS_STATUS.value,
+ message='Successfully submitted unload model task, please use "SHOW LOADED MODELS" to check progress.',
+ )
+
+ def show_loaded_models(self, req: TShowLoadedModelsReq) -> TShowLoadedModelsResp:
+ return TShowLoadedModelsResp(
+ status=get_status(TSStatusCode.SUCCESS_STATUS),
+ deviceLoadedModelsMap=self._pool_controller.show_loaded_models(
+ req.deviceIdList
+ if len(req.deviceIdList) > 0
+ else get_available_devices()
+ ),
+ )
def _handle_results(self):
while not self._stop_event.is_set():
@@ -246,12 +234,29 @@ class InferenceManager:
infer_req.get_final_output()
)
+ def _process_request(self, req):
+ req_id = req.req_id
+ infer_proxy = InferenceRequestProxy(req_id)
+ with self._result_wrapper_lock:
+ self._result_wrapper_map[req_id] = infer_proxy
+ try:
+ # dispatch request to the pool
+ self._pool_controller.add_request(req, infer_proxy)
+ outputs = infer_proxy.wait_for_result()
+ return outputs
+ except Exception as e:
+ logger.error(e)
+ raise InferenceModelInternalError(str(e))
+ finally:
+ with self._result_wrapper_lock:
+ del self._result_wrapper_map[req_id]
+
def _get_strategy(self, model_id, model):
if isinstance(model, TimerForPrediction):
return TimerXLStrategy(model)
if isinstance(model, SundialForPrediction):
return SundialStrategy(model)
- if self._model_manager.model_storage._is_built_in_or_fine_tuned(model_id):
+ if self._model_manager.model_storage.is_built_in_or_fine_tuned(model_id):
return BuiltInStrategy(model)
return RegisteredStrategy(model)
@@ -284,26 +289,8 @@ class InferenceManager:
predict_length,
)
- if model_id in self.ACCELERATE_MODEL_ID and "cuda" in str(
- self.DEFAULT_DEVICE
- ):
- # lazy initialization for first request
- if model_id not in self._request_pool_map:
- pool_num = _estimate_pool_size(self.DEFAULT_DEVICE, model_id)
- if pool_num <= 0:
- raise InferenceModelInternalError(
- f"Not enough memory to run model {model_id}."
- )
- # initialize the first pool
- self._first_pool_init(model_id)
- # start a background thread to expand pools
- expand_thread = threading.Thread(
- target=self._expand_pools,
- args=(model_id, 1, pool_num - 1),
- daemon=True,
- )
- expand_thread.start()
- # TODO: Logic in this branch shall handle all LTSM inferences
+ if self._pool_controller.has_request_pools(model_id):
+ # use request pool to accelerate inference when the model instance is already loaded.
# TODO: TSBlock -> Tensor codes should be unified
data = full_data[1][0]
if data.dtype.byteorder not in ("=", "|"):
@@ -311,30 +298,24 @@ class InferenceManager:
data = np_data.view(np_data.dtype.newbyteorder())
# the inputs should be on CPU before passing to the inference request
inputs = torch.tensor(data).unsqueeze(0).float().to("cpu")
- if model_id == "sundial":
+ model_type = self._model_manager.get_model_info(model_id).model_type
+ if model_type == BuiltInModelType.SUNDIAL.value:
inference_pipeline = TimerSundialInferencePipeline(SundialConfig())
- elif model_id == "timer_xl":
+ elif model_type == BuiltInModelType.TIMER_XL.value:
inference_pipeline = TimerXLInferencePipeline(TimerConfig())
+ else:
+ raise InferenceModelInternalError(
+ f"Unsupported model_id: {model_id}"
+ )
infer_req = InferenceRequest(
req_id=generate_req_id(),
+ model_id=model_id,
inputs=inputs,
inference_pipeline=inference_pipeline,
max_new_tokens=predict_length,
)
- infer_proxy = InferenceRequestProxy(infer_req.req_id)
- with self._result_wrapper_lock:
- self._result_wrapper_map[infer_req.req_id] = infer_proxy
- pool_idx = hash(infer_req.req_id) % len(
- self._request_pool_map[model_id]
- )
- self._request_pool_map[model_id][pool_idx][1].put(infer_req)
- logger.debug(
- f"[Inference][Device-{self.DEFAULT_DEVICE}][Pool-{pool_idx}][ID-{infer_req.req_id}] Request is queued for inference"
- )
- outputs = infer_proxy.wait_for_completion()
+ outputs = self._process_request(infer_req)
outputs = convert_to_binary(pd.DataFrame(outputs[0]))
- with self._result_wrapper_lock:
- del self._result_wrapper_map[infer_req.req_id]
else:
# load model
accel = str(inference_attrs.get("acceleration", "")).lower() == "true"
@@ -385,16 +366,9 @@ class InferenceManager:
single_output=False,
)
- def shutdown(self):
+ def stop(self):
self._stop_event.set()
- for model_id, pools in self._request_pool_map.items():
- for requestPool, requestQueue in pools:
- requestPool.stop()
- while not requestQueue.empty():
- requestQueue.get_nowait()
- requestQueue.close()
- for requestPool, _ in pools:
- requestPool.join(timeout=10)
+ self._pool_controller.stop()
while not self._result_queue.empty():
self._result_queue.get_nowait()
self._result_queue.close()
diff --git a/iotdb-core/ainode/iotdb/ainode/core/manager/model_manager.py b/iotdb-core/ainode/iotdb/ainode/core/manager/model_manager.py
index 086ab69a465..d84bca77c84 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/manager/model_manager.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/manager/model_manager.py
@@ -20,25 +20,22 @@ from typing import Callable, Dict
from torch import nn
from yaml import YAMLError
-from ainode.core.constant import TSStatusCode
-from iotdb.ainode.core.exception import (
- BadConfigValueError,
- InvalidUriError,
-)
-from ainode.core.log import Logger
+from iotdb.ainode.core.constant import TSStatusCode
+from iotdb.ainode.core.exception import BadConfigValueError, InvalidUriError
+from iotdb.ainode.core.log import Logger
from iotdb.ainode.core.model.model_enums import BuiltInModelType, ModelStates
-from ainode.core.model.model_info import ModelInfo
-from ainode.core.model.model_storage import ModelStorage
-from ainode.core.rpc.status import get_status
-from ainode.core.util.decorator import singleton
-from ainode.thrift.ainode.ttypes import (
+from iotdb.ainode.core.model.model_info import ModelInfo
+from iotdb.ainode.core.model.model_storage import ModelStorage
+from iotdb.ainode.core.rpc.status import get_status
+from iotdb.ainode.core.util.decorator import singleton
+from iotdb.thrift.ainode.ttypes import (
TDeleteModelReq,
TRegisterModelReq,
TRegisterModelResp,
TShowModelsReq,
TShowModelsResp,
)
-from ainode.thrift.common.ttypes import TSStatus
+from iotdb.thrift.common.ttypes import TSStatus
logger = Logger()
diff --git a/iotdb-core/ainode/iotdb/ainode/core/manager/utils.py b/iotdb-core/ainode/iotdb/ainode/core/manager/utils.py
index 65106e08e08..0264e27331a 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/manager/utils.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/manager/utils.py
@@ -22,9 +22,10 @@ import psutil
import torch
from iotdb.ainode.core.config import AINodeDescriptor
-from ainode.core.log import Logger
-from ainode.core.manager.model_manager import ModelManager
-from ainode.core.model.model_info import BUILT_IN_LTSM_MAP
+from iotdb.ainode.core.exception import ModelNotExistError
+from iotdb.ainode.core.log import Logger
+from iotdb.ainode.core.manager.model_manager import ModelManager
+from iotdb.ainode.core.model.model_info import BUILT_IN_LTSM_MAP
logger = Logger()
@@ -39,7 +40,7 @@ INFERENCE_EXTRA_MEMORY_RATIO = (
) # the overhead ratio for inference, used to estimate the pool size
-def _measure_model_memory(device: torch.device, model_id: str) -> int:
+def measure_model_memory(device: torch.device, model_id: str) -> int:
# TODO: support CPU in the future
# TODO: we can estimate the memory usage by running a dummy inference
torch.cuda.empty_cache()
@@ -62,7 +63,7 @@ def _measure_model_memory(device: torch.device, model_id: str) -> int:
return final
-def _evaluate_system_resources(device: torch.device) -> dict:
+def evaluate_system_resources(device: torch.device) -> dict:
if torch.cuda.is_available():
free_mem, total_mem = torch.cuda.mem_get_info()
logger.info(
@@ -70,7 +71,6 @@ def _evaluate_system_resources(device: torch.device) -> dict:
)
return {"device": "cuda", "free_mem": free_mem, "total_mem": total_mem}
else:
- # TODO: test cpu in the future
free_mem = psutil.virtual_memory().available
total_mem = psutil.virtual_memory().total
logger.info(
@@ -79,21 +79,20 @@ def _evaluate_system_resources(device: torch.device) -> dict:
return {"device": "cpu", "free_mem": free_mem, "total_mem": total_mem}
-def _estimate_pool_size(device: torch.device, model_id: str) -> int:
+def estimate_pool_size(device: torch.device, model_id: str) -> int:
model_info = BUILT_IN_LTSM_MAP.get(model_id, None)
- if model_info is None:
- logger.error(f"[Inference][Device-{device}] Model {model_id} not found")
- return 0
-
- model_type = model_info.model_type
- if model_type not in MODEL_MEM_USAGE_MAP:
- logger.error(f"[Inference][Device-{device}] Model {model_id} not supported now")
- return 0
+ if model_info is None or model_info.model_type not in MODEL_MEM_USAGE_MAP:
+ logger.error(
+ f"[Inference] Cannot estimate inference pool size on device: {device}, because model: {model_id} is not supported."
+ )
+ raise ModelNotExistError(model_id)
- system_res = _evaluate_system_resources(device)
+ system_res = evaluate_system_resources(device)
free_mem = system_res["free_mem"]
- mem_usage = MODEL_MEM_USAGE_MAP[model_type] * INFERENCE_EXTRA_MEMORY_RATIO
+ mem_usage = (
+ MODEL_MEM_USAGE_MAP[model_info.model_type] * INFERENCE_EXTRA_MEMORY_RATIO
+ )
size = int((free_mem * INFERENCE_MEMORY_USAGE_RATIO) // mem_usage)
if size <= 0:
logger.error(
diff --git a/iotdb-core/ainode/iotdb/ainode/core/model/built_in_model_factory.py b/iotdb-core/ainode/iotdb/ainode/core/model/built_in_model_factory.py
index a95af34990b..3b55142350b 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/model/built_in_model_factory.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/model/built_in_model_factory.py
@@ -30,7 +30,7 @@ from sktime.forecasting.naive import NaiveForecaster
from sktime.forecasting.trend import STLForecaster
from iotdb.ainode.core.config import AINodeDescriptor
-from ainode.core.constant import (
+from iotdb.ainode.core.constant import (
MODEL_CONFIG_FILE_IN_JSON,
MODEL_WEIGHTS_FILE_IN_SAFETENSORS,
AttributeName,
@@ -43,21 +43,21 @@ from iotdb.ainode.core.exception import (
StringRangeException,
WrongAttributeTypeError,
)
-from ainode.core.log import Logger
+from iotdb.ainode.core.log import Logger
from iotdb.ainode.core.model.model_enums import BuiltInModelType
-from ainode.core.model.model_info import TIMER_REPO_ID
-from ainode.core.model.sundial import modeling_sundial
+from iotdb.ainode.core.model.model_info import TIMER_REPO_ID
+from iotdb.ainode.core.model.sundial import modeling_sundial
from iotdb.ainode.core.model.timerxl import modeling_timer
logger = Logger()
-def _download_file_from_hf_if_necessary(
- file_path: str, local_dir: str, repo_id: str
-) -> bool:
- if not os.path.exists(file_path):
+def _download_file_from_hf_if_necessary(local_dir: str, repo_id: str) -> bool:
+ weights_path = os.path.join(local_dir, MODEL_WEIGHTS_FILE_IN_SAFETENSORS)
+ config_path = os.path.join(local_dir, MODEL_CONFIG_FILE_IN_JSON)
+ if not os.path.exists(weights_path):
logger.info(
- f"Model file not found at {file_path}, downloading from HuggingFace..."
+ f"Model weights file not found at {weights_path}, downloading from HuggingFace..."
)
try:
hf_hub_download(
@@ -65,9 +65,27 @@ def _download_file_from_hf_if_necessary(
filename=MODEL_WEIGHTS_FILE_IN_SAFETENSORS,
local_dir=local_dir,
)
- logger.info(f"Got file to {file_path}")
+ logger.info(f"Got file to {weights_path}")
except Exception as e:
- logger.error(f"Failed to download model file to {local_dir} due to {e}")
+ logger.error(
+ f"Failed to download model weights file to {local_dir} due to {e}"
+ )
+ return False
+ if not os.path.exists(config_path):
+ logger.info(
+ f"Model config file not found at {config_path}, downloading from HuggingFace..."
+ )
+ try:
+ hf_hub_download(
+ repo_id=repo_id,
+ filename=MODEL_CONFIG_FILE_IN_JSON,
+ local_dir=local_dir,
+ )
+ logger.info(f"Got file to {config_path}")
+ except Exception as e:
+ logger.error(
+ f"Failed to download model config file to {local_dir} due to {e}"
+ )
return False
return True
@@ -82,11 +100,7 @@ def download_built_in_ltsm_from_hf_if_necessary(
bool: True if the model is existed or downloaded successfully, False otherwise.
"""
repo_id = TIMER_REPO_ID[model_type]
- weights_path = os.path.join(local_dir, MODEL_WEIGHTS_FILE_IN_SAFETENSORS)
- if not _download_file_from_hf_if_necessary(weights_path, local_dir, repo_id):
- return False
- config_path = os.path.join(local_dir, MODEL_CONFIG_FILE_IN_JSON)
- if not _download_file_from_hf_if_necessary(config_path, local_dir, repo_id):
+ if not _download_file_from_hf_if_necessary(local_dir, repo_id):
return False
return True
diff --git a/iotdb-core/ainode/iotdb/ainode/core/model/model_factory.py b/iotdb-core/ainode/iotdb/ainode/core/model/model_factory.py
index c90222108ad..26d863156f3 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/model/model_factory.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/model/model_factory.py
@@ -22,20 +22,20 @@ from urllib.parse import urljoin
import yaml
-from ainode.core.constant import (
+from iotdb.ainode.core.constant import (
MODEL_CONFIG_FILE_IN_YAML,
MODEL_WEIGHTS_FILE_IN_PT,
)
from iotdb.ainode.core.exception import BadConfigValueError, InvalidUriError
-from ainode.core.log import Logger
+from iotdb.ainode.core.log import Logger
from iotdb.ainode.core.model.model_enums import ModelFileType
-from ainode.core.model.uri_utils import (
+from iotdb.ainode.core.model.uri_utils import (
UriType,
download_file,
download_snapshot_from_hf,
)
from iotdb.ainode.core.util.serde import get_data_type_byte_from_str
-from ainode.thrift.ainode.ttypes import TConfigs
+from iotdb.thrift.ainode.ttypes import TConfigs
logger = Logger()
diff --git a/iotdb-core/ainode/iotdb/ainode/core/model/model_info.py b/iotdb-core/ainode/iotdb/ainode/core/model/model_info.py
index 7cf15e68225..167bfd76640 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/model/model_info.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/model/model_info.py
@@ -18,7 +18,7 @@
import glob
import os
-from ainode.core.constant import (
+from iotdb.ainode.core.constant import (
MODEL_CONFIG_FILE_IN_JSON,
MODEL_CONFIG_FILE_IN_YAML,
MODEL_WEIGHTS_FILE_IN_PT,
diff --git a/iotdb-core/ainode/iotdb/ainode/core/model/model_storage.py b/iotdb-core/ainode/iotdb/ainode/core/model/model_storage.py
index 1f23c57ff64..e346f569102 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/model/model_storage.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/model/model_storage.py
@@ -27,7 +27,7 @@ import torch
from torch import nn
from iotdb.ainode.core.config import AINodeDescriptor
-from ainode.core.constant import (
+from iotdb.ainode.core.constant import (
MODEL_CONFIG_FILE_IN_JSON,
MODEL_WEIGHTS_FILE_IN_PT,
TSStatusCode,
@@ -37,8 +37,8 @@ from iotdb.ainode.core.exception import (
ModelNotExistError,
UnsupportedError,
)
-from ainode.core.log import Logger
-from ainode.core.model.built_in_model_factory import (
+from iotdb.ainode.core.log import Logger
+from iotdb.ainode.core.model.built_in_model_factory import (
download_built_in_ltsm_from_hf_if_necessary,
fetch_built_in_model,
)
@@ -49,17 +49,17 @@ from iotdb.ainode.core.model.model_enums import (
ModelStates,
)
from iotdb.ainode.core.model.model_factory import fetch_model_by_uri
-from ainode.core.model.model_info import (
+from iotdb.ainode.core.model.model_info import (
BUILT_IN_LTSM_MAP,
BUILT_IN_MACHINE_LEARNING_MODEL_MAP,
ModelInfo,
get_built_in_model_type,
get_model_file_type,
)
-from ainode.core.model.uri_utils import get_model_register_strategy
-from ainode.core.util.lock import ModelLockPool
-from ainode.thrift.ainode.ttypes import TShowModelsReq, TShowModelsResp
-from ainode.thrift.common.ttypes import TSStatus
+from iotdb.ainode.core.model.uri_utils import get_model_register_strategy
+from iotdb.ainode.core.util.lock import ModelLockPool
+from iotdb.thrift.ainode.ttypes import TShowModelsReq, TShowModelsResp
+from iotdb.thrift.common.ttypes import TSStatus
logger = Logger()
diff --git a/iotdb-core/ainode/iotdb/ainode/core/model/sundial/modeling_sundial.py b/iotdb-core/ainode/iotdb/ainode/core/model/sundial/modeling_sundial.py
index 6a2402952db..27ca3f1564e 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/model/sundial/modeling_sundial.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/model/sundial/modeling_sundial.py
@@ -29,9 +29,9 @@ from transformers.modeling_outputs import (
MoeModelOutputWithPast,
)
-from ainode.core.log import Logger
-from ainode.core.model.sundial.configuration_sundial import SundialConfig
-from ainode.core.model.sundial.flow_loss import FlowLoss
+from iotdb.ainode.core.log import Logger
+from iotdb.ainode.core.model.sundial.configuration_sundial import SundialConfig
+from iotdb.ainode.core.model.sundial.flow_loss import FlowLoss
from iotdb.ainode.core.model.sundial.ts_generation_mixin import TSGenerationMixin
logger = Logger()
@@ -554,7 +554,10 @@ class SundialForPrediction(SundialPreTrainedModel, TSGenerationMixin):
loss_masks = loss_masks.reshape(bsz * L).repeat(
self.config.diffusion_batch_mul
)
- mask_y = mask_y.repeat(L * self.config.diffusion_batch_mul, 1)
+ if mask_y is not None:
+ mask_y = mask_y.repeat(L * self.config.diffusion_batch_mul, 1)
+ else:
+ mask_y = None
loss = self.flow_loss(shift_labels, hidden_states, loss_masks, mask_y)
else:
diff --git a/iotdb-core/ainode/iotdb/ainode/core/model/timerxl/modeling_timer.py b/iotdb-core/ainode/iotdb/ainode/core/model/timerxl/modeling_timer.py
index 8dfddd335b7..4d6d288d4d3 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/model/timerxl/modeling_timer.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/model/timerxl/modeling_timer.py
@@ -29,9 +29,9 @@ from transformers.modeling_outputs import (
MoeModelOutputWithPast,
)
-from ainode.core.log import Logger
-from ainode.core.model.timerxl.configuration_timer import TimerConfig
-from ainode.core.model.timerxl.ts_generation_mixin import TSGenerationMixin
+from iotdb.ainode.core.log import Logger
+from iotdb.ainode.core.model.timerxl.configuration_timer import TimerConfig
+from iotdb.ainode.core.model.timerxl.ts_generation_mixin import TSGenerationMixin
logger = Logger()
diff --git a/iotdb-core/ainode/iotdb/ainode/core/model/uri_utils.py b/iotdb-core/ainode/iotdb/ainode/core/model/uri_utils.py
index 59f03057e85..b2e759e00ce 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/model/uri_utils.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/model/uri_utils.py
@@ -23,15 +23,15 @@ from huggingface_hub import snapshot_download
from requests import Session
from requests.adapters import HTTPAdapter
-from ainode.core.constant import (
+from iotdb.ainode.core.constant import (
DEFAULT_CHUNK_SIZE,
DEFAULT_RECONNECT_TIMEOUT,
DEFAULT_RECONNECT_TIMES,
)
from iotdb.ainode.core.exception import UnsupportedError
-from ainode.core.log import Logger
+from iotdb.ainode.core.log import Logger
from iotdb.ainode.core.model.model_enums import ModelFileType
-from ainode.core.model.model_info import get_model_file_type
+from iotdb.ainode.core.model.model_info import get_model_file_type
HTTP_PREFIX = "http://"
HTTPS_PREFIX = "https://"
diff --git a/iotdb-core/ainode/iotdb/ainode/core/rpc/client.py b/iotdb-core/ainode/iotdb/ainode/core/rpc/client.py
index dc9d84de9ae..0c44ea5d423 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/rpc/client.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/rpc/client.py
@@ -19,25 +19,26 @@ import time
from thrift.protocol import TBinaryProtocol, TCompactProtocol
from thrift.Thrift import TException
-from thrift.transport import TSocket, TTransport
+from thrift.transport import TSocket, TSSLSocket, TTransport
from iotdb.ainode.core.config import AINodeDescriptor
-from ainode.core.constant import TSStatusCode
-from ainode.core.log import Logger
-from ainode.core.rpc.status import verify_success
-from ainode.core.util.decorator import singleton
-from ainode.thrift.common.ttypes import (
+from iotdb.ainode.core.constant import TSStatusCode
+from iotdb.ainode.core.log import Logger
+from iotdb.ainode.core.rpc.status import verify_success
+from iotdb.ainode.core.util.decorator import singleton
+from iotdb.thrift.common.ttypes import (
TAINodeConfiguration,
TAINodeLocation,
TEndPoint,
TSStatus,
)
-from ainode.thrift.confignode import IConfigNodeRPCService
-from ainode.thrift.confignode.ttypes import (
+from iotdb.thrift.confignode import IConfigNodeRPCService
+from iotdb.thrift.confignode.ttypes import (
TAINodeRegisterReq,
TAINodeRemoveReq,
TAINodeRestartReq,
TNodeVersionInfo,
+ TSystemConfigurationResp,
TUpdateModelInfoReq,
)
@@ -109,9 +110,31 @@ class ConfigNodeClient(object):
raise TException(self._MSG_RECONNECTION_FAIL)
def _connect(self, target_config_node: TEndPoint) -> None:
- transport = TTransport.TFramedTransport(
- TSocket.TSocket(target_config_node.ip, target_config_node.port)
- )
+ if AINodeDescriptor().get_config().get_ain_internal_ssl_enabled():
+ import ssl
+ import sys
+
+ if sys.version_info >= (3, 10):
+ context = ssl.create_default_context(ssl.Purpose.SERVER_AUTH)
+ else:
+ context = ssl.SSLContext(ssl.PROTOCOL_TLS)
+ context.verify_mode = ssl.CERT_REQUIRED
+ context.check_hostname = False
+ context.load_verify_locations(
+ cafile=AINodeDescriptor().get_config().get_ain_thrift_ssl_cert_file()
+ )
+ context.load_cert_chain(
+ certfile=AINodeDescriptor().get_config().get_ain_thrift_ssl_cert_file(),
+ keyfile=AINodeDescriptor().get_config().get_ain_thrift_ssl_key_file(),
+ )
+ socket = TSSLSocket.TSSLSocket(
+ host=target_config_node.ip,
+ port=target_config_node.port,
+ ssl_context=context,
+ )
+ else:
+ socket = TSocket.TSocket(target_config_node.ip, target_config_node.port)
+ transport = TTransport.TFramedTransport(socket)
if not transport.isOpen():
try:
transport.open()
@@ -149,6 +172,24 @@ class ConfigNodeClient(object):
return True
return False
+ def getSystemConfiguration(self) -> TSystemConfigurationResp:
+ for _ in range(0, self._RETRY_NUM):
+ try:
+ resp = self._client.getSystemConfiguration()
+ if not self._update_config_node_leader(resp.status):
+ verify_success(
+ resp.status,
+ "An error occurs when calling getSystemConfiguration()",
+ )
+ return resp
+ except TTransport.TException:
+ logger.warning(
+ "Failed to connect to ConfigNode {} from AINode when executing getSystemConfiguration()",
+ self._config_leader,
+ )
+ self._config_leader = None
+ self._wait_and_reconnect()
+
def node_register(
self,
cluster_name: str,
diff --git a/iotdb-core/ainode/iotdb/ainode/core/rpc/handler.py b/iotdb-core/ainode/iotdb/ainode/core/rpc/handler.py
index eaad313903d..58e8d9bd0b1 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/rpc/handler.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/rpc/handler.py
@@ -15,31 +15,54 @@
# specific language governing permissions and limitations
# under the License.
#
-from ainode.core.constant import TSStatusCode
-from ainode.core.log import Logger
-from ainode.core.manager.cluster_manager import ClusterManager
-from ainode.core.manager.inference_manager import InferenceManager
-from ainode.core.manager.model_manager import ModelManager
-from ainode.core.rpc.status import get_status
-from ainode.thrift.ainode import IAINodeRPCService
-from ainode.thrift.ainode.ttypes import (
+
+from iotdb.ainode.core.config import AINodeDescriptor
+from iotdb.ainode.core.constant import TSStatusCode
+from iotdb.ainode.core.log import Logger
+from iotdb.ainode.core.manager.cluster_manager import ClusterManager
+from iotdb.ainode.core.manager.inference_manager import InferenceManager
+from iotdb.ainode.core.manager.model_manager import ModelManager
+from iotdb.ainode.core.model.model_info import ModelCategory, ModelInfo, ModelStates
+from iotdb.ainode.core.rpc.status import get_status
+from iotdb.ainode.core.util.gpu_mapping import get_available_devices
+from iotdb.thrift.ainode import IAINodeRPCService
+from iotdb.thrift.ainode.ttypes import (
TAIHeartbeatReq,
TAIHeartbeatResp,
TDeleteModelReq,
TForecastReq,
TInferenceReq,
TInferenceResp,
+ TLoadModelReq,
TRegisterModelReq,
TRegisterModelResp,
+ TShowAIDevicesResp,
+ TShowLoadedModelsReq,
+ TShowLoadedModelsResp,
TShowModelsReq,
TShowModelsResp,
TTrainingReq,
+ TUnloadModelReq,
)
-from ainode.thrift.common.ttypes import TSStatus
+from iotdb.thrift.common.ttypes import TSStatus
logger = Logger()
+def _ensure_device_id_is_available(device_id_list: list[str]) -> TSStatus:
+ """
+ Ensure that the device IDs in the provided list are available.
+ """
+ available_devices = get_available_devices()
+ for device_id in device_id_list:
+ if device_id not in available_devices:
+ return TSStatus(
+ code=TSStatusCode.INVALID_URI_ERROR.value,
+ message=f"Device ID [{device_id}] is not available. You can use 'SHOW AI_DEVICES' to retrieve the available devices.",
+ )
+ return TSStatus(code=TSStatusCode.SUCCESS_STATUS.value)
+
+
class AINodeRPCServiceHandler(IAINodeRPCService.Iface):
def __init__(self, ainode):
self._ainode = ainode
@@ -57,6 +80,24 @@ class AINodeRPCServiceHandler(IAINodeRPCService.Iface):
def registerModel(self, req: TRegisterModelReq) -> TRegisterModelResp:
return self._model_manager.register_model(req)
+ def loadModel(self, req: TLoadModelReq) -> TSStatus:
+ status = self._ensure_model_is_built_in_or_fine_tuned(req.existingModelId)
+ if status.code != TSStatusCode.SUCCESS_STATUS.value:
+ return status
+ status = _ensure_device_id_is_available(req.deviceIdList)
+ if status.code != TSStatusCode.SUCCESS_STATUS.value:
+ return status
+ return self._inference_manager.load_model(req)
+
+ def unloadModel(self, req: TUnloadModelReq) -> TSStatus:
+ status = self._ensure_model_is_built_in_or_fine_tuned(req.modelId)
+ if status.code != TSStatusCode.SUCCESS_STATUS.value:
+ return status
+ status = _ensure_device_id_is_available(req.deviceIdList)
+ if status.code != TSStatusCode.SUCCESS_STATUS.value:
+ return status
+ return self._inference_manager.unload_model(req)
+
def deleteModel(self, req: TDeleteModelReq) -> TSStatus:
return self._model_manager.delete_model(req)
@@ -72,5 +113,25 @@ class AINodeRPCServiceHandler(IAINodeRPCService.Iface):
def showModels(self, req: TShowModelsReq) -> TShowModelsResp:
return self._model_manager.show_models(req)
+ def showLoadedModels(self, req: TShowLoadedModelsReq) -> TShowLoadedModelsResp:
+ status = _ensure_device_id_is_available(req.deviceIdList)
+ if status.code != TSStatusCode.SUCCESS_STATUS.value:
+ return TShowLoadedModelsResp(status=status, deviceLoadedModelsMap={})
+ return self._inference_manager.show_loaded_models(req)
+
+ def showAIDevices(self) -> TShowAIDevicesResp:
+ return TShowAIDevicesResp(
+ status=TSStatus(code=TSStatusCode.SUCCESS_STATUS.value),
+ deviceIdList=get_available_devices(),
+ )
+
def createTrainingTask(self, req: TTrainingReq) -> TSStatus:
pass
+
+ def _ensure_model_is_built_in_or_fine_tuned(self, model_id: str) -> TSStatus:
+ if not self._model_manager.is_built_in_or_fine_tuned(model_id):
+ return TSStatus(
+ code=TSStatusCode.MODEL_NOT_FOUND_ERROR.value,
+ message=f"Model [{model_id}] is not a built-in or fine-tuned model. You can use 'SHOW MODELS' to retrieve the available models.",
+ )
+ return TSStatus(code=TSStatusCode.SUCCESS_STATUS.value)
diff --git a/iotdb-core/ainode/iotdb/ainode/core/rpc/service.py b/iotdb-core/ainode/iotdb/ainode/core/rpc/service.py
index 2282ae237d8..fc93a0cce7d 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/rpc/service.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/rpc/service.py
@@ -19,12 +19,12 @@ import threading
from thrift.protocol import TBinaryProtocol, TCompactProtocol
from thrift.server import TServer
-from thrift.transport import TSocket, TTransport
+from thrift.transport import TSocket, TSSLSocket, TTransport
from iotdb.ainode.core.config import AINodeDescriptor
-from ainode.core.log import Logger
-from ainode.core.rpc.handler import AINodeRPCServiceHandler
-from ainode.thrift.ainode import IAINodeRPCService
+from iotdb.ainode.core.log import Logger
+from iotdb.ainode.core.rpc.handler import AINodeRPCServiceHandler
+from iotdb.thrift.ainode import IAINodeRPCService
logger = Logger()
@@ -73,10 +73,33 @@ class AINodeRPCService(threading.Thread):
self._stop_event = threading.Event()
self._handler = handler
processor = IAINodeRPCService.Processor(handler=self._handler)
- transport = TSocket.TServerSocket(
- host=AINodeDescriptor().get_config().get_ain_rpc_address(),
- port=AINodeDescriptor().get_config().get_ain_rpc_port(),
- )
+ if AINodeDescriptor().get_config().get_ain_internal_ssl_enabled():
+ import ssl
+ import sys
+
+ if sys.version_info >= (3, 10):
+ context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
+ else:
+ context = ssl.SSLContext(ssl.PROTOCOL_TLS)
+ context.verify_mode = ssl.CERT_REQUIRED
+ context.check_hostname = False
+ context.load_verify_locations(
+ cafile=AINodeDescriptor().get_config().get_ain_thrift_ssl_cert_file()
+ )
+ context.load_cert_chain(
+ certfile=AINodeDescriptor().get_config().get_ain_thrift_ssl_cert_file(),
+ keyfile=AINodeDescriptor().get_config().get_ain_thrift_ssl_key_file(),
+ )
+ transport = TSSLSocket.TSSLServerSocket(
+ host=AINodeDescriptor().get_config().get_ain_rpc_address(),
+ port=AINodeDescriptor().get_config().get_ain_rpc_port(),
+ ssl_context=context,
+ )
+ else:
+ transport = TSocket.TServerSocket(
+ host=AINodeDescriptor().get_config().get_ain_rpc_address(),
+ port=AINodeDescriptor().get_config().get_ain_rpc_port(),
+ )
transport_factory = TTransport.TFramedTransportFactory()
if AINodeDescriptor().get_config().get_ain_thrift_compression_enabled():
protocol_factory = TCompactProtocol.TCompactProtocolFactory()
diff --git a/iotdb-core/ainode/iotdb/ainode/core/rpc/status.py b/iotdb-core/ainode/iotdb/ainode/core/rpc/status.py
index 37368b0068b..e2bacb53106 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/rpc/status.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/rpc/status.py
@@ -16,9 +16,9 @@
# under the License.
#
-from ainode.core.constant import TSStatusCode
-from ainode.core.log import Logger
-from ainode.thrift.common.ttypes import TSStatus
+from iotdb.ainode.core.constant import TSStatusCode
+from iotdb.ainode.core.log import Logger
+from iotdb.thrift.common.ttypes import TSStatus
def get_status(status_code: TSStatusCode, message: str = None) -> TSStatus:
diff --git a/iotdb-core/ainode/iotdb/ainode/core/script.py b/iotdb-core/ainode/iotdb/ainode/core/script.py
index dd3efa11ac8..6e244e43ab6 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/script.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/script.py
@@ -15,71 +15,27 @@
# specific language governing permissions and limitations
# under the License.
#
-import os
-import shutil
+import multiprocessing
import sys
import torch.multiprocessing as mp
from iotdb.ainode.core.ai_node import AINode
-from iotdb.ainode.core.config import AINodeDescriptor
-from ainode.core.constant import TSStatusCode
-from iotdb.ainode.core.exception import MissingConfigError
-from ainode.core.log import Logger
-from ainode.core.rpc.client import ClientManager
-from ainode.thrift.common.ttypes import (
- TAINodeLocation,
- TEndPoint,
-)
+from iotdb.ainode.core.log import Logger
logger = Logger()
-def remove_ainode(arguments):
- # Delete the current node
- if len(arguments) == 2:
- target_ainode_id = AINodeDescriptor().get_config().get_ainode_id()
- target_rpc_address = AINodeDescriptor().get_config().get_ain_rpc_address()
- target_rpc_port = AINodeDescriptor().get_config().get_ain_rpc_port()
-
- # Delete the node with a given id
- elif len(arguments) == 3:
- target_ainode_id = int(arguments[2])
- ainode_configuration_map = (
- ClientManager()
- .borrow_config_node_client()
- .get_ainode_configuration(target_ainode_id)
- )
-
- end_point = ainode_configuration_map[target_ainode_id].location.internalEndPoint
- target_rpc_address = end_point.ip
- target_rpc_port = end_point.port
-
- if not end_point:
- raise MissingConfigError(
- "NodeId: {} not found in cluster ".format(target_ainode_id)
- )
-
- logger.info("Got target AINode id: {}".format(target_ainode_id))
-
- else:
- raise MissingConfigError("Invalid command")
-
- location = TAINodeLocation(
- target_ainode_id, TEndPoint(target_rpc_address, target_rpc_port)
- )
- status = ClientManager().borrow_config_node_client().node_remove(location)
-
- if status.code == TSStatusCode.SUCCESS_STATUS.get_status_code():
- logger.info("IoTDB-AINode has successfully removed.")
- if os.path.exists(AINodeDescriptor().get_config().get_ain_models_dir()):
- shutil.rmtree(AINodeDescriptor().get_config().get_ain_models_dir())
-
-
def main():
+ # Handle PyInstaller: filter out Python arguments that might be passed to subprocesses
+ # These arguments are not needed in frozen executables and cause warnings
+ # Note: This filtering should happen AFTER freeze_support() has handled child processes
+ if getattr(sys, "frozen", False):
+ python_args_to_filter = ["-I", "-B", "-S", "-E", "-O", "-OO"]
+ sys.argv = [arg for arg in sys.argv if arg not in python_args_to_filter]
+
+ logger.info(f"Starting IoTDB-AINode process with sys argv {sys.argv}.")
arguments = sys.argv
- # load config
- AINodeDescriptor()
if len(arguments) == 1:
logger.info("Command line argument must be specified.")
return
@@ -88,23 +44,26 @@ def main():
try:
mp.set_start_method("spawn", force=True)
logger.info(f"Current multiprocess start method: {mp.get_start_method()}")
- logger.info("IoTDB-AINode is starting...")
+ logger.info("IoTDB AINode is starting...")
ai_node = AINode()
ai_node.start()
except Exception as e:
- logger.error("Start AINode failed, because of: {}".format(e))
- sys.exit(1)
- # TODO: remove the following function, and add a destroy script
- elif command == "remove":
- try:
- logger.info("Removing AINode...")
- remove_ainode(arguments)
- except Exception as e:
- logger.error("Remove AINode failed, because of: {}".format(e))
+ logger.error("Start IoTDB AINode failed, because of: {}".format(e))
sys.exit(1)
else:
logger.warning("Unknown argument: {}.".format(command))
if __name__ == "__main__":
+ # PyInstaller multiprocessing support
+ # freeze_support() is essential for PyInstaller frozen executables on all platforms
+ # It detects if the current process is a multiprocessing child process
+ # If it is, it executes the child process target function and exits
+ # If it's not, it returns immediately and continues with main() execution
+ # This prevents child processes from executing the main application logic
+ if getattr(sys, "frozen", False):
+ # Call freeze_support() for both standard multiprocessing and torch.multiprocessing
+ multiprocessing.freeze_support()
+ mp.freeze_support()
+
main()
diff --git a/iotdb-core/ainode/iotdb/ainode/core/util/cache.py b/iotdb-core/ainode/iotdb/ainode/core/util/cache.py
index 40e2b8d5771..122873df67b 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/util/cache.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/util/cache.py
@@ -19,7 +19,7 @@ import sys
from collections import OrderedDict
from iotdb.ainode.core.config import AINodeDescriptor
-from ainode.core.util.decorator import singleton
+from iotdb.ainode.core.util.decorator import singleton
def _estimate_size_in_byte(obj):
diff --git a/iotdb-core/ainode/iotdb/ainode/core/util/decorator.py b/iotdb-core/ainode/iotdb/ainode/core/util/decorator.py
index 33b9f4835ac..5a84c3d6bb2 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/util/decorator.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/util/decorator.py
@@ -15,6 +15,9 @@
# specific language governing permissions and limitations
# under the License.
#
+from functools import wraps
+
+
def singleton(cls):
instances = {}
@@ -24,3 +27,15 @@ def singleton(cls):
return instances[cls]
return get_instance
+
+
+def synchronized(lock):
+ def decorator(func):
+ @wraps(func)
+ def wrapper(*args, **kwargs):
+ with lock:
+ return func(*args, **kwargs)
+
+ return wrapper
+
+ return decorator
diff --git a/iotdb-core/ainode/iotdb/sqlalchemy/IoTDBSQLCompiler.py b/iotdb-core/ainode/iotdb/sqlalchemy/IoTDBSQLCompiler.py
index 008a314e683..94e650ba66c 100644
--- a/iotdb-core/ainode/iotdb/sqlalchemy/IoTDBSQLCompiler.py
+++ b/iotdb-core/ainode/iotdb/sqlalchemy/IoTDBSQLCompiler.py
@@ -16,9 +16,8 @@
# under the License.
#
-from sqlalchemy.sql.compiler import SQLCompiler
-from sqlalchemy.sql.compiler import OPERATORS
from sqlalchemy.sql import operators
+from sqlalchemy.sql.compiler import OPERATORS, SQLCompiler
class IoTDBSQLCompiler(SQLCompiler):
diff --git a/iotdb-core/ainode/iotdb/table_session_pool.py b/iotdb-core/ainode/iotdb/table_session_pool.py
index f44df3f249b..bd5a84be5c7 100644
--- a/iotdb-core/ainode/iotdb/table_session_pool.py
+++ b/iotdb-core/ainode/iotdb/table_session_pool.py
@@ -16,7 +16,7 @@
# under the License.
#
from iotdb.Session import Session
-from iotdb.SessionPool import SessionPool, PoolConfig
+from iotdb.SessionPool import PoolConfig, SessionPool
from iotdb.table_session import TableSession
diff --git a/iotdb-core/ainode/iotdb/template/MeasurementNode.py b/iotdb-core/ainode/iotdb/template/MeasurementNode.py
index 06cd7c6957e..865e17bdda9 100644
--- a/iotdb-core/ainode/iotdb/template/MeasurementNode.py
+++ b/iotdb-core/ainode/iotdb/template/MeasurementNode.py
@@ -17,9 +17,10 @@
#
import warnings
-from iotdb.utils.IoTDBConstants import TSDataType, TSEncoding, Compressor
-from .TemplateNode import TemplateNode
+from iotdb.utils.IoTDBConstants import Compressor, TSDataType, TSEncoding
+
from ..tsfile.utils.read_write_io_utils import ReadWriteUtils
+from .TemplateNode import TemplateNode
warnings.simplefilter("always", DeprecationWarning)
diff --git a/iotdb-core/ainode/iotdb/template/Template.py b/iotdb-core/ainode/iotdb/template/Template.py
index 98a6082f148..99c97515424 100644
--- a/iotdb-core/ainode/iotdb/template/Template.py
+++ b/iotdb-core/ainode/iotdb/template/Template.py
@@ -19,10 +19,10 @@
import struct
import warnings
-from .TemplateNode import TemplateNode
from ..tsfile.common.constant.tsfile_constant import TsFileConstant
from ..tsfile.utils.pair import Pair
from ..tsfile.utils.read_write_io_utils import ReadWriteUtils
+from .TemplateNode import TemplateNode
warnings.simplefilter("always", DeprecationWarning)
diff --git a/iotdb-core/ainode/iotdb/thrift/ainode/IAINodeRPCService-remote b/iotdb-core/ainode/iotdb/thrift/ainode/IAINodeRPCService-remote
index 082e8f84511..4b17e2f82dc 100755
--- a/iotdb-core/ainode/iotdb/thrift/ainode/IAINodeRPCService-remote
+++ b/iotdb-core/ainode/iotdb/thrift/ainode/IAINodeRPCService-remote
@@ -7,14 +7,16 @@
# options string: py
#
-import sys
import pprint
+import sys
+
if sys.version_info[0] > 2:
from urllib.parse import urlparse
else:
from urlparse import urlparse
-from thrift.transport import TTransport, TSocket, TSSLSocket, THttpClient
+
from thrift.protocol.TBinaryProtocol import TBinaryProtocol
+from thrift.transport import THttpClient, TSocket, TSSLSocket, TTransport
from iotdb.thrift.ainode import IAINodeRPCService
from iotdb.thrift.ainode.ttypes import *
diff --git a/iotdb-core/ainode/iotdb/thrift/ainode/IAINodeRPCService.py b/iotdb-core/ainode/iotdb/thrift/ainode/IAINodeRPCService.py
index 7db6b3bee65..f2231800d4d 100644
--- a/iotdb-core/ainode/iotdb/thrift/ainode/IAINodeRPCService.py
+++ b/iotdb-core/ainode/iotdb/thrift/ainode/IAINodeRPCService.py
@@ -6,15 +6,23 @@
# options string: py
#
-from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
+import logging
+import sys
+
from thrift.protocol.TProtocol import TProtocolException
+from thrift.Thrift import (
+ TApplicationException,
+ TException,
+ TFrozenDict,
+ TMessageType,
+ TProcessor,
+ TType,
+)
+from thrift.transport import TTransport
from thrift.TRecursive import fix_spec
-import sys
-import logging
from .ttypes import *
-from thrift.Thrift import TProcessor
-from thrift.transport import TTransport
+
all_structs = []
diff --git a/iotdb-core/ainode/iotdb/thrift/ainode/constants.py b/iotdb-core/ainode/iotdb/thrift/ainode/constants.py
index 69c181ade38..be9fb9f77b3 100644
--- a/iotdb-core/ainode/iotdb/thrift/ainode/constants.py
+++ b/iotdb-core/ainode/iotdb/thrift/ainode/constants.py
@@ -6,9 +6,16 @@
# options string: py
#
-from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
+import sys
+
from thrift.protocol.TProtocol import TProtocolException
+from thrift.Thrift import (
+ TApplicationException,
+ TException,
+ TFrozenDict,
+ TMessageType,
+ TType,
+)
from thrift.TRecursive import fix_spec
-import sys
from .ttypes import *
diff --git a/iotdb-core/ainode/iotdb/thrift/ainode/ttypes.py b/iotdb-core/ainode/iotdb/thrift/ainode/ttypes.py
index a016b467de1..b1ad583cd64 100644
--- a/iotdb-core/ainode/iotdb/thrift/ainode/ttypes.py
+++ b/iotdb-core/ainode/iotdb/thrift/ainode/ttypes.py
@@ -6,14 +6,21 @@
# options string: py
#
-from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
+import sys
+
from thrift.protocol.TProtocol import TProtocolException
+from thrift.Thrift import (
+ TApplicationException,
+ TException,
+ TFrozenDict,
+ TMessageType,
+ TType,
+)
+from thrift.transport import TTransport
from thrift.TRecursive import fix_spec
-import sys
import iotdb.thrift.common.ttypes
-from thrift.transport import TTransport
all_structs = []
diff --git a/iotdb-core/ainode/iotdb/thrift/common/constants.py b/iotdb-core/ainode/iotdb/thrift/common/constants.py
index 69c181ade38..be9fb9f77b3 100644
--- a/iotdb-core/ainode/iotdb/thrift/common/constants.py
+++ b/iotdb-core/ainode/iotdb/thrift/common/constants.py
@@ -6,9 +6,16 @@
# options string: py
#
-from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
+import sys
+
from thrift.protocol.TProtocol import TProtocolException
+from thrift.Thrift import (
+ TApplicationException,
+ TException,
+ TFrozenDict,
+ TMessageType,
+ TType,
+)
from thrift.TRecursive import fix_spec
-import sys
from .ttypes import *
diff --git a/iotdb-core/ainode/iotdb/thrift/common/ttypes.py b/iotdb-core/ainode/iotdb/thrift/common/ttypes.py
index 29d58f4dd4b..e310f022a49 100644
--- a/iotdb-core/ainode/iotdb/thrift/common/ttypes.py
+++ b/iotdb-core/ainode/iotdb/thrift/common/ttypes.py
@@ -6,13 +6,19 @@
# options string: py
#
-from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
-from thrift.protocol.TProtocol import TProtocolException
-from thrift.TRecursive import fix_spec
-
import sys
+from thrift.protocol.TProtocol import TProtocolException
+from thrift.Thrift import (
+ TApplicationException,
+ TException,
+ TFrozenDict,
+ TMessageType,
+ TType,
+)
from thrift.transport import TTransport
+from thrift.TRecursive import fix_spec
+
all_structs = []
@@ -163,7 +169,6 @@ class TAggregationType(object):
COUNT_ALL = 29
APPROX_COUNT_DISTINCT = 30
APPROX_MOST_FREQUENT = 31
- APPROX_PERCENTILE = 32
_VALUES_TO_NAMES = {
0: "COUNT",
@@ -198,7 +203,6 @@ class TAggregationType(object):
29: "COUNT_ALL",
30: "APPROX_COUNT_DISTINCT",
31: "APPROX_MOST_FREQUENT",
- 32: "APPROX_PERCENTILE",
}
_NAMES_TO_VALUES = {
@@ -234,7 +238,6 @@ class TAggregationType(object):
"COUNT_ALL": 29,
"APPROX_COUNT_DISTINCT": 30,
"APPROX_MOST_FREQUENT": 31,
- "APPROX_PERCENTILE": 32,
}
@@ -3227,87 +3230,6 @@ class TShowConfigurationResp(object):
def __ne__(self, other):
return not (self == other)
-
-
-class TShowAppliedConfigurationsResp(object):
- """
- Attributes:
- - status
- - data
-
- """
-
-
- def __init__(self, status=None, data=None,):
- self.status = status
- self.data = data
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.status = TSStatus()
- self.status.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.MAP:
- self.data = {}
- (_ktype131, _vtype132, _size130) = iprot.readMapBegin()
- for _i134 in range(_size130):
- _key135 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val136 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.data[_key135] = _val136
- iprot.readMapEnd()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('TShowAppliedConfigurationsResp')
- if self.status is not None:
- oprot.writeFieldBegin('status', TType.STRUCT, 1)
- self.status.write(oprot)
- oprot.writeFieldEnd()
- if self.data is not None:
- oprot.writeFieldBegin('data', TType.MAP, 2)
- oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.data))
- for kiter137, viter138 in self.data.items():
- oprot.writeString(kiter137.encode('utf-8') if sys.version_info[0] == 2 else kiter137)
- oprot.writeString(viter138.encode('utf-8') if sys.version_info[0] == 2 else viter138)
- oprot.writeMapEnd()
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.status is None:
- raise TProtocolException(message='Required field status is unset!')
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
all_structs.append(TEndPoint)
TEndPoint.thrift_spec = (
None, # 0
@@ -3540,11 +3462,5 @@ TShowConfigurationResp.thrift_spec = (
(1, TType.STRUCT, 'status', [TSStatus, None], None, ), # 1
(2, TType.STRING, 'content', 'UTF8', None, ), # 2
)
-all_structs.append(TShowAppliedConfigurationsResp)
-TShowAppliedConfigurationsResp.thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'status', [TSStatus, None], None, ), # 1
- (2, TType.MAP, 'data', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 2
-)
fix_spec(all_structs)
del all_structs
diff --git a/iotdb-core/ainode/iotdb/thrift/confignode/IConfigNodeRPCService-remote b/iotdb-core/ainode/iotdb/thrift/confignode/IConfigNodeRPCService-remote
index 014d1635657..2b0a8a3dd87 100755
--- a/iotdb-core/ainode/iotdb/thrift/confignode/IConfigNodeRPCService-remote
+++ b/iotdb-core/ainode/iotdb/thrift/confignode/IConfigNodeRPCService-remote
@@ -7,14 +7,16 @@
# options string: py
#
-import sys
import pprint
+import sys
+
if sys.version_info[0] > 2:
from urllib.parse import urlparse
else:
from urlparse import urlparse
-from thrift.transport import TTransport, TSocket, TSSLSocket, THttpClient
+
from thrift.protocol.TBinaryProtocol import TBinaryProtocol
+from thrift.transport import THttpClient, TSocket, TSSLSocket, TTransport
from iotdb.thrift.confignode import IConfigNodeRPCService
from iotdb.thrift.confignode.ttypes import *
@@ -32,6 +34,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print(' TSStatus removeAINode(TAINodeRemoveReq req)')
print(' TShowAINodesResp showAINodes()')
print(' TAINodeConfigurationResp getAINodeConfiguration(i32 aiNodeId)')
+ print(' TGetAINodeLocationResp getAINodeLocation()')
print(' TSystemConfigurationResp getSystemConfiguration()')
print(' TDataNodeRemoveResp removeDataNode(TDataNodeRemoveReq req)')
print(' TSStatus reportDataNodeShutdown(TDataNodeLocation dataNodeLocation)')
@@ -92,7 +95,6 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print(' TSStatus clearCache( cacheClearOptions)')
print(' TSStatus setConfiguration(TSetConfigurationReq req)')
print(' TShowConfigurationResp showConfiguration(i32 nodeId)')
- print(' TShowAppliedConfigurationsResp showAppliedConfigurations(i32 nodeId)')
print(' TSStatus startRepairData()')
print(' TSStatus stopRepairData()')
print(' TSStatus submitLoadConfigurationTask()')
@@ -103,7 +105,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print(' TSStatus reconstructRegion(TReconstructRegionReq req)')
print(' TSStatus extendRegion(TExtendRegionReq req)')
print(' TSStatus removeRegion(TRemoveRegionReq req)')
- print(' TSStatus killQuery(string queryId, i32 dataNodeId, string allowedUsername)')
+ print(' TSStatus killQuery(string queryId, i32 dataNodeId)')
print(' TGetDataNodeLocationsResp getReadableDataNodeLocations()')
print(' TShowClusterResp showCluster()')
print(' TShowVariablesResp showVariables()')
@@ -162,14 +164,8 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print(' TShowCQResp showCQ()')
print(' TSStatus createModel(TCreateModelReq req)')
print(' TSStatus dropModel(TDropModelReq req)')
- print(' TShowModelResp showModel(TShowModelReq req)')
- print(' TShowLoadedModelResp showLoadedModel(TShowLoadedModelReq req)')
- print(' TShowAIDevicesResp showAIDevices()')
- print(' TSStatus loadModel(TLoadModelReq req)')
- print(' TSStatus unloadModel(TUnloadModelReq req)')
print(' TGetModelInfoResp getModelInfo(TGetModelInfoReq req)')
print(' TSStatus updateModelInfo(TUpdateModelInfoReq req)')
- print(' TSStatus createTraining(TCreateTrainingReq req)')
print(' TSStatus setSpaceQuota(TSetSpaceQuotaReq req)')
print(' TSpaceQuotaResp showSpaceQuota( databases)')
print(' TSpaceQuotaResp getSpaceQuota()')
@@ -313,6 +309,12 @@ elif cmd == 'getAINodeConfiguration':
sys.exit(1)
pp.pprint(client.getAINodeConfiguration(eval(args[0]),))
+elif cmd == 'getAINodeLocation':
+ if len(args) != 0:
+ print('getAINodeLocation requires 0 args')
+ sys.exit(1)
+ pp.pprint(client.getAINodeLocation())
+
elif cmd == 'getSystemConfiguration':
if len(args) != 0:
print('getSystemConfiguration requires 0 args')
@@ -673,12 +675,6 @@ elif cmd == 'showConfiguration':
sys.exit(1)
pp.pprint(client.showConfiguration(eval(args[0]),))
-elif cmd == 'showAppliedConfigurations':
- if len(args) != 1:
- print('showAppliedConfigurations requires 1 args')
- sys.exit(1)
- pp.pprint(client.showAppliedConfigurations(eval(args[0]),))
-
elif cmd == 'startRepairData':
if len(args) != 0:
print('startRepairData requires 0 args')
@@ -740,10 +736,10 @@ elif cmd == 'removeRegion':
pp.pprint(client.removeRegion(eval(args[0]),))
elif cmd == 'killQuery':
- if len(args) != 3:
- print('killQuery requires 3 args')
+ if len(args) != 2:
+ print('killQuery requires 2 args')
sys.exit(1)
- pp.pprint(client.killQuery(args[0], eval(args[1]), args[2],))
+ pp.pprint(client.killQuery(args[0], eval(args[1]),))
elif cmd == 'getReadableDataNodeLocations':
if len(args) != 0:
@@ -1093,36 +1089,6 @@ elif cmd == 'dropModel':
sys.exit(1)
pp.pprint(client.dropModel(eval(args[0]),))
-elif cmd == 'showModel':
- if len(args) != 1:
- print('showModel requires 1 args')
- sys.exit(1)
- pp.pprint(client.showModel(eval(args[0]),))
-
-elif cmd == 'showLoadedModel':
- if len(args) != 1:
- print('showLoadedModel requires 1 args')
- sys.exit(1)
- pp.pprint(client.showLoadedModel(eval(args[0]),))
-
-elif cmd == 'showAIDevices':
- if len(args) != 0:
- print('showAIDevices requires 0 args')
- sys.exit(1)
- pp.pprint(client.showAIDevices())
-
-elif cmd == 'loadModel':
- if len(args) != 1:
- print('loadModel requires 1 args')
- sys.exit(1)
- pp.pprint(client.loadModel(eval(args[0]),))
-
-elif cmd == 'unloadModel':
- if len(args) != 1:
- print('unloadModel requires 1 args')
- sys.exit(1)
- pp.pprint(client.unloadModel(eval(args[0]),))
-
elif cmd == 'getModelInfo':
if len(args) != 1:
print('getModelInfo requires 1 args')
@@ -1135,12 +1101,6 @@ elif cmd == 'updateModelInfo':
sys.exit(1)
pp.pprint(client.updateModelInfo(eval(args[0]),))
-elif cmd == 'createTraining':
- if len(args) != 1:
- print('createTraining requires 1 args')
- sys.exit(1)
- pp.pprint(client.createTraining(eval(args[0]),))
-
elif cmd == 'setSpaceQuota':
if len(args) != 1:
print('setSpaceQuota requires 1 args')
diff --git a/iotdb-core/ainode/iotdb/thrift/confignode/IConfigNodeRPCService.py b/iotdb-core/ainode/iotdb/thrift/confignode/IConfigNodeRPCService.py
index 439190815c4..15159487df0 100644
--- a/iotdb-core/ainode/iotdb/thrift/confignode/IConfigNodeRPCService.py
+++ b/iotdb-core/ainode/iotdb/thrift/confignode/IConfigNodeRPCService.py
@@ -6,15 +6,23 @@
# options string: py
#
-from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
+import logging
+import sys
+
from thrift.protocol.TProtocol import TProtocolException
+from thrift.Thrift import (
+ TApplicationException,
+ TException,
+ TFrozenDict,
+ TMessageType,
+ TProcessor,
+ TType,
+)
+from thrift.transport import TTransport
from thrift.TRecursive import fix_spec
-import sys
-import logging
from .ttypes import *
-from thrift.Thrift import TProcessor
-from thrift.transport import TTransport
+
all_structs = []
@@ -91,6 +99,13 @@ class Iface(object):
"""
pass
+ def getAINodeLocation(self):
+ """
+ Return a reachable AINode location.
+
+ """
+ pass
+
def getSystemConfiguration(self):
"""
Get system configurations. i.e. configurations that is not associated with the DataNodeId
@@ -766,16 +781,6 @@ class Iface(object):
"""
pass
- def showAppliedConfigurations(self, nodeId):
- """
- Show applied configurations by TsBlock
-
- Parameters:
- - nodeId
-
- """
- pass
-
def startRepairData(self):
"""
Check and repair unsorted tsfile by compaction
@@ -858,14 +863,13 @@ class Iface(object):
"""
pass
- def killQuery(self, queryId, dataNodeId, allowedUsername):
+ def killQuery(self, queryId, dataNodeId):
"""
Kill query
Parameters:
- queryId
- dataNodeId
- - allowedUsername
"""
pass
@@ -1406,57 +1410,6 @@ class Iface(object):
"""
pass
- def showModel(self, req):
- """
- Return the model table
-
- Parameters:
- - req
-
- """
- pass
-
- def showLoadedModel(self, req):
- """
- Return the loaded model table
-
- Parameters:
- - req
-
- """
- pass
-
- def showAIDevices(self):
- """
- Return the available ai devices
-
- """
- pass
-
- def loadModel(self, req):
- """
- Load an existing model to specific devices
-
- @return SUCCESS_STATUS if the model loading task was submitted successfully
-
- Parameters:
- - req
-
- """
- pass
-
- def unloadModel(self, req):
- """
- Unload an existing model to specific devices
-
- @return SUCCESS_STATUS if the model unloading task was submitted successfully
-
- Parameters:
- - req
-
- """
- pass
-
def getModelInfo(self, req):
"""
Return the model info by model_id
@@ -1475,14 +1428,6 @@ class Iface(object):
"""
pass
- def createTraining(self, req):
- """
- Parameters:
- - req
-
- """
- pass
-
def setSpaceQuota(self, req):
"""
Set Space Quota
@@ -1883,6 +1828,36 @@ class Client(Iface):
return result.success
raise TApplicationException(TApplicationException.MISSING_RESULT, "getAINodeConfiguration failed: unknown result")
+ def getAINodeLocation(self):
+ """
+ Return a reachable AINode location.
+
+ """
+ self.send_getAINodeLocation()
+ return self.recv_getAINodeLocation()
+
+ def send_getAINodeLocation(self):
+ self._oprot.writeMessageBegin('getAINodeLocation', TMessageType.CALL, self._seqid)
+ args = getAINodeLocation_args()
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getAINodeLocation(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getAINodeLocation_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getAINodeLocation failed: unknown result")
+
def getSystemConfiguration(self):
"""
Get system configurations. i.e. configurations that is not associated with the DataNodeId
@@ -3992,40 +3967,6 @@ class Client(Iface):
return result.success
raise TApplicationException(TApplicationException.MISSING_RESULT, "showConfiguration failed: unknown result")
- def showAppliedConfigurations(self, nodeId):
- """
- Show applied configurations by TsBlock
-
- Parameters:
- - nodeId
-
- """
- self.send_showAppliedConfigurations(nodeId)
- return self.recv_showAppliedConfigurations()
-
- def send_showAppliedConfigurations(self, nodeId):
- self._oprot.writeMessageBegin('showAppliedConfigurations', TMessageType.CALL, self._seqid)
- args = showAppliedConfigurations_args()
- args.nodeId = nodeId
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
-
- def recv_showAppliedConfigurations(self):
- iprot = self._iprot
- (fname, mtype, rseqid) = iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(iprot)
- iprot.readMessageEnd()
- raise x
- result = showAppliedConfigurations_result()
- result.read(iprot)
- iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- raise TApplicationException(TApplicationException.MISSING_RESULT, "showAppliedConfigurations failed: unknown result")
-
def startRepairData(self):
"""
Check and repair unsorted tsfile by compaction
@@ -4344,25 +4285,23 @@ class Client(Iface):
return result.success
raise TApplicationException(TApplicationException.MISSING_RESULT, "removeRegion failed: unknown result")
- def killQuery(self, queryId, dataNodeId, allowedUsername):
+ def killQuery(self, queryId, dataNodeId):
"""
Kill query
Parameters:
- queryId
- dataNodeId
- - allowedUsername
"""
- self.send_killQuery(queryId, dataNodeId, allowedUsername)
+ self.send_killQuery(queryId, dataNodeId)
return self.recv_killQuery()
- def send_killQuery(self, queryId, dataNodeId, allowedUsername):
+ def send_killQuery(self, queryId, dataNodeId):
self._oprot.writeMessageBegin('killQuery', TMessageType.CALL, self._seqid)
args = killQuery_args()
args.queryId = queryId
args.dataNodeId = dataNodeId
- args.allowedUsername = allowedUsername
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
@@ -6295,176 +6234,6 @@ class Client(Iface):
return result.success
raise TApplicationException(TApplicationException.MISSING_RESULT, "dropModel failed: unknown result")
- def showModel(self, req):
- """
- Return the model table
-
- Parameters:
- - req
-
- """
- self.send_showModel(req)
- return self.recv_showModel()
-
- def send_showModel(self, req):
- self._oprot.writeMessageBegin('showModel', TMessageType.CALL, self._seqid)
- args = showModel_args()
- args.req = req
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
-
- def recv_showModel(self):
- iprot = self._iprot
- (fname, mtype, rseqid) = iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(iprot)
- iprot.readMessageEnd()
- raise x
- result = showModel_result()
- result.read(iprot)
- iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- raise TApplicationException(TApplicationException.MISSING_RESULT, "showModel failed: unknown result")
-
- def showLoadedModel(self, req):
- """
- Return the loaded model table
-
- Parameters:
- - req
-
- """
- self.send_showLoadedModel(req)
- return self.recv_showLoadedModel()
-
- def send_showLoadedModel(self, req):
- self._oprot.writeMessageBegin('showLoadedModel', TMessageType.CALL, self._seqid)
- args = showLoadedModel_args()
- args.req = req
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
-
- def recv_showLoadedModel(self):
- iprot = self._iprot
- (fname, mtype, rseqid) = iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(iprot)
- iprot.readMessageEnd()
- raise x
- result = showLoadedModel_result()
- result.read(iprot)
- iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- raise TApplicationException(TApplicationException.MISSING_RESULT, "showLoadedModel failed: unknown result")
-
- def showAIDevices(self):
- """
- Return the available ai devices
-
- """
- self.send_showAIDevices()
- return self.recv_showAIDevices()
-
- def send_showAIDevices(self):
- self._oprot.writeMessageBegin('showAIDevices', TMessageType.CALL, self._seqid)
- args = showAIDevices_args()
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
-
- def recv_showAIDevices(self):
- iprot = self._iprot
- (fname, mtype, rseqid) = iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(iprot)
- iprot.readMessageEnd()
- raise x
- result = showAIDevices_result()
- result.read(iprot)
- iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- raise TApplicationException(TApplicationException.MISSING_RESULT, "showAIDevices failed: unknown result")
-
- def loadModel(self, req):
- """
- Load an existing model to specific devices
-
- @return SUCCESS_STATUS if the model loading task was submitted successfully
-
- Parameters:
- - req
-
- """
- self.send_loadModel(req)
- return self.recv_loadModel()
-
- def send_loadModel(self, req):
- self._oprot.writeMessageBegin('loadModel', TMessageType.CALL, self._seqid)
- args = loadModel_args()
- args.req = req
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
-
- def recv_loadModel(self):
- iprot = self._iprot
- (fname, mtype, rseqid) = iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(iprot)
- iprot.readMessageEnd()
- raise x
- result = loadModel_result()
- result.read(iprot)
- iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- raise TApplicationException(TApplicationException.MISSING_RESULT, "loadModel failed: unknown result")
-
- def unloadModel(self, req):
- """
- Unload an existing model to specific devices
-
- @return SUCCESS_STATUS if the model unloading task was submitted successfully
-
- Parameters:
- - req
-
- """
- self.send_unloadModel(req)
- return self.recv_unloadModel()
-
- def send_unloadModel(self, req):
- self._oprot.writeMessageBegin('unloadModel', TMessageType.CALL, self._seqid)
- args = unloadModel_args()
- args.req = req
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
-
- def recv_unloadModel(self):
- iprot = self._iprot
- (fname, mtype, rseqid) = iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(iprot)
- iprot.readMessageEnd()
- raise x
- result = unloadModel_result()
- result.read(iprot)
- iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- raise TApplicationException(TApplicationException.MISSING_RESULT, "unloadModel failed: unknown result")
-
def getModelInfo(self, req):
"""
Return the model info by model_id
@@ -6531,38 +6300,6 @@ class Client(Iface):
return result.success
raise TApplicationException(TApplicationException.MISSING_RESULT, "updateModelInfo failed: unknown result")
- def createTraining(self, req):
- """
- Parameters:
- - req
-
- """
- self.send_createTraining(req)
- return self.recv_createTraining()
-
- def send_createTraining(self, req):
- self._oprot.writeMessageBegin('createTraining', TMessageType.CALL, self._seqid)
- args = createTraining_args()
- args.req = req
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
-
- def recv_createTraining(self):
- iprot = self._iprot
- (fname, mtype, rseqid) = iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(iprot)
- iprot.readMessageEnd()
- raise x
- result = createTraining_result()
- result.read(iprot)
- iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- raise TApplicationException(TApplicationException.MISSING_RESULT, "createTraining failed: unknown result")
-
def setSpaceQuota(self, req):
"""
Set Space Quota
@@ -7090,6 +6827,7 @@ class Processor(Iface, TProcessor):
self._processMap["removeAINode"] = Processor.process_removeAINode
self._processMap["showAINodes"] = Processor.process_showAINodes
self._processMap["getAINodeConfiguration"] = Processor.process_getAINodeConfiguration
+ self._processMap["getAINodeLocation"] = Processor.process_getAINodeLocation
self._processMap["getSystemConfiguration"] = Processor.process_getSystemConfiguration
self._processMap["removeDataNode"] = Processor.process_removeDataNode
self._processMap["reportDataNodeShutdown"] = Processor.process_reportDataNodeShutdown
@@ -7150,7 +6888,6 @@ class Processor(Iface, TProcessor):
self._processMap["clearCache"] = Processor.process_clearCache
self._processMap["setConfiguration"] = Processor.process_setConfiguration
self._processMap["showConfiguration"] = Processor.process_showConfiguration
- self._processMap["showAppliedConfigurations"] = Processor.process_showAppliedConfigurations
self._processMap["startRepairData"] = Processor.process_startRepairData
self._processMap["stopRepairData"] = Processor.process_stopRepairData
self._processMap["submitLoadConfigurationTask"] = Processor.process_submitLoadConfigurationTask
@@ -7220,14 +6957,8 @@ class Processor(Iface, TProcessor):
self._processMap["showCQ"] = Processor.process_showCQ
self._processMap["createModel"] = Processor.process_createModel
self._processMap["dropModel"] = Processor.process_dropModel
- self._processMap["showModel"] = Processor.process_showModel
- self._processMap["showLoadedModel"] = Processor.process_showLoadedModel
- self._processMap["showAIDevices"] = Processor.process_showAIDevices
- self._processMap["loadModel"] = Processor.process_loadModel
- self._processMap["unloadModel"] = Processor.process_unloadModel
self._processMap["getModelInfo"] = Processor.process_getModelInfo
self._processMap["updateModelInfo"] = Processor.process_updateModelInfo
- self._processMap["createTraining"] = Processor.process_createTraining
self._processMap["setSpaceQuota"] = Processor.process_setSpaceQuota
self._processMap["showSpaceQuota"] = Processor.process_showSpaceQuota
self._processMap["getSpaceQuota"] = Processor.process_getSpaceQuota
@@ -7450,11 +7181,34 @@ class Processor(Iface, TProcessor):
oprot.writeMessageEnd()
oprot.trans.flush()
- def process_getSystemConfiguration(self, seqid, iprot, oprot):
- args = getSystemConfiguration_args()
+ def process_getAINodeLocation(self, seqid, iprot, oprot):
+ args = getAINodeLocation_args()
args.read(iprot)
iprot.readMessageEnd()
- result = getSystemConfiguration_result()
+ result = getAINodeLocation_result()
+ try:
+ result.success = self._handler.getAINodeLocation()
+ msg_type = TMessageType.REPLY
+ except TTransport.TTransportException:
+ raise
+ except TApplicationException as ex:
+ logging.exception('TApplication exception in handler')
+ msg_type = TMessageType.EXCEPTION
+ result = ex
+ except Exception:
+ logging.exception('Unexpected exception in handler')
+ msg_type = TMessageType.EXCEPTION
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("getAINodeLocation", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_getSystemConfiguration(self, seqid, iprot, oprot):
+ args = getSystemConfiguration_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = getSystemConfiguration_result()
try:
result.success = self._handler.getSystemConfiguration()
msg_type = TMessageType.REPLY
@@ -8830,29 +8584,6 @@ class Processor(Iface, TProcessor):
oprot.writeMessageEnd()
oprot.trans.flush()
- def process_showAppliedConfigurations(self, seqid, iprot, oprot):
- args = showAppliedConfigurations_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = showAppliedConfigurations_result()
- try:
- result.success = self._handler.showAppliedConfigurations(args.nodeId)
- msg_type = TMessageType.REPLY
- except TTransport.TTransportException:
- raise
- except TApplicationException as ex:
- logging.exception('TApplication exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = ex
- except Exception:
- logging.exception('Unexpected exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("showAppliedConfigurations", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
-
def process_startRepairData(self, seqid, iprot, oprot):
args = startRepairData_args()
args.read(iprot)
@@ -9089,7 +8820,7 @@ class Processor(Iface, TProcessor):
iprot.readMessageEnd()
result = killQuery_result()
try:
- result.success = self._handler.killQuery(args.queryId, args.dataNodeId, args.allowedUsername)
+ result.success = self._handler.killQuery(args.queryId, args.dataNodeId)
msg_type = TMessageType.REPLY
except TTransport.TTransportException:
raise
@@ -10440,121 +10171,6 @@ class Processor(Iface, TProcessor):
oprot.writeMessageEnd()
oprot.trans.flush()
- def process_showModel(self, seqid, iprot, oprot):
- args = showModel_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = showModel_result()
- try:
- result.success = self._handler.showModel(args.req)
- msg_type = TMessageType.REPLY
- except TTransport.TTransportException:
- raise
- except TApplicationException as ex:
- logging.exception('TApplication exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = ex
- except Exception:
- logging.exception('Unexpected exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("showModel", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
-
- def process_showLoadedModel(self, seqid, iprot, oprot):
- args = showLoadedModel_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = showLoadedModel_result()
- try:
- result.success = self._handler.showLoadedModel(args.req)
- msg_type = TMessageType.REPLY
- except TTransport.TTransportException:
- raise
- except TApplicationException as ex:
- logging.exception('TApplication exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = ex
- except Exception:
- logging.exception('Unexpected exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("showLoadedModel", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
-
- def process_showAIDevices(self, seqid, iprot, oprot):
- args = showAIDevices_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = showAIDevices_result()
- try:
- result.success = self._handler.showAIDevices()
- msg_type = TMessageType.REPLY
- except TTransport.TTransportException:
- raise
- except TApplicationException as ex:
- logging.exception('TApplication exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = ex
- except Exception:
- logging.exception('Unexpected exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("showAIDevices", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
-
- def process_loadModel(self, seqid, iprot, oprot):
- args = loadModel_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = loadModel_result()
- try:
- result.success = self._handler.loadModel(args.req)
- msg_type = TMessageType.REPLY
- except TTransport.TTransportException:
- raise
- except TApplicationException as ex:
- logging.exception('TApplication exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = ex
- except Exception:
- logging.exception('Unexpected exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("loadModel", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
-
- def process_unloadModel(self, seqid, iprot, oprot):
- args = unloadModel_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = unloadModel_result()
- try:
- result.success = self._handler.unloadModel(args.req)
- msg_type = TMessageType.REPLY
- except TTransport.TTransportException:
- raise
- except TApplicationException as ex:
- logging.exception('TApplication exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = ex
- except Exception:
- logging.exception('Unexpected exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("unloadModel", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
-
def process_getModelInfo(self, seqid, iprot, oprot):
args = getModelInfo_args()
args.read(iprot)
@@ -10601,29 +10217,6 @@ class Processor(Iface, TProcessor):
oprot.writeMessageEnd()
oprot.trans.flush()
- def process_createTraining(self, seqid, iprot, oprot):
- args = createTraining_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = createTraining_result()
- try:
- result.success = self._handler.createTraining(args.req)
- msg_type = TMessageType.REPLY
- except TTransport.TTransportException:
- raise
- except TApplicationException as ex:
- logging.exception('TApplication exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = ex
- except Exception:
- logging.exception('Unexpected exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("createTraining", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
-
def process_setSpaceQuota(self, seqid, iprot, oprot):
args = setSpaceQuota_args()
args.read(iprot)
@@ -11936,6 +11529,111 @@ getAINodeConfiguration_result.thrift_spec = (
)
+class getAINodeLocation_args(object):
+
+
+ def read(self, iprot):
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
+ iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
+ oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
+ return
+ oprot.writeStructBegin('getAINodeLocation_args')
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ return
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.items()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+all_structs.append(getAINodeLocation_args)
+getAINodeLocation_args.thrift_spec = (
+)
+
+
+class getAINodeLocation_result(object):
+ """
+ Attributes:
+ - success
+
+ """
+
+
+ def __init__(self, success=None,):
+ self.success = success
+
+ def read(self, iprot):
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
+ iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 0:
+ if ftype == TType.STRUCT:
+ self.success = TGetAINodeLocationResp()
+ self.success.read(iprot)
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
+ oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
+ return
+ oprot.writeStructBegin('getAINodeLocation_result')
+ if self.success is not None:
+ oprot.writeFieldBegin('success', TType.STRUCT, 0)
+ self.success.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ return
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.items()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+all_structs.append(getAINodeLocation_result)
+getAINodeLocation_result.thrift_spec = (
+ (0, TType.STRUCT, 'success', [TGetAINodeLocationResp, None], None, ), # 0
+)
+
+
class getSystemConfiguration_args(object):
@@ -13770,17 +13468,17 @@ class getSchemaPartitionTableWithSlots_args(object):
if fid == -1:
if ftype == TType.MAP:
self.dbSlotMap = {}
- (_ktype957, _vtype958, _size956) = iprot.readMapBegin()
- for _i960 in range(_size956):
- _key961 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val962 = []
- (_etype966, _size963) = iprot.readListBegin()
- for _i967 in range(_size963):
- _elem968 = iotdb.thrift.common.ttypes.TSeriesPartitionSlot()
- _elem968.read(iprot)
- _val962.append(_elem968)
+ (_ktype856, _vtype857, _size855) = iprot.readMapBegin()
+ for _i859 in range(_size855):
+ _key860 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ _val861 = []
+ (_etype865, _size862) = iprot.readListBegin()
+ for _i866 in range(_size862):
+ _elem867 = iotdb.thrift.common.ttypes.TSeriesPartitionSlot()
+ _elem867.read(iprot)
+ _val861.append(_elem867)
iprot.readListEnd()
- self.dbSlotMap[_key961] = _val962
+ self.dbSlotMap[_key860] = _val861
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -13797,11 +13495,11 @@ class getSchemaPartitionTableWithSlots_args(object):
if self.dbSlotMap is not None:
oprot.writeFieldBegin('dbSlotMap', TType.MAP, -1)
oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.dbSlotMap))
- for kiter969, viter970 in self.dbSlotMap.items():
- oprot.writeString(kiter969.encode('utf-8') if sys.version_info[0] == 2 else kiter969)
- oprot.writeListBegin(TType.STRUCT, len(viter970))
- for iter971 in viter970:
- iter971.write(oprot)
+ for kiter868, viter869 in self.dbSlotMap.items():
+ oprot.writeString(kiter868.encode('utf-8') if sys.version_info[0] == 2 else kiter868)
+ oprot.writeListBegin(TType.STRUCT, len(viter869))
+ for iter870 in viter869:
+ iter870.write(oprot)
oprot.writeListEnd()
oprot.writeMapEnd()
oprot.writeFieldEnd()
@@ -14032,17 +13730,17 @@ class getOrCreateSchemaPartitionTableWithSlots_args(object):
if fid == -1:
if ftype == TType.MAP:
self.dbSlotMap = {}
- (_ktype973, _vtype974, _size972) = iprot.readMapBegin()
- for _i976 in range(_size972):
- _key977 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val978 = []
- (_etype982, _size979) = iprot.readListBegin()
- for _i983 in range(_size979):
- _elem984 = iotdb.thrift.common.ttypes.TSeriesPartitionSlot()
- _elem984.read(iprot)
- _val978.append(_elem984)
+ (_ktype872, _vtype873, _size871) = iprot.readMapBegin()
+ for _i875 in range(_size871):
+ _key876 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ _val877 = []
+ (_etype881, _size878) = iprot.readListBegin()
+ for _i882 in range(_size878):
+ _elem883 = iotdb.thrift.common.ttypes.TSeriesPartitionSlot()
+ _elem883.read(iprot)
+ _val877.append(_elem883)
iprot.readListEnd()
- self.dbSlotMap[_key977] = _val978
+ self.dbSlotMap[_key876] = _val877
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -14059,11 +13757,11 @@ class getOrCreateSchemaPartitionTableWithSlots_args(object):
if self.dbSlotMap is not None:
oprot.writeFieldBegin('dbSlotMap', TType.MAP, -1)
oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.dbSlotMap))
- for kiter985, viter986 in self.dbSlotMap.items():
- oprot.writeString(kiter985.encode('utf-8') if sys.version_info[0] == 2 else kiter985)
- oprot.writeListBegin(TType.STRUCT, len(viter986))
- for iter987 in viter986:
- iter987.write(oprot)
+ for kiter884, viter885 in self.dbSlotMap.items():
+ oprot.writeString(kiter884.encode('utf-8') if sys.version_info[0] == 2 else kiter884)
+ oprot.writeListBegin(TType.STRUCT, len(viter885))
+ for iter886 in viter885:
+ iter886.write(oprot)
oprot.writeListEnd()
oprot.writeMapEnd()
oprot.writeFieldEnd()
@@ -18843,10 +18541,10 @@ class clearCache_args(object):
if fid == -1:
if ftype == TType.SET:
self.cacheClearOptions = set()
- (_etype991, _size988) = iprot.readSetBegin()
- for _i992 in range(_size988):
- _elem993 = iprot.readI32()
- self.cacheClearOptions.add(_elem993)
+ (_etype890, _size887) = iprot.readSetBegin()
+ for _i891 in range(_size887):
+ _elem892 = iprot.readI32()
+ self.cacheClearOptions.add(_elem892)
iprot.readSetEnd()
else:
iprot.skip(ftype)
@@ -18863,8 +18561,8 @@ class clearCache_args(object):
if self.cacheClearOptions is not None:
oprot.writeFieldBegin('cacheClearOptions', TType.SET, -1)
oprot.writeSetBegin(TType.I32, len(self.cacheClearOptions))
- for iter994 in self.cacheClearOptions:
- oprot.writeI32(iter994)
+ for iter893 in self.cacheClearOptions:
+ oprot.writeI32(iter893)
oprot.writeSetEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -19195,131 +18893,7 @@ showConfiguration_result.thrift_spec = (
)
-class showAppliedConfigurations_args(object):
- """
- Attributes:
- - nodeId
-
- """
-
-
- def __init__(self, nodeId=None,):
- self.nodeId = nodeId
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.I32:
- self.nodeId = iprot.readI32()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('showAppliedConfigurations_args')
- if self.nodeId is not None:
- oprot.writeFieldBegin('nodeId', TType.I32, 1)
- oprot.writeI32(self.nodeId)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-all_structs.append(showAppliedConfigurations_args)
-showAppliedConfigurations_args.thrift_spec = (
- None, # 0
- (1, TType.I32, 'nodeId', None, None, ), # 1
-)
-
-
-class showAppliedConfigurations_result(object):
- """
- Attributes:
- - success
-
- """
-
-
- def __init__(self, success=None,):
- self.success = success
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 0:
- if ftype == TType.STRUCT:
- self.success = iotdb.thrift.common.ttypes.TShowAppliedConfigurationsResp()
- self.success.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('showAppliedConfigurations_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRUCT, 0)
- self.success.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-all_structs.append(showAppliedConfigurations_result)
-showAppliedConfigurations_result.thrift_spec = (
- (0, TType.STRUCT, 'success', [iotdb.thrift.common.ttypes.TShowAppliedConfigurationsResp, None], None, ), # 0
-)
-
-
-class startRepairData_args(object):
+class startRepairData_args(object):
def read(self, iprot):
@@ -20475,15 +20049,13 @@ class killQuery_args(object):
Attributes:
- queryId
- dataNodeId
- - allowedUsername
"""
- def __init__(self, queryId=None, dataNodeId=None, allowedUsername=None,):
+ def __init__(self, queryId=None, dataNodeId=None,):
self.queryId = queryId
self.dataNodeId = dataNodeId
- self.allowedUsername = allowedUsername
def read(self, iprot):
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
@@ -20504,11 +20076,6 @@ class killQuery_args(object):
self.dataNodeId = iprot.readI32()
else:
iprot.skip(ftype)
- elif fid == -3:
- if ftype == TType.STRING:
- self.allowedUsername = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- else:
- iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -20519,10 +20086,6 @@ class killQuery_args(object):
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
return
oprot.writeStructBegin('killQuery_args')
- if self.allowedUsername is not None:
- oprot.writeFieldBegin('allowedUsername', TType.STRING, -3)
- oprot.writeString(self.allowedUsername.encode('utf-8') if sys.version_info[0] == 2 else self.allowedUsername)
- oprot.writeFieldEnd()
if self.dataNodeId is not None:
oprot.writeFieldBegin('dataNodeId', TType.I32, -2)
oprot.writeI32(self.dataNodeId)
@@ -27427,7 +26990,7 @@ dropModel_result.thrift_spec = (
)
-class showModel_args(object):
+class getModelInfo_args(object):
"""
Attributes:
- req
@@ -27449,7 +27012,7 @@ class showModel_args(object):
break
if fid == -1:
if ftype == TType.STRUCT:
- self.req = TShowModelReq()
+ self.req = TGetModelInfoReq()
self.req.read(iprot)
else:
iprot.skip(ftype)
@@ -27462,7 +27025,7 @@ class showModel_args(object):
if oprot._fast_encode is not None and self.thrift_spec is not None:
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
return
- oprot.writeStructBegin('showModel_args')
+ oprot.writeStructBegin('getModelInfo_args')
if self.req is not None:
oprot.writeFieldBegin('req', TType.STRUCT, -1)
self.req.write(oprot)
@@ -27483,11 +27046,11 @@ class showModel_args(object):
def __ne__(self, other):
return not (self == other)
-all_structs.append(showModel_args)
-showModel_args.thrift_spec = ()
+all_structs.append(getModelInfo_args)
+getModelInfo_args.thrift_spec = ()
-class showModel_result(object):
+class getModelInfo_result(object):
"""
Attributes:
- success
@@ -27509,7 +27072,7 @@ class showModel_result(object):
break
if fid == 0:
if ftype == TType.STRUCT:
- self.success = TShowModelResp()
+ self.success = TGetModelInfoResp()
self.success.read(iprot)
else:
iprot.skip(ftype)
@@ -27522,7 +27085,7 @@ class showModel_result(object):
if oprot._fast_encode is not None and self.thrift_spec is not None:
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
return
- oprot.writeStructBegin('showModel_result')
+ oprot.writeStructBegin('getModelInfo_result')
if self.success is not None:
oprot.writeFieldBegin('success', TType.STRUCT, 0)
self.success.write(oprot)
@@ -27543,13 +27106,13 @@ class showModel_result(object):
def __ne__(self, other):
return not (self == other)
-all_structs.append(showModel_result)
-showModel_result.thrift_spec = (
- (0, TType.STRUCT, 'success', [TShowModelResp, None], None, ), # 0
+all_structs.append(getModelInfo_result)
+getModelInfo_result.thrift_spec = (
+ (0, TType.STRUCT, 'success', [TGetModelInfoResp, None], None, ), # 0
)
-class showLoadedModel_args(object):
+class updateModelInfo_args(object):
"""
Attributes:
- req
@@ -27571,7 +27134,7 @@ class showLoadedModel_args(object):
break
if fid == -1:
if ftype == TType.STRUCT:
- self.req = TShowLoadedModelReq()
+ self.req = TUpdateModelInfoReq()
self.req.read(iprot)
else:
iprot.skip(ftype)
@@ -27584,7 +27147,7 @@ class showLoadedModel_args(object):
if oprot._fast_encode is not None and self.thrift_spec is not None:
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
return
- oprot.writeStructBegin('showLoadedModel_args')
+ oprot.writeStructBegin('updateModelInfo_args')
if self.req is not None:
oprot.writeFieldBegin('req', TType.STRUCT, -1)
self.req.write(oprot)
@@ -27605,116 +27168,11 @@ class showLoadedModel_args(object):
def __ne__(self, other):
return not (self == other)
-all_structs.append(showLoadedModel_args)
-showLoadedModel_args.thrift_spec = ()
-
-
-class showLoadedModel_result(object):
- """
- Attributes:
- - success
-
- """
-
-
- def __init__(self, success=None,):
- self.success = success
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 0:
- if ftype == TType.STRUCT:
- self.success = TShowLoadedModelResp()
- self.success.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('showLoadedModel_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRUCT, 0)
- self.success.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-all_structs.append(showLoadedModel_result)
-showLoadedModel_result.thrift_spec = (
- (0, TType.STRUCT, 'success', [TShowLoadedModelResp, None], None, ), # 0
-)
-
-
-class showAIDevices_args(object):
-
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('showAIDevices_args')
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-all_structs.append(showAIDevices_args)
-showAIDevices_args.thrift_spec = (
-)
+all_structs.append(updateModelInfo_args)
+updateModelInfo_args.thrift_spec = ()
-class showAIDevices_result(object):
+class updateModelInfo_result(object):
"""
Attributes:
- success
@@ -27736,7 +27194,7 @@ class showAIDevices_result(object):
break
if fid == 0:
if ftype == TType.STRUCT:
- self.success = TShowAIDevicesResp()
+ self.success = iotdb.thrift.common.ttypes.TSStatus()
self.success.read(iprot)
else:
iprot.skip(ftype)
@@ -27749,495 +27207,7 @@ class showAIDevices_result(object):
if oprot._fast_encode is not None and self.thrift_spec is not None:
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
return
- oprot.writeStructBegin('showAIDevices_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRUCT, 0)
- self.success.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-all_structs.append(showAIDevices_result)
-showAIDevices_result.thrift_spec = (
- (0, TType.STRUCT, 'success', [TShowAIDevicesResp, None], None, ), # 0
-)
-
-
-class loadModel_args(object):
- """
- Attributes:
- - req
-
- """
-
-
- def __init__(self, req=None,):
- self.req = req
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == -1:
- if ftype == TType.STRUCT:
- self.req = TLoadModelReq()
- self.req.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('loadModel_args')
- if self.req is not None:
- oprot.writeFieldBegin('req', TType.STRUCT, -1)
- self.req.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-all_structs.append(loadModel_args)
-loadModel_args.thrift_spec = ()
-
-
-class loadModel_result(object):
- """
- Attributes:
- - success
-
- """
-
-
- def __init__(self, success=None,):
- self.success = success
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 0:
- if ftype == TType.STRUCT:
- self.success = iotdb.thrift.common.ttypes.TSStatus()
- self.success.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('loadModel_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRUCT, 0)
- self.success.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-all_structs.append(loadModel_result)
-loadModel_result.thrift_spec = (
- (0, TType.STRUCT, 'success', [iotdb.thrift.common.ttypes.TSStatus, None], None, ), # 0
-)
-
-
-class unloadModel_args(object):
- """
- Attributes:
- - req
-
- """
-
-
- def __init__(self, req=None,):
- self.req = req
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == -1:
- if ftype == TType.STRUCT:
- self.req = TUnloadModelReq()
- self.req.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('unloadModel_args')
- if self.req is not None:
- oprot.writeFieldBegin('req', TType.STRUCT, -1)
- self.req.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-all_structs.append(unloadModel_args)
-unloadModel_args.thrift_spec = ()
-
-
-class unloadModel_result(object):
- """
- Attributes:
- - success
-
- """
-
-
- def __init__(self, success=None,):
- self.success = success
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 0:
- if ftype == TType.STRUCT:
- self.success = iotdb.thrift.common.ttypes.TSStatus()
- self.success.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('unloadModel_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRUCT, 0)
- self.success.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-all_structs.append(unloadModel_result)
-unloadModel_result.thrift_spec = (
- (0, TType.STRUCT, 'success', [iotdb.thrift.common.ttypes.TSStatus, None], None, ), # 0
-)
-
-
-class getModelInfo_args(object):
- """
- Attributes:
- - req
-
- """
-
-
- def __init__(self, req=None,):
- self.req = req
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == -1:
- if ftype == TType.STRUCT:
- self.req = TGetModelInfoReq()
- self.req.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('getModelInfo_args')
- if self.req is not None:
- oprot.writeFieldBegin('req', TType.STRUCT, -1)
- self.req.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-all_structs.append(getModelInfo_args)
-getModelInfo_args.thrift_spec = ()
-
-
-class getModelInfo_result(object):
- """
- Attributes:
- - success
-
- """
-
-
- def __init__(self, success=None,):
- self.success = success
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 0:
- if ftype == TType.STRUCT:
- self.success = TGetModelInfoResp()
- self.success.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('getModelInfo_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRUCT, 0)
- self.success.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-all_structs.append(getModelInfo_result)
-getModelInfo_result.thrift_spec = (
- (0, TType.STRUCT, 'success', [TGetModelInfoResp, None], None, ), # 0
-)
-
-
-class updateModelInfo_args(object):
- """
- Attributes:
- - req
-
- """
-
-
- def __init__(self, req=None,):
- self.req = req
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == -1:
- if ftype == TType.STRUCT:
- self.req = TUpdateModelInfoReq()
- self.req.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('updateModelInfo_args')
- if self.req is not None:
- oprot.writeFieldBegin('req', TType.STRUCT, -1)
- self.req.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-all_structs.append(updateModelInfo_args)
-updateModelInfo_args.thrift_spec = ()
-
-
-class updateModelInfo_result(object):
- """
- Attributes:
- - success
-
- """
-
-
- def __init__(self, success=None,):
- self.success = success
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 0:
- if ftype == TType.STRUCT:
- self.success = iotdb.thrift.common.ttypes.TSStatus()
- self.success.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('updateModelInfo_result')
+ oprot.writeStructBegin('updateModelInfo_result')
if self.success is not None:
oprot.writeFieldBegin('success', TType.STRUCT, 0)
self.success.write(oprot)
@@ -28264,128 +27234,6 @@ updateModelInfo_result.thrift_spec = (
)
-class createTraining_args(object):
- """
- Attributes:
- - req
-
- """
-
-
- def __init__(self, req=None,):
- self.req = req
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == -1:
- if ftype == TType.STRUCT:
- self.req = TCreateTrainingReq()
- self.req.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('createTraining_args')
- if self.req is not None:
- oprot.writeFieldBegin('req', TType.STRUCT, -1)
- self.req.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-all_structs.append(createTraining_args)
-createTraining_args.thrift_spec = ()
-
-
-class createTraining_result(object):
- """
- Attributes:
- - success
-
- """
-
-
- def __init__(self, success=None,):
- self.success = success
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 0:
- if ftype == TType.STRUCT:
- self.success = iotdb.thrift.common.ttypes.TSStatus()
- self.success.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('createTraining_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRUCT, 0)
- self.success.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-all_structs.append(createTraining_result)
-createTraining_result.thrift_spec = (
- (0, TType.STRUCT, 'success', [iotdb.thrift.common.ttypes.TSStatus, None], None, ), # 0
-)
-
-
class setSpaceQuota_args(object):
"""
Attributes:
@@ -28531,10 +27379,10 @@ class showSpaceQuota_args(object):
if fid == -1:
if ftype == TType.LIST:
self.databases = []
- (_etype998, _size995) = iprot.readListBegin()
- for _i999 in range(_size995):
- _elem1000 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.databases.append(_elem1000)
+ (_etype897, _size894) = iprot.readListBegin()
+ for _i898 in range(_size894):
+ _elem899 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ self.databases.append(_elem899)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -28551,8 +27399,8 @@ class showSpaceQuota_args(object):
if self.databases is not None:
oprot.writeFieldBegin('databases', TType.LIST, -1)
oprot.writeListBegin(TType.STRING, len(self.databases))
- for iter1001 in self.databases:
- oprot.writeString(iter1001.encode('utf-8') if sys.version_info[0] == 2 else iter1001)
+ for iter900 in self.databases:
+ oprot.writeString(iter900.encode('utf-8') if sys.version_info[0] == 2 else iter900)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -29975,16 +28823,16 @@ class fetchTables_args(object):
if fid == -1:
if ftype == TType.MAP:
self.fetchTableMap = {}
- (_ktype1003, _vtype1004, _size1002) = iprot.readMapBegin()
- for _i1006 in range(_size1002):
- _key1007 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val1008 = set()
- (_etype1012, _size1009) = iprot.readSetBegin()
- for _i1013 in range(_size1009):
- _elem1014 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val1008.add(_elem1014)
+ (_ktype902, _vtype903, _size901) = iprot.readMapBegin()
+ for _i905 in range(_size901):
+ _key906 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ _val907 = set()
+ (_etype911, _size908) = iprot.readSetBegin()
+ for _i912 in range(_size908):
+ _elem913 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ _val907.add(_elem913)
iprot.readSetEnd()
- self.fetchTableMap[_key1007] = _val1008
+ self.fetchTableMap[_key906] = _val907
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -30001,11 +28849,11 @@ class fetchTables_args(object):
if self.fetchTableMap is not None:
oprot.writeFieldBegin('fetchTableMap', TType.MAP, -1)
oprot.writeMapBegin(TType.STRING, TType.SET, len(self.fetchTableMap))
- for kiter1015, viter1016 in self.fetchTableMap.items():
- oprot.writeString(kiter1015.encode('utf-8') if sys.version_info[0] == 2 else kiter1015)
- oprot.writeSetBegin(TType.STRING, len(viter1016))
- for iter1017 in viter1016:
- oprot.writeString(iter1017.encode('utf-8') if sys.version_info[0] == 2 else iter1017)
+ for kiter914, viter915 in self.fetchTableMap.items():
+ oprot.writeString(kiter914.encode('utf-8') if sys.version_info[0] == 2 else kiter914)
+ oprot.writeSetBegin(TType.STRING, len(viter915))
+ for iter916 in viter915:
+ oprot.writeString(iter916.encode('utf-8') if sys.version_info[0] == 2 else iter916)
oprot.writeSetEnd()
oprot.writeMapEnd()
oprot.writeFieldEnd()
diff --git a/iotdb-core/ainode/iotdb/thrift/confignode/constants.py b/iotdb-core/ainode/iotdb/thrift/confignode/constants.py
index 69c181ade38..be9fb9f77b3 100644
--- a/iotdb-core/ainode/iotdb/thrift/confignode/constants.py
+++ b/iotdb-core/ainode/iotdb/thrift/confignode/constants.py
@@ -6,9 +6,16 @@
# options string: py
#
-from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
+import sys
+
from thrift.protocol.TProtocol import TProtocolException
+from thrift.Thrift import (
+ TApplicationException,
+ TException,
+ TFrozenDict,
+ TMessageType,
+ TType,
+)
from thrift.TRecursive import fix_spec
-import sys
from .ttypes import *
diff --git a/iotdb-core/ainode/iotdb/thrift/confignode/ttypes.py b/iotdb-core/ainode/iotdb/thrift/confignode/ttypes.py
index 9a8d9c4b4e4..6bbbb619084 100644
--- a/iotdb-core/ainode/iotdb/thrift/confignode/ttypes.py
+++ b/iotdb-core/ainode/iotdb/thrift/confignode/ttypes.py
@@ -6,14 +6,21 @@
# options string: py
#
-from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
+import sys
+
from thrift.protocol.TProtocol import TProtocolException
+from thrift.Thrift import (
+ TApplicationException,
+ TException,
+ TFrozenDict,
+ TMessageType,
+ TType,
+)
+from thrift.transport import TTransport
from thrift.TRecursive import fix_spec
-import sys
import iotdb.thrift.common.ttypes
-from thrift.transport import TTransport
all_structs = []
@@ -161,98 +168,6 @@ class TSystemConfigurationResp(object):
return not (self == other)
-class TAuditConfig(object):
- """
- Attributes:
- - enableAuditLog
- - auditableOperationType
- - auditableOperationLevel
- - auditableOperationResult
-
- """
-
-
- def __init__(self, enableAuditLog=None, auditableOperationType=None, auditableOperationLevel=None, auditableOperationResult=None,):
- self.enableAuditLog = enableAuditLog
- self.auditableOperationType = auditableOperationType
- self.auditableOperationLevel = auditableOperationLevel
- self.auditableOperationResult = auditableOperationResult
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.BOOL:
- self.enableAuditLog = iprot.readBool()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.auditableOperationType = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.STRING:
- self.auditableOperationLevel = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.STRING:
- self.auditableOperationResult = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('TAuditConfig')
- if self.enableAuditLog is not None:
- oprot.writeFieldBegin('enableAuditLog', TType.BOOL, 1)
- oprot.writeBool(self.enableAuditLog)
- oprot.writeFieldEnd()
- if self.auditableOperationType is not None:
- oprot.writeFieldBegin('auditableOperationType', TType.STRING, 2)
- oprot.writeString(self.auditableOperationType.encode('utf-8') if sys.version_info[0] == 2 else self.auditableOperationType)
- oprot.writeFieldEnd()
- if self.auditableOperationLevel is not None:
- oprot.writeFieldBegin('auditableOperationLevel', TType.STRING, 3)
- oprot.writeString(self.auditableOperationLevel.encode('utf-8') if sys.version_info[0] == 2 else self.auditableOperationLevel)
- oprot.writeFieldEnd()
- if self.auditableOperationResult is not None:
- oprot.writeFieldBegin('auditableOperationResult', TType.STRING, 4)
- oprot.writeString(self.auditableOperationResult.encode('utf-8') if sys.version_info[0] == 2 else self.auditableOperationResult)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.enableAuditLog is None:
- raise TProtocolException(message='Required field enableAuditLog is unset!')
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-
class TGlobalConfig(object):
"""
Attributes:
@@ -263,7 +178,6 @@ class TGlobalConfig(object):
- timePartitionInterval
- readConsistencyLevel
- diskSpaceWarningThreshold
- - enableGrantOption
- timestampPrecision
- schemaEngineMode
- tagAttributeTotalSize
@@ -273,7 +187,7 @@ class TGlobalConfig(object):
"""
- def __init__(self, dataRegionConsensusProtocolClass=None, schemaRegionConsensusProtocolClass=None, seriesPartitionSlotNum=None, seriesPartitionExecutorClass=None, timePartitionInterval=None, readConsistencyLevel=None, diskSpaceWarningThreshold=None, enableGrantOption=None, timestampPrecision=None, schemaEngineMode=None, tagAttributeTotalSize=None, isEnterprise=None, timePartitionOrigin=None,):
+ def __init__(self, dataRegionConsensusProtocolClass=None, schemaRegionConsensusProtocolClass=None, seriesPartitionSlotNum=None, seriesPartitionExecutorClass=None, timePartitionInterval=None, readConsistencyLevel=None, diskSpaceWarningThreshold=None, timestampPrecision=None, schemaEngineMode=None, tagAttributeTotalSize=None, isEnterprise=None, timePartitionOrigin=None,):
self.dataRegionConsensusProtocolClass = dataRegionConsensusProtocolClass
self.schemaRegionConsensusProtocolClass = schemaRegionConsensusProtocolClass
self.seriesPartitionSlotNum = seriesPartitionSlotNum
@@ -281,7 +195,6 @@ class TGlobalConfig(object):
self.timePartitionInterval = timePartitionInterval
self.readConsistencyLevel = readConsistencyLevel
self.diskSpaceWarningThreshold = diskSpaceWarningThreshold
- self.enableGrantOption = enableGrantOption
self.timestampPrecision = timestampPrecision
self.schemaEngineMode = schemaEngineMode
self.tagAttributeTotalSize = tagAttributeTotalSize
@@ -333,31 +246,26 @@ class TGlobalConfig(object):
else:
iprot.skip(ftype)
elif fid == 8:
- if ftype == TType.BOOL:
- self.enableGrantOption = iprot.readBool()
- else:
- iprot.skip(ftype)
- elif fid == 9:
if ftype == TType.STRING:
self.timestampPrecision = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
- elif fid == 10:
+ elif fid == 9:
if ftype == TType.STRING:
self.schemaEngineMode = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
- elif fid == 11:
+ elif fid == 10:
if ftype == TType.I32:
self.tagAttributeTotalSize = iprot.readI32()
else:
iprot.skip(ftype)
- elif fid == 12:
+ elif fid == 11:
if ftype == TType.BOOL:
self.isEnterprise = iprot.readBool()
else:
iprot.skip(ftype)
- elif fid == 13:
+ elif fid == 12:
if ftype == TType.I64:
self.timePartitionOrigin = iprot.readI64()
else:
@@ -400,28 +308,24 @@ class TGlobalConfig(object):
oprot.writeFieldBegin('diskSpaceWarningThreshold', TType.DOUBLE, 7)
oprot.writeDouble(self.diskSpaceWarningThreshold)
oprot.writeFieldEnd()
- if self.enableGrantOption is not None:
- oprot.writeFieldBegin('enableGrantOption', TType.BOOL, 8)
- oprot.writeBool(self.enableGrantOption)
- oprot.writeFieldEnd()
if self.timestampPrecision is not None:
- oprot.writeFieldBegin('timestampPrecision', TType.STRING, 9)
+ oprot.writeFieldBegin('timestampPrecision', TType.STRING, 8)
oprot.writeString(self.timestampPrecision.encode('utf-8') if sys.version_info[0] == 2 else self.timestampPrecision)
oprot.writeFieldEnd()
if self.schemaEngineMode is not None:
- oprot.writeFieldBegin('schemaEngineMode', TType.STRING, 10)
+ oprot.writeFieldBegin('schemaEngineMode', TType.STRING, 9)
oprot.writeString(self.schemaEngineMode.encode('utf-8') if sys.version_info[0] == 2 else self.schemaEngineMode)
oprot.writeFieldEnd()
if self.tagAttributeTotalSize is not None:
- oprot.writeFieldBegin('tagAttributeTotalSize', TType.I32, 11)
+ oprot.writeFieldBegin('tagAttributeTotalSize', TType.I32, 10)
oprot.writeI32(self.tagAttributeTotalSize)
oprot.writeFieldEnd()
if self.isEnterprise is not None:
- oprot.writeFieldBegin('isEnterprise', TType.BOOL, 12)
+ oprot.writeFieldBegin('isEnterprise', TType.BOOL, 11)
oprot.writeBool(self.isEnterprise)
oprot.writeFieldEnd()
if self.timePartitionOrigin is not None:
- oprot.writeFieldBegin('timePartitionOrigin', TType.I64, 13)
+ oprot.writeFieldBegin('timePartitionOrigin', TType.I64, 12)
oprot.writeI64(self.timePartitionOrigin)
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -442,8 +346,6 @@ class TGlobalConfig(object):
raise TProtocolException(message='Required field readConsistencyLevel is unset!')
if self.diskSpaceWarningThreshold is None:
raise TProtocolException(message='Required field diskSpaceWarningThreshold is unset!')
- if self.enableGrantOption is None:
- raise TProtocolException(message='Required field enableGrantOption is unset!')
return
def __repr__(self):
@@ -495,12 +397,11 @@ class TRatisConfig(object):
- schemaRegionLogForceSyncNum
- schemaRegionPeriodicSnapshotInterval
- dataRegionPeriodicSnapshotInterval
- - ratisTransferLeaderTimeoutMs
"""
- def __init__(self, schemaAppenderBufferSize=None, dataAppenderBufferSize=None, schemaSnapshotTriggerThreshold=None, dataSnapshotTriggerThreshold=None, schemaLogUnsafeFlushEnable=None, dataLogUnsafeFlushEnable=None, schemaLogSegmentSizeMax=None, dataLogSegmentSizeMax=None, schemaGrpcFlowControlWindow=None, dataGrpcFlowControlWindow=None, schemaLeaderElectionTimeoutMin=None, dataLeaderElectionTimeoutMin=None, schemaLeaderElectionTimeoutMax=None, dataLeaderElectionTimeoutMax=None, schem [...]
+ def __init__(self, schemaAppenderBufferSize=None, dataAppenderBufferSize=None, schemaSnapshotTriggerThreshold=None, dataSnapshotTriggerThreshold=None, schemaLogUnsafeFlushEnable=None, dataLogUnsafeFlushEnable=None, schemaLogSegmentSizeMax=None, dataLogSegmentSizeMax=None, schemaGrpcFlowControlWindow=None, dataGrpcFlowControlWindow=None, schemaLeaderElectionTimeoutMin=None, dataLeaderElectionTimeoutMin=None, schemaLeaderElectionTimeoutMax=None, dataLeaderElectionTimeoutMax=None, schem [...]
self.schemaAppenderBufferSize = schemaAppenderBufferSize
self.dataAppenderBufferSize = dataAppenderBufferSize
self.schemaSnapshotTriggerThreshold = schemaSnapshotTriggerThreshold
@@ -535,7 +436,6 @@ class TRatisConfig(object):
self.schemaRegionLogForceSyncNum = schemaRegionLogForceSyncNum
self.schemaRegionPeriodicSnapshotInterval = schemaRegionPeriodicSnapshotInterval
self.dataRegionPeriodicSnapshotInterval = dataRegionPeriodicSnapshotInterval
- self.ratisTransferLeaderTimeoutMs = ratisTransferLeaderTimeoutMs
def read(self, iprot):
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
@@ -716,11 +616,6 @@ class TRatisConfig(object):
self.dataRegionPeriodicSnapshotInterval = iprot.readI64()
else:
iprot.skip(ftype)
- elif fid == 35:
- if ftype == TType.I32:
- self.ratisTransferLeaderTimeoutMs = iprot.readI32()
- else:
- iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -867,10 +762,6 @@ class TRatisConfig(object):
oprot.writeFieldBegin('dataRegionPeriodicSnapshotInterval', TType.I64, 34)
oprot.writeI64(self.dataRegionPeriodicSnapshotInterval)
oprot.writeFieldEnd()
- if self.ratisTransferLeaderTimeoutMs is not None:
- oprot.writeFieldBegin('ratisTransferLeaderTimeoutMs', TType.I32, 35)
- oprot.writeI32(self.ratisTransferLeaderTimeoutMs)
- oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -943,8 +834,6 @@ class TRatisConfig(object):
raise TProtocolException(message='Required field schemaRegionPeriodicSnapshotInterval is unset!')
if self.dataRegionPeriodicSnapshotInterval is None:
raise TProtocolException(message='Required field dataRegionPeriodicSnapshotInterval is unset!')
- if self.ratisTransferLeaderTimeoutMs is None:
- raise TProtocolException(message='Required field ratisTransferLeaderTimeoutMs is unset!')
return
def __repr__(self):
@@ -1028,14 +917,11 @@ class TRuntimeConfiguration(object):
- allPipeInformation
- clusterId
- tableInfo
- - auditConfig
- - superUserName
- - enableSeparationOfAdminPowers
"""
- def __init__(self, templateInfo=None, allTriggerInformation=None, allUDFInformation=None, allTTLInformation=None, allPipeInformation=None, clusterId=None, tableInfo=None, auditConfig=None, superUserName=None, enableSeparationOfAdminPowers=None,):
+ def __init__(self, templateInfo=None, allTriggerInformation=None, allUDFInformation=None, allTTLInformation=None, allPipeInformation=None, clusterId=None, tableInfo=None,):
self.templateInfo = templateInfo
self.allTriggerInformation = allTriggerInformation
self.allUDFInformation = allUDFInformation
@@ -1043,9 +929,6 @@ class TRuntimeConfiguration(object):
self.allPipeInformation = allPipeInformation
self.clusterId = clusterId
self.tableInfo = tableInfo
- self.auditConfig = auditConfig
- self.superUserName = superUserName
- self.enableSeparationOfAdminPowers = enableSeparationOfAdminPowers
def read(self, iprot):
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
@@ -1106,22 +989,6 @@ class TRuntimeConfiguration(object):
self.tableInfo = iprot.readBinary()
else:
iprot.skip(ftype)
- elif fid == 8:
- if ftype == TType.STRUCT:
- self.auditConfig = TAuditConfig()
- self.auditConfig.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 9:
- if ftype == TType.STRING:
- self.superUserName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 10:
- if ftype == TType.BOOL:
- self.enableSeparationOfAdminPowers = iprot.readBool()
- else:
- iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -1169,18 +1036,6 @@ class TRuntimeConfiguration(object):
oprot.writeFieldBegin('tableInfo', TType.STRING, 7)
oprot.writeBinary(self.tableInfo)
oprot.writeFieldEnd()
- if self.auditConfig is not None:
- oprot.writeFieldBegin('auditConfig', TType.STRUCT, 8)
- self.auditConfig.write(oprot)
- oprot.writeFieldEnd()
- if self.superUserName is not None:
- oprot.writeFieldBegin('superUserName', TType.STRING, 9)
- oprot.writeString(self.superUserName.encode('utf-8') if sys.version_info[0] == 2 else self.superUserName)
- oprot.writeFieldEnd()
- if self.enableSeparationOfAdminPowers is not None:
- oprot.writeFieldBegin('enableSeparationOfAdminPowers', TType.BOOL, 10)
- oprot.writeBool(self.enableSeparationOfAdminPowers)
- oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -1195,10 +1050,6 @@ class TRuntimeConfiguration(object):
raise TProtocolException(message='Required field allTTLInformation is unset!')
if self.allPipeInformation is None:
raise TProtocolException(message='Required field allPipeInformation is unset!')
- if self.auditConfig is None:
- raise TProtocolException(message='Required field auditConfig is unset!')
- if self.superUserName is None:
- raise TProtocolException(message='Required field superUserName is unset!')
return
def __repr__(self):
@@ -2868,16 +2719,14 @@ class TSchemaNodeManagementReq(object):
- pathPatternTree
- level
- scopePatternTree
- - needAuditDB
"""
- def __init__(self, pathPatternTree=None, level=None, scopePatternTree=None, needAuditDB=None,):
+ def __init__(self, pathPatternTree=None, level=None, scopePatternTree=None,):
self.pathPatternTree = pathPatternTree
self.level = level
self.scopePatternTree = scopePatternTree
- self.needAuditDB = needAuditDB
def read(self, iprot):
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
@@ -2903,11 +2752,6 @@ class TSchemaNodeManagementReq(object):
self.scopePatternTree = iprot.readBinary()
else:
iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.BOOL:
- self.needAuditDB = iprot.readBool()
- else:
- iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -2930,10 +2774,6 @@ class TSchemaNodeManagementReq(object):
oprot.writeFieldBegin('scopePatternTree', TType.STRING, 3)
oprot.writeBinary(self.scopePatternTree)
oprot.writeFieldEnd()
- if self.needAuditDB is not None:
- oprot.writeFieldBegin('needAuditDB', TType.BOOL, 4)
- oprot.writeBool(self.needAuditDB)
- oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -4260,13 +4100,8 @@ class TExtendRegionReq(object):
if ftype == TType.STOP:
break
if fid == 1:
- if ftype == TType.LIST:
- self.regionId = []
- (_etype225, _size222) = iprot.readListBegin()
- for _i226 in range(_size222):
- _elem227 = iprot.readI32()
- self.regionId.append(_elem227)
- iprot.readListEnd()
+ if ftype == TType.I32:
+ self.regionId = iprot.readI32()
else:
iprot.skip(ftype)
elif fid == 2:
@@ -4290,11 +4125,8 @@ class TExtendRegionReq(object):
return
oprot.writeStructBegin('TExtendRegionReq')
if self.regionId is not None:
- oprot.writeFieldBegin('regionId', TType.LIST, 1)
- oprot.writeListBegin(TType.I32, len(self.regionId))
- for iter228 in self.regionId:
- oprot.writeI32(iter228)
- oprot.writeListEnd()
+ oprot.writeFieldBegin('regionId', TType.I32, 1)
+ oprot.writeI32(self.regionId)
oprot.writeFieldEnd()
if self.dataNodeId is not None:
oprot.writeFieldBegin('dataNodeId', TType.I32, 2)
@@ -4353,13 +4185,8 @@ class TRemoveRegionReq(object):
if ftype == TType.STOP:
break
if fid == 1:
- if ftype == TType.LIST:
- self.regionId = []
- (_etype232, _size229) = iprot.readListBegin()
- for _i233 in range(_size229):
- _elem234 = iprot.readI32()
- self.regionId.append(_elem234)
- iprot.readListEnd()
+ if ftype == TType.I32:
+ self.regionId = iprot.readI32()
else:
iprot.skip(ftype)
elif fid == 2:
@@ -4383,11 +4210,8 @@ class TRemoveRegionReq(object):
return
oprot.writeStructBegin('TRemoveRegionReq')
if self.regionId is not None:
- oprot.writeFieldBegin('regionId', TType.LIST, 1)
- oprot.writeListBegin(TType.I32, len(self.regionId))
- for iter235 in self.regionId:
- oprot.writeI32(iter235)
- oprot.writeListEnd()
+ oprot.writeFieldBegin('regionId', TType.I32, 1)
+ oprot.writeI32(self.regionId)
oprot.writeFieldEnd()
if self.dataNodeId is not None:
oprot.writeFieldBegin('dataNodeId', TType.I32, 2)
@@ -4432,13 +4256,11 @@ class TAuthorizerReq(object):
- permissions
- grantOpt
- nodeNameList
- - executedByUserID
- - newUsername
"""
- def __init__(self, authorType=None, userName=None, roleName=None, password=None, newPassword=None, permissions=None, grantOpt=None, nodeNameList=None, executedByUserID=None, newUsername=None,):
+ def __init__(self, authorType=None, userName=None, roleName=None, password=None, newPassword=None, permissions=None, grantOpt=None, nodeNameList=None,):
self.authorType = authorType
self.userName = userName
self.roleName = roleName
@@ -4447,8 +4269,6 @@ class TAuthorizerReq(object):
self.permissions = permissions
self.grantOpt = grantOpt
self.nodeNameList = nodeNameList
- self.executedByUserID = executedByUserID
- self.newUsername = newUsername
def read(self, iprot):
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
@@ -4487,10 +4307,10 @@ class TAuthorizerReq(object):
elif fid == 6:
if ftype == TType.SET:
self.permissions = set()
- (_etype239, _size236) = iprot.readSetBegin()
- for _i240 in range(_size236):
- _elem241 = iprot.readI32()
- self.permissions.add(_elem241)
+ (_etype225, _size222) = iprot.readSetBegin()
+ for _i226 in range(_size222):
+ _elem227 = iprot.readI32()
+ self.permissions.add(_elem227)
iprot.readSetEnd()
else:
iprot.skip(ftype)
@@ -4504,16 +4324,6 @@ class TAuthorizerReq(object):
self.nodeNameList = iprot.readBinary()
else:
iprot.skip(ftype)
- elif fid == 9:
- if ftype == TType.I64:
- self.executedByUserID = iprot.readI64()
- else:
- iprot.skip(ftype)
- elif fid == 10:
- if ftype == TType.STRING:
- self.newUsername = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- else:
- iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -4547,8 +4357,8 @@ class TAuthorizerReq(object):
if self.permissions is not None:
oprot.writeFieldBegin('permissions', TType.SET, 6)
oprot.writeSetBegin(TType.I32, len(self.permissions))
- for iter242 in self.permissions:
- oprot.writeI32(iter242)
+ for iter228 in self.permissions:
+ oprot.writeI32(iter228)
oprot.writeSetEnd()
oprot.writeFieldEnd()
if self.grantOpt is not None:
@@ -4559,14 +4369,6 @@ class TAuthorizerReq(object):
oprot.writeFieldBegin('nodeNameList', TType.STRING, 8)
oprot.writeBinary(self.nodeNameList)
oprot.writeFieldEnd()
- if self.executedByUserID is not None:
- oprot.writeFieldBegin('executedByUserID', TType.I64, 9)
- oprot.writeI64(self.executedByUserID)
- oprot.writeFieldEnd()
- if self.newUsername is not None:
- oprot.writeFieldBegin('newUsername', TType.STRING, 10)
- oprot.writeString(self.newUsername.encode('utf-8') if sys.version_info[0] == 2 else self.newUsername)
- oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -4587,10 +4389,6 @@ class TAuthorizerReq(object):
raise TProtocolException(message='Required field grantOpt is unset!')
if self.nodeNameList is None:
raise TProtocolException(message='Required field nodeNameList is unset!')
- if self.executedByUserID is None:
- raise TProtocolException(message='Required field executedByUserID is unset!')
- if self.newUsername is None:
- raise TProtocolException(message='Required field newUsername is unset!')
return
def __repr__(self):
@@ -4616,13 +4414,11 @@ class TAuthorizerRelationalReq(object):
- table
- permissions
- grantOpt
- - executedByUserID
- - newUsername
"""
- def __init__(self, authorType=None, userName=None, roleName=None, password=None, database=None, table=None, permissions=None, grantOpt=None, executedByUserID=None, newUsername=None,):
+ def __init__(self, authorType=None, userName=None, roleName=None, password=None, database=None, table=None, permissions=None, grantOpt=None,):
self.authorType = authorType
self.userName = userName
self.roleName = roleName
@@ -4631,8 +4427,6 @@ class TAuthorizerRelationalReq(object):
self.table = table
self.permissions = permissions
self.grantOpt = grantOpt
- self.executedByUserID = executedByUserID
- self.newUsername = newUsername
def read(self, iprot):
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
@@ -4676,10 +4470,10 @@ class TAuthorizerRelationalReq(object):
elif fid == 7:
if ftype == TType.SET:
self.permissions = set()
- (_etype246, _size243) = iprot.readSetBegin()
- for _i247 in range(_size243):
- _elem248 = iprot.readI32()
- self.permissions.add(_elem248)
+ (_etype232, _size229) = iprot.readSetBegin()
+ for _i233 in range(_size229):
+ _elem234 = iprot.readI32()
+ self.permissions.add(_elem234)
iprot.readSetEnd()
else:
iprot.skip(ftype)
@@ -4688,16 +4482,6 @@ class TAuthorizerRelationalReq(object):
self.grantOpt = iprot.readBool()
else:
iprot.skip(ftype)
- elif fid == 9:
- if ftype == TType.I64:
- self.executedByUserID = iprot.readI64()
- else:
- iprot.skip(ftype)
- elif fid == 10:
- if ftype == TType.STRING:
- self.newUsername = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- else:
- iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -4735,22 +4519,14 @@ class TAuthorizerRelationalReq(object):
if self.permissions is not None:
oprot.writeFieldBegin('permissions', TType.SET, 7)
oprot.writeSetBegin(TType.I32, len(self.permissions))
- for iter249 in self.permissions:
- oprot.writeI32(iter249)
+ for iter235 in self.permissions:
+ oprot.writeI32(iter235)
oprot.writeSetEnd()
oprot.writeFieldEnd()
if self.grantOpt is not None:
oprot.writeFieldBegin('grantOpt', TType.BOOL, 8)
oprot.writeBool(self.grantOpt)
oprot.writeFieldEnd()
- if self.executedByUserID is not None:
- oprot.writeFieldBegin('executedByUserID', TType.I64, 9)
- oprot.writeI64(self.executedByUserID)
- oprot.writeFieldEnd()
- if self.newUsername is not None:
- oprot.writeFieldBegin('newUsername', TType.STRING, 10)
- oprot.writeString(self.newUsername.encode('utf-8') if sys.version_info[0] == 2 else self.newUsername)
- oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -4771,10 +4547,6 @@ class TAuthorizerRelationalReq(object):
raise TProtocolException(message='Required field permissions is unset!')
if self.grantOpt is None:
raise TProtocolException(message='Required field grantOpt is unset!')
- if self.executedByUserID is None:
- raise TProtocolException(message='Required field executedByUserID is unset!')
- if self.newUsername is None:
- raise TProtocolException(message='Required field newUsername is unset!')
return
def __repr__(self):
@@ -4796,17 +4568,15 @@ class TAuthorizerResp(object):
- tag
- memberInfo
- permissionInfo
- - usersInfo
"""
- def __init__(self, status=None, tag=None, memberInfo=None, permissionInfo=None, usersInfo=None,):
+ def __init__(self, status=None, tag=None, memberInfo=None, permissionInfo=None,):
self.status = status
self.tag = tag
self.memberInfo = memberInfo
self.permissionInfo = permissionInfo
- self.usersInfo = usersInfo
def read(self, iprot):
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
@@ -4831,10 +4601,10 @@ class TAuthorizerResp(object):
elif fid == 3:
if ftype == TType.LIST:
self.memberInfo = []
- (_etype253, _size250) = iprot.readListBegin()
- for _i254 in range(_size250):
- _elem255 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.memberInfo.append(_elem255)
+ (_etype239, _size236) = iprot.readListBegin()
+ for _i240 in range(_size236):
+ _elem241 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ self.memberInfo.append(_elem241)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -4844,17 +4614,6 @@ class TAuthorizerResp(object):
self.permissionInfo.read(iprot)
else:
iprot.skip(ftype)
- elif fid == 5:
- if ftype == TType.LIST:
- self.usersInfo = []
- (_etype259, _size256) = iprot.readListBegin()
- for _i260 in range(_size256):
- _elem261 = TListUserInfo()
- _elem261.read(iprot)
- self.usersInfo.append(_elem261)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -4876,21 +4635,14 @@ class TAuthorizerResp(object):
if self.memberInfo is not None:
oprot.writeFieldBegin('memberInfo', TType.LIST, 3)
oprot.writeListBegin(TType.STRING, len(self.memberInfo))
- for iter262 in self.memberInfo:
- oprot.writeString(iter262.encode('utf-8') if sys.version_info[0] == 2 else iter262)
+ for iter242 in self.memberInfo:
+ oprot.writeString(iter242.encode('utf-8') if sys.version_info[0] == 2 else iter242)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.permissionInfo is not None:
oprot.writeFieldBegin('permissionInfo', TType.STRUCT, 4)
self.permissionInfo.write(oprot)
oprot.writeFieldEnd()
- if self.usersInfo is not None:
- oprot.writeFieldBegin('usersInfo', TType.LIST, 5)
- oprot.writeListBegin(TType.STRUCT, len(self.usersInfo))
- for iter263 in self.usersInfo:
- iter263.write(oprot)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -4911,104 +4663,6 @@ class TAuthorizerResp(object):
return not (self == other)
-class TListUserInfo(object):
- """
- Attributes:
- - userId
- - username
- - maxSessionPerUser
- - minSessionPerUser
-
- """
-
-
- def __init__(self, userId=None, username=None, maxSessionPerUser=None, minSessionPerUser=None,):
- self.userId = userId
- self.username = username
- self.maxSessionPerUser = maxSessionPerUser
- self.minSessionPerUser = minSessionPerUser
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.I64:
- self.userId = iprot.readI64()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.username = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.I32:
- self.maxSessionPerUser = iprot.readI32()
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.I32:
- self.minSessionPerUser = iprot.readI32()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('TListUserInfo')
- if self.userId is not None:
- oprot.writeFieldBegin('userId', TType.I64, 1)
- oprot.writeI64(self.userId)
- oprot.writeFieldEnd()
- if self.username is not None:
- oprot.writeFieldBegin('username', TType.STRING, 2)
- oprot.writeString(self.username.encode('utf-8') if sys.version_info[0] == 2 else self.username)
- oprot.writeFieldEnd()
- if self.maxSessionPerUser is not None:
- oprot.writeFieldBegin('maxSessionPerUser', TType.I32, 3)
- oprot.writeI32(self.maxSessionPerUser)
- oprot.writeFieldEnd()
- if self.minSessionPerUser is not None:
- oprot.writeFieldBegin('minSessionPerUser', TType.I32, 4)
- oprot.writeI32(self.minSessionPerUser)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.userId is None:
- raise TProtocolException(message='Required field userId is unset!')
- if self.username is None:
- raise TProtocolException(message='Required field username is unset!')
- if self.maxSessionPerUser is None:
- raise TProtocolException(message='Required field maxSessionPerUser is unset!')
- if self.minSessionPerUser is None:
- raise TProtocolException(message='Required field minSessionPerUser is unset!')
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-
class TUserResp(object):
"""
Attributes:
@@ -5016,17 +4670,15 @@ class TUserResp(object):
- password
- roleSet
- isOpenIdUser
- - userId
"""
- def __init__(self, permissionInfo=None, password=None, roleSet=None, isOpenIdUser=None, userId=None,):
+ def __init__(self, permissionInfo=None, password=None, roleSet=None, isOpenIdUser=None,):
self.permissionInfo = permissionInfo
self.password = password
self.roleSet = roleSet
self.isOpenIdUser = isOpenIdUser
- self.userId = userId
def read(self, iprot):
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
@@ -5051,10 +4703,10 @@ class TUserResp(object):
elif fid == 3:
if ftype == TType.SET:
self.roleSet = set()
- (_etype267, _size264) = iprot.readSetBegin()
- for _i268 in range(_size264):
- _elem269 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.roleSet.add(_elem269)
+ (_etype246, _size243) = iprot.readSetBegin()
+ for _i247 in range(_size243):
+ _elem248 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ self.roleSet.add(_elem248)
iprot.readSetEnd()
else:
iprot.skip(ftype)
@@ -5063,11 +4715,6 @@ class TUserResp(object):
self.isOpenIdUser = iprot.readBool()
else:
iprot.skip(ftype)
- elif fid == 5:
- if ftype == TType.I64:
- self.userId = iprot.readI64()
- else:
- iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -5089,18 +4736,14 @@ class TUserResp(object):
if self.roleSet is not None:
oprot.writeFieldBegin('roleSet', TType.SET, 3)
oprot.writeSetBegin(TType.STRING, len(self.roleSet))
- for iter270 in self.roleSet:
- oprot.writeString(iter270.encode('utf-8') if sys.version_info[0] == 2 else iter270)
+ for iter249 in self.roleSet:
+ oprot.writeString(iter249.encode('utf-8') if sys.version_info[0] == 2 else iter249)
oprot.writeSetEnd()
oprot.writeFieldEnd()
if self.isOpenIdUser is not None:
oprot.writeFieldBegin('isOpenIdUser', TType.BOOL, 4)
oprot.writeBool(self.isOpenIdUser)
oprot.writeFieldEnd()
- if self.userId is not None:
- oprot.writeFieldBegin('userId', TType.I64, 5)
- oprot.writeI64(self.userId)
- oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -5113,8 +4756,6 @@ class TUserResp(object):
raise TProtocolException(message='Required field roleSet is unset!')
if self.isOpenIdUser is None:
raise TProtocolException(message='Required field isOpenIdUser is unset!')
- if self.userId is None:
- raise TProtocolException(message='Required field userId is unset!')
return
def __repr__(self):
@@ -5169,63 +4810,63 @@ class TRoleResp(object):
elif fid == 2:
if ftype == TType.LIST:
self.privilegeList = []
- (_etype274, _size271) = iprot.readListBegin()
- for _i275 in range(_size271):
- _elem276 = TPathPrivilege()
- _elem276.read(iprot)
- self.privilegeList.append(_elem276)
+ (_etype253, _size250) = iprot.readListBegin()
+ for _i254 in range(_size250):
+ _elem255 = TPathPrivilege()
+ _elem255.read(iprot)
+ self.privilegeList.append(_elem255)
iprot.readListEnd()
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.SET:
self.sysPriSet = set()
- (_etype280, _size277) = iprot.readSetBegin()
- for _i281 in range(_size277):
- _elem282 = iprot.readI32()
- self.sysPriSet.add(_elem282)
+ (_etype259, _size256) = iprot.readSetBegin()
+ for _i260 in range(_size256):
+ _elem261 = iprot.readI32()
+ self.sysPriSet.add(_elem261)
iprot.readSetEnd()
else:
iprot.skip(ftype)
elif fid == 4:
if ftype == TType.SET:
self.sysPriSetGrantOpt = set()
- (_etype286, _size283) = iprot.readSetBegin()
- for _i287 in range(_size283):
- _elem288 = iprot.readI32()
- self.sysPriSetGrantOpt.add(_elem288)
+ (_etype265, _size262) = iprot.readSetBegin()
+ for _i266 in range(_size262):
+ _elem267 = iprot.readI32()
+ self.sysPriSetGrantOpt.add(_elem267)
iprot.readSetEnd()
else:
iprot.skip(ftype)
elif fid == 5:
if ftype == TType.MAP:
self.dbPrivilegeMap = {}
- (_ktype290, _vtype291, _size289) = iprot.readMapBegin()
- for _i293 in range(_size289):
- _key294 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val295 = TDBPrivilege()
- _val295.read(iprot)
- self.dbPrivilegeMap[_key294] = _val295
+ (_ktype269, _vtype270, _size268) = iprot.readMapBegin()
+ for _i272 in range(_size268):
+ _key273 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ _val274 = TDBPrivilege()
+ _val274.read(iprot)
+ self.dbPrivilegeMap[_key273] = _val274
iprot.readMapEnd()
else:
iprot.skip(ftype)
elif fid == 6:
if ftype == TType.SET:
self.anyScopeSet = set()
- (_etype299, _size296) = iprot.readSetBegin()
- for _i300 in range(_size296):
- _elem301 = iprot.readI32()
- self.anyScopeSet.add(_elem301)
+ (_etype278, _size275) = iprot.readSetBegin()
+ for _i279 in range(_size275):
+ _elem280 = iprot.readI32()
+ self.anyScopeSet.add(_elem280)
iprot.readSetEnd()
else:
iprot.skip(ftype)
elif fid == 7:
if ftype == TType.SET:
self.anyScopeGrantSet = set()
- (_etype305, _size302) = iprot.readSetBegin()
- for _i306 in range(_size302):
- _elem307 = iprot.readI32()
- self.anyScopeGrantSet.add(_elem307)
+ (_etype284, _size281) = iprot.readSetBegin()
+ for _i285 in range(_size281):
+ _elem286 = iprot.readI32()
+ self.anyScopeGrantSet.add(_elem286)
iprot.readSetEnd()
else:
iprot.skip(ftype)
@@ -5246,44 +4887,44 @@ class TRoleResp(object):
if self.privilegeList is not None:
oprot.writeFieldBegin('privilegeList', TType.LIST, 2)
oprot.writeListBegin(TType.STRUCT, len(self.privilegeList))
- for iter308 in self.privilegeList:
- iter308.write(oprot)
+ for iter287 in self.privilegeList:
+ iter287.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.sysPriSet is not None:
oprot.writeFieldBegin('sysPriSet', TType.SET, 3)
oprot.writeSetBegin(TType.I32, len(self.sysPriSet))
- for iter309 in self.sysPriSet:
- oprot.writeI32(iter309)
+ for iter288 in self.sysPriSet:
+ oprot.writeI32(iter288)
oprot.writeSetEnd()
oprot.writeFieldEnd()
if self.sysPriSetGrantOpt is not None:
oprot.writeFieldBegin('sysPriSetGrantOpt', TType.SET, 4)
oprot.writeSetBegin(TType.I32, len(self.sysPriSetGrantOpt))
- for iter310 in self.sysPriSetGrantOpt:
- oprot.writeI32(iter310)
+ for iter289 in self.sysPriSetGrantOpt:
+ oprot.writeI32(iter289)
oprot.writeSetEnd()
oprot.writeFieldEnd()
if self.dbPrivilegeMap is not None:
oprot.writeFieldBegin('dbPrivilegeMap', TType.MAP, 5)
oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.dbPrivilegeMap))
- for kiter311, viter312 in self.dbPrivilegeMap.items():
- oprot.writeString(kiter311.encode('utf-8') if sys.version_info[0] == 2 else kiter311)
- viter312.write(oprot)
+ for kiter290, viter291 in self.dbPrivilegeMap.items():
+ oprot.writeString(kiter290.encode('utf-8') if sys.version_info[0] == 2 else kiter290)
+ viter291.write(oprot)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.anyScopeSet is not None:
oprot.writeFieldBegin('anyScopeSet', TType.SET, 6)
oprot.writeSetBegin(TType.I32, len(self.anyScopeSet))
- for iter313 in self.anyScopeSet:
- oprot.writeI32(iter313)
+ for iter292 in self.anyScopeSet:
+ oprot.writeI32(iter292)
oprot.writeSetEnd()
oprot.writeFieldEnd()
if self.anyScopeGrantSet is not None:
oprot.writeFieldBegin('anyScopeGrantSet', TType.SET, 7)
oprot.writeSetBegin(TType.I32, len(self.anyScopeGrantSet))
- for iter314 in self.anyScopeGrantSet:
- oprot.writeI32(iter314)
+ for iter293 in self.anyScopeGrantSet:
+ oprot.writeI32(iter293)
oprot.writeSetEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -5350,20 +4991,20 @@ class TPathPrivilege(object):
elif fid == 2:
if ftype == TType.SET:
self.priSet = set()
- (_etype318, _size315) = iprot.readSetBegin()
- for _i319 in range(_size315):
- _elem320 = iprot.readI32()
- self.priSet.add(_elem320)
+ (_etype297, _size294) = iprot.readSetBegin()
+ for _i298 in range(_size294):
+ _elem299 = iprot.readI32()
+ self.priSet.add(_elem299)
iprot.readSetEnd()
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.SET:
self.priGrantOpt = set()
- (_etype324, _size321) = iprot.readSetBegin()
- for _i325 in range(_size321):
- _elem326 = iprot.readI32()
- self.priGrantOpt.add(_elem326)
+ (_etype303, _size300) = iprot.readSetBegin()
+ for _i304 in range(_size300):
+ _elem305 = iprot.readI32()
+ self.priGrantOpt.add(_elem305)
iprot.readSetEnd()
else:
iprot.skip(ftype)
@@ -5384,15 +5025,15 @@ class TPathPrivilege(object):
if self.priSet is not None:
oprot.writeFieldBegin('priSet', TType.SET, 2)
oprot.writeSetBegin(TType.I32, len(self.priSet))
- for iter327 in self.priSet:
- oprot.writeI32(iter327)
+ for iter306 in self.priSet:
+ oprot.writeI32(iter306)
oprot.writeSetEnd()
oprot.writeFieldEnd()
if self.priGrantOpt is not None:
oprot.writeFieldBegin('priGrantOpt', TType.SET, 3)
oprot.writeSetBegin(TType.I32, len(self.priGrantOpt))
- for iter328 in self.priGrantOpt:
- oprot.writeI32(iter328)
+ for iter307 in self.priGrantOpt:
+ oprot.writeI32(iter307)
oprot.writeSetEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -5451,20 +5092,20 @@ class TTablePrivilege(object):
elif fid == 2:
if ftype == TType.SET:
self.privileges = set()
- (_etype332, _size329) = iprot.readSetBegin()
- for _i333 in range(_size329):
- _elem334 = iprot.readI32()
- self.privileges.add(_elem334)
+ (_etype311, _size308) = iprot.readSetBegin()
+ for _i312 in range(_size308):
+ _elem313 = iprot.readI32()
+ self.privileges.add(_elem313)
iprot.readSetEnd()
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.SET:
self.grantOption = set()
- (_etype338, _size335) = iprot.readSetBegin()
- for _i339 in range(_size335):
- _elem340 = iprot.readI32()
- self.grantOption.add(_elem340)
+ (_etype317, _size314) = iprot.readSetBegin()
+ for _i318 in range(_size314):
+ _elem319 = iprot.readI32()
+ self.grantOption.add(_elem319)
iprot.readSetEnd()
else:
iprot.skip(ftype)
@@ -5485,15 +5126,15 @@ class TTablePrivilege(object):
if self.privileges is not None:
oprot.writeFieldBegin('privileges', TType.SET, 2)
oprot.writeSetBegin(TType.I32, len(self.privileges))
- for iter341 in self.privileges:
- oprot.writeI32(iter341)
+ for iter320 in self.privileges:
+ oprot.writeI32(iter320)
oprot.writeSetEnd()
oprot.writeFieldEnd()
if self.grantOption is not None:
oprot.writeFieldBegin('grantOption', TType.SET, 3)
oprot.writeSetBegin(TType.I32, len(self.grantOption))
- for iter342 in self.grantOption:
- oprot.writeI32(iter342)
+ for iter321 in self.grantOption:
+ oprot.writeI32(iter321)
oprot.writeSetEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -5554,32 +5195,32 @@ class TDBPrivilege(object):
elif fid == 2:
if ftype == TType.SET:
self.privileges = set()
- (_etype346, _size343) = iprot.readSetBegin()
- for _i347 in range(_size343):
- _elem348 = iprot.readI32()
- self.privileges.add(_elem348)
+ (_etype325, _size322) = iprot.readSetBegin()
+ for _i326 in range(_size322):
+ _elem327 = iprot.readI32()
+ self.privileges.add(_elem327)
iprot.readSetEnd()
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.SET:
self.grantOpt = set()
- (_etype352, _size349) = iprot.readSetBegin()
- for _i353 in range(_size349):
- _elem354 = iprot.readI32()
- self.grantOpt.add(_elem354)
+ (_etype331, _size328) = iprot.readSetBegin()
+ for _i332 in range(_size328):
+ _elem333 = iprot.readI32()
+ self.grantOpt.add(_elem333)
iprot.readSetEnd()
else:
iprot.skip(ftype)
elif fid == 4:
if ftype == TType.MAP:
self.tablePrivilegeMap = {}
- (_ktype356, _vtype357, _size355) = iprot.readMapBegin()
- for _i359 in range(_size355):
- _key360 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val361 = TTablePrivilege()
- _val361.read(iprot)
- self.tablePrivilegeMap[_key360] = _val361
+ (_ktype335, _vtype336, _size334) = iprot.readMapBegin()
+ for _i338 in range(_size334):
+ _key339 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ _val340 = TTablePrivilege()
+ _val340.read(iprot)
+ self.tablePrivilegeMap[_key339] = _val340
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -5600,23 +5241,23 @@ class TDBPrivilege(object):
if self.privileges is not None:
oprot.writeFieldBegin('privileges', TType.SET, 2)
oprot.writeSetBegin(TType.I32, len(self.privileges))
- for iter362 in self.privileges:
- oprot.writeI32(iter362)
+ for iter341 in self.privileges:
+ oprot.writeI32(iter341)
oprot.writeSetEnd()
oprot.writeFieldEnd()
if self.grantOpt is not None:
oprot.writeFieldBegin('grantOpt', TType.SET, 3)
oprot.writeSetBegin(TType.I32, len(self.grantOpt))
- for iter363 in self.grantOpt:
- oprot.writeI32(iter363)
+ for iter342 in self.grantOpt:
+ oprot.writeI32(iter342)
oprot.writeSetEnd()
oprot.writeFieldEnd()
if self.tablePrivilegeMap is not None:
oprot.writeFieldBegin('tablePrivilegeMap', TType.MAP, 4)
oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.tablePrivilegeMap))
- for kiter364, viter365 in self.tablePrivilegeMap.items():
- oprot.writeString(kiter364.encode('utf-8') if sys.version_info[0] == 2 else kiter364)
- viter365.write(oprot)
+ for kiter343, viter344 in self.tablePrivilegeMap.items():
+ oprot.writeString(kiter343.encode('utf-8') if sys.version_info[0] == 2 else kiter343)
+ viter344.write(oprot)
oprot.writeMapEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -5680,10 +5321,10 @@ class TPermissionInfoResp(object):
elif fid == 2:
if ftype == TType.LIST:
self.failPos = []
- (_etype369, _size366) = iprot.readListBegin()
- for _i370 in range(_size366):
- _elem371 = iprot.readI32()
- self.failPos.append(_elem371)
+ (_etype348, _size345) = iprot.readListBegin()
+ for _i349 in range(_size345):
+ _elem350 = iprot.readI32()
+ self.failPos.append(_elem350)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -5696,12 +5337,12 @@ class TPermissionInfoResp(object):
elif fid == 4:
if ftype == TType.MAP:
self.roleInfo = {}
- (_ktype373, _vtype374, _size372) = iprot.readMapBegin()
- for _i376 in range(_size372):
- _key377 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val378 = TRoleResp()
- _val378.read(iprot)
- self.roleInfo[_key377] = _val378
+ (_ktype352, _vtype353, _size351) = iprot.readMapBegin()
+ for _i355 in range(_size351):
+ _key356 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ _val357 = TRoleResp()
+ _val357.read(iprot)
+ self.roleInfo[_key356] = _val357
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -5722,8 +5363,8 @@ class TPermissionInfoResp(object):
if self.failPos is not None:
oprot.writeFieldBegin('failPos', TType.LIST, 2)
oprot.writeListBegin(TType.I32, len(self.failPos))
- for iter379 in self.failPos:
- oprot.writeI32(iter379)
+ for iter358 in self.failPos:
+ oprot.writeI32(iter358)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.userInfo is not None:
@@ -5733,9 +5374,9 @@ class TPermissionInfoResp(object):
if self.roleInfo is not None:
oprot.writeFieldBegin('roleInfo', TType.MAP, 4)
oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.roleInfo))
- for kiter380, viter381 in self.roleInfo.items():
- oprot.writeString(kiter380.encode('utf-8') if sys.version_info[0] == 2 else kiter380)
- viter381.write(oprot)
+ for kiter359, viter360 in self.roleInfo.items():
+ oprot.writeString(kiter359.encode('utf-8') if sys.version_info[0] == 2 else kiter359)
+ viter360.write(oprot)
oprot.writeMapEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -6682,11 +6323,11 @@ class TAddConsensusGroupReq(object):
if fid == 1:
if ftype == TType.LIST:
self.configNodeList = []
- (_etype385, _size382) = iprot.readListBegin()
- for _i386 in range(_size382):
- _elem387 = iotdb.thrift.common.ttypes.TConfigNodeLocation()
- _elem387.read(iprot)
- self.configNodeList.append(_elem387)
+ (_etype364, _size361) = iprot.readListBegin()
+ for _i365 in range(_size361):
+ _elem366 = iotdb.thrift.common.ttypes.TConfigNodeLocation()
+ _elem366.read(iprot)
+ self.configNodeList.append(_elem366)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -6703,8 +6344,8 @@ class TAddConsensusGroupReq(object):
if self.configNodeList is not None:
oprot.writeFieldBegin('configNodeList', TType.LIST, 1)
oprot.writeListBegin(TType.STRUCT, len(self.configNodeList))
- for iter388 in self.configNodeList:
- iter388.write(oprot)
+ for iter367 in self.configNodeList:
+ iter367.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -7027,10 +6668,10 @@ class TGetUDFTableResp(object):
elif fid == 2:
if ftype == TType.LIST:
self.allUDFInformation = []
- (_etype392, _size389) = iprot.readListBegin()
- for _i393 in range(_size389):
- _elem394 = iprot.readBinary()
- self.allUDFInformation.append(_elem394)
+ (_etype371, _size368) = iprot.readListBegin()
+ for _i372 in range(_size368):
+ _elem373 = iprot.readBinary()
+ self.allUDFInformation.append(_elem373)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -7051,8 +6692,8 @@ class TGetUDFTableResp(object):
if self.allUDFInformation is not None:
oprot.writeFieldBegin('allUDFInformation', TType.LIST, 2)
oprot.writeListBegin(TType.STRING, len(self.allUDFInformation))
- for iter395 in self.allUDFInformation:
- oprot.writeBinary(iter395)
+ for iter374 in self.allUDFInformation:
+ oprot.writeBinary(iter374)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -7147,11 +6788,11 @@ class TCreateTriggerReq(object):
elif fid == 6:
if ftype == TType.MAP:
self.attributes = {}
- (_ktype397, _vtype398, _size396) = iprot.readMapBegin()
- for _i400 in range(_size396):
- _key401 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val402 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.attributes[_key401] = _val402
+ (_ktype376, _vtype377, _size375) = iprot.readMapBegin()
+ for _i379 in range(_size375):
+ _key380 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ _val381 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ self.attributes[_key380] = _val381
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -7218,9 +6859,9 @@ class TCreateTriggerReq(object):
if self.attributes is not None:
oprot.writeFieldBegin('attributes', TType.MAP, 6)
oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes))
- for kiter403, viter404 in self.attributes.items():
- oprot.writeString(kiter403.encode('utf-8') if sys.version_info[0] == 2 else kiter403)
- oprot.writeString(viter404.encode('utf-8') if sys.version_info[0] == 2 else viter404)
+ for kiter382, viter383 in self.attributes.items():
+ oprot.writeString(kiter382.encode('utf-8') if sys.version_info[0] == 2 else kiter382)
+ oprot.writeString(viter383.encode('utf-8') if sys.version_info[0] == 2 else viter383)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.failureStrategy is not None:
@@ -7454,10 +7095,10 @@ class TGetTriggerTableResp(object):
elif fid == 2:
if ftype == TType.LIST:
self.allTriggerInformation = []
- (_etype408, _size405) = iprot.readListBegin()
- for _i409 in range(_size405):
- _elem410 = iprot.readBinary()
- self.allTriggerInformation.append(_elem410)
+ (_etype387, _size384) = iprot.readListBegin()
+ for _i388 in range(_size384):
+ _elem389 = iprot.readBinary()
+ self.allTriggerInformation.append(_elem389)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -7478,8 +7119,8 @@ class TGetTriggerTableResp(object):
if self.allTriggerInformation is not None:
oprot.writeFieldBegin('allTriggerInformation', TType.LIST, 2)
oprot.writeListBegin(TType.STRING, len(self.allTriggerInformation))
- for iter411 in self.allTriggerInformation:
- oprot.writeBinary(iter411)
+ for iter390 in self.allTriggerInformation:
+ oprot.writeBinary(iter390)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -7527,10 +7168,10 @@ class TGetJarInListReq(object):
if fid == 1:
if ftype == TType.LIST:
self.jarNameList = []
- (_etype415, _size412) = iprot.readListBegin()
- for _i416 in range(_size412):
- _elem417 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.jarNameList.append(_elem417)
+ (_etype394, _size391) = iprot.readListBegin()
+ for _i395 in range(_size391):
+ _elem396 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ self.jarNameList.append(_elem396)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -7547,8 +7188,8 @@ class TGetJarInListReq(object):
if self.jarNameList is not None:
oprot.writeFieldBegin('jarNameList', TType.LIST, 1)
oprot.writeListBegin(TType.STRING, len(self.jarNameList))
- for iter418 in self.jarNameList:
- oprot.writeString(iter418.encode('utf-8') if sys.version_info[0] == 2 else iter418)
+ for iter397 in self.jarNameList:
+ oprot.writeString(iter397.encode('utf-8') if sys.version_info[0] == 2 else iter397)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -7602,10 +7243,10 @@ class TGetJarInListResp(object):
elif fid == 2:
if ftype == TType.LIST:
self.jarList = []
- (_etype422, _size419) = iprot.readListBegin()
- for _i423 in range(_size419):
- _elem424 = iprot.readBinary()
- self.jarList.append(_elem424)
+ (_etype401, _size398) = iprot.readListBegin()
+ for _i402 in range(_size398):
+ _elem403 = iprot.readBinary()
+ self.jarList.append(_elem403)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -7626,8 +7267,8 @@ class TGetJarInListResp(object):
if self.jarList is not None:
oprot.writeFieldBegin('jarList', TType.LIST, 2)
oprot.writeListBegin(TType.STRING, len(self.jarList))
- for iter425 in self.jarList:
- oprot.writeBinary(iter425)
+ for iter404 in self.jarList:
+ oprot.writeBinary(iter404)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -7683,11 +7324,11 @@ class TGetDataNodeLocationsResp(object):
elif fid == 2:
if ftype == TType.LIST:
self.dataNodeLocationList = []
- (_etype429, _size426) = iprot.readListBegin()
- for _i430 in range(_size426):
- _elem431 = iotdb.thrift.common.ttypes.TDataNodeLocation()
- _elem431.read(iprot)
- self.dataNodeLocationList.append(_elem431)
+ (_etype408, _size405) = iprot.readListBegin()
+ for _i409 in range(_size405):
+ _elem410 = iotdb.thrift.common.ttypes.TDataNodeLocation()
+ _elem410.read(iprot)
+ self.dataNodeLocationList.append(_elem410)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -7708,8 +7349,8 @@ class TGetDataNodeLocationsResp(object):
if self.dataNodeLocationList is not None:
oprot.writeFieldBegin('dataNodeLocationList', TType.LIST, 2)
oprot.writeListBegin(TType.STRUCT, len(self.dataNodeLocationList))
- for iter432 in self.dataNodeLocationList:
- iter432.write(oprot)
+ for iter411 in self.dataNodeLocationList:
+ iter411.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -7773,56 +7414,56 @@ class TShowClusterResp(object):
elif fid == 2:
if ftype == TType.LIST:
self.configNodeList = []
- (_etype436, _size433) = iprot.readListBegin()
- for _i437 in range(_size433):
- _elem438 = iotdb.thrift.common.ttypes.TConfigNodeLocation()
- _elem438.read(iprot)
- self.configNodeList.append(_elem438)
+ (_etype415, _size412) = iprot.readListBegin()
+ for _i416 in range(_size412):
+ _elem417 = iotdb.thrift.common.ttypes.TConfigNodeLocation()
+ _elem417.read(iprot)
+ self.configNodeList.append(_elem417)
iprot.readListEnd()
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.LIST:
self.dataNodeList = []
- (_etype442, _size439) = iprot.readListBegin()
- for _i443 in range(_size439):
- _elem444 = iotdb.thrift.common.ttypes.TDataNodeLocation()
- _elem444.read(iprot)
- self.dataNodeList.append(_elem444)
+ (_etype421, _size418) = iprot.readListBegin()
+ for _i422 in range(_size418):
+ _elem423 = iotdb.thrift.common.ttypes.TDataNodeLocation()
+ _elem423.read(iprot)
+ self.dataNodeList.append(_elem423)
iprot.readListEnd()
else:
iprot.skip(ftype)
elif fid == 4:
if ftype == TType.LIST:
self.aiNodeList = []
- (_etype448, _size445) = iprot.readListBegin()
- for _i449 in range(_size445):
- _elem450 = iotdb.thrift.common.ttypes.TAINodeLocation()
- _elem450.read(iprot)
- self.aiNodeList.append(_elem450)
+ (_etype427, _size424) = iprot.readListBegin()
+ for _i428 in range(_size424):
+ _elem429 = iotdb.thrift.common.ttypes.TAINodeLocation()
+ _elem429.read(iprot)
+ self.aiNodeList.append(_elem429)
iprot.readListEnd()
else:
iprot.skip(ftype)
elif fid == 5:
if ftype == TType.MAP:
self.nodeStatus = {}
- (_ktype452, _vtype453, _size451) = iprot.readMapBegin()
- for _i455 in range(_size451):
- _key456 = iprot.readI32()
- _val457 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.nodeStatus[_key456] = _val457
+ (_ktype431, _vtype432, _size430) = iprot.readMapBegin()
+ for _i434 in range(_size430):
+ _key435 = iprot.readI32()
+ _val436 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ self.nodeStatus[_key435] = _val436
iprot.readMapEnd()
else:
iprot.skip(ftype)
elif fid == 6:
if ftype == TType.MAP:
self.nodeVersionInfo = {}
- (_ktype459, _vtype460, _size458) = iprot.readMapBegin()
- for _i462 in range(_size458):
- _key463 = iprot.readI32()
- _val464 = TNodeVersionInfo()
- _val464.read(iprot)
- self.nodeVersionInfo[_key463] = _val464
+ (_ktype438, _vtype439, _size437) = iprot.readMapBegin()
+ for _i441 in range(_size437):
+ _key442 = iprot.readI32()
+ _val443 = TNodeVersionInfo()
+ _val443.read(iprot)
+ self.nodeVersionInfo[_key442] = _val443
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -7843,38 +7484,38 @@ class TShowClusterResp(object):
if self.configNodeList is not None:
oprot.writeFieldBegin('configNodeList', TType.LIST, 2)
oprot.writeListBegin(TType.STRUCT, len(self.configNodeList))
- for iter465 in self.configNodeList:
- iter465.write(oprot)
+ for iter444 in self.configNodeList:
+ iter444.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.dataNodeList is not None:
oprot.writeFieldBegin('dataNodeList', TType.LIST, 3)
oprot.writeListBegin(TType.STRUCT, len(self.dataNodeList))
- for iter466 in self.dataNodeList:
- iter466.write(oprot)
+ for iter445 in self.dataNodeList:
+ iter445.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.aiNodeList is not None:
oprot.writeFieldBegin('aiNodeList', TType.LIST, 4)
oprot.writeListBegin(TType.STRUCT, len(self.aiNodeList))
- for iter467 in self.aiNodeList:
- iter467.write(oprot)
+ for iter446 in self.aiNodeList:
+ iter446.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.nodeStatus is not None:
oprot.writeFieldBegin('nodeStatus', TType.MAP, 5)
oprot.writeMapBegin(TType.I32, TType.STRING, len(self.nodeStatus))
- for kiter468, viter469 in self.nodeStatus.items():
- oprot.writeI32(kiter468)
- oprot.writeString(viter469.encode('utf-8') if sys.version_info[0] == 2 else viter469)
+ for kiter447, viter448 in self.nodeStatus.items():
+ oprot.writeI32(kiter447)
+ oprot.writeString(viter448.encode('utf-8') if sys.version_info[0] == 2 else viter448)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.nodeVersionInfo is not None:
oprot.writeFieldBegin('nodeVersionInfo', TType.MAP, 6)
oprot.writeMapBegin(TType.I32, TType.STRUCT, len(self.nodeVersionInfo))
- for kiter470, viter471 in self.nodeVersionInfo.items():
- oprot.writeI32(kiter470)
- viter471.write(oprot)
+ for kiter449, viter450 in self.nodeVersionInfo.items():
+ oprot.writeI32(kiter449)
+ viter450.write(oprot)
oprot.writeMapEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -8566,6 +8207,78 @@ class TAINodeInfo(object):
return not (self == other)
+class TGetAINodeLocationResp(object):
+ """
+ Attributes:
+ - status
+ - aiNodeLocation
+
+ """
+
+
+ def __init__(self, status=None, aiNodeLocation=None,):
+ self.status = status
+ self.aiNodeLocation = aiNodeLocation
+
+ def read(self, iprot):
+ if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
+ iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 1:
+ if ftype == TType.STRUCT:
+ self.status = iotdb.thrift.common.ttypes.TSStatus()
+ self.status.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.aiNodeLocation = iotdb.thrift.common.ttypes.TAINodeLocation()
+ self.aiNodeLocation.read(iprot)
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot._fast_encode is not None and self.thrift_spec is not None:
+ oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
+ return
+ oprot.writeStructBegin('TGetAINodeLocationResp')
+ if self.status is not None:
+ oprot.writeFieldBegin('status', TType.STRUCT, 1)
+ self.status.write(oprot)
+ oprot.writeFieldEnd()
+ if self.aiNodeLocation is not None:
+ oprot.writeFieldBegin('aiNodeLocation', TType.STRUCT, 2)
+ self.aiNodeLocation.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.status is None:
+ raise TProtocolException(message='Required field status is unset!')
+ return
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.items()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+
class TShowDataNodes4InformationSchemaResp(object):
"""
Attributes:
@@ -8597,11 +8310,11 @@ class TShowDataNodes4InformationSchemaResp(object):
elif fid == 2:
if ftype == TType.LIST:
self.dataNodesInfoList = []
- (_etype475, _size472) = iprot.readListBegin()
- for _i476 in range(_size472):
- _elem477 = TDataNodeInfo4InformationSchema()
- _elem477.read(iprot)
- self.dataNodesInfoList.append(_elem477)
+ (_etype454, _size451) = iprot.readListBegin()
+ for _i455 in range(_size451):
+ _elem456 = TDataNodeInfo4InformationSchema()
+ _elem456.read(iprot)
+ self.dataNodesInfoList.append(_elem456)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -8622,8 +8335,8 @@ class TShowDataNodes4InformationSchemaResp(object):
if self.dataNodesInfoList is not None:
oprot.writeFieldBegin('dataNodesInfoList', TType.LIST, 2)
oprot.writeListBegin(TType.STRUCT, len(self.dataNodesInfoList))
- for iter478 in self.dataNodesInfoList:
- iter478.write(oprot)
+ for iter457 in self.dataNodesInfoList:
+ iter457.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -8677,11 +8390,11 @@ class TShowDataNodesResp(object):
elif fid == 2:
if ftype == TType.LIST:
self.dataNodesInfoList = []
- (_etype482, _size479) = iprot.readListBegin()
- for _i483 in range(_size479):
- _elem484 = TDataNodeInfo()
- _elem484.read(iprot)
- self.dataNodesInfoList.append(_elem484)
+ (_etype461, _size458) = iprot.readListBegin()
+ for _i462 in range(_size458):
+ _elem463 = TDataNodeInfo()
+ _elem463.read(iprot)
+ self.dataNodesInfoList.append(_elem463)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -8702,8 +8415,8 @@ class TShowDataNodesResp(object):
if self.dataNodesInfoList is not None:
oprot.writeFieldBegin('dataNodesInfoList', TType.LIST, 2)
oprot.writeListBegin(TType.STRUCT, len(self.dataNodesInfoList))
- for iter485 in self.dataNodesInfoList:
- iter485.write(oprot)
+ for iter464 in self.dataNodesInfoList:
+ iter464.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -8757,11 +8470,11 @@ class TShowAINodesResp(object):
elif fid == 2:
if ftype == TType.LIST:
self.aiNodesInfoList = []
- (_etype489, _size486) = iprot.readListBegin()
- for _i490 in range(_size486):
- _elem491 = TAINodeInfo()
- _elem491.read(iprot)
- self.aiNodesInfoList.append(_elem491)
+ (_etype468, _size465) = iprot.readListBegin()
+ for _i469 in range(_size465):
+ _elem470 = TAINodeInfo()
+ _elem470.read(iprot)
+ self.aiNodesInfoList.append(_elem470)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -8782,8 +8495,8 @@ class TShowAINodesResp(object):
if self.aiNodesInfoList is not None:
oprot.writeFieldBegin('aiNodesInfoList', TType.LIST, 2)
oprot.writeListBegin(TType.STRUCT, len(self.aiNodesInfoList))
- for iter492 in self.aiNodesInfoList:
- iter492.write(oprot)
+ for iter471 in self.aiNodesInfoList:
+ iter471.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -8948,11 +8661,11 @@ class TShowConfigNodesResp(object):
elif fid == 2:
if ftype == TType.LIST:
self.configNodesInfoList = []
- (_etype496, _size493) = iprot.readListBegin()
- for _i497 in range(_size493):
- _elem498 = TConfigNodeInfo()
- _elem498.read(iprot)
- self.configNodesInfoList.append(_elem498)
+ (_etype475, _size472) = iprot.readListBegin()
+ for _i476 in range(_size472):
+ _elem477 = TConfigNodeInfo()
+ _elem477.read(iprot)
+ self.configNodesInfoList.append(_elem477)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -8973,8 +8686,8 @@ class TShowConfigNodesResp(object):
if self.configNodesInfoList is not None:
oprot.writeFieldBegin('configNodesInfoList', TType.LIST, 2)
oprot.writeListBegin(TType.STRUCT, len(self.configNodesInfoList))
- for iter499 in self.configNodesInfoList:
- iter499.write(oprot)
+ for iter478 in self.configNodesInfoList:
+ iter478.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -9113,11 +8826,11 @@ class TShowConfigNodes4InformationSchemaResp(object):
elif fid == 2:
if ftype == TType.LIST:
self.configNodesInfoList = []
- (_etype503, _size500) = iprot.readListBegin()
- for _i504 in range(_size500):
- _elem505 = TConfigNodeInfo4InformationSchema()
- _elem505.read(iprot)
- self.configNodesInfoList.append(_elem505)
+ (_etype482, _size479) = iprot.readListBegin()
+ for _i483 in range(_size479):
+ _elem484 = TConfigNodeInfo4InformationSchema()
+ _elem484.read(iprot)
+ self.configNodesInfoList.append(_elem484)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -9138,8 +8851,8 @@ class TShowConfigNodes4InformationSchemaResp(object):
if self.configNodesInfoList is not None:
oprot.writeFieldBegin('configNodesInfoList', TType.LIST, 2)
oprot.writeListBegin(TType.STRUCT, len(self.configNodesInfoList))
- for iter506 in self.configNodesInfoList:
- iter506.write(oprot)
+ for iter485 in self.configNodesInfoList:
+ iter485.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -9368,16 +9081,14 @@ class TGetDatabaseReq(object):
- databasePathPattern
- scopePatternTree
- isTableModel
- - canSeeAuditDB
"""
- def __init__(self, databasePathPattern=None, scopePatternTree=None, isTableModel=None, canSeeAuditDB=None,):
+ def __init__(self, databasePathPattern=None, scopePatternTree=None, isTableModel=None,):
self.databasePathPattern = databasePathPattern
self.scopePatternTree = scopePatternTree
self.isTableModel = isTableModel
- self.canSeeAuditDB = canSeeAuditDB
def read(self, iprot):
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
@@ -9391,10 +9102,10 @@ class TGetDatabaseReq(object):
if fid == 1:
if ftype == TType.LIST:
self.databasePathPattern = []
- (_etype510, _size507) = iprot.readListBegin()
- for _i511 in range(_size507):
- _elem512 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.databasePathPattern.append(_elem512)
+ (_etype489, _size486) = iprot.readListBegin()
+ for _i490 in range(_size486):
+ _elem491 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ self.databasePathPattern.append(_elem491)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -9408,11 +9119,6 @@ class TGetDatabaseReq(object):
self.isTableModel = iprot.readBool()
else:
iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.BOOL:
- self.canSeeAuditDB = iprot.readBool()
- else:
- iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -9426,8 +9132,8 @@ class TGetDatabaseReq(object):
if self.databasePathPattern is not None:
oprot.writeFieldBegin('databasePathPattern', TType.LIST, 1)
oprot.writeListBegin(TType.STRING, len(self.databasePathPattern))
- for iter513 in self.databasePathPattern:
- oprot.writeString(iter513.encode('utf-8') if sys.version_info[0] == 2 else iter513)
+ for iter492 in self.databasePathPattern:
+ oprot.writeString(iter492.encode('utf-8') if sys.version_info[0] == 2 else iter492)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.scopePatternTree is not None:
@@ -9438,10 +9144,6 @@ class TGetDatabaseReq(object):
oprot.writeFieldBegin('isTableModel', TType.BOOL, 3)
oprot.writeBool(self.isTableModel)
oprot.writeFieldEnd()
- if self.canSeeAuditDB is not None:
- oprot.writeFieldBegin('canSeeAuditDB', TType.BOOL, 4)
- oprot.writeBool(self.canSeeAuditDB)
- oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -9495,12 +9197,12 @@ class TShowDatabaseResp(object):
elif fid == 2:
if ftype == TType.MAP:
self.databaseInfoMap = {}
- (_ktype515, _vtype516, _size514) = iprot.readMapBegin()
- for _i518 in range(_size514):
- _key519 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val520 = TDatabaseInfo()
- _val520.read(iprot)
- self.databaseInfoMap[_key519] = _val520
+ (_ktype494, _vtype495, _size493) = iprot.readMapBegin()
+ for _i497 in range(_size493):
+ _key498 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ _val499 = TDatabaseInfo()
+ _val499.read(iprot)
+ self.databaseInfoMap[_key498] = _val499
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -9521,9 +9223,9 @@ class TShowDatabaseResp(object):
if self.databaseInfoMap is not None:
oprot.writeFieldBegin('databaseInfoMap', TType.MAP, 2)
oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.databaseInfoMap))
- for kiter521, viter522 in self.databaseInfoMap.items():
- oprot.writeString(kiter521.encode('utf-8') if sys.version_info[0] == 2 else kiter521)
- viter522.write(oprot)
+ for kiter500, viter501 in self.databaseInfoMap.items():
+ oprot.writeString(kiter500.encode('utf-8') if sys.version_info[0] == 2 else kiter500)
+ viter501.write(oprot)
oprot.writeMapEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -9578,10 +9280,10 @@ class TShowRegionReq(object):
elif fid == 2:
if ftype == TType.LIST:
self.databases = []
- (_etype526, _size523) = iprot.readListBegin()
- for _i527 in range(_size523):
- _elem528 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.databases.append(_elem528)
+ (_etype505, _size502) = iprot.readListBegin()
+ for _i506 in range(_size502):
+ _elem507 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ self.databases.append(_elem507)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -9607,8 +9309,8 @@ class TShowRegionReq(object):
if self.databases is not None:
oprot.writeFieldBegin('databases', TType.LIST, 2)
oprot.writeListBegin(TType.STRING, len(self.databases))
- for iter529 in self.databases:
- oprot.writeString(iter529.encode('utf-8') if sys.version_info[0] == 2 else iter529)
+ for iter508 in self.databases:
+ oprot.writeString(iter508.encode('utf-8') if sys.version_info[0] == 2 else iter508)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.isTableModel is not None:
@@ -9868,11 +9570,11 @@ class TShowRegionResp(object):
elif fid == 2:
if ftype == TType.LIST:
self.regionInfoList = []
- (_etype533, _size530) = iprot.readListBegin()
- for _i534 in range(_size530):
- _elem535 = TRegionInfo()
- _elem535.read(iprot)
- self.regionInfoList.append(_elem535)
+ (_etype512, _size509) = iprot.readListBegin()
+ for _i513 in range(_size509):
+ _elem514 = TRegionInfo()
+ _elem514.read(iprot)
+ self.regionInfoList.append(_elem514)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -9893,8 +9595,8 @@ class TShowRegionResp(object):
if self.regionInfoList is not None:
oprot.writeFieldBegin('regionInfoList', TType.LIST, 2)
oprot.writeListBegin(TType.STRUCT, len(self.regionInfoList))
- for iter536 in self.regionInfoList:
- iter536.write(oprot)
+ for iter515 in self.regionInfoList:
+ iter515.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -9955,13 +9657,13 @@ class TRegionRouteMapResp(object):
elif fid == 3:
if ftype == TType.MAP:
self.regionRouteMap = {}
- (_ktype538, _vtype539, _size537) = iprot.readMapBegin()
- for _i541 in range(_size537):
- _key542 = iotdb.thrift.common.ttypes.TConsensusGroupId()
- _key542.read(iprot)
- _val543 = iotdb.thrift.common.ttypes.TRegionReplicaSet()
- _val543.read(iprot)
- self.regionRouteMap[_key542] = _val543
+ (_ktype517, _vtype518, _size516) = iprot.readMapBegin()
+ for _i520 in range(_size516):
+ _key521 = iotdb.thrift.common.ttypes.TConsensusGroupId()
+ _key521.read(iprot)
+ _val522 = iotdb.thrift.common.ttypes.TRegionReplicaSet()
+ _val522.read(iprot)
+ self.regionRouteMap[_key521] = _val522
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -9986,9 +9688,9 @@ class TRegionRouteMapResp(object):
if self.regionRouteMap is not None:
oprot.writeFieldBegin('regionRouteMap', TType.MAP, 3)
oprot.writeMapBegin(TType.STRUCT, TType.STRUCT, len(self.regionRouteMap))
- for kiter544, viter545 in self.regionRouteMap.items():
- kiter544.write(oprot)
- viter545.write(oprot)
+ for kiter523, viter524 in self.regionRouteMap.items():
+ kiter523.write(oprot)
+ viter524.write(oprot)
oprot.writeMapEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -10186,10 +9888,10 @@ class TGetAllTemplatesResp(object):
elif fid == 2:
if ftype == TType.LIST:
self.templateList = []
- (_etype549, _size546) = iprot.readListBegin()
- for _i550 in range(_size546):
- _elem551 = iprot.readBinary()
- self.templateList.append(_elem551)
+ (_etype528, _size525) = iprot.readListBegin()
+ for _i529 in range(_size525):
+ _elem530 = iprot.readBinary()
+ self.templateList.append(_elem530)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -10210,8 +9912,8 @@ class TGetAllTemplatesResp(object):
if self.templateList is not None:
oprot.writeFieldBegin('templateList', TType.LIST, 2)
oprot.writeListBegin(TType.STRING, len(self.templateList))
- for iter552 in self.templateList:
- oprot.writeBinary(iter552)
+ for iter531 in self.templateList:
+ oprot.writeBinary(iter531)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -10504,10 +10206,10 @@ class TGetPathsSetTemplatesResp(object):
elif fid == 2:
if ftype == TType.LIST:
self.pathList = []
- (_etype556, _size553) = iprot.readListBegin()
- for _i557 in range(_size553):
- _elem558 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.pathList.append(_elem558)
+ (_etype535, _size532) = iprot.readListBegin()
+ for _i536 in range(_size532):
+ _elem537 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ self.pathList.append(_elem537)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -10528,8 +10230,8 @@ class TGetPathsSetTemplatesResp(object):
if self.pathList is not None:
oprot.writeFieldBegin('pathList', TType.LIST, 2)
oprot.writeListBegin(TType.STRING, len(self.pathList))
- for iter559 in self.pathList:
- oprot.writeString(iter559.encode('utf-8') if sys.version_info[0] == 2 else iter559)
+ for iter538 in self.pathList:
+ oprot.writeString(iter538.encode('utf-8') if sys.version_info[0] == 2 else iter538)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -10786,10 +10488,10 @@ class TGetPipePluginTableResp(object):
elif fid == 2:
if ftype == TType.LIST:
self.allPipePluginMeta = []
- (_etype563, _size560) = iprot.readListBegin()
- for _i564 in range(_size560):
- _elem565 = iprot.readBinary()
- self.allPipePluginMeta.append(_elem565)
+ (_etype542, _size539) = iprot.readListBegin()
+ for _i543 in range(_size539):
+ _elem544 = iprot.readBinary()
+ self.allPipePluginMeta.append(_elem544)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -10810,8 +10512,8 @@ class TGetPipePluginTableResp(object):
if self.allPipePluginMeta is not None:
oprot.writeFieldBegin('allPipePluginMeta', TType.LIST, 2)
oprot.writeListBegin(TType.STRING, len(self.allPipePluginMeta))
- for iter566 in self.allPipePluginMeta:
- oprot.writeBinary(iter566)
+ for iter545 in self.allPipePluginMeta:
+ oprot.writeBinary(iter545)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -11083,10 +10785,10 @@ class TGetAllPipeInfoResp(object):
elif fid == 2:
if ftype == TType.LIST:
self.allPipeInfo = []
- (_etype570, _size567) = iprot.readListBegin()
- for _i571 in range(_size567):
- _elem572 = iprot.readBinary()
- self.allPipeInfo.append(_elem572)
+ (_etype549, _size546) = iprot.readListBegin()
+ for _i550 in range(_size546):
+ _elem551 = iprot.readBinary()
+ self.allPipeInfo.append(_elem551)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -11107,8 +10809,8 @@ class TGetAllPipeInfoResp(object):
if self.allPipeInfo is not None:
oprot.writeFieldBegin('allPipeInfo', TType.LIST, 2)
oprot.writeListBegin(TType.STRING, len(self.allPipeInfo))
- for iter573 in self.allPipeInfo:
- oprot.writeBinary(iter573)
+ for iter552 in self.allPipeInfo:
+ oprot.writeBinary(iter552)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -11171,33 +10873,33 @@ class TCreatePipeReq(object):
elif fid == 2:
if ftype == TType.MAP:
self.extractorAttributes = {}
- (_ktype575, _vtype576, _size574) = iprot.readMapBegin()
- for _i578 in range(_size574):
- _key579 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val580 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.extractorAttributes[_key579] = _val580
+ (_ktype554, _vtype555, _size553) = iprot.readMapBegin()
+ for _i557 in range(_size553):
+ _key558 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ _val559 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ self.extractorAttributes[_key558] = _val559
iprot.readMapEnd()
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.MAP:
self.processorAttributes = {}
- (_ktype582, _vtype583, _size581) = iprot.readMapBegin()
- for _i585 in range(_size581):
- _key586 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val587 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.processorAttributes[_key586] = _val587
+ (_ktype561, _vtype562, _size560) = iprot.readMapBegin()
+ for _i564 in range(_size560):
+ _key565 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ _val566 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ self.processorAttributes[_key565] = _val566
iprot.readMapEnd()
else:
iprot.skip(ftype)
elif fid == 4:
if ftype == TType.MAP:
self.connectorAttributes = {}
- (_ktype589, _vtype590, _size588) = iprot.readMapBegin()
- for _i592 in range(_size588):
- _key593 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val594 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.connectorAttributes[_key593] = _val594
+ (_ktype568, _vtype569, _size567) = iprot.readMapBegin()
+ for _i571 in range(_size567):
+ _key572 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ _val573 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ self.connectorAttributes[_key572] = _val573
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -11228,25 +10930,25 @@ class TCreatePipeReq(object):
if self.extractorAttributes is not None:
oprot.writeFieldBegin('extractorAttributes', TType.MAP, 2)
oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extractorAttributes))
- for kiter595, viter596 in self.extractorAttributes.items():
- oprot.writeString(kiter595.encode('utf-8') if sys.version_info[0] == 2 else kiter595)
- oprot.writeString(viter596.encode('utf-8') if sys.version_info[0] == 2 else viter596)
+ for kiter574, viter575 in self.extractorAttributes.items():
+ oprot.writeString(kiter574.encode('utf-8') if sys.version_info[0] == 2 else kiter574)
+ oprot.writeString(viter575.encode('utf-8') if sys.version_info[0] == 2 else viter575)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.processorAttributes is not None:
oprot.writeFieldBegin('processorAttributes', TType.MAP, 3)
oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.processorAttributes))
- for kiter597, viter598 in self.processorAttributes.items():
- oprot.writeString(kiter597.encode('utf-8') if sys.version_info[0] == 2 else kiter597)
- oprot.writeString(viter598.encode('utf-8') if sys.version_info[0] == 2 else viter598)
+ for kiter576, viter577 in self.processorAttributes.items():
+ oprot.writeString(kiter576.encode('utf-8') if sys.version_info[0] == 2 else kiter576)
+ oprot.writeString(viter577.encode('utf-8') if sys.version_info[0] == 2 else viter577)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.connectorAttributes is not None:
oprot.writeFieldBegin('connectorAttributes', TType.MAP, 4)
oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.connectorAttributes))
- for kiter599, viter600 in self.connectorAttributes.items():
- oprot.writeString(kiter599.encode('utf-8') if sys.version_info[0] == 2 else kiter599)
- oprot.writeString(viter600.encode('utf-8') if sys.version_info[0] == 2 else viter600)
+ for kiter578, viter579 in self.connectorAttributes.items():
+ oprot.writeString(kiter578.encode('utf-8') if sys.version_info[0] == 2 else kiter578)
+ oprot.writeString(viter579.encode('utf-8') if sys.version_info[0] == 2 else viter579)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.ifNotExistsCondition is not None:
@@ -11323,22 +11025,22 @@ class TAlterPipeReq(object):
elif fid == 2:
if ftype == TType.MAP:
self.processorAttributes = {}
- (_ktype602, _vtype603, _size601) = iprot.readMapBegin()
- for _i605 in range(_size601):
- _key606 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val607 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.processorAttributes[_key606] = _val607
+ (_ktype581, _vtype582, _size580) = iprot.readMapBegin()
+ for _i584 in range(_size580):
+ _key585 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ _val586 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ self.processorAttributes[_key585] = _val586
iprot.readMapEnd()
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.MAP:
self.connectorAttributes = {}
- (_ktype609, _vtype610, _size608) = iprot.readMapBegin()
- for _i612 in range(_size608):
- _key613 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val614 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.connectorAttributes[_key613] = _val614
+ (_ktype588, _vtype589, _size587) = iprot.readMapBegin()
+ for _i591 in range(_size587):
+ _key592 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ _val593 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ self.connectorAttributes[_key592] = _val593
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -11355,11 +11057,11 @@ class TAlterPipeReq(object):
elif fid == 6:
if ftype == TType.MAP:
self.extractorAttributes = {}
- (_ktype616, _vtype617, _size615) = iprot.readMapBegin()
- for _i619 in range(_size615):
- _key620 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val621 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.extractorAttributes[_key620] = _val621
+ (_ktype595, _vtype596, _size594) = iprot.readMapBegin()
+ for _i598 in range(_size594):
+ _key599 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ _val600 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ self.extractorAttributes[_key599] = _val600
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -11395,17 +11097,17 @@ class TAlterPipeReq(object):
if self.processorAttributes is not None:
oprot.writeFieldBegin('processorAttributes', TType.MAP, 2)
oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.processorAttributes))
- for kiter622, viter623 in self.processorAttributes.items():
- oprot.writeString(kiter622.encode('utf-8') if sys.version_info[0] == 2 else kiter622)
- oprot.writeString(viter623.encode('utf-8') if sys.version_info[0] == 2 else viter623)
+ for kiter601, viter602 in self.processorAttributes.items():
+ oprot.writeString(kiter601.encode('utf-8') if sys.version_info[0] == 2 else kiter601)
+ oprot.writeString(viter602.encode('utf-8') if sys.version_info[0] == 2 else viter602)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.connectorAttributes is not None:
oprot.writeFieldBegin('connectorAttributes', TType.MAP, 3)
oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.connectorAttributes))
- for kiter624, viter625 in self.connectorAttributes.items():
- oprot.writeString(kiter624.encode('utf-8') if sys.version_info[0] == 2 else kiter624)
- oprot.writeString(viter625.encode('utf-8') if sys.version_info[0] == 2 else viter625)
+ for kiter603, viter604 in self.connectorAttributes.items():
+ oprot.writeString(kiter603.encode('utf-8') if sys.version_info[0] == 2 else kiter603)
+ oprot.writeString(viter604.encode('utf-8') if sys.version_info[0] == 2 else viter604)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.isReplaceAllProcessorAttributes is not None:
@@ -11419,9 +11121,9 @@ class TAlterPipeReq(object):
if self.extractorAttributes is not None:
oprot.writeFieldBegin('extractorAttributes', TType.MAP, 6)
oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extractorAttributes))
- for kiter626, viter627 in self.extractorAttributes.items():
- oprot.writeString(kiter626.encode('utf-8') if sys.version_info[0] == 2 else kiter626)
- oprot.writeString(viter627.encode('utf-8') if sys.version_info[0] == 2 else viter627)
+ for kiter605, viter606 in self.extractorAttributes.items():
+ oprot.writeString(kiter605.encode('utf-8') if sys.version_info[0] == 2 else kiter605)
+ oprot.writeString(viter606.encode('utf-8') if sys.version_info[0] == 2 else viter606)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.isReplaceAllExtractorAttributes is not None:
@@ -11722,11 +11424,11 @@ class TPipeSinkInfo(object):
elif fid == 3:
if ftype == TType.MAP:
self.attributes = {}
- (_ktype629, _vtype630, _size628) = iprot.readMapBegin()
- for _i632 in range(_size628):
- _key633 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val634 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.attributes[_key633] = _val634
+ (_ktype608, _vtype609, _size607) = iprot.readMapBegin()
+ for _i611 in range(_size607):
+ _key612 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ _val613 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ self.attributes[_key612] = _val613
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -11751,9 +11453,9 @@ class TPipeSinkInfo(object):
if self.attributes is not None:
oprot.writeFieldBegin('attributes', TType.MAP, 3)
oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes))
- for kiter635, viter636 in self.attributes.items():
- oprot.writeString(kiter635.encode('utf-8') if sys.version_info[0] == 2 else kiter635)
- oprot.writeString(viter636.encode('utf-8') if sys.version_info[0] == 2 else viter636)
+ for kiter614, viter615 in self.attributes.items():
+ oprot.writeString(kiter614.encode('utf-8') if sys.version_info[0] == 2 else kiter614)
+ oprot.writeString(viter615.encode('utf-8') if sys.version_info[0] == 2 else viter615)
oprot.writeMapEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -11784,16 +11486,14 @@ class TShowPipeReq(object):
- pipeName
- whereClause
- isTableModel
- - userName
"""
- def __init__(self, pipeName=None, whereClause=None, isTableModel=None, userName=None,):
+ def __init__(self, pipeName=None, whereClause=None, isTableModel=None,):
self.pipeName = pipeName
self.whereClause = whereClause
self.isTableModel = isTableModel
- self.userName = userName
def read(self, iprot):
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
@@ -11819,11 +11519,6 @@ class TShowPipeReq(object):
self.isTableModel = iprot.readBool()
else:
iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.STRING:
- self.userName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- else:
- iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -11846,10 +11541,6 @@ class TShowPipeReq(object):
oprot.writeFieldBegin('isTableModel', TType.BOOL, 3)
oprot.writeBool(self.isTableModel)
oprot.writeFieldEnd()
- if self.userName is not None:
- oprot.writeFieldBegin('userName', TType.STRING, 4)
- oprot.writeString(self.userName.encode('utf-8') if sys.version_info[0] == 2 else self.userName)
- oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -11899,11 +11590,11 @@ class TShowPipeResp(object):
elif fid == 2:
if ftype == TType.LIST:
self.pipeInfoList = []
- (_etype640, _size637) = iprot.readListBegin()
- for _i641 in range(_size637):
- _elem642 = TShowPipeInfo()
- _elem642.read(iprot)
- self.pipeInfoList.append(_elem642)
+ (_etype619, _size616) = iprot.readListBegin()
+ for _i620 in range(_size616):
+ _elem621 = TShowPipeInfo()
+ _elem621.read(iprot)
+ self.pipeInfoList.append(_elem621)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -11924,8 +11615,8 @@ class TShowPipeResp(object):
if self.pipeInfoList is not None:
oprot.writeFieldBegin('pipeInfoList', TType.LIST, 2)
oprot.writeListBegin(TType.STRUCT, len(self.pipeInfoList))
- for iter643 in self.pipeInfoList:
- iter643.write(oprot)
+ for iter622 in self.pipeInfoList:
+ iter622.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -12136,16 +11827,14 @@ class TDeleteTimeSeriesReq(object):
- queryId
- pathPatternTree
- isGeneratedByPipe
- - mayDeleteAudit
"""
- def __init__(self, queryId=None, pathPatternTree=None, isGeneratedByPipe=None, mayDeleteAudit=None,):
+ def __init__(self, queryId=None, pathPatternTree=None, isGeneratedByPipe=None,):
self.queryId = queryId
self.pathPatternTree = pathPatternTree
self.isGeneratedByPipe = isGeneratedByPipe
- self.mayDeleteAudit = mayDeleteAudit
def read(self, iprot):
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
@@ -12171,11 +11860,6 @@ class TDeleteTimeSeriesReq(object):
self.isGeneratedByPipe = iprot.readBool()
else:
iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.BOOL:
- self.mayDeleteAudit = iprot.readBool()
- else:
- iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -12198,10 +11882,6 @@ class TDeleteTimeSeriesReq(object):
oprot.writeFieldBegin('isGeneratedByPipe', TType.BOOL, 3)
oprot.writeBool(self.isGeneratedByPipe)
oprot.writeFieldEnd()
- if self.mayDeleteAudit is not None:
- oprot.writeFieldBegin('mayDeleteAudit', TType.BOOL, 4)
- oprot.writeBool(self.mayDeleteAudit)
- oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -12422,11 +12102,11 @@ class TCreateTopicReq(object):
elif fid == 2:
if ftype == TType.MAP:
self.topicAttributes = {}
- (_ktype645, _vtype646, _size644) = iprot.readMapBegin()
- for _i648 in range(_size644):
- _key649 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val650 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.topicAttributes[_key649] = _val650
+ (_ktype624, _vtype625, _size623) = iprot.readMapBegin()
+ for _i627 in range(_size623):
+ _key628 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ _val629 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ self.topicAttributes[_key628] = _val629
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -12452,9 +12132,9 @@ class TCreateTopicReq(object):
if self.topicAttributes is not None:
oprot.writeFieldBegin('topicAttributes', TType.MAP, 2)
oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.topicAttributes))
- for kiter651, viter652 in self.topicAttributes.items():
- oprot.writeString(kiter651.encode('utf-8') if sys.version_info[0] == 2 else kiter651)
- oprot.writeString(viter652.encode('utf-8') if sys.version_info[0] == 2 else viter652)
+ for kiter630, viter631 in self.topicAttributes.items():
+ oprot.writeString(kiter630.encode('utf-8') if sys.version_info[0] == 2 else kiter630)
+ oprot.writeString(viter631.encode('utf-8') if sys.version_info[0] == 2 else viter631)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.ifNotExistsCondition is not None:
@@ -12661,11 +12341,11 @@ class TShowTopicResp(object):
elif fid == 2:
if ftype == TType.LIST:
self.topicInfoList = []
- (_etype656, _size653) = iprot.readListBegin()
- for _i657 in range(_size653):
- _elem658 = TShowTopicInfo()
- _elem658.read(iprot)
- self.topicInfoList.append(_elem658)
+ (_etype635, _size632) = iprot.readListBegin()
+ for _i636 in range(_size632):
+ _elem637 = TShowTopicInfo()
+ _elem637.read(iprot)
+ self.topicInfoList.append(_elem637)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -12686,8 +12366,8 @@ class TShowTopicResp(object):
if self.topicInfoList is not None:
oprot.writeFieldBegin('topicInfoList', TType.LIST, 2)
oprot.writeListBegin(TType.STRUCT, len(self.topicInfoList))
- for iter659 in self.topicInfoList:
- iter659.write(oprot)
+ for iter638 in self.topicInfoList:
+ iter638.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -12825,21 +12505,21 @@ class TAlterTopicReq(object):
elif fid == 2:
if ftype == TType.MAP:
self.topicAttributes = {}
- (_ktype661, _vtype662, _size660) = iprot.readMapBegin()
- for _i664 in range(_size660):
- _key665 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val666 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.topicAttributes[_key665] = _val666
+ (_ktype640, _vtype641, _size639) = iprot.readMapBegin()
+ for _i643 in range(_size639):
+ _key644 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ _val645 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ self.topicAttributes[_key644] = _val645
iprot.readMapEnd()
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.SET:
self.subscribedConsumerGroupIds = set()
- (_etype670, _size667) = iprot.readSetBegin()
- for _i671 in range(_size667):
- _elem672 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.subscribedConsumerGroupIds.add(_elem672)
+ (_etype649, _size646) = iprot.readSetBegin()
+ for _i650 in range(_size646):
+ _elem651 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ self.subscribedConsumerGroupIds.add(_elem651)
iprot.readSetEnd()
else:
iprot.skip(ftype)
@@ -12860,16 +12540,16 @@ class TAlterTopicReq(object):
if self.topicAttributes is not None:
oprot.writeFieldBegin('topicAttributes', TType.MAP, 2)
oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.topicAttributes))
- for kiter673, viter674 in self.topicAttributes.items():
- oprot.writeString(kiter673.encode('utf-8') if sys.version_info[0] == 2 else kiter673)
- oprot.writeString(viter674.encode('utf-8') if sys.version_info[0] == 2 else viter674)
+ for kiter652, viter653 in self.topicAttributes.items():
+ oprot.writeString(kiter652.encode('utf-8') if sys.version_info[0] == 2 else kiter652)
+ oprot.writeString(viter653.encode('utf-8') if sys.version_info[0] == 2 else viter653)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.subscribedConsumerGroupIds is not None:
oprot.writeFieldBegin('subscribedConsumerGroupIds', TType.SET, 3)
oprot.writeSetBegin(TType.STRING, len(self.subscribedConsumerGroupIds))
- for iter675 in self.subscribedConsumerGroupIds:
- oprot.writeString(iter675.encode('utf-8') if sys.version_info[0] == 2 else iter675)
+ for iter654 in self.subscribedConsumerGroupIds:
+ oprot.writeString(iter654.encode('utf-8') if sys.version_info[0] == 2 else iter654)
oprot.writeSetEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -12927,10 +12607,10 @@ class TGetAllTopicInfoResp(object):
elif fid == 2:
if ftype == TType.LIST:
self.allTopicInfo = []
- (_etype679, _size676) = iprot.readListBegin()
- for _i680 in range(_size676):
- _elem681 = iprot.readBinary()
- self.allTopicInfo.append(_elem681)
+ (_etype658, _size655) = iprot.readListBegin()
+ for _i659 in range(_size655):
+ _elem660 = iprot.readBinary()
+ self.allTopicInfo.append(_elem660)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -12951,8 +12631,8 @@ class TGetAllTopicInfoResp(object):
if self.allTopicInfo is not None:
oprot.writeFieldBegin('allTopicInfo', TType.LIST, 2)
oprot.writeListBegin(TType.STRING, len(self.allTopicInfo))
- for iter682 in self.allTopicInfo:
- oprot.writeBinary(iter682)
+ for iter661 in self.allTopicInfo:
+ oprot.writeBinary(iter661)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -13014,11 +12694,11 @@ class TCreateConsumerReq(object):
elif fid == 3:
if ftype == TType.MAP:
self.consumerAttributes = {}
- (_ktype684, _vtype685, _size683) = iprot.readMapBegin()
- for _i687 in range(_size683):
- _key688 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val689 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.consumerAttributes[_key688] = _val689
+ (_ktype663, _vtype664, _size662) = iprot.readMapBegin()
+ for _i666 in range(_size662):
+ _key667 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ _val668 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ self.consumerAttributes[_key667] = _val668
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -13043,9 +12723,9 @@ class TCreateConsumerReq(object):
if self.consumerAttributes is not None:
oprot.writeFieldBegin('consumerAttributes', TType.MAP, 3)
oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.consumerAttributes))
- for kiter690, viter691 in self.consumerAttributes.items():
- oprot.writeString(kiter690.encode('utf-8') if sys.version_info[0] == 2 else kiter690)
- oprot.writeString(viter691.encode('utf-8') if sys.version_info[0] == 2 else viter691)
+ for kiter669, viter670 in self.consumerAttributes.items():
+ oprot.writeString(kiter669.encode('utf-8') if sys.version_info[0] == 2 else kiter669)
+ oprot.writeString(viter670.encode('utf-8') if sys.version_info[0] == 2 else viter670)
oprot.writeMapEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -13181,10 +12861,10 @@ class TSubscribeReq(object):
elif fid == 3:
if ftype == TType.SET:
self.topicNames = set()
- (_etype695, _size692) = iprot.readSetBegin()
- for _i696 in range(_size692):
- _elem697 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.topicNames.add(_elem697)
+ (_etype674, _size671) = iprot.readSetBegin()
+ for _i675 in range(_size671):
+ _elem676 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ self.topicNames.add(_elem676)
iprot.readSetEnd()
else:
iprot.skip(ftype)
@@ -13214,8 +12894,8 @@ class TSubscribeReq(object):
if self.topicNames is not None:
oprot.writeFieldBegin('topicNames', TType.SET, 3)
oprot.writeSetBegin(TType.STRING, len(self.topicNames))
- for iter698 in self.topicNames:
- oprot.writeString(iter698.encode('utf-8') if sys.version_info[0] == 2 else iter698)
+ for iter677 in self.topicNames:
+ oprot.writeString(iter677.encode('utf-8') if sys.version_info[0] == 2 else iter677)
oprot.writeSetEnd()
oprot.writeFieldEnd()
if self.isTableModel is not None:
@@ -13285,10 +12965,10 @@ class TUnsubscribeReq(object):
elif fid == 3:
if ftype == TType.SET:
self.topicNames = set()
- (_etype702, _size699) = iprot.readSetBegin()
- for _i703 in range(_size699):
- _elem704 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.topicNames.add(_elem704)
+ (_etype681, _size678) = iprot.readSetBegin()
+ for _i682 in range(_size678):
+ _elem683 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ self.topicNames.add(_elem683)
iprot.readSetEnd()
else:
iprot.skip(ftype)
@@ -13318,8 +12998,8 @@ class TUnsubscribeReq(object):
if self.topicNames is not None:
oprot.writeFieldBegin('topicNames', TType.SET, 3)
oprot.writeSetBegin(TType.STRING, len(self.topicNames))
- for iter705 in self.topicNames:
- oprot.writeString(iter705.encode('utf-8') if sys.version_info[0] == 2 else iter705)
+ for iter684 in self.topicNames:
+ oprot.writeString(iter684.encode('utf-8') if sys.version_info[0] == 2 else iter684)
oprot.writeSetEnd()
oprot.writeFieldEnd()
if self.isTableModel is not None:
@@ -13449,11 +13129,11 @@ class TShowSubscriptionResp(object):
elif fid == 2:
if ftype == TType.LIST:
self.subscriptionInfoList = []
- (_etype709, _size706) = iprot.readListBegin()
- for _i710 in range(_size706):
- _elem711 = TShowSubscriptionInfo()
- _elem711.read(iprot)
- self.subscriptionInfoList.append(_elem711)
+ (_etype688, _size685) = iprot.readListBegin()
+ for _i689 in range(_size685):
+ _elem690 = TShowSubscriptionInfo()
+ _elem690.read(iprot)
+ self.subscriptionInfoList.append(_elem690)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -13474,8 +13154,8 @@ class TShowSubscriptionResp(object):
if self.subscriptionInfoList is not None:
oprot.writeFieldBegin('subscriptionInfoList', TType.LIST, 2)
oprot.writeListBegin(TType.STRUCT, len(self.subscriptionInfoList))
- for iter712 in self.subscriptionInfoList:
- iter712.write(oprot)
+ for iter691 in self.subscriptionInfoList:
+ iter691.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -13537,10 +13217,10 @@ class TShowSubscriptionInfo(object):
elif fid == 3:
if ftype == TType.SET:
self.consumerIds = set()
- (_etype716, _size713) = iprot.readSetBegin()
- for _i717 in range(_size713):
- _elem718 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.consumerIds.add(_elem718)
+ (_etype695, _size692) = iprot.readSetBegin()
+ for _i696 in range(_size692):
+ _elem697 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ self.consumerIds.add(_elem697)
iprot.readSetEnd()
else:
iprot.skip(ftype)
@@ -13570,8 +13250,8 @@ class TShowSubscriptionInfo(object):
if self.consumerIds is not None:
oprot.writeFieldBegin('consumerIds', TType.SET, 3)
oprot.writeSetBegin(TType.STRING, len(self.consumerIds))
- for iter719 in self.consumerIds:
- oprot.writeString(iter719.encode('utf-8') if sys.version_info[0] == 2 else iter719)
+ for iter698 in self.consumerIds:
+ oprot.writeString(iter698.encode('utf-8') if sys.version_info[0] == 2 else iter698)
oprot.writeSetEnd()
oprot.writeFieldEnd()
if self.creationTime is not None:
@@ -13714,10 +13394,10 @@ class TGetAllSubscriptionInfoResp(object):
elif fid == 2:
if ftype == TType.LIST:
self.allSubscriptionInfo = []
- (_etype723, _size720) = iprot.readListBegin()
- for _i724 in range(_size720):
- _elem725 = iprot.readBinary()
- self.allSubscriptionInfo.append(_elem725)
+ (_etype702, _size699) = iprot.readListBegin()
+ for _i703 in range(_size699):
+ _elem704 = iprot.readBinary()
+ self.allSubscriptionInfo.append(_elem704)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -13738,8 +13418,8 @@ class TGetAllSubscriptionInfoResp(object):
if self.allSubscriptionInfo is not None:
oprot.writeFieldBegin('allSubscriptionInfo', TType.LIST, 2)
oprot.writeListBegin(TType.STRING, len(self.allSubscriptionInfo))
- for iter726 in self.allSubscriptionInfo:
- oprot.writeBinary(iter726)
+ for iter705 in self.allSubscriptionInfo:
+ oprot.writeBinary(iter705)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -14115,11 +13795,11 @@ class TShowCQResp(object):
elif fid == 2:
if ftype == TType.LIST:
self.cqList = []
- (_etype730, _size727) = iprot.readListBegin()
- for _i731 in range(_size727):
- _elem732 = TCQEntry()
- _elem732.read(iprot)
- self.cqList.append(_elem732)
+ (_etype709, _size706) = iprot.readListBegin()
+ for _i710 in range(_size706):
+ _elem711 = TCQEntry()
+ _elem711.read(iprot)
+ self.cqList.append(_elem711)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -14140,8 +13820,8 @@ class TShowCQResp(object):
if self.cqList is not None:
oprot.writeFieldBegin('cqList', TType.LIST, 2)
oprot.writeListBegin(TType.STRUCT, len(self.cqList))
- for iter733 in self.cqList:
- iter733.write(oprot)
+ for iter712 in self.cqList:
+ iter712.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -14487,7 +14167,7 @@ class TDropModelReq(object):
return not (self == other)
-class TShowModelReq(object):
+class TGetModelInfoReq(object):
"""
Attributes:
- modelId
@@ -14521,7 +14201,7 @@ class TShowModelReq(object):
if oprot._fast_encode is not None and self.thrift_spec is not None:
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
return
- oprot.writeStructBegin('TShowModelReq')
+ oprot.writeStructBegin('TGetModelInfoReq')
if self.modelId is not None:
oprot.writeFieldBegin('modelId', TType.STRING, 1)
oprot.writeString(self.modelId.encode('utf-8') if sys.version_info[0] == 2 else self.modelId)
@@ -14530,6 +14210,8 @@ class TShowModelReq(object):
oprot.writeStructEnd()
def validate(self):
+ if self.modelId is None:
+ raise TProtocolException(message='Required field modelId is unset!')
return
def __repr__(self):
@@ -14544,24 +14226,20 @@ class TShowModelReq(object):
return not (self == other)
-class TShowModelResp(object):
+class TGetModelInfoResp(object):
"""
Attributes:
- status
- - modelIdList
- - modelTypeMap
- - categoryMap
- - stateMap
+ - modelInfo
+ - aiNodeAddress
"""
- def __init__(self, status=None, modelIdList=None, modelTypeMap=None, categoryMap=None, stateMap=None,):
+ def __init__(self, status=None, modelInfo=None, aiNodeAddress=None,):
self.status = status
- self.modelIdList = modelIdList
- self.modelTypeMap = modelTypeMap
- self.categoryMap = categoryMap
- self.stateMap = stateMap
+ self.modelInfo = modelInfo
+ self.aiNodeAddress = aiNodeAddress
def read(self, iprot):
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
@@ -14579,46 +14257,14 @@ class TShowModelResp(object):
else:
iprot.skip(ftype)
elif fid == 2:
- if ftype == TType.LIST:
- self.modelIdList = []
- (_etype737, _size734) = iprot.readListBegin()
- for _i738 in range(_size734):
- _elem739 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.modelIdList.append(_elem739)
- iprot.readListEnd()
+ if ftype == TType.STRING:
+ self.modelInfo = iprot.readBinary()
else:
iprot.skip(ftype)
elif fid == 3:
- if ftype == TType.MAP:
- self.modelTypeMap = {}
- (_ktype741, _vtype742, _size740) = iprot.readMapBegin()
- for _i744 in range(_size740):
- _key745 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val746 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.modelTypeMap[_key745] = _val746
- iprot.readMapEnd()
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.MAP:
- self.categoryMap = {}
- (_ktype748, _vtype749, _size747) = iprot.readMapBegin()
- for _i751 in range(_size747):
- _key752 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val753 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.categoryMap[_key752] = _val753
- iprot.readMapEnd()
- else:
- iprot.skip(ftype)
- elif fid == 5:
- if ftype == TType.MAP:
- self.stateMap = {}
- (_ktype755, _vtype756, _size754) = iprot.readMapBegin()
- for _i758 in range(_size754):
- _key759 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val760 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.stateMap[_key759] = _val760
- iprot.readMapEnd()
+ if ftype == TType.STRUCT:
+ self.aiNodeAddress = iotdb.thrift.common.ttypes.TEndPoint()
+ self.aiNodeAddress.read(iprot)
else:
iprot.skip(ftype)
else:
@@ -14630,41 +14276,18 @@ class TShowModelResp(object):
if oprot._fast_encode is not None and self.thrift_spec is not None:
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
return
- oprot.writeStructBegin('TShowModelResp')
+ oprot.writeStructBegin('TGetModelInfoResp')
if self.status is not None:
oprot.writeFieldBegin('status', TType.STRUCT, 1)
self.status.write(oprot)
oprot.writeFieldEnd()
- if self.modelIdList is not None:
- oprot.writeFieldBegin('modelIdList', TType.LIST, 2)
- oprot.writeListBegin(TType.STRING, len(self.modelIdList))
- for iter761 in self.modelIdList:
- oprot.writeString(iter761.encode('utf-8') if sys.version_info[0] == 2 else iter761)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- if self.modelTypeMap is not None:
- oprot.writeFieldBegin('modelTypeMap', TType.MAP, 3)
- oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.modelTypeMap))
- for kiter762, viter763 in self.modelTypeMap.items():
- oprot.writeString(kiter762.encode('utf-8') if sys.version_info[0] == 2 else kiter762)
- oprot.writeString(viter763.encode('utf-8') if sys.version_info[0] == 2 else viter763)
- oprot.writeMapEnd()
- oprot.writeFieldEnd()
- if self.categoryMap is not None:
- oprot.writeFieldBegin('categoryMap', TType.MAP, 4)
- oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.categoryMap))
- for kiter764, viter765 in self.categoryMap.items():
- oprot.writeString(kiter764.encode('utf-8') if sys.version_info[0] == 2 else kiter764)
- oprot.writeString(viter765.encode('utf-8') if sys.version_info[0] == 2 else viter765)
- oprot.writeMapEnd()
+ if self.modelInfo is not None:
+ oprot.writeFieldBegin('modelInfo', TType.STRING, 2)
+ oprot.writeBinary(self.modelInfo)
oprot.writeFieldEnd()
- if self.stateMap is not None:
- oprot.writeFieldBegin('stateMap', TType.MAP, 5)
- oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.stateMap))
- for kiter766, viter767 in self.stateMap.items():
- oprot.writeString(kiter766.encode('utf-8') if sys.version_info[0] == 2 else kiter766)
- oprot.writeString(viter767.encode('utf-8') if sys.version_info[0] == 2 else viter767)
- oprot.writeMapEnd()
+ if self.aiNodeAddress is not None:
+ oprot.writeFieldBegin('aiNodeAddress', TType.STRUCT, 3)
+ self.aiNodeAddress.write(oprot)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -14686,16 +14309,26 @@ class TShowModelResp(object):
return not (self == other)
-class TShowLoadedModelReq(object):
+class TUpdateModelInfoReq(object):
"""
Attributes:
- - deviceIdList
+ - modelId
+ - modelStatus
+ - attributes
+ - aiNodeIds
+ - inputLength
+ - outputLength
"""
- def __init__(self, deviceIdList=None,):
- self.deviceIdList = deviceIdList
+ def __init__(self, modelId=None, modelStatus=None, attributes=None, aiNodeIds=None, inputLength=None, outputLength=None,):
+ self.modelId = modelId
+ self.modelStatus = modelStatus
+ self.attributes = attributes
+ self.aiNodeIds = aiNodeIds
+ self.inputLength = inputLength
+ self.outputLength = outputLength
def read(self, iprot):
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
@@ -14707,15 +14340,40 @@ class TShowLoadedModelReq(object):
if ftype == TType.STOP:
break
if fid == 1:
+ if ftype == TType.STRING:
+ self.modelId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.I32:
+ self.modelStatus = iprot.readI32()
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.STRING:
+ self.attributes = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ else:
+ iprot.skip(ftype)
+ elif fid == 4:
if ftype == TType.LIST:
- self.deviceIdList = []
- (_etype771, _size768) = iprot.readListBegin()
- for _i772 in range(_size768):
- _elem773 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.deviceIdList.append(_elem773)
+ self.aiNodeIds = []
+ (_etype716, _size713) = iprot.readListBegin()
+ for _i717 in range(_size713):
+ _elem718 = iprot.readI32()
+ self.aiNodeIds.append(_elem718)
iprot.readListEnd()
else:
iprot.skip(ftype)
+ elif fid == 5:
+ if ftype == TType.I32:
+ self.inputLength = iprot.readI32()
+ else:
+ iprot.skip(ftype)
+ elif fid == 6:
+ if ftype == TType.I32:
+ self.outputLength = iprot.readI32()
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -14725,588 +14383,10 @@ class TShowLoadedModelReq(object):
if oprot._fast_encode is not None and self.thrift_spec is not None:
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
return
- oprot.writeStructBegin('TShowLoadedModelReq')
- if self.deviceIdList is not None:
- oprot.writeFieldBegin('deviceIdList', TType.LIST, 1)
- oprot.writeListBegin(TType.STRING, len(self.deviceIdList))
- for iter774 in self.deviceIdList:
- oprot.writeString(iter774.encode('utf-8') if sys.version_info[0] == 2 else iter774)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.deviceIdList is None:
- raise TProtocolException(message='Required field deviceIdList is unset!')
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-
-class TShowLoadedModelResp(object):
- """
- Attributes:
- - status
- - deviceLoadedModelsMap
-
- """
-
-
- def __init__(self, status=None, deviceLoadedModelsMap=None,):
- self.status = status
- self.deviceLoadedModelsMap = deviceLoadedModelsMap
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.status = iotdb.thrift.common.ttypes.TSStatus()
- self.status.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.MAP:
- self.deviceLoadedModelsMap = {}
- (_ktype776, _vtype777, _size775) = iprot.readMapBegin()
- for _i779 in range(_size775):
- _key780 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val781 = {}
- (_ktype783, _vtype784, _size782) = iprot.readMapBegin()
- for _i786 in range(_size782):
- _key787 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val788 = iprot.readI32()
- _val781[_key787] = _val788
- iprot.readMapEnd()
- self.deviceLoadedModelsMap[_key780] = _val781
- iprot.readMapEnd()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('TShowLoadedModelResp')
- if self.status is not None:
- oprot.writeFieldBegin('status', TType.STRUCT, 1)
- self.status.write(oprot)
- oprot.writeFieldEnd()
- if self.deviceLoadedModelsMap is not None:
- oprot.writeFieldBegin('deviceLoadedModelsMap', TType.MAP, 2)
- oprot.writeMapBegin(TType.STRING, TType.MAP, len(self.deviceLoadedModelsMap))
- for kiter789, viter790 in self.deviceLoadedModelsMap.items():
- oprot.writeString(kiter789.encode('utf-8') if sys.version_info[0] == 2 else kiter789)
- oprot.writeMapBegin(TType.STRING, TType.I32, len(viter790))
- for kiter791, viter792 in viter790.items():
- oprot.writeString(kiter791.encode('utf-8') if sys.version_info[0] == 2 else kiter791)
- oprot.writeI32(viter792)
- oprot.writeMapEnd()
- oprot.writeMapEnd()
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.status is None:
- raise TProtocolException(message='Required field status is unset!')
- if self.deviceLoadedModelsMap is None:
- raise TProtocolException(message='Required field deviceLoadedModelsMap is unset!')
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-
-class TShowAIDevicesResp(object):
- """
- Attributes:
- - status
- - deviceIdList
-
- """
-
-
- def __init__(self, status=None, deviceIdList=None,):
- self.status = status
- self.deviceIdList = deviceIdList
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.status = iotdb.thrift.common.ttypes.TSStatus()
- self.status.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.LIST:
- self.deviceIdList = []
- (_etype796, _size793) = iprot.readListBegin()
- for _i797 in range(_size793):
- _elem798 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.deviceIdList.append(_elem798)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('TShowAIDevicesResp')
- if self.status is not None:
- oprot.writeFieldBegin('status', TType.STRUCT, 1)
- self.status.write(oprot)
- oprot.writeFieldEnd()
- if self.deviceIdList is not None:
- oprot.writeFieldBegin('deviceIdList', TType.LIST, 2)
- oprot.writeListBegin(TType.STRING, len(self.deviceIdList))
- for iter799 in self.deviceIdList:
- oprot.writeString(iter799.encode('utf-8') if sys.version_info[0] == 2 else iter799)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.status is None:
- raise TProtocolException(message='Required field status is unset!')
- if self.deviceIdList is None:
- raise TProtocolException(message='Required field deviceIdList is unset!')
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-
-class TLoadModelReq(object):
- """
- Attributes:
- - existingModelId
- - deviceIdList
-
- """
-
-
- def __init__(self, existingModelId=None, deviceIdList=None,):
- self.existingModelId = existingModelId
- self.deviceIdList = deviceIdList
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.existingModelId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.LIST:
- self.deviceIdList = []
- (_etype803, _size800) = iprot.readListBegin()
- for _i804 in range(_size800):
- _elem805 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.deviceIdList.append(_elem805)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('TLoadModelReq')
- if self.existingModelId is not None:
- oprot.writeFieldBegin('existingModelId', TType.STRING, 1)
- oprot.writeString(self.existingModelId.encode('utf-8') if sys.version_info[0] == 2 else self.existingModelId)
- oprot.writeFieldEnd()
- if self.deviceIdList is not None:
- oprot.writeFieldBegin('deviceIdList', TType.LIST, 2)
- oprot.writeListBegin(TType.STRING, len(self.deviceIdList))
- for iter806 in self.deviceIdList:
- oprot.writeString(iter806.encode('utf-8') if sys.version_info[0] == 2 else iter806)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.existingModelId is None:
- raise TProtocolException(message='Required field existingModelId is unset!')
- if self.deviceIdList is None:
- raise TProtocolException(message='Required field deviceIdList is unset!')
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-
-class TUnloadModelReq(object):
- """
- Attributes:
- - modelId
- - deviceIdList
-
- """
-
-
- def __init__(self, modelId=None, deviceIdList=None,):
- self.modelId = modelId
- self.deviceIdList = deviceIdList
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.modelId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.LIST:
- self.deviceIdList = []
- (_etype810, _size807) = iprot.readListBegin()
- for _i811 in range(_size807):
- _elem812 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.deviceIdList.append(_elem812)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('TUnloadModelReq')
- if self.modelId is not None:
- oprot.writeFieldBegin('modelId', TType.STRING, 1)
- oprot.writeString(self.modelId.encode('utf-8') if sys.version_info[0] == 2 else self.modelId)
- oprot.writeFieldEnd()
- if self.deviceIdList is not None:
- oprot.writeFieldBegin('deviceIdList', TType.LIST, 2)
- oprot.writeListBegin(TType.STRING, len(self.deviceIdList))
- for iter813 in self.deviceIdList:
- oprot.writeString(iter813.encode('utf-8') if sys.version_info[0] == 2 else iter813)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.modelId is None:
- raise TProtocolException(message='Required field modelId is unset!')
- if self.deviceIdList is None:
- raise TProtocolException(message='Required field deviceIdList is unset!')
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-
-class TGetModelInfoReq(object):
- """
- Attributes:
- - modelId
-
- """
-
-
- def __init__(self, modelId=None,):
- self.modelId = modelId
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.modelId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('TGetModelInfoReq')
- if self.modelId is not None:
- oprot.writeFieldBegin('modelId', TType.STRING, 1)
- oprot.writeString(self.modelId.encode('utf-8') if sys.version_info[0] == 2 else self.modelId)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.modelId is None:
- raise TProtocolException(message='Required field modelId is unset!')
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-
-class TGetModelInfoResp(object):
- """
- Attributes:
- - status
- - modelInfo
- - aiNodeAddress
-
- """
-
-
- def __init__(self, status=None, modelInfo=None, aiNodeAddress=None,):
- self.status = status
- self.modelInfo = modelInfo
- self.aiNodeAddress = aiNodeAddress
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.status = iotdb.thrift.common.ttypes.TSStatus()
- self.status.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.modelInfo = iprot.readBinary()
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.STRUCT:
- self.aiNodeAddress = iotdb.thrift.common.ttypes.TEndPoint()
- self.aiNodeAddress.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('TGetModelInfoResp')
- if self.status is not None:
- oprot.writeFieldBegin('status', TType.STRUCT, 1)
- self.status.write(oprot)
- oprot.writeFieldEnd()
- if self.modelInfo is not None:
- oprot.writeFieldBegin('modelInfo', TType.STRING, 2)
- oprot.writeBinary(self.modelInfo)
- oprot.writeFieldEnd()
- if self.aiNodeAddress is not None:
- oprot.writeFieldBegin('aiNodeAddress', TType.STRUCT, 3)
- self.aiNodeAddress.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.status is None:
- raise TProtocolException(message='Required field status is unset!')
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-
-class TUpdateModelInfoReq(object):
- """
- Attributes:
- - modelId
- - modelStatus
- - attributes
- - aiNodeIds
- - inputLength
- - outputLength
-
- """
-
-
- def __init__(self, modelId=None, modelStatus=None, attributes=None, aiNodeIds=None, inputLength=None, outputLength=None,):
- self.modelId = modelId
- self.modelStatus = modelStatus
- self.attributes = attributes
- self.aiNodeIds = aiNodeIds
- self.inputLength = inputLength
- self.outputLength = outputLength
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.modelId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.I32:
- self.modelStatus = iprot.readI32()
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.STRING:
- self.attributes = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.LIST:
- self.aiNodeIds = []
- (_etype817, _size814) = iprot.readListBegin()
- for _i818 in range(_size814):
- _elem819 = iprot.readI32()
- self.aiNodeIds.append(_elem819)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- elif fid == 5:
- if ftype == TType.I32:
- self.inputLength = iprot.readI32()
- else:
- iprot.skip(ftype)
- elif fid == 6:
- if ftype == TType.I32:
- self.outputLength = iprot.readI32()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('TUpdateModelInfoReq')
- if self.modelId is not None:
- oprot.writeFieldBegin('modelId', TType.STRING, 1)
- oprot.writeString(self.modelId.encode('utf-8') if sys.version_info[0] == 2 else self.modelId)
+ oprot.writeStructBegin('TUpdateModelInfoReq')
+ if self.modelId is not None:
+ oprot.writeFieldBegin('modelId', TType.STRING, 1)
+ oprot.writeString(self.modelId.encode('utf-8') if sys.version_info[0] == 2 else self.modelId)
oprot.writeFieldEnd()
if self.modelStatus is not None:
oprot.writeFieldBegin('modelStatus', TType.I32, 2)
@@ -15319,8 +14399,8 @@ class TUpdateModelInfoReq(object):
if self.aiNodeIds is not None:
oprot.writeFieldBegin('aiNodeIds', TType.LIST, 4)
oprot.writeListBegin(TType.I32, len(self.aiNodeIds))
- for iter820 in self.aiNodeIds:
- oprot.writeI32(iter820)
+ for iter719 in self.aiNodeIds:
+ oprot.writeI32(iter719)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.inputLength is not None:
@@ -15435,10 +14515,10 @@ class TDataSchemaForTree(object):
if fid == 1:
if ftype == TType.LIST:
self.path = []
- (_etype824, _size821) = iprot.readListBegin()
- for _i825 in range(_size821):
- _elem826 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.path.append(_elem826)
+ (_etype723, _size720) = iprot.readListBegin()
+ for _i724 in range(_size720):
+ _elem725 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ self.path.append(_elem725)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -15455,8 +14535,8 @@ class TDataSchemaForTree(object):
if self.path is not None:
oprot.writeFieldBegin('path', TType.LIST, 1)
oprot.writeListBegin(TType.STRING, len(self.path))
- for iter827 in self.path:
- oprot.writeString(iter827.encode('utf-8') if sys.version_info[0] == 2 else iter827)
+ for iter726 in self.path:
+ oprot.writeString(iter726.encode('utf-8') if sys.version_info[0] == 2 else iter726)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -15541,26 +14621,26 @@ class TCreateTrainingReq(object):
elif fid == 6:
if ftype == TType.MAP:
self.parameters = {}
- (_ktype829, _vtype830, _size828) = iprot.readMapBegin()
- for _i832 in range(_size828):
- _key833 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val834 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.parameters[_key833] = _val834
+ (_ktype728, _vtype729, _size727) = iprot.readMapBegin()
+ for _i731 in range(_size727):
+ _key732 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ _val733 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ self.parameters[_key732] = _val733
iprot.readMapEnd()
else:
iprot.skip(ftype)
elif fid == 7:
if ftype == TType.LIST:
self.timeRanges = []
- (_etype838, _size835) = iprot.readListBegin()
- for _i839 in range(_size835):
- _elem840 = []
- (_etype844, _size841) = iprot.readListBegin()
- for _i845 in range(_size841):
- _elem846 = iprot.readI64()
- _elem840.append(_elem846)
+ (_etype737, _size734) = iprot.readListBegin()
+ for _i738 in range(_size734):
+ _elem739 = []
+ (_etype743, _size740) = iprot.readListBegin()
+ for _i744 in range(_size740):
+ _elem745 = iprot.readI64()
+ _elem739.append(_elem745)
iprot.readListEnd()
- self.timeRanges.append(_elem840)
+ self.timeRanges.append(_elem739)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -15597,18 +14677,18 @@ class TCreateTrainingReq(object):
if self.parameters is not None:
oprot.writeFieldBegin('parameters', TType.MAP, 6)
oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
- for kiter847, viter848 in self.parameters.items():
- oprot.writeString(kiter847.encode('utf-8') if sys.version_info[0] == 2 else kiter847)
- oprot.writeString(viter848.encode('utf-8') if sys.version_info[0] == 2 else viter848)
+ for kiter746, viter747 in self.parameters.items():
+ oprot.writeString(kiter746.encode('utf-8') if sys.version_info[0] == 2 else kiter746)
+ oprot.writeString(viter747.encode('utf-8') if sys.version_info[0] == 2 else viter747)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.timeRanges is not None:
oprot.writeFieldBegin('timeRanges', TType.LIST, 7)
oprot.writeListBegin(TType.LIST, len(self.timeRanges))
- for iter849 in self.timeRanges:
- oprot.writeListBegin(TType.I64, len(iter849))
- for iter850 in iter849:
- oprot.writeI64(iter850)
+ for iter748 in self.timeRanges:
+ oprot.writeListBegin(TType.I64, len(iter748))
+ for iter749 in iter748:
+ oprot.writeI64(iter749)
oprot.writeListEnd()
oprot.writeListEnd()
oprot.writeFieldEnd()
@@ -15669,24 +14749,24 @@ class TSpaceQuotaResp(object):
elif fid == 2:
if ftype == TType.MAP:
self.spaceQuota = {}
- (_ktype852, _vtype853, _size851) = iprot.readMapBegin()
- for _i855 in range(_size851):
- _key856 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val857 = iotdb.thrift.common.ttypes.TSpaceQuota()
- _val857.read(iprot)
- self.spaceQuota[_key856] = _val857
+ (_ktype751, _vtype752, _size750) = iprot.readMapBegin()
+ for _i754 in range(_size750):
+ _key755 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ _val756 = iotdb.thrift.common.ttypes.TSpaceQuota()
+ _val756.read(iprot)
+ self.spaceQuota[_key755] = _val756
iprot.readMapEnd()
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.MAP:
self.spaceQuotaUsage = {}
- (_ktype859, _vtype860, _size858) = iprot.readMapBegin()
- for _i862 in range(_size858):
- _key863 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val864 = iotdb.thrift.common.ttypes.TSpaceQuota()
- _val864.read(iprot)
- self.spaceQuotaUsage[_key863] = _val864
+ (_ktype758, _vtype759, _size757) = iprot.readMapBegin()
+ for _i761 in range(_size757):
+ _key762 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ _val763 = iotdb.thrift.common.ttypes.TSpaceQuota()
+ _val763.read(iprot)
+ self.spaceQuotaUsage[_key762] = _val763
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -15707,17 +14787,17 @@ class TSpaceQuotaResp(object):
if self.spaceQuota is not None:
oprot.writeFieldBegin('spaceQuota', TType.MAP, 2)
oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.spaceQuota))
- for kiter865, viter866 in self.spaceQuota.items():
- oprot.writeString(kiter865.encode('utf-8') if sys.version_info[0] == 2 else kiter865)
- viter866.write(oprot)
+ for kiter764, viter765 in self.spaceQuota.items():
+ oprot.writeString(kiter764.encode('utf-8') if sys.version_info[0] == 2 else kiter764)
+ viter765.write(oprot)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.spaceQuotaUsage is not None:
oprot.writeFieldBegin('spaceQuotaUsage', TType.MAP, 3)
oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.spaceQuotaUsage))
- for kiter867, viter868 in self.spaceQuotaUsage.items():
- oprot.writeString(kiter867.encode('utf-8') if sys.version_info[0] == 2 else kiter867)
- viter868.write(oprot)
+ for kiter766, viter767 in self.spaceQuotaUsage.items():
+ oprot.writeString(kiter766.encode('utf-8') if sys.version_info[0] == 2 else kiter766)
+ viter767.write(oprot)
oprot.writeMapEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -15771,12 +14851,12 @@ class TThrottleQuotaResp(object):
elif fid == 2:
if ftype == TType.MAP:
self.throttleQuota = {}
- (_ktype870, _vtype871, _size869) = iprot.readMapBegin()
- for _i873 in range(_size869):
- _key874 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val875 = iotdb.thrift.common.ttypes.TThrottleQuota()
- _val875.read(iprot)
- self.throttleQuota[_key874] = _val875
+ (_ktype769, _vtype770, _size768) = iprot.readMapBegin()
+ for _i772 in range(_size768):
+ _key773 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ _val774 = iotdb.thrift.common.ttypes.TThrottleQuota()
+ _val774.read(iprot)
+ self.throttleQuota[_key773] = _val774
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -15797,9 +14877,9 @@ class TThrottleQuotaResp(object):
if self.throttleQuota is not None:
oprot.writeFieldBegin('throttleQuota', TType.MAP, 2)
oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.throttleQuota))
- for kiter876, viter877 in self.throttleQuota.items():
- oprot.writeString(kiter876.encode('utf-8') if sys.version_info[0] == 2 else kiter876)
- viter877.write(oprot)
+ for kiter775, viter776 in self.throttleQuota.items():
+ oprot.writeString(kiter775.encode('utf-8') if sys.version_info[0] == 2 else kiter775)
+ viter776.write(oprot)
oprot.writeMapEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -15982,12 +15062,12 @@ class TAINodeConfigurationResp(object):
elif fid == 2:
if ftype == TType.MAP:
self.aiNodeConfigurationMap = {}
- (_ktype879, _vtype880, _size878) = iprot.readMapBegin()
- for _i882 in range(_size878):
- _key883 = iprot.readI32()
- _val884 = iotdb.thrift.common.ttypes.TAINodeConfiguration()
- _val884.read(iprot)
- self.aiNodeConfigurationMap[_key883] = _val884
+ (_ktype778, _vtype779, _size777) = iprot.readMapBegin()
+ for _i781 in range(_size777):
+ _key782 = iprot.readI32()
+ _val783 = iotdb.thrift.common.ttypes.TAINodeConfiguration()
+ _val783.read(iprot)
+ self.aiNodeConfigurationMap[_key782] = _val783
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -16008,9 +15088,9 @@ class TAINodeConfigurationResp(object):
if self.aiNodeConfigurationMap is not None:
oprot.writeFieldBegin('aiNodeConfigurationMap', TType.MAP, 2)
oprot.writeMapBegin(TType.I32, TType.STRUCT, len(self.aiNodeConfigurationMap))
- for kiter885, viter886 in self.aiNodeConfigurationMap.items():
- oprot.writeI32(kiter885)
- viter886.write(oprot)
+ for kiter784, viter785 in self.aiNodeConfigurationMap.items():
+ oprot.writeI32(kiter784)
+ viter785.write(oprot)
oprot.writeMapEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -16151,11 +15231,11 @@ class TAINodeRegisterResp(object):
elif fid == 2:
if ftype == TType.LIST:
self.configNodeList = []
- (_etype890, _size887) = iprot.readListBegin()
- for _i891 in range(_size887):
- _elem892 = iotdb.thrift.common.ttypes.TConfigNodeLocation()
- _elem892.read(iprot)
- self.configNodeList.append(_elem892)
+ (_etype789, _size786) = iprot.readListBegin()
+ for _i790 in range(_size786):
+ _elem791 = iotdb.thrift.common.ttypes.TConfigNodeLocation()
+ _elem791.read(iprot)
+ self.configNodeList.append(_elem791)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -16181,8 +15261,8 @@ class TAINodeRegisterResp(object):
if self.configNodeList is not None:
oprot.writeFieldBegin('configNodeList', TType.LIST, 2)
oprot.writeListBegin(TType.STRUCT, len(self.configNodeList))
- for iter893 in self.configNodeList:
- iter893.write(oprot)
+ for iter792 in self.configNodeList:
+ iter792.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.aiNodeId is not None:
@@ -16338,11 +15418,11 @@ class TAINodeRestartResp(object):
elif fid == 2:
if ftype == TType.LIST:
self.configNodeList = []
- (_etype897, _size894) = iprot.readListBegin()
- for _i898 in range(_size894):
- _elem899 = iotdb.thrift.common.ttypes.TConfigNodeLocation()
- _elem899.read(iprot)
- self.configNodeList.append(_elem899)
+ (_etype796, _size793) = iprot.readListBegin()
+ for _i797 in range(_size793):
+ _elem798 = iotdb.thrift.common.ttypes.TConfigNodeLocation()
+ _elem798.read(iprot)
+ self.configNodeList.append(_elem798)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -16363,8 +15443,8 @@ class TAINodeRestartResp(object):
if self.configNodeList is not None:
oprot.writeFieldBegin('configNodeList', TType.LIST, 2)
oprot.writeListBegin(TType.STRUCT, len(self.configNodeList))
- for iter900 in self.configNodeList:
- iter900.write(oprot)
+ for iter799 in self.configNodeList:
+ iter799.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -16795,11 +15875,11 @@ class TShowTableResp(object):
elif fid == 2:
if ftype == TType.LIST:
self.tableInfoList = []
- (_etype904, _size901) = iprot.readListBegin()
- for _i905 in range(_size901):
- _elem906 = TTableInfo()
- _elem906.read(iprot)
- self.tableInfoList.append(_elem906)
+ (_etype803, _size800) = iprot.readListBegin()
+ for _i804 in range(_size800):
+ _elem805 = TTableInfo()
+ _elem805.read(iprot)
+ self.tableInfoList.append(_elem805)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -16820,8 +15900,8 @@ class TShowTableResp(object):
if self.tableInfoList is not None:
oprot.writeFieldBegin('tableInfoList', TType.LIST, 2)
oprot.writeListBegin(TType.STRUCT, len(self.tableInfoList))
- for iter907 in self.tableInfoList:
- iter907.write(oprot)
+ for iter806 in self.tableInfoList:
+ iter806.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -16875,17 +15955,17 @@ class TShowTable4InformationSchemaResp(object):
elif fid == 2:
if ftype == TType.MAP:
self.databaseTableInfoMap = {}
- (_ktype909, _vtype910, _size908) = iprot.readMapBegin()
- for _i912 in range(_size908):
- _key913 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val914 = []
- (_etype918, _size915) = iprot.readListBegin()
- for _i919 in range(_size915):
- _elem920 = TTableInfo()
- _elem920.read(iprot)
- _val914.append(_elem920)
+ (_ktype808, _vtype809, _size807) = iprot.readMapBegin()
+ for _i811 in range(_size807):
+ _key812 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ _val813 = []
+ (_etype817, _size814) = iprot.readListBegin()
+ for _i818 in range(_size814):
+ _elem819 = TTableInfo()
+ _elem819.read(iprot)
+ _val813.append(_elem819)
iprot.readListEnd()
- self.databaseTableInfoMap[_key913] = _val914
+ self.databaseTableInfoMap[_key812] = _val813
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -16906,11 +15986,11 @@ class TShowTable4InformationSchemaResp(object):
if self.databaseTableInfoMap is not None:
oprot.writeFieldBegin('databaseTableInfoMap', TType.MAP, 2)
oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.databaseTableInfoMap))
- for kiter921, viter922 in self.databaseTableInfoMap.items():
- oprot.writeString(kiter921.encode('utf-8') if sys.version_info[0] == 2 else kiter921)
- oprot.writeListBegin(TType.STRUCT, len(viter922))
- for iter923 in viter922:
- iter923.write(oprot)
+ for kiter820, viter821 in self.databaseTableInfoMap.items():
+ oprot.writeString(kiter820.encode('utf-8') if sys.version_info[0] == 2 else kiter820)
+ oprot.writeListBegin(TType.STRUCT, len(viter821))
+ for iter822 in viter821:
+ iter822.write(oprot)
oprot.writeListEnd()
oprot.writeMapEnd()
oprot.writeFieldEnd()
@@ -16972,10 +16052,10 @@ class TDescTableResp(object):
elif fid == 3:
if ftype == TType.SET:
self.preDeletedColumns = set()
- (_etype927, _size924) = iprot.readSetBegin()
- for _i928 in range(_size924):
- _elem929 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.preDeletedColumns.add(_elem929)
+ (_etype826, _size823) = iprot.readSetBegin()
+ for _i827 in range(_size823):
+ _elem828 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ self.preDeletedColumns.add(_elem828)
iprot.readSetEnd()
else:
iprot.skip(ftype)
@@ -17000,8 +16080,8 @@ class TDescTableResp(object):
if self.preDeletedColumns is not None:
oprot.writeFieldBegin('preDeletedColumns', TType.SET, 3)
oprot.writeSetBegin(TType.STRING, len(self.preDeletedColumns))
- for iter930 in self.preDeletedColumns:
- oprot.writeString(iter930.encode('utf-8') if sys.version_info[0] == 2 else iter930)
+ for iter829 in self.preDeletedColumns:
+ oprot.writeString(iter829.encode('utf-8') if sys.version_info[0] == 2 else iter829)
oprot.writeSetEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -17055,18 +16135,18 @@ class TDescTable4InformationSchemaResp(object):
elif fid == 2:
if ftype == TType.MAP:
self.tableColumnInfoMap = {}
- (_ktype932, _vtype933, _size931) = iprot.readMapBegin()
- for _i935 in range(_size931):
- _key936 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val937 = {}
- (_ktype939, _vtype940, _size938) = iprot.readMapBegin()
- for _i942 in range(_size938):
- _key943 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- _val944 = TTableColumnInfo()
- _val944.read(iprot)
- _val937[_key943] = _val944
+ (_ktype831, _vtype832, _size830) = iprot.readMapBegin()
+ for _i834 in range(_size830):
+ _key835 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ _val836 = {}
+ (_ktype838, _vtype839, _size837) = iprot.readMapBegin()
+ for _i841 in range(_size837):
+ _key842 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ _val843 = TTableColumnInfo()
+ _val843.read(iprot)
+ _val836[_key842] = _val843
iprot.readMapEnd()
- self.tableColumnInfoMap[_key936] = _val937
+ self.tableColumnInfoMap[_key835] = _val836
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -17087,12 +16167,12 @@ class TDescTable4InformationSchemaResp(object):
if self.tableColumnInfoMap is not None:
oprot.writeFieldBegin('tableColumnInfoMap', TType.MAP, 2)
oprot.writeMapBegin(TType.STRING, TType.MAP, len(self.tableColumnInfoMap))
- for kiter945, viter946 in self.tableColumnInfoMap.items():
- oprot.writeString(kiter945.encode('utf-8') if sys.version_info[0] == 2 else kiter945)
- oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(viter946))
- for kiter947, viter948 in viter946.items():
- oprot.writeString(kiter947.encode('utf-8') if sys.version_info[0] == 2 else kiter947)
- viter948.write(oprot)
+ for kiter844, viter845 in self.tableColumnInfoMap.items():
+ oprot.writeString(kiter844.encode('utf-8') if sys.version_info[0] == 2 else kiter844)
+ oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(viter845))
+ for kiter846, viter847 in viter845.items():
+ oprot.writeString(kiter846.encode('utf-8') if sys.version_info[0] == 2 else kiter846)
+ viter847.write(oprot)
oprot.writeMapEnd()
oprot.writeMapEnd()
oprot.writeFieldEnd()
@@ -17146,10 +16226,10 @@ class TTableColumnInfo(object):
elif fid == 2:
if ftype == TType.SET:
self.preDeletedColumns = set()
- (_etype952, _size949) = iprot.readSetBegin()
- for _i953 in range(_size949):
- _elem954 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- self.preDeletedColumns.add(_elem954)
+ (_etype851, _size848) = iprot.readSetBegin()
+ for _i852 in range(_size848):
+ _elem853 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
+ self.preDeletedColumns.add(_elem853)
iprot.readSetEnd()
else:
iprot.skip(ftype)
@@ -17170,8 +16250,8 @@ class TTableColumnInfo(object):
if self.preDeletedColumns is not None:
oprot.writeFieldBegin('preDeletedColumns', TType.SET, 2)
oprot.writeSetBegin(TType.STRING, len(self.preDeletedColumns))
- for iter955 in self.preDeletedColumns:
- oprot.writeString(iter955.encode('utf-8') if sys.version_info[0] == 2 else iter955)
+ for iter854 in self.preDeletedColumns:
+ oprot.writeString(iter854.encode('utf-8') if sys.version_info[0] == 2 else iter854)
oprot.writeSetEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -17448,14 +16528,6 @@ TSystemConfigurationResp.thrift_spec = (
(3, TType.STRUCT, 'ratisConfig', [TRatisConfig, None], None, ), # 3
(4, TType.STRUCT, 'cqConfig', [TCQConfig, None], None, ), # 4
)
-all_structs.append(TAuditConfig)
-TAuditConfig.thrift_spec = (
- None, # 0
- (1, TType.BOOL, 'enableAuditLog', None, None, ), # 1
- (2, TType.STRING, 'auditableOperationType', 'UTF8', None, ), # 2
- (3, TType.STRING, 'auditableOperationLevel', 'UTF8', None, ), # 3
- (4, TType.STRING, 'auditableOperationResult', 'UTF8', None, ), # 4
-)
all_structs.append(TGlobalConfig)
TGlobalConfig.thrift_spec = (
None, # 0
@@ -17466,12 +16538,11 @@ TGlobalConfig.thrift_spec = (
(5, TType.I64, 'timePartitionInterval', None, None, ), # 5
(6, TType.STRING, 'readConsistencyLevel', 'UTF8', None, ), # 6
(7, TType.DOUBLE, 'diskSpaceWarningThreshold', None, None, ), # 7
- (8, TType.BOOL, 'enableGrantOption', None, None, ), # 8
- (9, TType.STRING, 'timestampPrecision', 'UTF8', None, ), # 9
- (10, TType.STRING, 'schemaEngineMode', 'UTF8', None, ), # 10
- (11, TType.I32, 'tagAttributeTotalSize', None, None, ), # 11
- (12, TType.BOOL, 'isEnterprise', None, None, ), # 12
- (13, TType.I64, 'timePartitionOrigin', None, None, ), # 13
+ (8, TType.STRING, 'timestampPrecision', 'UTF8', None, ), # 8
+ (9, TType.STRING, 'schemaEngineMode', 'UTF8', None, ), # 9
+ (10, TType.I32, 'tagAttributeTotalSize', None, None, ), # 10
+ (11, TType.BOOL, 'isEnterprise', None, None, ), # 11
+ (12, TType.I64, 'timePartitionOrigin', None, None, ), # 12
)
all_structs.append(TRatisConfig)
TRatisConfig.thrift_spec = (
@@ -17510,7 +16581,6 @@ TRatisConfig.thrift_spec = (
(32, TType.I32, 'schemaRegionLogForceSyncNum', None, None, ), # 32
(33, TType.I64, 'schemaRegionPeriodicSnapshotInterval', None, None, ), # 33
(34, TType.I64, 'dataRegionPeriodicSnapshotInterval', None, None, ), # 34
- (35, TType.I32, 'ratisTransferLeaderTimeoutMs', None, None, ), # 35
)
all_structs.append(TCQConfig)
TCQConfig.thrift_spec = (
@@ -17527,9 +16597,6 @@ TRuntimeConfiguration.thrift_spec = (
(5, TType.LIST, 'allPipeInformation', (TType.STRING, 'BINARY', False), None, ), # 5
(6, TType.STRING, 'clusterId', 'UTF8', None, ), # 6
(7, TType.STRING, 'tableInfo', 'BINARY', None, ), # 7
- (8, TType.STRUCT, 'auditConfig', [TAuditConfig, None], None, ), # 8
- (9, TType.STRING, 'superUserName', 'UTF8', None, ), # 9
- (10, TType.BOOL, 'enableSeparationOfAdminPowers', None, None, ), # 10
)
all_structs.append(TDataNodeRegisterReq)
TDataNodeRegisterReq.thrift_spec = (
@@ -17667,7 +16734,6 @@ TSchemaNodeManagementReq.thrift_spec = (
(1, TType.STRING, 'pathPatternTree', 'BINARY', None, ), # 1
(2, TType.I32, 'level', None, None, ), # 2
(3, TType.STRING, 'scopePatternTree', 'BINARY', None, ), # 3
- (4, TType.BOOL, 'needAuditDB', None, None, ), # 4
)
all_structs.append(TSchemaNodeManagementResp)
TSchemaNodeManagementResp.thrift_spec = (
@@ -17771,14 +16837,14 @@ TReconstructRegionReq.thrift_spec = (
all_structs.append(TExtendRegionReq)
TExtendRegionReq.thrift_spec = (
None, # 0
- (1, TType.LIST, 'regionId', (TType.I32, None, False), None, ), # 1
+ (1, TType.I32, 'regionId', None, None, ), # 1
(2, TType.I32, 'dataNodeId', None, None, ), # 2
(3, TType.I32, 'model', None, None, ), # 3
)
all_structs.append(TRemoveRegionReq)
TRemoveRegionReq.thrift_spec = (
None, # 0
- (1, TType.LIST, 'regionId', (TType.I32, None, False), None, ), # 1
+ (1, TType.I32, 'regionId', None, None, ), # 1
(2, TType.I32, 'dataNodeId', None, None, ), # 2
(3, TType.I32, 'model', None, None, ), # 3
)
@@ -17793,8 +16859,6 @@ TAuthorizerReq.thrift_spec = (
(6, TType.SET, 'permissions', (TType.I32, None, False), None, ), # 6
(7, TType.BOOL, 'grantOpt', None, None, ), # 7
(8, TType.STRING, 'nodeNameList', 'BINARY', None, ), # 8
- (9, TType.I64, 'executedByUserID', None, None, ), # 9
- (10, TType.STRING, 'newUsername', 'UTF8', None, ), # 10
)
all_structs.append(TAuthorizerRelationalReq)
TAuthorizerRelationalReq.thrift_spec = (
@@ -17807,8 +16871,6 @@ TAuthorizerRelationalReq.thrift_spec = (
(6, TType.STRING, 'table', 'UTF8', None, ), # 6
(7, TType.SET, 'permissions', (TType.I32, None, False), None, ), # 7
(8, TType.BOOL, 'grantOpt', None, None, ), # 8
- (9, TType.I64, 'executedByUserID', None, None, ), # 9
- (10, TType.STRING, 'newUsername', 'UTF8', None, ), # 10
)
all_structs.append(TAuthorizerResp)
TAuthorizerResp.thrift_spec = (
@@ -17817,15 +16879,6 @@ TAuthorizerResp.thrift_spec = (
(2, TType.STRING, 'tag', 'UTF8', None, ), # 2
(3, TType.LIST, 'memberInfo', (TType.STRING, 'UTF8', False), None, ), # 3
(4, TType.STRUCT, 'permissionInfo', [TPermissionInfoResp, None], None, ), # 4
- (5, TType.LIST, 'usersInfo', (TType.STRUCT, [TListUserInfo, None], False), None, ), # 5
-)
-all_structs.append(TListUserInfo)
-TListUserInfo.thrift_spec = (
- None, # 0
- (1, TType.I64, 'userId', None, None, ), # 1
- (2, TType.STRING, 'username', 'UTF8', None, ), # 2
- (3, TType.I32, 'maxSessionPerUser', None, None, ), # 3
- (4, TType.I32, 'minSessionPerUser', None, None, ), # 4
)
all_structs.append(TUserResp)
TUserResp.thrift_spec = (
@@ -17834,7 +16887,6 @@ TUserResp.thrift_spec = (
(2, TType.STRING, 'password', 'UTF8', None, ), # 2
(3, TType.SET, 'roleSet', (TType.STRING, 'UTF8', False), None, ), # 3
(4, TType.BOOL, 'isOpenIdUser', None, None, ), # 4
- (5, TType.I64, 'userId', None, None, ), # 5
)
all_structs.append(TRoleResp)
TRoleResp.thrift_spec = (
@@ -18101,6 +17153,12 @@ TAINodeInfo.thrift_spec = (
(3, TType.STRING, 'internalAddress', 'UTF8', None, ), # 3
(4, TType.I32, 'internalPort', None, None, ), # 4
)
+all_structs.append(TGetAINodeLocationResp)
+TGetAINodeLocationResp.thrift_spec = (
+ None, # 0
+ (1, TType.STRUCT, 'status', [iotdb.thrift.common.ttypes.TSStatus, None], None, ), # 1
+ (2, TType.STRUCT, 'aiNodeLocation', [iotdb.thrift.common.ttypes.TAINodeLocation, None], None, ), # 2
+)
all_structs.append(TShowDataNodes4InformationSchemaResp)
TShowDataNodes4InformationSchemaResp.thrift_spec = (
None, # 0
@@ -18171,7 +17229,6 @@ TGetDatabaseReq.thrift_spec = (
(1, TType.LIST, 'databasePathPattern', (TType.STRING, 'UTF8', False), None, ), # 1
(2, TType.STRING, 'scopePatternTree', 'BINARY', None, ), # 2
(3, TType.BOOL, 'isTableModel', None, None, ), # 3
- (4, TType.BOOL, 'canSeeAuditDB', None, None, ), # 4
)
all_structs.append(TShowDatabaseResp)
TShowDatabaseResp.thrift_spec = (
@@ -18362,7 +17419,6 @@ TShowPipeReq.thrift_spec = (
(1, TType.STRING, 'pipeName', 'UTF8', None, ), # 1
(2, TType.BOOL, 'whereClause', None, None, ), # 2
(3, TType.BOOL, 'isTableModel', None, None, ), # 3
- (4, TType.STRING, 'userName', 'UTF8', None, ), # 4
)
all_structs.append(TShowPipeResp)
TShowPipeResp.thrift_spec = (
@@ -18391,7 +17447,6 @@ TDeleteTimeSeriesReq.thrift_spec = (
(1, TType.STRING, 'queryId', 'UTF8', None, ), # 1
(2, TType.STRING, 'pathPatternTree', 'BINARY', None, ), # 2
(3, TType.BOOL, 'isGeneratedByPipe', None, None, ), # 3
- (4, TType.BOOL, 'mayDeleteAudit', None, None, ), # 4
)
all_structs.append(TDeleteLogicalViewReq)
TDeleteLogicalViewReq.thrift_spec = (
@@ -18574,49 +17629,6 @@ TDropModelReq.thrift_spec = (
None, # 0
(1, TType.STRING, 'modelId', 'UTF8', None, ), # 1
)
-all_structs.append(TShowModelReq)
-TShowModelReq.thrift_spec = (
- None, # 0
- (1, TType.STRING, 'modelId', 'UTF8', None, ), # 1
-)
-all_structs.append(TShowModelResp)
-TShowModelResp.thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'status', [iotdb.thrift.common.ttypes.TSStatus, None], None, ), # 1
- (2, TType.LIST, 'modelIdList', (TType.STRING, 'UTF8', False), None, ), # 2
- (3, TType.MAP, 'modelTypeMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 3
- (4, TType.MAP, 'categoryMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 4
- (5, TType.MAP, 'stateMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 5
-)
-all_structs.append(TShowLoadedModelReq)
-TShowLoadedModelReq.thrift_spec = (
- None, # 0
- (1, TType.LIST, 'deviceIdList', (TType.STRING, 'UTF8', False), None, ), # 1
-)
-all_structs.append(TShowLoadedModelResp)
-TShowLoadedModelResp.thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'status', [iotdb.thrift.common.ttypes.TSStatus, None], None, ), # 1
- (2, TType.MAP, 'deviceLoadedModelsMap', (TType.STRING, 'UTF8', TType.MAP, (TType.STRING, 'UTF8', TType.I32, None, False), False), None, ), # 2
-)
-all_structs.append(TShowAIDevicesResp)
-TShowAIDevicesResp.thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'status', [iotdb.thrift.common.ttypes.TSStatus, None], None, ), # 1
- (2, TType.LIST, 'deviceIdList', (TType.STRING, 'UTF8', False), None, ), # 2
-)
-all_structs.append(TLoadModelReq)
-TLoadModelReq.thrift_spec = (
- None, # 0
- (1, TType.STRING, 'existingModelId', 'UTF8', None, ), # 1
- (2, TType.LIST, 'deviceIdList', (TType.STRING, 'UTF8', False), None, ), # 2
-)
-all_structs.append(TUnloadModelReq)
-TUnloadModelReq.thrift_spec = (
- None, # 0
- (1, TType.STRING, 'modelId', 'UTF8', None, ), # 1
- (2, TType.LIST, 'deviceIdList', (TType.STRING, 'UTF8', False), None, ), # 2
-)
all_structs.append(TGetModelInfoReq)
TGetModelInfoReq.thrift_spec = (
None, # 0
diff --git a/iotdb-core/ainode/iotdb/thrift/datanode/IDataNodeRPCService-remote b/iotdb-core/ainode/iotdb/thrift/datanode/IDataNodeRPCService-remote
index c37821f4d78..eb022a82405 100755
--- a/iotdb-core/ainode/iotdb/thrift/datanode/IDataNodeRPCService-remote
+++ b/iotdb-core/ainode/iotdb/thrift/datanode/IDataNodeRPCService-remote
@@ -7,14 +7,16 @@
# options string: py
#
-import sys
import pprint
+import sys
+
if sys.version_info[0] > 2:
from urllib.parse import urlparse
else:
from urlparse import urlparse
-from thrift.transport import TTransport, TSocket, TSSLSocket, THttpClient
+
from thrift.protocol.TBinaryProtocol import TBinaryProtocol
+from thrift.transport import THttpClient, TSocket, TSSLSocket, TTransport
from iotdb.thrift.datanode import IDataNodeRPCService
from iotdb.thrift.datanode.ttypes import *
@@ -61,7 +63,6 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print(' TSStatus updateTriggerLocation(TUpdateTriggerLocationReq req)')
print(' TFireTriggerResp fireTrigger(TFireTriggerReq req)')
print(' TSStatus invalidatePermissionCache(TInvalidatePermissionCacheReq req)')
- print(' TSStatus enableSeparationOfAdminPower()')
print(' TSStatus createPipePlugin(TCreatePipePluginInstanceReq req)')
print(' TSStatus dropPipePlugin(TDropPipePluginInstanceReq req)')
print(' TSStatus merge()')
@@ -71,11 +72,10 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print(' TSStatus stopRepairData()')
print(' TSStatus clearCache( cacheClearOptions)')
print(' TShowConfigurationResp showConfiguration()')
- print(' TShowAppliedConfigurationsResp showAppliedConfigurations()')
print(' TSStatus setConfiguration(TSetConfigurationReq req)')
print(' TSStatus loadConfiguration()')
print(' TSStatus setSystemStatus(string status)')
- print(' TSStatus killQueryInstance(TKillQueryInstanceReq req)')
+ print(' TSStatus killQueryInstance(string queryId)')
print(' TSStatus setTTL(TSetTTLReq req)')
print(' TSStatus updateTemplate(TUpdateTemplateReq req)')
print(' TSStatus constructSchemaBlackList(TConstructSchemaBlackListReq req)')
@@ -123,7 +123,6 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print(' TTestConnectionResp submitInternalTestConnectionTask(TNodeLocations nodeLocations)')
print(' TSStatus testConnectionEmptyRPC()')
print(' TSStatus insertRecord(TSInsertRecordReq req)')
- print(' TSStatus writeAuditLog(TAuditLogReq req)')
print('')
sys.exit(0)
@@ -425,12 +424,6 @@ elif cmd == 'invalidatePermissionCache':
sys.exit(1)
pp.pprint(client.invalidatePermissionCache(eval(args[0]),))
-elif cmd == 'enableSeparationOfAdminPower':
- if len(args) != 0:
- print('enableSeparationOfAdminPower requires 0 args')
- sys.exit(1)
- pp.pprint(client.enableSeparationOfAdminPower())
-
elif cmd == 'createPipePlugin':
if len(args) != 1:
print('createPipePlugin requires 1 args')
@@ -485,12 +478,6 @@ elif cmd == 'showConfiguration':
sys.exit(1)
pp.pprint(client.showConfiguration())
-elif cmd == 'showAppliedConfigurations':
- if len(args) != 0:
- print('showAppliedConfigurations requires 0 args')
- sys.exit(1)
- pp.pprint(client.showAppliedConfigurations())
-
elif cmd == 'setConfiguration':
if len(args) != 1:
print('setConfiguration requires 1 args')
@@ -513,7 +500,7 @@ elif cmd == 'killQueryInstance':
if len(args) != 1:
print('killQueryInstance requires 1 args')
sys.exit(1)
- pp.pprint(client.killQueryInstance(eval(args[0]),))
+ pp.pprint(client.killQueryInstance(args[0],))
elif cmd == 'setTTL':
if len(args) != 1:
@@ -797,12 +784,6 @@ elif cmd == 'insertRecord':
sys.exit(1)
pp.pprint(client.insertRecord(eval(args[0]),))
-elif cmd == 'writeAuditLog':
- if len(args) != 1:
- print('writeAuditLog requires 1 args')
- sys.exit(1)
- pp.pprint(client.writeAuditLog(eval(args[0]),))
-
else:
print('Unrecognized method %s' % cmd)
sys.exit(1)
diff --git a/iotdb-core/ainode/iotdb/thrift/datanode/IDataNodeRPCService.py b/iotdb-core/ainode/iotdb/thrift/datanode/IDataNodeRPCService.py
index ca3c29ddd8f..0793a2e1fd5 100644
--- a/iotdb-core/ainode/iotdb/thrift/datanode/IDataNodeRPCService.py
+++ b/iotdb-core/ainode/iotdb/thrift/datanode/IDataNodeRPCService.py
@@ -6,15 +6,23 @@
# options string: py
#
-from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
+import logging
+import sys
+
from thrift.protocol.TProtocol import TProtocolException
+from thrift.Thrift import (
+ TApplicationException,
+ TException,
+ TFrozenDict,
+ TMessageType,
+ TProcessor,
+ TType,
+)
+from thrift.transport import TTransport
from thrift.TRecursive import fix_spec
-import sys
-import logging
from .ttypes import *
-from thrift.Thrift import TProcessor
-from thrift.transport import TTransport
+
all_structs = []
@@ -430,14 +438,6 @@ class Iface(object):
"""
pass
- def enableSeparationOfAdminPower(self):
- """
- Enable separation of admin powers in datanode
-
-
- """
- pass
-
def createPipePlugin(self, req):
"""
Config node will create a pipe plugin on a list of data nodes.
@@ -500,9 +500,6 @@ class Iface(object):
def showConfiguration(self):
pass
- def showAppliedConfigurations(self):
- pass
-
def setConfiguration(self, req):
"""
Parameters:
@@ -522,10 +519,10 @@ class Iface(object):
"""
pass
- def killQueryInstance(self, req):
+ def killQueryInstance(self, queryId):
"""
Parameters:
- - req
+ - queryId
"""
pass
@@ -987,16 +984,6 @@ class Iface(object):
"""
pass
- def writeAuditLog(self, req):
- """
- Write an audit log entry to the DataNode's AuditEventLogger
-
- Parameters:
- - req
-
- """
- pass
-
class Client(Iface):
"""
@@ -2303,37 +2290,6 @@ class Client(Iface):
return result.success
raise TApplicationException(TApplicationException.MISSING_RESULT, "invalidatePermissionCache failed: unknown result")
- def enableSeparationOfAdminPower(self):
- """
- Enable separation of admin powers in datanode
-
-
- """
- self.send_enableSeparationOfAdminPower()
- return self.recv_enableSeparationOfAdminPower()
-
- def send_enableSeparationOfAdminPower(self):
- self._oprot.writeMessageBegin('enableSeparationOfAdminPower', TMessageType.CALL, self._seqid)
- args = enableSeparationOfAdminPower_args()
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
-
- def recv_enableSeparationOfAdminPower(self):
- iprot = self._iprot
- (fname, mtype, rseqid) = iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(iprot)
- iprot.readMessageEnd()
- raise x
- result = enableSeparationOfAdminPower_result()
- result.read(iprot)
- iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- raise TApplicationException(TApplicationException.MISSING_RESULT, "enableSeparationOfAdminPower failed: unknown result")
-
def createPipePlugin(self, req):
"""
Config node will create a pipe plugin on a list of data nodes.
@@ -2608,32 +2564,6 @@ class Client(Iface):
return result.success
raise TApplicationException(TApplicationException.MISSING_RESULT, "showConfiguration failed: unknown result")
- def showAppliedConfigurations(self):
- self.send_showAppliedConfigurations()
- return self.recv_showAppliedConfigurations()
-
- def send_showAppliedConfigurations(self):
- self._oprot.writeMessageBegin('showAppliedConfigurations', TMessageType.CALL, self._seqid)
- args = showAppliedConfigurations_args()
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
-
- def recv_showAppliedConfigurations(self):
- iprot = self._iprot
- (fname, mtype, rseqid) = iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(iprot)
- iprot.readMessageEnd()
- raise x
- result = showAppliedConfigurations_result()
- result.read(iprot)
- iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- raise TApplicationException(TApplicationException.MISSING_RESULT, "showAppliedConfigurations failed: unknown result")
-
def setConfiguration(self, req):
"""
Parameters:
@@ -2724,19 +2654,19 @@ class Client(Iface):
return result.success
raise TApplicationException(TApplicationException.MISSING_RESULT, "setSystemStatus failed: unknown result")
- def killQueryInstance(self, req):
+ def killQueryInstance(self, queryId):
"""
Parameters:
- - req
+ - queryId
"""
- self.send_killQueryInstance(req)
+ self.send_killQueryInstance(queryId)
return self.recv_killQueryInstance()
- def send_killQueryInstance(self, req):
+ def send_killQueryInstance(self, queryId):
self._oprot.writeMessageBegin('killQueryInstance', TMessageType.CALL, self._seqid)
args = killQueryInstance_args()
- args.req = req
+ args.queryId = queryId
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
@@ -4340,40 +4270,6 @@ class Client(Iface):
return result.success
raise TApplicationException(TApplicationException.MISSING_RESULT, "insertRecord failed: unknown result")
- def writeAuditLog(self, req):
- """
- Write an audit log entry to the DataNode's AuditEventLogger
-
- Parameters:
- - req
-
- """
- self.send_writeAuditLog(req)
- return self.recv_writeAuditLog()
-
- def send_writeAuditLog(self, req):
- self._oprot.writeMessageBegin('writeAuditLog', TMessageType.CALL, self._seqid)
- args = writeAuditLog_args()
- args.req = req
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
-
- def recv_writeAuditLog(self):
- iprot = self._iprot
- (fname, mtype, rseqid) = iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(iprot)
- iprot.readMessageEnd()
- raise x
- result = writeAuditLog_result()
- result.read(iprot)
- iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- raise TApplicationException(TApplicationException.MISSING_RESULT, "writeAuditLog failed: unknown result")
-
class Processor(Iface, TProcessor):
def __init__(self, handler):
@@ -4416,7 +4312,6 @@ class Processor(Iface, TProcessor):
self._processMap["updateTriggerLocation"] = Processor.process_updateTriggerLocation
self._processMap["fireTrigger"] = Processor.process_fireTrigger
self._processMap["invalidatePermissionCache"] = Processor.process_invalidatePermissionCache
- self._processMap["enableSeparationOfAdminPower"] = Processor.process_enableSeparationOfAdminPower
self._processMap["createPipePlugin"] = Processor.process_createPipePlugin
self._processMap["dropPipePlugin"] = Processor.process_dropPipePlugin
self._processMap["merge"] = Processor.process_merge
@@ -4426,7 +4321,6 @@ class Processor(Iface, TProcessor):
self._processMap["stopRepairData"] = Processor.process_stopRepairData
self._processMap["clearCache"] = Processor.process_clearCache
self._processMap["showConfiguration"] = Processor.process_showConfiguration
- self._processMap["showAppliedConfigurations"] = Processor.process_showAppliedConfigurations
self._processMap["setConfiguration"] = Processor.process_setConfiguration
self._processMap["loadConfiguration"] = Processor.process_loadConfiguration
self._processMap["setSystemStatus"] = Processor.process_setSystemStatus
@@ -4478,7 +4372,6 @@ class Processor(Iface, TProcessor):
self._processMap["submitInternalTestConnectionTask"] = Processor.process_submitInternalTestConnectionTask
self._processMap["testConnectionEmptyRPC"] = Processor.process_testConnectionEmptyRPC
self._processMap["insertRecord"] = Processor.process_insertRecord
- self._processMap["writeAuditLog"] = Processor.process_writeAuditLog
self._on_message_begin = None
def on_message_begin(self, func):
@@ -5352,29 +5245,6 @@ class Processor(Iface, TProcessor):
oprot.writeMessageEnd()
oprot.trans.flush()
- def process_enableSeparationOfAdminPower(self, seqid, iprot, oprot):
- args = enableSeparationOfAdminPower_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = enableSeparationOfAdminPower_result()
- try:
- result.success = self._handler.enableSeparationOfAdminPower()
- msg_type = TMessageType.REPLY
- except TTransport.TTransportException:
- raise
- except TApplicationException as ex:
- logging.exception('TApplication exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = ex
- except Exception:
- logging.exception('Unexpected exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("enableSeparationOfAdminPower", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
-
def process_createPipePlugin(self, seqid, iprot, oprot):
args = createPipePlugin_args()
args.read(iprot)
@@ -5582,29 +5452,6 @@ class Processor(Iface, TProcessor):
oprot.writeMessageEnd()
oprot.trans.flush()
- def process_showAppliedConfigurations(self, seqid, iprot, oprot):
- args = showAppliedConfigurations_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = showAppliedConfigurations_result()
- try:
- result.success = self._handler.showAppliedConfigurations()
- msg_type = TMessageType.REPLY
- except TTransport.TTransportException:
- raise
- except TApplicationException as ex:
- logging.exception('TApplication exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = ex
- except Exception:
- logging.exception('Unexpected exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("showAppliedConfigurations", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
-
def process_setConfiguration(self, seqid, iprot, oprot):
args = setConfiguration_args()
args.read(iprot)
@@ -5680,7 +5527,7 @@ class Processor(Iface, TProcessor):
iprot.readMessageEnd()
result = killQueryInstance_result()
try:
- result.success = self._handler.killQueryInstance(args.req)
+ result.success = self._handler.killQueryInstance(args.queryId)
msg_type = TMessageType.REPLY
except TTransport.TTransportException:
raise
@@ -6778,29 +6625,6 @@ class Processor(Iface, TProcessor):
oprot.writeMessageEnd()
oprot.trans.flush()
- def process_writeAuditLog(self, seqid, iprot, oprot):
- args = writeAuditLog_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = writeAuditLog_result()
- try:
- result.success = self._handler.writeAuditLog(args.req)
- msg_type = TMessageType.REPLY
- except TTransport.TTransportException:
- raise
- except TApplicationException as ex:
- logging.exception('TApplication exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = ex
- except Exception:
- logging.exception('Unexpected exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("writeAuditLog", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
-
# HELPER FUNCTIONS AND STRUCTURES
@@ -11299,111 +11123,6 @@ invalidatePermissionCache_result.thrift_spec = (
)
-class enableSeparationOfAdminPower_args(object):
-
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('enableSeparationOfAdminPower_args')
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-all_structs.append(enableSeparationOfAdminPower_args)
-enableSeparationOfAdminPower_args.thrift_spec = (
-)
-
-
-class enableSeparationOfAdminPower_result(object):
- """
- Attributes:
- - success
-
- """
-
-
- def __init__(self, success=None,):
- self.success = success
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 0:
- if ftype == TType.STRUCT:
- self.success = iotdb.thrift.common.ttypes.TSStatus()
- self.success.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('enableSeparationOfAdminPower_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRUCT, 0)
- self.success.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-all_structs.append(enableSeparationOfAdminPower_result)
-enableSeparationOfAdminPower_result.thrift_spec = (
- (0, TType.STRUCT, 'success', [iotdb.thrift.common.ttypes.TSStatus, None], None, ), # 0
-)
-
-
class createPipePlugin_args(object):
"""
Attributes:
@@ -12441,111 +12160,6 @@ showConfiguration_result.thrift_spec = (
)
-class showAppliedConfigurations_args(object):
-
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('showAppliedConfigurations_args')
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-all_structs.append(showAppliedConfigurations_args)
-showAppliedConfigurations_args.thrift_spec = (
-)
-
-
-class showAppliedConfigurations_result(object):
- """
- Attributes:
- - success
-
- """
-
-
- def __init__(self, success=None,):
- self.success = success
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 0:
- if ftype == TType.STRUCT:
- self.success = iotdb.thrift.common.ttypes.TShowAppliedConfigurationsResp()
- self.success.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('showAppliedConfigurations_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRUCT, 0)
- self.success.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-all_structs.append(showAppliedConfigurations_result)
-showAppliedConfigurations_result.thrift_spec = (
- (0, TType.STRUCT, 'success', [iotdb.thrift.common.ttypes.TShowAppliedConfigurationsResp, None], None, ), # 0
-)
-
-
class setConfiguration_args(object):
"""
Attributes:
@@ -12897,13 +12511,13 @@ setSystemStatus_result.thrift_spec = (
class killQueryInstance_args(object):
"""
Attributes:
- - req
+ - queryId
"""
- def __init__(self, req=None,):
- self.req = req
+ def __init__(self, queryId=None,):
+ self.queryId = queryId
def read(self, iprot):
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
@@ -12915,9 +12529,8 @@ class killQueryInstance_args(object):
if ftype == TType.STOP:
break
if fid == -1:
- if ftype == TType.STRUCT:
- self.req = TKillQueryInstanceReq()
- self.req.read(iprot)
+ if ftype == TType.STRING:
+ self.queryId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
else:
@@ -12930,9 +12543,9 @@ class killQueryInstance_args(object):
oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
return
oprot.writeStructBegin('killQueryInstance_args')
- if self.req is not None:
- oprot.writeFieldBegin('req', TType.STRUCT, -1)
- self.req.write(oprot)
+ if self.queryId is not None:
+ oprot.writeFieldBegin('queryId', TType.STRING, -1)
+ oprot.writeString(self.queryId.encode('utf-8') if sys.version_info[0] == 2 else self.queryId)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -18734,127 +18347,5 @@ all_structs.append(insertRecord_result)
insertRecord_result.thrift_spec = (
(0, TType.STRUCT, 'success', [iotdb.thrift.common.ttypes.TSStatus, None], None, ), # 0
)
-
-
-class writeAuditLog_args(object):
- """
- Attributes:
- - req
-
- """
-
-
- def __init__(self, req=None,):
- self.req = req
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == -1:
- if ftype == TType.STRUCT:
- self.req = TAuditLogReq()
- self.req.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('writeAuditLog_args')
- if self.req is not None:
- oprot.writeFieldBegin('req', TType.STRUCT, -1)
- self.req.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-all_structs.append(writeAuditLog_args)
-writeAuditLog_args.thrift_spec = ()
-
-
-class writeAuditLog_result(object):
- """
- Attributes:
- - success
-
- """
-
-
- def __init__(self, success=None,):
- self.success = success
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 0:
- if ftype == TType.STRUCT:
- self.success = iotdb.thrift.common.ttypes.TSStatus()
- self.success.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('writeAuditLog_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRUCT, 0)
- self.success.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-all_structs.append(writeAuditLog_result)
-writeAuditLog_result.thrift_spec = (
- (0, TType.STRUCT, 'success', [iotdb.thrift.common.ttypes.TSStatus, None], None, ), # 0
-)
fix_spec(all_structs)
del all_structs
diff --git a/iotdb-core/ainode/iotdb/thrift/datanode/MPPDataExchangeService-remote b/iotdb-core/ainode/iotdb/thrift/datanode/MPPDataExchangeService-remote
index b1fbd493625..3fd163e7830 100755
--- a/iotdb-core/ainode/iotdb/thrift/datanode/MPPDataExchangeService-remote
+++ b/iotdb-core/ainode/iotdb/thrift/datanode/MPPDataExchangeService-remote
@@ -7,14 +7,16 @@
# options string: py
#
-import sys
import pprint
+import sys
+
if sys.version_info[0] > 2:
from urllib.parse import urlparse
else:
from urlparse import urlparse
-from thrift.transport import TTransport, TSocket, TSSLSocket, THttpClient
+
from thrift.protocol.TBinaryProtocol import TBinaryProtocol
+from thrift.transport import THttpClient, TSocket, TSSLSocket, TTransport
from iotdb.thrift.datanode import MPPDataExchangeService
from iotdb.thrift.datanode.ttypes import *
diff --git a/iotdb-core/ainode/iotdb/thrift/datanode/MPPDataExchangeService.py b/iotdb-core/ainode/iotdb/thrift/datanode/MPPDataExchangeService.py
index ce970090b32..cd0248990b9 100644
--- a/iotdb-core/ainode/iotdb/thrift/datanode/MPPDataExchangeService.py
+++ b/iotdb-core/ainode/iotdb/thrift/datanode/MPPDataExchangeService.py
@@ -6,15 +6,23 @@
# options string: py
#
-from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
+import logging
+import sys
+
from thrift.protocol.TProtocol import TProtocolException
+from thrift.Thrift import (
+ TApplicationException,
+ TException,
+ TFrozenDict,
+ TMessageType,
+ TProcessor,
+ TType,
+)
+from thrift.transport import TTransport
from thrift.TRecursive import fix_spec
-import sys
-import logging
from .ttypes import *
-from thrift.Thrift import TProcessor
-from thrift.transport import TTransport
+
all_structs = []
diff --git a/iotdb-core/ainode/iotdb/thrift/datanode/constants.py b/iotdb-core/ainode/iotdb/thrift/datanode/constants.py
index 69c181ade38..be9fb9f77b3 100644
--- a/iotdb-core/ainode/iotdb/thrift/datanode/constants.py
+++ b/iotdb-core/ainode/iotdb/thrift/datanode/constants.py
@@ -6,9 +6,16 @@
# options string: py
#
-from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
+import sys
+
from thrift.protocol.TProtocol import TProtocolException
+from thrift.Thrift import (
+ TApplicationException,
+ TException,
+ TFrozenDict,
+ TMessageType,
+ TType,
+)
from thrift.TRecursive import fix_spec
-import sys
from .ttypes import *
diff --git a/iotdb-core/ainode/iotdb/thrift/datanode/ttypes.py b/iotdb-core/ainode/iotdb/thrift/datanode/ttypes.py
index b1d99ce48e3..380a11704f5 100644
--- a/iotdb-core/ainode/iotdb/thrift/datanode/ttypes.py
+++ b/iotdb-core/ainode/iotdb/thrift/datanode/ttypes.py
@@ -6,15 +6,22 @@
# options string: py
#
-from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
+import sys
+
from thrift.protocol.TProtocol import TProtocolException
+from thrift.Thrift import (
+ TApplicationException,
+ TException,
+ TFrozenDict,
+ TMessageType,
+ TType,
+)
+from thrift.transport import TTransport
from thrift.TRecursive import fix_spec
-import sys
import iotdb.thrift.common.ttypes
import iotdb.thrift.rpc.ttypes
-from thrift.transport import TTransport
all_structs = []
@@ -3557,15 +3564,13 @@ class TInvalidatePermissionCacheReq(object):
Attributes:
- username
- roleName
- - needDisconnect
"""
- def __init__(self, username=None, roleName=None, needDisconnect=None,):
+ def __init__(self, username=None, roleName=None,):
self.username = username
self.roleName = roleName
- self.needDisconnect = needDisconnect
def read(self, iprot):
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
@@ -3586,11 +3591,6 @@ class TInvalidatePermissionCacheReq(object):
self.roleName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.BOOL:
- self.needDisconnect = iprot.readBool()
- else:
- iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -3609,10 +3609,6 @@ class TInvalidatePermissionCacheReq(object):
oprot.writeFieldBegin('roleName', TType.STRING, 2)
oprot.writeString(self.roleName.encode('utf-8') if sys.version_info[0] == 2 else self.roleName)
oprot.writeFieldEnd()
- if self.needDisconnect is not None:
- oprot.writeFieldBegin('needDisconnect', TType.BOOL, 3)
- oprot.writeBool(self.needDisconnect)
- oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -3653,12 +3649,11 @@ class TDataNodeHeartbeatReq(object):
- topology
- logicalClock
- currentRegionOperations
- - booleanVariables1
"""
- def __init__(self, heartbeatTimestamp=None, needJudgeLeader=None, needSamplingLoad=None, timeSeriesQuotaRemain=None, schemaRegionIds=None, dataRegionIds=None, spaceQuotaUsage=None, needPipeMetaList=None, deviceQuotaRemain=None, activation=None, configNodeEndPoints=None, dataNodes=None, topology=None, logicalClock=None, currentRegionOperations=None, booleanVariables1=None,):
+ def __init__(self, heartbeatTimestamp=None, needJudgeLeader=None, needSamplingLoad=None, timeSeriesQuotaRemain=None, schemaRegionIds=None, dataRegionIds=None, spaceQuotaUsage=None, needPipeMetaList=None, deviceQuotaRemain=None, activation=None, configNodeEndPoints=None, dataNodes=None, topology=None, logicalClock=None, currentRegionOperations=None,):
self.heartbeatTimestamp = heartbeatTimestamp
self.needJudgeLeader = needJudgeLeader
self.needSamplingLoad = needSamplingLoad
@@ -3674,7 +3669,6 @@ class TDataNodeHeartbeatReq(object):
self.topology = topology
self.logicalClock = logicalClock
self.currentRegionOperations = currentRegionOperations
- self.booleanVariables1 = booleanVariables1
def read(self, iprot):
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
@@ -3808,11 +3802,6 @@ class TDataNodeHeartbeatReq(object):
iprot.readListEnd()
else:
iprot.skip(ftype)
- elif fid == 16:
- if ftype == TType.BYTE:
- self.booleanVariables1 = iprot.readByte()
- else:
- iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -3910,10 +3899,6 @@ class TDataNodeHeartbeatReq(object):
iter147.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
- if self.booleanVariables1 is not None:
- oprot.writeFieldBegin('booleanVariables1', TType.BYTE, 16)
- oprot.writeByte(self.booleanVariables1)
- oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -9251,195 +9236,6 @@ class TFetchTimeseriesResp(object):
return not (self == other)
-class TAuditLogReq(object):
- """
- Attributes:
- - username
- - userId
- - cliHostname
- - auditEventType
- - operationType
- - privilegeType
- - result
- - database
- - sqlString
- - log
- - cnId
-
- """
-
-
- def __init__(self, username=None, userId=None, cliHostname=None, auditEventType=None, operationType=None, privilegeType=None, result=None, database=None, sqlString=None, log=None, cnId=None,):
- self.username = username
- self.userId = userId
- self.cliHostname = cliHostname
- self.auditEventType = auditEventType
- self.operationType = operationType
- self.privilegeType = privilegeType
- self.result = result
- self.database = database
- self.sqlString = sqlString
- self.log = log
- self.cnId = cnId
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.username = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.I64:
- self.userId = iprot.readI64()
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.STRING:
- self.cliHostname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 4:
- if ftype == TType.STRING:
- self.auditEventType = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 5:
- if ftype == TType.STRING:
- self.operationType = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 6:
- if ftype == TType.STRING:
- self.privilegeType = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 7:
- if ftype == TType.BOOL:
- self.result = iprot.readBool()
- else:
- iprot.skip(ftype)
- elif fid == 8:
- if ftype == TType.STRING:
- self.database = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 9:
- if ftype == TType.STRING:
- self.sqlString = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 10:
- if ftype == TType.STRING:
- self.log = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 11:
- if ftype == TType.I32:
- self.cnId = iprot.readI32()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('TAuditLogReq')
- if self.username is not None:
- oprot.writeFieldBegin('username', TType.STRING, 1)
- oprot.writeString(self.username.encode('utf-8') if sys.version_info[0] == 2 else self.username)
- oprot.writeFieldEnd()
- if self.userId is not None:
- oprot.writeFieldBegin('userId', TType.I64, 2)
- oprot.writeI64(self.userId)
- oprot.writeFieldEnd()
- if self.cliHostname is not None:
- oprot.writeFieldBegin('cliHostname', TType.STRING, 3)
- oprot.writeString(self.cliHostname.encode('utf-8') if sys.version_info[0] == 2 else self.cliHostname)
- oprot.writeFieldEnd()
- if self.auditEventType is not None:
- oprot.writeFieldBegin('auditEventType', TType.STRING, 4)
- oprot.writeString(self.auditEventType.encode('utf-8') if sys.version_info[0] == 2 else self.auditEventType)
- oprot.writeFieldEnd()
- if self.operationType is not None:
- oprot.writeFieldBegin('operationType', TType.STRING, 5)
- oprot.writeString(self.operationType.encode('utf-8') if sys.version_info[0] == 2 else self.operationType)
- oprot.writeFieldEnd()
- if self.privilegeType is not None:
- oprot.writeFieldBegin('privilegeType', TType.STRING, 6)
- oprot.writeString(self.privilegeType.encode('utf-8') if sys.version_info[0] == 2 else self.privilegeType)
- oprot.writeFieldEnd()
- if self.result is not None:
- oprot.writeFieldBegin('result', TType.BOOL, 7)
- oprot.writeBool(self.result)
- oprot.writeFieldEnd()
- if self.database is not None:
- oprot.writeFieldBegin('database', TType.STRING, 8)
- oprot.writeString(self.database.encode('utf-8') if sys.version_info[0] == 2 else self.database)
- oprot.writeFieldEnd()
- if self.sqlString is not None:
- oprot.writeFieldBegin('sqlString', TType.STRING, 9)
- oprot.writeString(self.sqlString.encode('utf-8') if sys.version_info[0] == 2 else self.sqlString)
- oprot.writeFieldEnd()
- if self.log is not None:
- oprot.writeFieldBegin('log', TType.STRING, 10)
- oprot.writeString(self.log.encode('utf-8') if sys.version_info[0] == 2 else self.log)
- oprot.writeFieldEnd()
- if self.cnId is not None:
- oprot.writeFieldBegin('cnId', TType.I32, 11)
- oprot.writeI32(self.cnId)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- if self.username is None:
- raise TProtocolException(message='Required field username is unset!')
- if self.userId is None:
- raise TProtocolException(message='Required field userId is unset!')
- if self.cliHostname is None:
- raise TProtocolException(message='Required field cliHostname is unset!')
- if self.auditEventType is None:
- raise TProtocolException(message='Required field auditEventType is unset!')
- if self.operationType is None:
- raise TProtocolException(message='Required field operationType is unset!')
- if self.privilegeType is None:
- raise TProtocolException(message='Required field privilegeType is unset!')
- if self.result is None:
- raise TProtocolException(message='Required field result is unset!')
- if self.database is None:
- raise TProtocolException(message='Required field database is unset!')
- if self.sqlString is None:
- raise TProtocolException(message='Required field sqlString is unset!')
- if self.log is None:
- raise TProtocolException(message='Required field log is unset!')
- if self.cnId is None:
- raise TProtocolException(message='Required field cnId is unset!')
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
-
-
class TOperatorStatistics(object):
"""
BEGIN: Used for EXPLAIN ANALYZE
@@ -10484,74 +10280,6 @@ class TFetchFragmentInstanceStatisticsResp(object):
def __ne__(self, other):
return not (self == other)
-
-
-class TKillQueryInstanceReq(object):
- """
- Attributes:
- - queryId
- - allowedUsername
-
- """
-
-
- def __init__(self, queryId=None, allowedUsername=None,):
- self.queryId = queryId
- self.allowedUsername = allowedUsername
-
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.queryId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.allowedUsername = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
-
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('TKillQueryInstanceReq')
- if self.queryId is not None:
- oprot.writeFieldBegin('queryId', TType.STRING, 1)
- oprot.writeString(self.queryId.encode('utf-8') if sys.version_info[0] == 2 else self.queryId)
- oprot.writeFieldEnd()
- if self.allowedUsername is not None:
- oprot.writeFieldBegin('allowedUsername', TType.STRING, 2)
- oprot.writeString(self.allowedUsername.encode('utf-8') if sys.version_info[0] == 2 else self.allowedUsername)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
-
- def validate(self):
- return
-
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- return not (self == other)
all_structs.append(TCreateSchemaRegionReq)
TCreateSchemaRegionReq.thrift_spec = (
None, # 0
@@ -10841,7 +10569,6 @@ TInvalidatePermissionCacheReq.thrift_spec = (
None, # 0
(1, TType.STRING, 'username', 'UTF8', None, ), # 1
(2, TType.STRING, 'roleName', 'UTF8', None, ), # 2
- (3, TType.BOOL, 'needDisconnect', None, None, ), # 3
)
all_structs.append(TDataNodeHeartbeatReq)
TDataNodeHeartbeatReq.thrift_spec = (
@@ -10861,7 +10588,6 @@ TDataNodeHeartbeatReq.thrift_spec = (
(13, TType.MAP, 'topology', (TType.I32, None, TType.SET, (TType.I32, None, False), False), None, ), # 13
(14, TType.I64, 'logicalClock', None, None, ), # 14
(15, TType.LIST, 'currentRegionOperations', (TType.STRUCT, [iotdb.thrift.common.ttypes.TConsensusGroupId, None], False), None, ), # 15
- (16, TType.BYTE, 'booleanVariables1', None, None, ), # 16
)
all_structs.append(TDataNodeActivation)
TDataNodeActivation.thrift_spec = (
@@ -11265,21 +10991,6 @@ TFetchTimeseriesResp.thrift_spec = (
(6, TType.LIST, 'tsDataset', (TType.STRING, 'BINARY', False), None, ), # 6
(7, TType.BOOL, 'hasMoreData', None, None, ), # 7
)
-all_structs.append(TAuditLogReq)
-TAuditLogReq.thrift_spec = (
- None, # 0
- (1, TType.STRING, 'username', 'UTF8', None, ), # 1
- (2, TType.I64, 'userId', None, None, ), # 2
- (3, TType.STRING, 'cliHostname', 'UTF8', None, ), # 3
- (4, TType.STRING, 'auditEventType', 'UTF8', None, ), # 4
- (5, TType.STRING, 'operationType', 'UTF8', None, ), # 5
- (6, TType.STRING, 'privilegeType', 'UTF8', None, ), # 6
- (7, TType.BOOL, 'result', None, None, ), # 7
- (8, TType.STRING, 'database', 'UTF8', None, ), # 8
- (9, TType.STRING, 'sqlString', 'UTF8', None, ), # 9
- (10, TType.STRING, 'log', 'UTF8', None, ), # 10
- (11, TType.I32, 'cnId', None, None, ), # 11
-)
all_structs.append(TOperatorStatistics)
TOperatorStatistics.thrift_spec = (
None, # 0
@@ -11370,11 +11081,5 @@ TFetchFragmentInstanceStatisticsResp.thrift_spec = (
(16, TType.STRING, 'state', 'UTF8', None, ), # 16
(17, TType.I32, 'initDataQuerySourceRetryCount', None, None, ), # 17
)
-all_structs.append(TKillQueryInstanceReq)
-TKillQueryInstanceReq.thrift_spec = (
- None, # 0
- (1, TType.STRING, 'queryId', 'UTF8', None, ), # 1
- (2, TType.STRING, 'allowedUsername', 'UTF8', None, ), # 2
-)
fix_spec(all_structs)
del all_structs
diff --git a/iotdb-core/ainode/iotdb/thrift/rpc/IClientRPCService-remote b/iotdb-core/ainode/iotdb/thrift/rpc/IClientRPCService-remote
index 45126506e6f..e343377d3e7 100755
--- a/iotdb-core/ainode/iotdb/thrift/rpc/IClientRPCService-remote
+++ b/iotdb-core/ainode/iotdb/thrift/rpc/IClientRPCService-remote
@@ -7,14 +7,16 @@
# options string: py
#
-import sys
import pprint
+import sys
+
if sys.version_info[0] > 2:
from urllib.parse import urlparse
else:
from urlparse import urlparse
-from thrift.transport import TTransport, TSocket, TSSLSocket, THttpClient
+
from thrift.protocol.TBinaryProtocol import TBinaryProtocol
+from thrift.transport import THttpClient, TSocket, TSSLSocket, TTransport
from iotdb.thrift.rpc import IClientRPCService
from iotdb.thrift.rpc.ttypes import *
@@ -32,6 +34,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print(' TSExecuteStatementResp executeFastLastDataQueryForOnePrefixPath(TSFastLastDataQueryForOnePrefixPathReq req)')
print(' TSExecuteStatementResp executeFastLastDataQueryForOneDeviceV2(TSFastLastDataQueryForOneDeviceReq req)')
print(' TSExecuteStatementResp executeAggregationQueryV2(TSAggregationQueryReq req)')
+ print(' TSExecuteStatementResp executeGroupByQueryIntervalQuery(TSGroupByQueryIntervalReq req)')
print(' TSFetchResultsResp fetchResultsV2(TSFetchResultsReq req)')
print(' TSOpenSessionResp openSession(TSOpenSessionReq req)')
print(' TSStatus closeSession(TSCloseSessionReq req)')
@@ -217,6 +220,12 @@ elif cmd == 'executeAggregationQueryV2':
sys.exit(1)
pp.pprint(client.executeAggregationQueryV2(eval(args[0]),))
+elif cmd == 'executeGroupByQueryIntervalQuery':
+ if len(args) != 1:
+ print('executeGroupByQueryIntervalQuery requires 1 args')
+ sys.exit(1)
+ pp.pprint(client.executeGroupByQueryIntervalQuery(eval(args[0]),))
+
elif cmd == 'fetchResultsV2':
if len(args) != 1:
print('fetchResultsV2 requires 1 args')
diff --git a/iotdb-core/ainode/iotdb/thrift/rpc/IClientRPCService.py b/iotdb-core/ainode/iotdb/thrift/rpc/IClientRPCService.py
index 647d46a7995..279b7c06e2d 100644
--- a/iotdb-core/ainode/iotdb/thrift/rpc/IClientRPCService.py
+++ b/iotdb-core/ainode/iotdb/thrift/rpc/IClientRPCService.py
@@ -6,15 +6,23 @@
# options string: py
#
-from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
+import logging
+import sys
+
from thrift.protocol.TProtocol import TProtocolException
+from thrift.Thrift import (
+ TApplicationException,
+ TException,
+ TFrozenDict,
+ TMessageType,
+ TProcessor,
+ TType,
+)
+from thrift.transport import TTransport
from thrift.TRecursive import fix_spec
-import sys
-import logging
from .ttypes import *
... 831 lines suppressed ...
(iotdb) 10/15: [AINode] Enable AINode start as background (-d) (#16762)
Posted by yo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
yongzao pushed a commit to branch rc/2.0.6
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 533087eb5a5bd6ba46d6cab1ac90d8435b4a476e
Author: Yongzao <53...@qq.com>
AuthorDate: Sat Nov 15 16:56:32 2025 +0800
[AINode] Enable AINode start as background (-d) (#16762)
(cherry picked from commit 1ebb9515767eee492a908cfad38a478f1ec7bba0)
---
iotdb-core/ainode/iotdb/ainode/core/ai_node.py | 10 +++++++---
.../iotdb/ainode/core/inference/pool_controller.py | 2 +-
iotdb-core/ainode/iotdb/ainode/core/rpc/handler.py | 2 +-
iotdb-core/ainode/iotdb/ainode/core/rpc/service.py | 1 +
scripts/sbin/start-ainode.sh | 17 +++++++++++++----
scripts/sbin/windows/start-ainode.bat | 22 +++++++++++++++++-----
6 files changed, 40 insertions(+), 14 deletions(-)
diff --git a/iotdb-core/ainode/iotdb/ainode/core/ai_node.py b/iotdb-core/ainode/iotdb/ainode/core/ai_node.py
index b323818c155..13ff1f485d4 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/ai_node.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/ai_node.py
@@ -163,7 +163,11 @@ class AINode:
self._rpc_handler.stop()
if self._rpc_service:
self._rpc_service.stop()
- self._rpc_service.join(1)
- if self._rpc_service.is_alive():
- logger.warning("RPC service thread failed to stop in time.")
+ for retry in range(30):
+ self._rpc_service.join(2)
+ if not self._rpc_service.is_alive():
+ logger.warning(
+ "RPC service thread failed to stop in time, retrying..."
+ )
+ break
logger.info("IoTDB-AINode has successfully stopped.")
diff --git a/iotdb-core/ainode/iotdb/ainode/core/inference/pool_controller.py b/iotdb-core/ainode/iotdb/ainode/core/inference/pool_controller.py
index 00bb3b5568b..54580402ec2 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/inference/pool_controller.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/inference/pool_controller.py
@@ -504,7 +504,7 @@ class PoolController:
return pool_group.get_load(pool_id)
return -1
- def shutdown(self):
+ def stop(self):
self._stop_event.set()
# shutdown pool controller
diff --git a/iotdb-core/ainode/iotdb/ainode/core/rpc/handler.py b/iotdb-core/ainode/iotdb/ainode/core/rpc/handler.py
index ce7ce26abfc..eaad313903d 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/rpc/handler.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/rpc/handler.py
@@ -48,7 +48,7 @@ class AINodeRPCServiceHandler(IAINodeRPCService.Iface):
def stop(self) -> None:
logger.info("Stopping the RPC service handler of IoTDB-AINode...")
- self._inference_manager.shutdown()
+ self._inference_manager.stop()
def stopAINode(self) -> TSStatus:
self._ainode.stop()
diff --git a/iotdb-core/ainode/iotdb/ainode/core/rpc/service.py b/iotdb-core/ainode/iotdb/ainode/core/rpc/service.py
index 8642f62fc20..2282ae237d8 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/rpc/service.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/rpc/service.py
@@ -102,3 +102,4 @@ class AINodeRPCService(threading.Thread):
logger.info("Stopping the RPC service of IoTDB-AINode...")
self._stop_event.set()
self.__pool_server.stop()
+ self._handler.stop()
diff --git a/scripts/sbin/start-ainode.sh b/scripts/sbin/start-ainode.sh
index 671de54ba1a..454a0389c38 100644
--- a/scripts/sbin/start-ainode.sh
+++ b/scripts/sbin/start-ainode.sh
@@ -27,10 +27,14 @@ export IOTDB_AINODE_HOME
echo "IOTDB_AINODE_HOME: $IOTDB_AINODE_HOME"
# fetch parameters with names
-while getopts "i:rn" opt; do
+daemon_mode=false
+while getopts "i:rnd" opt; do
case $opt in
n)
;;
+ d)
+ daemon_mode=true
+ ;;
\?) echo "Invalid option -$OPTARG" >&2
exit 1
;;
@@ -41,6 +45,11 @@ ain_ainode_executable="$IOTDB_AINODE_HOME/lib/ainode"
echo Script got ainode executable: "$ain_ainode_executable"
-echo Starting AINode...
-
-$ain_ainode_executable start
+if [ "$daemon_mode" = true ]; then
+ echo Starting AINode in daemon mode...
+ nohup $ain_ainode_executable start > /dev/null 2>&1 &
+ echo AINode started in background
+else
+ echo Starting AINode...
+ $ain_ainode_executable start
+fi
diff --git a/scripts/sbin/windows/start-ainode.bat b/scripts/sbin/windows/start-ainode.bat
index 1d9a4306baf..09ce914f226 100644
--- a/scripts/sbin/windows/start-ainode.bat
+++ b/scripts/sbin/windows/start-ainode.bat
@@ -30,8 +30,20 @@ set ain_ainode_executable=%IOTDB_AINODE_HOME%\lib\ainode
echo Script got ainode executable: %ain_ainode_executable%
-echo Starting AINode...
-
-%$ain_ainode_executable% start
-
-pause
\ No newline at end of file
+set daemon_mode=false
+:parse_args
+if "%~1"=="" goto end_parse
+if /i "%~1"=="-d" set daemon_mode=true
+shift
+goto parse_args
+:end_parse
+
+if "%daemon_mode%"=="true" (
+ echo Starting AINode in daemon mode...
+ start /B "" %ain_ainode_executable% start
+ echo AINode started in background
+) else (
+ echo Starting AINode...
+ %ain_ainode_executable% start
+ pause
+)
\ No newline at end of file
(iotdb) 07/15: [AINode] Adjust the maximum inference input length (#16640)
Posted by yo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
yongzao pushed a commit to branch rc/2.0.6
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 9bd8328f24dc7abc3bd02bd73b3f9f14ae5856f0
Author: Yongzao <yo...@apache.org>
AuthorDate: Wed Oct 22 18:04:50 2025 +0800
[AINode] Adjust the maximum inference input length (#16640)
(cherry picked from commit 2c9064ff67c44820c885554f74f4c218e1d6e5a4)
---
.../plan/relational/function/tvf/ForecastTableFunction.java | 2 +-
.../db/queryengine/plan/relational/analyzer/TableFunctionTest.java | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/function/tvf/ForecastTableFunction.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/function/tvf/ForecastTableFunction.java
index b7dc5053c3f..5521062a24e 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/function/tvf/ForecastTableFunction.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/function/tvf/ForecastTableFunction.java
@@ -207,7 +207,7 @@ public class ForecastTableFunction implements TableFunction {
private static final String IS_INPUT_COLUMN_NAME = "is_input";
private static final String OPTIONS_PARAMETER_NAME = "MODEL_OPTIONS";
private static final String DEFAULT_OPTIONS = "";
- private static final int MAX_INPUT_LENGTH = 1440;
+ private static final int MAX_INPUT_LENGTH = 2880;
private static final String INVALID_OPTIONS_FORMAT = "Invalid options: %s";
diff --git a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/TableFunctionTest.java b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/TableFunctionTest.java
index 081d334a0c1..e56b48936b9 100644
--- a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/TableFunctionTest.java
+++ b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/TableFunctionTest.java
@@ -372,7 +372,7 @@ public class TableFunctionTest {
.handle(
new ForecastTableFunction.ForecastTableFunctionHandle(
false,
- 1440,
+ 2880,
"timer_xl",
Collections.emptyMap(),
96,
@@ -433,7 +433,7 @@ public class TableFunctionTest {
.handle(
new ForecastTableFunction.ForecastTableFunctionHandle(
false,
- 1440,
+ 2880,
"timer_xl",
Collections.emptyMap(),
96,
(iotdb) 02/15: [AINode] Implement concurrent inference framework (#16311)
Posted by yo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
yongzao pushed a commit to branch rc/2.0.6
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 9272ef6c2c6031bedbdd78aaf22d54b9e491c4d0
Author: Leo <16...@users.noreply.github.com>
AuthorDate: Fri Sep 12 22:14:27 2025 +0800
[AINode] Implement concurrent inference framework (#16311)
(cherry picked from commit 7b9ec7ea83d1a315690617e98056564a99dc4aee)
---
.../iotdb/it/env/cluster/node/AINodeWrapper.java | 2 +-
.../ainode/it/AINodeConcurrentInferenceIT.java | 141 ++++++
.../ainode/it/AINodeInstanceManagementIT.java | 212 +++++++++
.../apache/iotdb/ainode/utils/AINodeTestUtils.java | 32 ++
.../java/org/apache/iotdb/rpc/TSStatusCode.java | 1 +
iotdb-core/ainode/iotdb/ainode/core/ai_node.py | 2 +
iotdb-core/ainode/iotdb/ainode/core/constant.py | 9 +-
iotdb-core/ainode/iotdb/ainode/core/exception.py | 4 +-
.../iotdb/ainode/core/inference/pool_controller.py | 509 +++++++++++++++++++++
.../iotdb/ainode/core/inference/pool_group.py | 117 +++++
.../iotdb/ainode/core/manager/model_manager.py | 12 +
.../iotdb/ainode/core/model/model_storage.py | 6 +-
.../ainode/iotdb/ainode/core/util/atmoic_int.py | 66 +++
.../iotdb/ainode/core/util/batch_executor.py | 133 ++++++
.../ainode/iotdb/ainode/core/util/gpu_mapping.py | 93 ++++
.../ainode/iotdb/ainode/core/util/thread_name.py | 22 +
.../org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4 | 20 +-
.../antlr4/org/apache/iotdb/db/qp/sql/SqlLexer.g4 | 8 +
.../exception/NoAvailableAINodeException.java | 27 ++
.../iotdb/confignode/manager/ConfigManager.java | 37 ++
.../apache/iotdb/confignode/manager/IManager.java | 17 +
.../iotdb/confignode/manager/ModelManager.java | 96 +++-
.../thrift/ConfigNodeRPCServiceProcessor.java | 25 +
.../iotdb/db/protocol/client/ConfigNodeClient.java | 28 ++
.../table/v1/handler/ExecuteStatementHandler.java | 4 +
.../rest/v1/handler/ExecuteStatementHandler.java | 4 +
.../rest/v1/handler/QueryDataSetHandler.java | 4 +
.../rest/v2/handler/ExecuteStatementHandler.java | 4 +
.../rest/v2/handler/QueryDataSetHandler.java | 4 +
.../protocol/thrift/impl/ClientRPCServiceImpl.java | 1 -
.../common/header/DatasetHeaderFactory.java | 8 +
.../iotdb/db/queryengine/plan/Coordinator.java | 8 +
.../execution/config/TableConfigTaskVisitor.java | 32 ++
.../execution/config/TreeConfigTaskVisitor.java | 33 ++
.../config/executor/ClusterConfigTaskExecutor.java | 83 ++++
.../config/executor/IConfigTaskExecutor.java | 8 +
.../config/metadata/ai/LoadModelTask.java | 45 ++
.../config/metadata/ai/ShowAIDevicesTask.java | 64 +++
.../config/metadata/ai/ShowLoadedModelsTask.java | 78 ++++
.../config/metadata/ai/UnloadModelTask.java | 45 ++
.../db/queryengine/plan/parser/ASTVisitor.java | 55 +++
.../plan/relational/sql/ast/AstVisitor.java | 16 +
.../plan/relational/sql/ast/LoadModel.java | 73 +++
.../plan/relational/sql/ast/ShowAIDevices.java | 59 +++
.../plan/relational/sql/ast/ShowLoadedModels.java | 66 +++
.../plan/relational/sql/ast/UnloadModel.java | 72 +++
.../plan/relational/sql/parser/AstBuilder.java | 53 +++
.../plan/statement/StatementVisitor.java | 20 +
.../metadata/model/LoadModelStatement.java | 89 ++++
.../metadata/model/ShowAIDevicesStatement.java | 51 +++
.../metadata/model/ShowLoadedModelsStatement.java | 77 ++++
.../metadata/model/UnloadModelStatement.java | 89 ++++
.../iotdb/commons/client/ainode/AINodeClient.java | 53 +++
.../schema/column/ColumnHeaderConstant.java | 11 +
.../db/relational/grammar/sql/RelationalSql.g4 | 24 +
.../thrift-ainode/src/main/thrift/ainode.thrift | 32 ++
.../src/main/thrift/confignode.thrift | 48 ++
57 files changed, 2907 insertions(+), 25 deletions(-)
diff --git a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/AINodeWrapper.java b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/AINodeWrapper.java
index b9eba67c6e1..359c9d1c921 100644
--- a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/AINodeWrapper.java
+++ b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/AINodeWrapper.java
@@ -59,7 +59,7 @@ public class AINodeWrapper extends AbstractNodeWrapper {
public static final String CONFIG_PATH = "conf";
public static final String SCRIPT_PATH = "sbin";
public static final String BUILT_IN_MODEL_PATH = "data/ainode/models/weights";
- public static final String CACHE_BUILT_IN_MODEL_PATH = "/tmp/data/ainode/models/weights";
+ public static final String CACHE_BUILT_IN_MODEL_PATH = "/data/ainode/models/weights";
private void replaceAttribute(String[] keys, String[] values, String filePath) {
try (BufferedWriter writer = new BufferedWriter(new FileWriter(filePath, true))) {
diff --git a/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeConcurrentInferenceIT.java b/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeConcurrentInferenceIT.java
new file mode 100644
index 00000000000..b8ebfa9600b
--- /dev/null
+++ b/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeConcurrentInferenceIT.java
@@ -0,0 +1,141 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.ainode.it;
+
+import org.apache.iotdb.it.env.EnvFactory;
+import org.apache.iotdb.itbase.env.BaseEnv;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Statement;
+
+import static org.apache.iotdb.ainode.utils.AINodeTestUtils.concurrentInference;
+
+public class AINodeConcurrentInferenceIT {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(AINodeConcurrentInferenceIT.class);
+
+ @BeforeClass
+ public static void setUp() throws Exception {
+ // Init 1C1D1A cluster environment
+ EnvFactory.getEnv().initClusterEnvironment(1, 1);
+ prepareDataForTreeModel();
+ prepareDataForTableModel();
+ }
+
+ @AfterClass
+ public static void tearDown() throws Exception {
+ EnvFactory.getEnv().cleanClusterEnvironment();
+ }
+
+ private static void prepareDataForTreeModel() throws SQLException {
+ try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TREE_SQL_DIALECT);
+ Statement statement = connection.createStatement()) {
+ statement.execute("CREATE DATABASE root.AI");
+ statement.execute("CREATE TIMESERIES root.AI.s WITH DATATYPE=DOUBLE, ENCODING=RLE");
+ for (int i = 0; i < 2880; i++) {
+ statement.execute(
+ String.format(
+ "INSERT INTO root.AI(timestamp, s) VALUES(%d, %f)",
+ i, Math.sin(i * Math.PI / 1440)));
+ }
+ }
+ }
+
+ private static void prepareDataForTableModel() throws SQLException {
+ try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TABLE_SQL_DIALECT);
+ Statement statement = connection.createStatement()) {
+ statement.execute("CREATE DATABASE root");
+ statement.execute("CREATE TABLE root.AI (s DOUBLE FIELD)");
+ for (int i = 0; i < 2880; i++) {
+ statement.execute(
+ String.format(
+ "INSERT INTO root.AI(timestamp, s) VALUES(%d, %f)",
+ i, Math.sin(i * Math.PI / 1440)));
+ }
+ }
+ }
+
+ @Test
+ public void concurrentCPUCallInferenceTest() throws SQLException, InterruptedException {
+ try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TREE_SQL_DIALECT);
+ Statement statement = connection.createStatement()) {
+ statement.execute("LOAD MODEL sundial TO DEVICES \"cpu\"");
+ concurrentInference(statement, "CALL INFERENCE(sundial, \"SELECT s FROM root.AI\")", 4, 10);
+ }
+ }
+
+ @Test
+ public void concurrentGPUCallInferenceTest() throws SQLException, InterruptedException {
+ try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TREE_SQL_DIALECT);
+ Statement statement = connection.createStatement()) {
+ statement.execute("LOAD MODEL sundial TO DEVICES \"0,1\"");
+ concurrentInference(statement, "CALL INFERENCE(sundial, \"SELECT s FROM root.AI\")", 10, 100);
+ }
+ }
+
+ @Test
+ public void concurrentCPUForecastTest() throws SQLException, InterruptedException {
+ try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TREE_SQL_DIALECT);
+ Statement statement = connection.createStatement()) {
+ final int threadCnt = 4;
+ final int loop = 10;
+ statement.execute("LOAD MODEL sundial TO DEVICES \"cpu\"");
+ long startTime = System.currentTimeMillis();
+ concurrentInference(
+ statement,
+ "SELECT * FROM FORECAST(model_id=>'sundial', input=>(SELECT time,s FROM root.AI) ORDER BY time)",
+ threadCnt,
+ loop);
+ long endTime = System.currentTimeMillis();
+ LOGGER.info(
+ String.format(
+ "Timer-Sundial concurrent inference %d reqs (%d threads, %d loops) in CPU takes time: %dms",
+ threadCnt * loop, threadCnt, loop, endTime - startTime));
+ }
+ }
+
+ @Test
+ public void concurrentGPUForecastTest() throws SQLException, InterruptedException {
+ try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TREE_SQL_DIALECT);
+ Statement statement = connection.createStatement()) {
+ final int threadCnt = 10;
+ final int loop = 100;
+ statement.execute("LOAD MODEL sundial TO DEVICES \"0,1\"");
+ long startTime = System.currentTimeMillis();
+ concurrentInference(
+ statement,
+ "SELECT * FROM FORECAST(model_id=>'sundial', input=>(SELECT time,s FROM root.AI) ORDER BY time)",
+ threadCnt,
+ loop);
+ long endTime = System.currentTimeMillis();
+ LOGGER.info(
+ String.format(
+ "Timer-Sundial concurrent inference %d reqs (%d threads, %d loops) in GPU takes time: %dms",
+ threadCnt * loop, threadCnt, loop, endTime - startTime));
+ }
+ }
+}
diff --git a/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeInstanceManagementIT.java b/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeInstanceManagementIT.java
new file mode 100644
index 00000000000..93351c01785
--- /dev/null
+++ b/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeInstanceManagementIT.java
@@ -0,0 +1,212 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.ainode.it;
+
+import org.apache.iotdb.it.env.EnvFactory;
+import org.apache.iotdb.itbase.env.BaseEnv;
+
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+
+import static org.apache.iotdb.ainode.utils.AINodeTestUtils.checkHeader;
+import static org.apache.iotdb.ainode.utils.AINodeTestUtils.errorTest;
+
+public class AINodeInstanceManagementIT {
+
+ private static final int WAITING_TIME_SEC = 30;
+ private static final Set<String> TARGET_DEVICES = new HashSet<>(Arrays.asList("cpu", "0", "1"));
+
+ @BeforeClass
+ public static void setUp() throws Exception {
+ // Init 1C1D1A cluster environment
+ EnvFactory.getEnv().initClusterEnvironment(1, 1);
+ }
+
+ @AfterClass
+ public static void tearDown() throws Exception {
+ EnvFactory.getEnv().cleanClusterEnvironment();
+ }
+
+ @Test
+ public void basicManagementTestInTreeModel() throws SQLException, InterruptedException {
+ try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TREE_SQL_DIALECT);
+ Statement statement = connection.createStatement()) {
+ basicManagementTest(statement);
+ }
+ }
+
+ @Test
+ public void basicManagementTestInTableModel() throws SQLException, InterruptedException {
+ try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TABLE_SQL_DIALECT);
+ Statement statement = connection.createStatement()) {
+ basicManagementTest(statement);
+ }
+ }
+
+ private void basicManagementTest(Statement statement) throws SQLException, InterruptedException {
+ // Ensure resources
+ try (ResultSet resultSet = statement.executeQuery("SHOW AI_DEVICES")) {
+ ResultSetMetaData resultSetMetaData = resultSet.getMetaData();
+ checkHeader(resultSetMetaData, "DeviceID");
+ final Set<String> resultDevices = new HashSet<>();
+ while (resultSet.next()) {
+ resultDevices.add(resultSet.getString("DeviceID"));
+ }
+ Assert.assertEquals(TARGET_DEVICES, resultDevices);
+ }
+
+ // Load sundial to each device
+ statement.execute("LOAD MODEL sundial TO DEVICES \"cpu,0,1\"");
+ TimeUnit.SECONDS.sleep(WAITING_TIME_SEC);
+ try (ResultSet resultSet = statement.executeQuery("SHOW LOADED MODELS 0")) {
+ ResultSetMetaData resultSetMetaData = resultSet.getMetaData();
+ checkHeader(resultSetMetaData, "DeviceID,ModelType,Count(instances)");
+ while (resultSet.next()) {
+ Assert.assertEquals("0", resultSet.getString("DeviceID"));
+ Assert.assertEquals("Timer-Sundial", resultSet.getString("ModelType"));
+ Assert.assertTrue(resultSet.getInt("Count(instances)") > 1);
+ }
+ }
+ try (ResultSet resultSet = statement.executeQuery("SHOW LOADED MODELS")) {
+ ResultSetMetaData resultSetMetaData = resultSet.getMetaData();
+ checkHeader(resultSetMetaData, "DeviceID,ModelType,Count(instances)");
+ final Set<String> resultDevices = new HashSet<>();
+ while (resultSet.next()) {
+ resultDevices.add(resultSet.getString("DeviceID"));
+ }
+ Assert.assertEquals(TARGET_DEVICES, resultDevices);
+ }
+
+ // Load timer_xl to each device
+ statement.execute("LOAD MODEL timer_xl TO DEVICES \"cpu,0,1\"");
+ TimeUnit.SECONDS.sleep(WAITING_TIME_SEC);
+ try (ResultSet resultSet = statement.executeQuery("SHOW LOADED MODELS")) {
+ ResultSetMetaData resultSetMetaData = resultSet.getMetaData();
+ checkHeader(resultSetMetaData, "DeviceID,ModelType,Count(instances)");
+ final Set<String> resultDevices = new HashSet<>();
+ while (resultSet.next()) {
+ if (resultSet.getString("ModelType").equals("Timer-XL")) {
+ resultDevices.add(resultSet.getString("DeviceID"));
+ }
+ Assert.assertTrue(resultSet.getInt("Count(instances)") > 1);
+ }
+ Assert.assertEquals(TARGET_DEVICES, resultDevices);
+ }
+
+ // Clean every device
+ statement.execute("UNLOAD MODEL sundial FROM DEVICES \"cpu,0,1\"");
+ statement.execute("UNLOAD MODEL timer_xl FROM DEVICES \"cpu,0,1\"");
+ TimeUnit.SECONDS.sleep(WAITING_TIME_SEC);
+ try (ResultSet resultSet = statement.executeQuery("SHOW LOADED MODELS")) {
+ ResultSetMetaData resultSetMetaData = resultSet.getMetaData();
+ checkHeader(resultSetMetaData, "DeviceID,ModelType,Count(instances)");
+ Assert.assertFalse(resultSet.next());
+ }
+ }
+
+ private static final int LOOP_CNT = 10;
+
+ @Test
+ public void repeatLoadAndUnloadTest() throws SQLException, InterruptedException {
+ try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TREE_SQL_DIALECT);
+ Statement statement = connection.createStatement()) {
+ for (int i = 0; i < LOOP_CNT; i++) {
+ statement.execute("LOAD MODEL sundial TO DEVICES \"cpu,0,1\"");
+ TimeUnit.SECONDS.sleep(WAITING_TIME_SEC);
+ try (ResultSet resultSet = statement.executeQuery("SHOW LOADED MODELS")) {
+ ResultSetMetaData resultSetMetaData = resultSet.getMetaData();
+ checkHeader(resultSetMetaData, "DeviceID,ModelType,Count(instances)");
+ final Set<String> resultDevices = new HashSet<>();
+ while (resultSet.next()) {
+ resultDevices.add(resultSet.getString("DeviceID"));
+ }
+ Assert.assertEquals(TARGET_DEVICES, resultDevices);
+ }
+ statement.execute("UNLOAD MODEL sundial FROM DEVICES \"cpu,0,1\"");
+ TimeUnit.SECONDS.sleep(WAITING_TIME_SEC);
+ try (ResultSet resultSet = statement.executeQuery("SHOW LOADED MODELS")) {
+ ResultSetMetaData resultSetMetaData = resultSet.getMetaData();
+ checkHeader(resultSetMetaData, "DeviceID,ModelType,Count(instances)");
+ Assert.assertFalse(resultSet.next());
+ }
+ }
+ }
+ }
+
+ @Test
+ public void concurrentLoadAndUnloadTest() throws SQLException, InterruptedException {
+ try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TABLE_SQL_DIALECT);
+ Statement statement = connection.createStatement()) {
+ for (int i = 0; i < LOOP_CNT; i++) {
+ statement.execute("LOAD MODEL sundial TO DEVICES \"cpu,0,1\"");
+ statement.execute("UNLOAD MODEL sundial FROM DEVICES \"cpu,0,1\"");
+ }
+ TimeUnit.SECONDS.sleep(WAITING_TIME_SEC * LOOP_CNT);
+ try (ResultSet resultSet = statement.executeQuery("SHOW LOADED MODELS")) {
+ ResultSetMetaData resultSetMetaData = resultSet.getMetaData();
+ checkHeader(resultSetMetaData, "DeviceID,ModelType,Count(instances)");
+ Assert.assertFalse(resultSet.next());
+ }
+ }
+ }
+
+ @Test
+ public void failTestInTreeModel() throws SQLException {
+ try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TREE_SQL_DIALECT);
+ Statement statement = connection.createStatement()) {
+ failTest(statement);
+ }
+ }
+
+ @Test
+ public void failTestInTableModel() throws SQLException {
+ try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TABLE_SQL_DIALECT);
+ Statement statement = connection.createStatement()) {
+ failTest(statement);
+ }
+ }
+
+ private void failTest(Statement statement) {
+ errorTest(
+ statement,
+ "LOAD MODEL unknown TO DEVICES \"cpu,0,1\"",
+ "1505: Cannot load model [unknown], because it is neither a built-in nor a fine-tuned model. You can use 'SHOW MODELS' to retrieve the available models.");
+ errorTest(
+ statement,
+ "LOAD MODEL sundial TO DEVICES \"unknown\"",
+ "1507: Device ID [unknown] is not available. You can use 'SHOW AI_DEVICES' to retrieve the available devices.");
+ errorTest(
+ statement,
+ "UNLOAD MODEL sundial FROM DEVICES \"unknown\"",
+ "1507: Device ID [unknown] is not available. You can use 'SHOW AI_DEVICES' to retrieve the available devices.");
+ }
+}
diff --git a/integration-test/src/test/java/org/apache/iotdb/ainode/utils/AINodeTestUtils.java b/integration-test/src/test/java/org/apache/iotdb/ainode/utils/AINodeTestUtils.java
index d3f36e38efe..31e498ae729 100644
--- a/integration-test/src/test/java/org/apache/iotdb/ainode/utils/AINodeTestUtils.java
+++ b/integration-test/src/test/java/org/apache/iotdb/ainode/utils/AINodeTestUtils.java
@@ -25,6 +25,7 @@ import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Objects;
+import java.util.concurrent.TimeUnit;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
@@ -59,6 +60,37 @@ public class AINodeTestUtils {
}
}
+ public static void concurrentInference(Statement statement, String sql, int threadCnt, int loop)
+ throws InterruptedException {
+ Thread[] threads = new Thread[threadCnt];
+ for (int i = 0; i < threadCnt; i++) {
+ threads[i] =
+ new Thread(
+ () -> {
+ try {
+ for (int j = 0; j < loop; j++) {
+ try (ResultSet resultSet = statement.executeQuery(sql)) {
+ while (resultSet.next()) {
+ // do nothing
+ }
+ } catch (SQLException e) {
+ fail(e.getMessage());
+ }
+ }
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+ });
+ threads[i].start();
+ }
+ for (Thread thread : threads) {
+ thread.join(TimeUnit.MINUTES.toMillis(10));
+ if (thread.isAlive()) {
+ fail("Thread timeout after 10 minutes");
+ }
+ }
+ }
+
public static class FakeModelInfo {
private final String modelId;
diff --git a/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/TSStatusCode.java b/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/TSStatusCode.java
index c9828eb4109..98f05176068 100644
--- a/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/TSStatusCode.java
+++ b/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/TSStatusCode.java
@@ -250,6 +250,7 @@ public enum TSStatusCode {
NO_REGISTERED_AI_NODE_ERROR(1504),
MODEL_NOT_FOUND_ERROR(1505),
REGISTER_AI_NODE_ERROR(1506),
+ UNAVAILABLE_AI_DEVICE_ERROR(1507),
AI_NODE_INTERNAL_ERROR(1510),
REMOVE_AI_NODE_ERROR(1511),
diff --git a/iotdb-core/ainode/iotdb/ainode/core/ai_node.py b/iotdb-core/ainode/iotdb/ainode/core/ai_node.py
index 4fe2a9b97dc..b323818c155 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/ai_node.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/ai_node.py
@@ -147,6 +147,8 @@ class AINode:
self._stop_event = threading.Event()
signal.signal(signal.SIGTERM, self._handle_signal)
+ self._rpc_service.join()
+
def _handle_signal(self, signum, frame):
signal_name = {signal.SIGTERM: "SIGTERM", signal.SIGINT: "SIGINT"}.get(
signum, f"SIGNAL {signum}"
diff --git a/iotdb-core/ainode/iotdb/ainode/core/constant.py b/iotdb-core/ainode/iotdb/ainode/core/constant.py
index 954380b225f..c351d74db02 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/constant.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/constant.py
@@ -35,11 +35,11 @@ AINODE_SYSTEM_FILE_NAME = "system.properties"
# AINode cluster configuration
AINODE_CLUSTER_NAME = "defaultCluster"
-AINODE_TARGET_CONFIG_NODE_LIST = TEndPoint("127.0.0.1", 10710)
+AINODE_TARGET_CONFIG_NODE_LIST = TEndPoint("127.0.0.1", 10910)
AINODE_RPC_ADDRESS = "127.0.0.1"
-AINODE_RPC_PORT = 10810
+AINODE_RPC_PORT = 20810
AINODE_CLUSTER_INGRESS_ADDRESS = "127.0.0.1"
-AINODE_CLUSTER_INGRESS_PORT = 6667
+AINODE_CLUSTER_INGRESS_PORT = 9667
AINODE_CLUSTER_INGRESS_USERNAME = "root"
AINODE_CLUSTER_INGRESS_PASSWORD = "root"
AINODE_CLUSTER_INGRESS_TIME_ZONE = "UTC+8"
@@ -90,6 +90,9 @@ DEFAULT_CHUNK_SIZE = 8192
class TSStatusCode(Enum):
SUCCESS_STATUS = 200
REDIRECTION_RECOMMEND = 400
+ MODEL_EXIST_ERROR = 1502
+ MODEL_NOT_FOUND_ERROR = 1505
+ UNAVAILABLE_AI_DEVICE_ERROR = 1507
AINODE_INTERNAL_ERROR = 1510
INVALID_URI_ERROR = 1511
INVALID_INFERENCE_CONFIG = 1512
diff --git a/iotdb-core/ainode/iotdb/ainode/core/exception.py b/iotdb-core/ainode/iotdb/ainode/core/exception.py
index 4e09f053b8e..f00900e8d01 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/exception.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/exception.py
@@ -36,8 +36,8 @@ class BadNodeUrlError(_BaseError):
class ModelNotExistError(_BaseError):
- def __init__(self, file_path: str):
- self.message = "Model path is not exists: {} ".format(file_path)
+ def __init__(self, msg: str):
+ self.message = "Model is not exists: {} ".format(msg)
class BadConfigValueError(_BaseError):
diff --git a/iotdb-core/ainode/iotdb/ainode/core/inference/pool_controller.py b/iotdb-core/ainode/iotdb/ainode/core/inference/pool_controller.py
new file mode 100644
index 00000000000..ce04120474e
--- /dev/null
+++ b/iotdb-core/ainode/iotdb/ainode/core/inference/pool_controller.py
@@ -0,0 +1,509 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+import concurrent
+import queue
+import random
+import threading
+from concurrent.futures import wait
+from typing import Dict, Optional
+
+import torch
+import torch.multiprocessing as mp
+
+from iotdb.ainode.core.exception import InferenceModelInternalError
+from iotdb.ainode.core.inference.inference_request import (
+ InferenceRequest,
+ InferenceRequestProxy,
+)
+from iotdb.ainode.core.inference.inference_request_pool import (
+ InferenceRequestPool,
+ PoolState,
+)
+from iotdb.ainode.core.inference.pool_group import PoolGroup
+from iotdb.ainode.core.inference.pool_scheduler.basic_pool_scheduler import (
+ BasicPoolScheduler,
+ ScaleActionType,
+)
+from iotdb.ainode.core.log import Logger
+from iotdb.ainode.core.model.sundial.configuration_sundial import SundialConfig
+from iotdb.ainode.core.model.timerxl.configuration_timer import TimerConfig
+from iotdb.ainode.core.util.atmoic_int import AtomicInt
+from iotdb.ainode.core.util.batch_executor import BatchExecutor
+from iotdb.ainode.core.util.decorator import synchronized
+from iotdb.ainode.core.util.thread_name import ThreadName
+
+logger = Logger()
+
+
+class PoolController:
+ """
+ A controller for handling inference request pools.
+ """
+
+ def __init__(self, result_queue: mp.Queue):
+ # structure: {model_id: {device_id: PoolGroup}}
+ self._request_pool_map: Dict[str, Dict[str, PoolGroup]] = {}
+ self._new_pool_id = AtomicInt()
+ self._result_queue = result_queue
+ self._pool_scheduler = BasicPoolScheduler(self._request_pool_map)
+ self._stop_event = threading.Event()
+
+ # for pool instances control
+ self._task_queue = queue.Queue()
+ self._pool_control_worker_thread = threading.Thread(
+ target=self._worker_loop, daemon=True
+ )
+ self._pool_control_worker_thread.start()
+ self._executor = BatchExecutor(
+ thread_name_prefix=ThreadName.INFERENCE_POOL_CONTROLLER.value
+ )
+
+ # =============== Pool Management ===============
+ @synchronized(threading.Lock())
+ def first_req_init(self, model_id: str):
+ """
+ Initialize the pools when the first request for the given model_id arrives.
+ """
+ if not self.has_request_pools(model_id, device.index):
+ # TODO: choose a device based on some strategy
+ device = self.DEFAULT_DEVICE
+ actions = self._pool_scheduler.schedule(model_id, device)
+ for action in actions:
+ if action.action == ScaleActionType.SCALE_UP:
+ # initialize the first pool
+ self._first_pool_init(action.model_id, str(device))
+ # start a background thread to expand pools
+ expand_thread = threading.Thread(
+ target=self._expand_pools_on_device,
+ args=(action.model_id, str(device), action.amount - 1),
+ daemon=True,
+ )
+ expand_thread.start()
+ elif action.action == ScaleActionType.SCALE_DOWN:
+ # TODO: implement scale down logic
+ pass
+
+ def _first_pool_init(self, model_id: str, device_str: str):
+ """
+ Initialize the first pool for the given model_id.
+ Ensure the pool is ready before returning.
+ """
+ device = torch.device(device_str)
+ device_id = device.index
+
+ if model_id == "sundial":
+ config = SundialConfig()
+ elif model_id == "timer_xl":
+ config = TimerConfig()
+ first_queue = mp.Queue()
+ ready_event = mp.Event()
+ first_pool = InferenceRequestPool(
+ pool_id=0,
+ model_id=model_id,
+ device=device_str,
+ config=config,
+ request_queue=first_queue,
+ result_queue=self._result_queue,
+ ready_event=ready_event,
+ )
+ first_pool.start()
+ self._register_pool(model_id, device_str, 0, first_pool, first_queue)
+
+ if not ready_event.wait(timeout=30):
+ self._erase_pool(model_id, device_id, 0)
+ logger.error(
+ f"[Inference][Device-{device}][Pool-0] Pool failed to be ready in time"
+ )
+ else:
+ self.set_state(model_id, device_id, 0, PoolState.RUNNING)
+ logger.info(
+ f"[Inference][Device-{device}][Pool-0] Pool started running for model {model_id}"
+ )
+
+ def load_model(self, model_id: str, device_id_list: list[str]):
+ """
+ Load the model to the specified devices asynchronously.
+ Args:
+ model_id (str): The ID of the model to be loaded.
+ device_id_list (list[str]): List of device_ids where the model should be loaded.
+ """
+ self._task_queue.put((self._load_model_task, (model_id, device_id_list), {}))
+
+ def unload_model(self, model_id: str, device_id_list: list[str]):
+ """
+ Unload the model from the specified devices asynchronously.
+ Args:
+ model_id (str): The ID of the model to be unloaded.
+ device_id_list (list[str]): List of device_ids where the model should be unloaded.
+ """
+ self._task_queue.put((self._unload_model_task, (model_id, device_id_list), {}))
+
+ def show_loaded_models(
+ self, device_id_list: list[str]
+ ) -> Dict[str, Dict[str, int]]:
+ """
+ Show loaded model instances on the specified devices.
+ Args:
+ device_id_list (list[str]): List of device_ids where to examine loaded instances.
+ Return:
+ Dict[str, Dict[str, int]]: Dict[device_id, Dict[model_id, Count(instances)]].
+ """
+ result = {}
+ for device_id in device_id_list:
+ device_models = {}
+ for model_id, device_map in self._request_pool_map.items():
+ if device_id in device_map:
+ pool_group = device_map[device_id]
+ device_models[model_id] = pool_group.get_pool_count()
+ result[device_id] = device_models
+ return result
+
+ def _worker_loop(self):
+ while not self._stop_event.is_set():
+ task = self._task_queue.get()
+ if task is None:
+ self._task_queue.task_done()
+ break
+ task_fn, args, kwargs = task
+ try:
+ task_fn(*args, **kwargs)
+ except Exception as e:
+ logger.error(f"Error executing task: {e}")
+ finally:
+ self._task_queue.task_done()
+
+ def _load_model_task(self, model_id: str, device_id_list: list[str]):
+ def _load_model_on_device_task(device_id: str):
+ if not self.has_request_pools(model_id, device_id):
+ actions = self._pool_scheduler.schedule_load_model_to_device(
+ model_id, device_id
+ )
+ for action in actions:
+ if action.action == ScaleActionType.SCALE_UP:
+ self._expand_pools_on_device(
+ action.model_id, device_id, action.amount
+ )
+ elif action.action == ScaleActionType.SCALE_DOWN:
+ self._shrink_pools_on_device(
+ action.model_id, device_id, action.amount
+ )
+ else:
+ logger.info(
+ f"[Inference][Device-{device_id}] Model {model_id} is already installed."
+ )
+
+ load_model_futures = self._executor.submit_batch(
+ device_id_list, _load_model_on_device_task
+ )
+ concurrent.futures.wait(
+ load_model_futures, return_when=concurrent.futures.ALL_COMPLETED
+ )
+
+ def _unload_model_task(self, model_id: str, device_id_list: list[str]):
+ def _unload_model_on_device_task(device_id: str):
+ if self.has_request_pools(model_id, device_id):
+ actions = self._pool_scheduler.schedule_unload_model_from_device(
+ model_id, device_id
+ )
+ for action in actions:
+ if action.action == ScaleActionType.SCALE_DOWN:
+ self._shrink_pools_on_device(
+ action.model_id, device_id, action.amount
+ )
+ elif action.action == ScaleActionType.SCALE_UP:
+ self._expand_pools_on_device(
+ action.model_id, device_id, action.amount
+ )
+ else:
+ logger.info(
+ f"[Inference][Device-{device_id}] Model {model_id} is not installed."
+ )
+
+ unload_model_futures = self._executor.submit_batch(
+ device_id_list, _unload_model_on_device_task
+ )
+ concurrent.futures.wait(
+ unload_model_futures, return_when=concurrent.futures.ALL_COMPLETED
+ )
+
+ def _expand_pools_on_device(self, model_id: str, device_id: str, count: int):
+ """
+ Expand the pools for the given model_id and device_id sequentially.
+ Args:
+ model_id (str): The ID of the model.
+ device_id (str): The ID of the device.
+ count (int): The number of pools to be expanded.
+ """
+
+ def _expand_pool_on_device(*_):
+ result_queue = mp.Queue()
+ pool_id = self._new_pool_id.get_and_increment()
+ if model_id == "sundial":
+ config = SundialConfig()
+ elif model_id == "timer_xl":
+ config = TimerConfig()
+ pool = InferenceRequestPool(
+ pool_id=pool_id,
+ model_id=model_id,
+ device=device_id,
+ config=config,
+ request_queue=result_queue,
+ result_queue=self._result_queue,
+ ready_event=mp.Event(),
+ )
+ pool.start()
+ self._register_pool(model_id, device_id, pool_id, pool, result_queue)
+ if not pool.ready_event.wait(timeout=30):
+ logger.error(
+ f"[Inference][Device-{device_id}][Pool-{pool_id}] Pool failed to be ready in time"
+ )
+ # TODO: retry or decrease the count? this error should be better handled
+ self._erase_pool(model_id, device_id, pool_id)
+ else:
+ self.set_state(model_id, device_id, pool_id, PoolState.RUNNING)
+ logger.info(
+ f"[Inference][Device-{device_id}][Pool-{pool_id}] Pool started running for model {model_id}"
+ )
+
+ expand_pool_futures = self._executor.submit_batch(
+ [None for _ in range(count)], _expand_pool_on_device
+ )
+ concurrent.futures.wait(
+ expand_pool_futures, return_when=concurrent.futures.ALL_COMPLETED
+ )
+
+ def _shrink_pools_on_device(self, model_id: str, device_id: str, count):
+ """
+ Shrink the pools for the given model_id by count sequentially.
+ TODO: shrink pools in parallel
+ """
+
+ pool_ids = self.get_pool_ids(model_id, device_id)
+ current_count = len(pool_ids)
+ if current_count < count:
+ logger.warning(
+ f"[Inference] Cannot shrink {count} pools for model {model_id}, only {current_count} pools available."
+ )
+
+ # 1. Find pools with zero load and set them to STOP
+ zero_load_pools = [
+ pid for pid in pool_ids if self.get_load(model_id, device_id, pid) == 0
+ ]
+ stop_count = min(len(zero_load_pools), count)
+ pools_to_stop = zero_load_pools[:stop_count]
+
+ for pid in pools_to_stop:
+ self.set_state(
+ model_id, device_id, pid, PoolState.STOPPING
+ ) # Set to STOPPING state
+
+ remaining_to_close = count - len(pools_to_stop)
+ if remaining_to_close <= 0:
+ # close the STOP pools whose load is 0
+ for pid in pools_to_stop:
+ self.get_request_pool(model_id, device_id, pid).stop()
+ self._erase_pool(model_id, device_id, pid)
+ return
+
+ # 2. If not enough, randomly select additional pools to set to STOP
+ candidates = [pid for pid in pool_ids if pid not in pools_to_stop]
+ additional_stop = random.sample(
+ candidates, min(remaining_to_close, len(candidates))
+ ) # TODO: implement better selection strategy
+ for pid in additional_stop:
+ self.set_state(
+ model_id, device_id, pid, PoolState.STOPPING
+ ) # Set to STOPPING state
+
+ # 3. Wait for all STOPPING pools to have zero load, then close them
+ final_stop_pools = pools_to_stop + additional_stop
+ while final_stop_pools and not self._stop_event.is_set():
+ for pid in final_stop_pools[:]: # iterate over a copy of the list
+ if self.get_load(model_id, device_id, pid) == 0:
+ self.get_request_pool(model_id, device_id, pid).stop()
+ self._erase_pool(model_id, device_id, pid)
+ final_stop_pools.remove(pid)
+
+ def _register_pool(
+ self,
+ model_id: str,
+ device_id: str,
+ pool_id: int,
+ request_pool: InferenceRequestPool,
+ request_queue: mp.Queue,
+ ):
+ """
+ Register a new inference request pool for the given model_id, device and pool_id.
+ """
+ self.set_request_pool_map(
+ model_id, device_id, pool_id, request_pool, request_queue
+ )
+ pool_group: PoolGroup = self.get_request_pools_group(model_id, device_id)
+ pool_group.set_state(pool_id, PoolState.INITIALIZING)
+ logger.info(
+ f"[Inference][Device-{device_id}][Pool-{pool_id}] Pool initializing for model {model_id}"
+ )
+
+ def _erase_pool(self, model_id: str, device_id: str, pool_id: int):
+ """
+ Erase the specified inference request pool for the given model_id, device_id and pool_id.
+ """
+ pool_group = self.get_request_pools_group(model_id, device_id)
+ if pool_group:
+ pool_group.remove_pool(pool_id)
+ logger.info(
+ f"[Inference][Device-{device_id}][Pool-{pool_id}] Erase pool for model {model_id}"
+ )
+ # Clean up empty structures
+ if pool_group and not pool_group.get_pool_ids():
+ self._request_pool_map[model_id].pop(device_id, None)
+ if model_id in self._request_pool_map and not self._request_pool_map[model_id]:
+ self._request_pool_map.pop(model_id, None)
+
+ # =============== Request Management ===============
+ def add_request(self, req: InferenceRequest, infer_proxy: InferenceRequestProxy):
+ model_id = req.model_id
+ if not self.has_request_pools(model_id):
+ logger.error(f"[Inference] No pools found for model {model_id}.")
+ infer_proxy.set_result(None)
+ raise InferenceModelInternalError(
+ "Dispatch request failed, because no inference pools are init."
+ )
+ # TODO: Implement adaptive scaling based on requests.(e.g. lazy initialization)
+ # self.first_req_init(model_id)
+
+ device_ids = self.get_device_ids(model_id)
+ device_id = random.choice(
+ device_ids
+ ) # TODO: Implement better device selection strategy
+ self._request_pool_map[model_id][device_id].dispatch_request(req, infer_proxy)
+
+ # =============== Getters / Setters ===============
+ def get_state(self, model_id, device_id, pool_id) -> Optional[PoolState]:
+ """
+ Get the state of the specified pool based on model_id, device_id, and pool_id.
+ """
+ pool_group = self.get_request_pools_group(model_id, device_id)
+ if pool_group:
+ return pool_group.get_state(pool_id)
+ return None
+
+ def set_state(self, model_id, device_id, pool_id, state):
+ """
+ Set the state of the specified pool based on model_id, device_id, and pool_id.
+ """
+ pool_group = self.get_request_pools_group(model_id, device_id)
+ if pool_group:
+ pool_group.set_state(pool_id, state)
+
+ def get_device_ids(self, model_id) -> list[str]:
+ """
+ Get the list of device IDs for the given model_id, where the corresponding instances are loaded.
+ """
+ if model_id in self._request_pool_map:
+ return list(self._request_pool_map[model_id].keys())
+ return []
+
+ def get_pool_ids(self, model_id: str, device_id: str) -> list[int]:
+ """
+ Get the list of pool IDs for the given model_id and device_id.
+ """
+ pool_group = self.get_request_pools_group(model_id, device_id)
+ if pool_group:
+ return pool_group.get_pool_ids()
+ return []
+
+ def has_request_pools(self, model_id: str, device_id: Optional[str] = None) -> bool:
+ """
+ Check if there are request pools for the given model_id and device_id (optional).
+ """
+ if model_id not in self._request_pool_map:
+ return False
+ if device_id is not None:
+ return device_id in self._request_pool_map[model_id]
+ return True
+
+ def get_request_pools_group(
+ self, model_id: str, device_id: str
+ ) -> Optional[PoolGroup]:
+ if (
+ model_id in self._request_pool_map
+ and device_id in self._request_pool_map[model_id]
+ ):
+ return self._request_pool_map[model_id][device_id]
+ else:
+ return None
+
+ def get_request_pool(
+ self, model_id, device_id, pool_id
+ ) -> Optional[InferenceRequestPool]:
+ pool_group = self.get_request_pools_group(model_id, device_id)
+ if pool_group:
+ return pool_group.get_request_pool(pool_id)
+ return None
+
+ def get_request_queue(self, model_id, device_id, pool_id) -> Optional[mp.Queue]:
+ pool_group = self.get_request_pools_group(model_id, device_id)
+ if pool_group:
+ return pool_group.get_request_queue(pool_id)
+ return None
+
+ def set_request_pool_map(
+ self,
+ model_id: str,
+ device_id: str,
+ pool_id: int,
+ request_pool: InferenceRequestPool,
+ request_queue: mp.Queue,
+ ):
+ """
+ Set the request pool map for the given model_id, device and pool_id.
+ """
+ if model_id not in self._request_pool_map:
+ self._request_pool_map[model_id] = {}
+ if device_id not in self._request_pool_map[model_id]:
+ self._request_pool_map[model_id][device_id] = PoolGroup(model_id)
+ self._request_pool_map[model_id][device_id].add_pool(
+ pool_id, request_pool, request_queue
+ )
+ logger.info(
+ f"[Inference][Device-{device_id}][Pool-{pool_id}] Registered pool for model {model_id}"
+ )
+
+ def get_load(self, model_id, device_id, pool_id) -> int:
+ """
+ Get the current load of the specified pool.
+ """
+ pool_group = self.get_request_pools_group(model_id, device_id)
+ if pool_group:
+ return pool_group.get_load(pool_id)
+ return -1
+
+ def shutdown(self):
+ self._stop_event.set()
+
+ # shutdown pool controller
+ self._task_queue.put(None)
+ self._pool_control_worker_thread.join()
+ self._executor.close()
+
+ # shutdown pool instances
+ # TODO: pool instances can be shutdown in parallel
+ for inner in self._request_pool_map.values():
+ for group in inner.values():
+ group.shutdown()
diff --git a/iotdb-core/ainode/iotdb/ainode/core/inference/pool_group.py b/iotdb-core/ainode/iotdb/ainode/core/inference/pool_group.py
new file mode 100644
index 00000000000..a7004549db0
--- /dev/null
+++ b/iotdb-core/ainode/iotdb/ainode/core/inference/pool_group.py
@@ -0,0 +1,117 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+from typing import Dict, Tuple
+
+import torch.multiprocessing as mp
+
+from iotdb.ainode.core.exception import (
+ InferenceModelInternalError,
+)
+from iotdb.ainode.core.inference.dispatcher.basic_dispatcher import BasicDispatcher
+from iotdb.ainode.core.inference.inference_request import (
+ InferenceRequest,
+ InferenceRequestProxy,
+)
+from iotdb.ainode.core.inference.inference_request_pool import (
+ InferenceRequestPool,
+ PoolState,
+)
+from iotdb.ainode.core.log import Logger
+from iotdb.ainode.core.util.atmoic_int import AtomicInt
+
+logger = Logger()
+
+
+class PoolGroup:
+ """
+ A group of inference request pools for a specific model.
+ """
+
+ def __init__(self, model_id):
+ # structure: {pool_id: (InferenceRequestPool, waitingQueue)}
+ self.pool_group: Dict[int, Tuple[InferenceRequestPool, mp.Queue]] = {}
+ # structure: {pool_id: PoolState}
+ self.pool_states: Dict[int, PoolState] = {}
+ # structure: {pool_id: remaining_reqs_cnt}
+ self.pool_remaining_reqs: Dict[int, AtomicInt] = {}
+ self.model_id = model_id
+ self.request_dispatcher = BasicDispatcher(self.pool_states)
+
+ def get_pool_group(self) -> Dict[int, Tuple[InferenceRequestPool, mp.Queue]]:
+ return self.pool_group
+
+ def add_pool(
+ self, pool_id: int, request_pool: InferenceRequestPool, request_queue: mp.Queue
+ ):
+ self.pool_group[pool_id] = (request_pool, request_queue)
+ self.pool_remaining_reqs[pool_id] = AtomicInt()
+
+ def remove_pool(self, pool_id: int):
+ self.pool_group.pop(pool_id, None)
+ self.pool_states.pop(pool_id, None)
+ self.pool_remaining_reqs.pop(pool_id, None)
+
+ def get_pool_ids(self) -> list[int]:
+ return list(self.pool_group.keys())
+
+ def get_pool_count(self) -> int:
+ return len(self.pool_group)
+
+ def dispatch_request(
+ self, req: InferenceRequest, infer_proxy: InferenceRequestProxy
+ ):
+ pool_id = self.request_dispatcher.dispatch_request(req, self.get_pool_ids())
+ req_q = self.pool_group[pool_id][1]
+ self.pool_remaining_reqs[pool_id].increment_and_get()
+ infer_proxy.set_counter(self.pool_remaining_reqs[pool_id])
+ req_q.put(req)
+ logger.debug(
+ f"[Inference][Pool-{pool_id}][Req-{req.req_id}] Request is queued for inference"
+ )
+
+ def get_request_pool(self, pool_id) -> InferenceRequestPool:
+ if pool_id not in self.pool_group:
+ raise InferenceModelInternalError(
+ f"[Inference][Pool-{pool_id}] Pool not found for model {self.model_id}"
+ )
+ return self.pool_group[pool_id][0]
+
+ def get_request_queue(self, pool_id) -> mp.Queue:
+ if pool_id not in self.pool_group:
+ raise InferenceModelInternalError(
+ f"[Inference][Pool-{pool_id}] Pool not found for model {self.model_id}"
+ )
+ return self.pool_group[pool_id][1]
+
+ def get_state(self, pool_id) -> PoolState:
+ return self.pool_states[pool_id]
+
+ def set_state(self, pool_id, state):
+ self.pool_states[pool_id] = state
+
+ def get_load(self, pool_id) -> int:
+ """
+ Currently, we use the number of remaining requests in the pool as the load estimation.
+ TODO: we will implement better load estimation in the future.
+ """
+ return self.pool_remaining_reqs[pool_id].get()
+
+ def shutdown(self):
+ for pool_id, (request_pool, _) in self.pool_group.items():
+ logger.info(f"[Inference][Pool-{pool_id}] Shutting down the pool...")
+ request_pool.stop()
diff --git a/iotdb-core/ainode/iotdb/ainode/core/manager/model_manager.py b/iotdb-core/ainode/iotdb/ainode/core/manager/model_manager.py
index 818311ed57f..6917f28065e 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/manager/model_manager.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/manager/model_manager.py
@@ -155,3 +155,15 @@ class ModelManager:
Get the type of the model with the given model_id.
"""
return self.model_storage.get_built_in_model_type(model_id)
+
+ def is_built_in_or_fine_tuned(self, model_id: str) -> bool:
+ """
+ Check if the model_id corresponds to a built-in or fine-tuned model.
+
+ Args:
+ model_id (str): The ID of the model.
+
+ Returns:
+ bool: True if the model is built-in or fine_tuned, False otherwise.
+ """
+ return self.model_storage.is_built_in_or_fine_tuned(model_id)
diff --git a/iotdb-core/ainode/iotdb/ainode/core/model/model_storage.py b/iotdb-core/ainode/iotdb/ainode/core/model/model_storage.py
index 93f695805dd..467c99e00a9 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/model/model_storage.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/model/model_storage.py
@@ -281,7 +281,7 @@ class ModelStorage(object):
and self._model_info_map[model_id].category == ModelCategory.BUILT_IN
)
- def _is_built_in_or_fine_tuned(self, model_id: str) -> bool:
+ def is_built_in_or_fine_tuned(self, model_id: str) -> bool:
"""
Check if the model_id corresponds to a built-in or fine-tuned model.
@@ -306,7 +306,7 @@ class ModelStorage(object):
model: The model instance corresponding to specific model_id
"""
with self._lock_pool.get_lock(model_id).read_lock():
- if self._is_built_in_or_fine_tuned(model_id):
+ if self.is_built_in_or_fine_tuned(model_id):
model_dir = os.path.join(self._builtin_model_dir, f"{model_id}")
return fetch_built_in_model(
get_built_in_model_type(self._model_info_map[model_id].model_type),
@@ -348,7 +348,7 @@ class ModelStorage(object):
Whether saving succeeded
"""
with self._lock_pool.get_lock(model_id).write_lock():
- if self._is_built_in_or_fine_tuned(model_id):
+ if self.is_built_in_or_fine_tuned(model_id):
model_dir = os.path.join(self._builtin_model_dir, f"{model_id}")
model.save_pretrained(model_dir)
else:
diff --git a/iotdb-core/ainode/iotdb/ainode/core/util/atmoic_int.py b/iotdb-core/ainode/iotdb/ainode/core/util/atmoic_int.py
new file mode 100644
index 00000000000..8c55bd8e00c
--- /dev/null
+++ b/iotdb-core/ainode/iotdb/ainode/core/util/atmoic_int.py
@@ -0,0 +1,66 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+import threading
+
+
+class AtomicInt:
+ def __init__(self, value=0):
+ self._value = value
+ self._lock = threading.Lock()
+
+ def get(self) -> int:
+ with self._lock:
+ return self._value
+
+ def set(self, value):
+ with self._lock:
+ self._value = value
+
+ def get_and_increment(self) -> int:
+ with self._lock:
+ old_value = self._value
+ self._value += 1
+ return old_value
+
+ def increment_and_get(self) -> int:
+ with self._lock:
+ self._value += 1
+ return self._value
+
+ def get_and_decrement(self) -> int:
+ with self._lock:
+ old_value = self._value
+ self._value -= 1
+ return old_value
+
+ def decrement_and_get(self) -> int:
+ with self._lock:
+ self._value -= 1
+ return self._value
+
+ def get_and_add(self, delta=1) -> int:
+ with self._lock:
+ old_value = self._value
+ self._value += delta
+ return old_value
+
+ def add_and_get(self, delta=1) -> int:
+ with self._lock:
+ self._value += delta
+ return self._value
diff --git a/iotdb-core/ainode/iotdb/ainode/core/util/batch_executor.py b/iotdb-core/ainode/iotdb/ainode/core/util/batch_executor.py
new file mode 100644
index 00000000000..0629c893d8c
--- /dev/null
+++ b/iotdb-core/ainode/iotdb/ainode/core/util/batch_executor.py
@@ -0,0 +1,133 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+import atexit
+import threading
+from concurrent.futures import Future, ThreadPoolExecutor
+from typing import Any, Callable, Iterable, List, Optional
+
+from iotdb.ainode.core.log import Logger
+
+logger = Logger()
+
+
+class BatchExecutor:
+ """
+ Abstract batch concurrent executor.
+ - Default fire-and-forget: automatically logs task exceptions (ignores return values)
+ - Allows customization of completion logic by overriding callback hooks via inheritance
+ - Supports single/batch submission, explicit closure, context management, and exit-time cleanup
+ """
+
+ def __init__(
+ self,
+ max_workers: int = 8,
+ thread_name_prefix: str = "batch-exec",
+ cancel_on_close: bool = False,
+ ):
+ self._executor = ThreadPoolExecutor(
+ max_workers=max_workers, thread_name_prefix=thread_name_prefix
+ )
+ self._closing = threading.Event()
+ self._lock = threading.Lock()
+ self._cancel_on_close = cancel_on_close
+ atexit.register(self._atexit_close)
+
+ def submit(self, fn: Callable[..., Any], *args, **kwargs) -> Optional[Future]:
+ """
+ Submit a single task.
+ Default fire-and-forget: internally attaches a done callback to automatically log exceptions.
+ To take over result handling, inherit and override on_task_done().
+ """
+ if self._closing.is_set():
+ raise RuntimeError("Executor is closing; reject new submissions.")
+
+ fut = self._executor.submit(fn, *args, **kwargs)
+ self._attach_done_callback(fut, item=None)
+ self.on_task_submitted(item=None, future=fut)
+ return fut
+
+ def submit_batch(
+ self, items: Iterable[Any], fn: Callable[[Any], Any]
+ ) -> List[Future]:
+ """
+ Submit a batch of tasks. Executes fn(item) for each item.
+ """
+ if self._closing.is_set():
+ raise RuntimeError("Executor is closing; reject new submissions.")
+
+ futures: List[Future] = []
+ for item in items:
+ fut = self._executor.submit(fn, item)
+ self._attach_done_callback(fut, item=item)
+ self.on_task_submitted(item=item, future=fut)
+ futures.append(fut)
+ return futures
+
+ def close(self, wait: bool = True) -> None:
+ """
+ Close the executor:
+ - wait=True: wait for submitted tasks to complete (default; suitable for graceful shutdown)
+ - wait=False: return quickly; if cancel_on_close=True, attempts to cancel pending tasks
+ """
+ with self._lock:
+ if self._closing.is_set():
+ return
+ self._closing.set()
+ self._executor.shutdown(
+ wait=wait, cancel_futures=(self._cancel_on_close and not wait)
+ )
+
+ def __enter__(self):
+ return self
+
+ def __exit__(self, exc_type, exc, tb):
+ # Context manager exit: close and wait for tasks to finish
+ self.close(wait=True)
+
+ def on_task_submitted(self, item: Any, future: Future) -> None:
+ # Triggered when a task is submitted. Default does nothing.
+ pass
+
+ def on_task_done(self, item: Any, future: Future) -> None:
+ """
+ Triggered when a task is done. Default logs exceptions (key for fire-and-forget).
+ To customize behavior: inherit and override this method.
+ - If you need the result (which may raise), call future.result() here.
+ """
+ try:
+ _ = future.result()
+ except Exception as e:
+ logger.error(f"Batch task failed (item={item}), because {e}")
+
+ def _attach_done_callback(self, fut: Future, item: Any) -> None:
+ def _cb(f: Future, _item=item, self_ref=self):
+ try:
+ self_ref.on_task_done(_item, f)
+ except Exception as e:
+ logger.error(
+ f"Error in on_task_done callback (item={_item}), because {e}"
+ )
+
+ fut.add_done_callback(_cb)
+
+ def _atexit_close(self) -> None:
+ try:
+ self.close(wait=False)
+ except Exception:
+ pass
diff --git a/iotdb-core/ainode/iotdb/ainode/core/util/gpu_mapping.py b/iotdb-core/ainode/iotdb/ainode/core/util/gpu_mapping.py
new file mode 100644
index 00000000000..72b056adb87
--- /dev/null
+++ b/iotdb-core/ainode/iotdb/ainode/core/util/gpu_mapping.py
@@ -0,0 +1,93 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+import torch
+
+
+def convert_device_id_to_torch_device(device_id: str) -> torch.device:
+ """
+ Converts a device ID string to a torch.device object.
+
+ Args:
+ device_id (str): The device ID string. It can be "cpu" or a GPU index like "0", "1", etc.
+
+ Returns:
+ torch.device: The corresponding torch.device object.
+
+ Raises:
+ ValueError: If the device_id is not "cpu" or a valid integer string.
+ """
+ if device_id.lower() == "cpu":
+ return torch.device("cpu")
+ try:
+ gpu_index = int(device_id)
+ if gpu_index < 0:
+ raise ValueError
+ return torch.device(f"cuda:{gpu_index}")
+ except ValueError:
+ raise ValueError(
+ f"Invalid device_id '{device_id}'. It should be 'cpu' or a non-negative integer string."
+ )
+
+
+def get_available_gpus() -> list[int]:
+ """
+ Returns a list of available GPU indices if CUDA is available, otherwise returns an empty list.
+ """
+
+ if not torch.cuda.is_available():
+ return []
+ return list(range(torch.cuda.device_count()))
+
+
+def get_available_devices() -> list[str]:
+ """
+ Returns: a list of available device IDs as strings, including "cpu".
+ """
+ device_id_list = get_available_gpus()
+ device_id_list = [str(device_id) for device_id in device_id_list]
+ device_id_list.append("cpu")
+ return device_id_list
+
+
+def parse_devices(devices):
+ """
+ Parses the input string of GPU devices and returns a comma-separated string of valid GPU indices.
+
+ Args:
+ devices (str): A comma-separated string of GPU indices (e.g., "0,1,2").
+ Returns:
+ str: A comma-separated string of valid GPU indices corresponding to the input. All available GPUs if no input is provided.
+ Exceptions:
+ RuntimeError: If no GPUs are available.
+ ValueError: If any of the provided GPU indices are not available.
+ """
+ if devices is None or devices == "":
+ gpu_ids = get_available_gpus()
+ if not gpu_ids:
+ raise RuntimeError("No available GPU")
+ return ",".join(map(str, gpu_ids))
+ else:
+ gpu_ids = [int(gpu) for gpu in devices.split(",")]
+ available_gpus = get_available_gpus()
+ for gpu_id in gpu_ids:
+ if gpu_id not in available_gpus:
+ raise ValueError(
+ f"GPU {gpu_id} is not available, the available choices are: {available_gpus}"
+ )
+ return devices
diff --git a/iotdb-core/ainode/iotdb/ainode/core/util/thread_name.py b/iotdb-core/ainode/iotdb/ainode/core/util/thread_name.py
new file mode 100644
index 00000000000..0b26ed7b8a1
--- /dev/null
+++ b/iotdb-core/ainode/iotdb/ainode/core/util/thread_name.py
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+from enum import Enum
+
+
+class ThreadName(Enum):
+ INFERENCE_POOL_CONTROLLER = "inference-pool-controller"
diff --git a/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4 b/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4
index 789fac304a6..7816d9db9da 100644
--- a/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4
+++ b/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4
@@ -66,7 +66,8 @@ ddlStatement
| migrateRegion | reconstructRegion | extendRegion | removeRegion | removeDataNode | removeConfigNode | removeAINode
| verifyConnection
// AINode
- | showAINodes | createModel | dropModel | showModels | callInference
+ | showAINodes | createModel | dropModel | showModels | showLoadedModels | showAIDevices
+ | callInference | loadModel | unloadModel
// Quota
| setSpaceQuota | showSpaceQuota | setThrottleQuota | showThrottleQuota
// View
@@ -738,6 +739,14 @@ hparamValue
| windowFunction
;
+loadModel
+ : LOAD MODEL existingModelId=identifier TO DEVICES deviceIdList=STRING_LITERAL
+ ;
+
+unloadModel
+ : UNLOAD MODEL existingModelId=identifier FROM DEVICES deviceIdList=STRING_LITERAL
+ ;
+
// ---- Drop Model
dropModel
: DROP MODEL modelId=identifier
@@ -749,6 +758,15 @@ showModels
| SHOW MODELS modelId=identifier
;
+showLoadedModels
+ : SHOW LOADED MODELS
+ | SHOW LOADED MODELS deviceIdList=STRING_LITERAL
+ ;
+
+showAIDevices
+ : SHOW AI_DEVICES
+ ;
+
// Create Logical View
createLogicalView
: CREATE VIEW viewTargetPaths AS viewSourcePaths
diff --git a/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlLexer.g4 b/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlLexer.g4
index 787412e0812..72b4001390d 100644
--- a/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlLexer.g4
+++ b/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlLexer.g4
@@ -45,6 +45,10 @@ AFTER
: A F T E R
;
+AI_DEVICES
+ : A I '_' D E V I C E S
+ ;
+
ALIAS
: A L I A S
;
@@ -478,6 +482,10 @@ LOAD
: L O A D
;
+LOADED
+ : L O A D E D
+ ;
+
LOCAL
: L O C A L
;
diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/NoAvailableAINodeException.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/NoAvailableAINodeException.java
new file mode 100644
index 00000000000..0737b9f75ac
--- /dev/null
+++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/NoAvailableAINodeException.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.confignode.exception;
+
+public class NoAvailableAINodeException extends ConfigNodeException {
+ public NoAvailableAINodeException() {
+ super(
+ "There are no available AINodes currently, please use \"show cluster\" to check the cluster status.");
+ }
+}
diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConfigManager.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConfigManager.java
index 20d706a1252..56d4663094e 100644
--- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConfigManager.java
+++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConfigManager.java
@@ -210,6 +210,7 @@ import org.apache.iotdb.confignode.rpc.thrift.TGetTimeSlotListResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetTriggerTableResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetUDFTableResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetUdfTableReq;
+import org.apache.iotdb.confignode.rpc.thrift.TLoadModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TMigrateRegionReq;
import org.apache.iotdb.confignode.rpc.thrift.TNodeVersionInfo;
import org.apache.iotdb.confignode.rpc.thrift.TPermissionInfoResp;
@@ -222,6 +223,7 @@ import org.apache.iotdb.confignode.rpc.thrift.TSchemaNodeManagementResp;
import org.apache.iotdb.confignode.rpc.thrift.TSchemaPartitionTableResp;
import org.apache.iotdb.confignode.rpc.thrift.TSetDataNodeStatusReq;
import org.apache.iotdb.confignode.rpc.thrift.TSetSchemaTemplateReq;
+import org.apache.iotdb.confignode.rpc.thrift.TShowAIDevicesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowAINodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowCQResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowClusterResp;
@@ -230,6 +232,8 @@ import org.apache.iotdb.confignode.rpc.thrift.TShowConfigNodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDataNodes4InformationSchemaResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDataNodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDatabaseResp;
+import org.apache.iotdb.confignode.rpc.thrift.TShowLoadedModelReq;
+import org.apache.iotdb.confignode.rpc.thrift.TShowLoadedModelResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TShowModelResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowPipePluginReq;
@@ -249,6 +253,7 @@ import org.apache.iotdb.confignode.rpc.thrift.TStopPipeReq;
import org.apache.iotdb.confignode.rpc.thrift.TSubscribeReq;
import org.apache.iotdb.confignode.rpc.thrift.TThrottleQuotaResp;
import org.apache.iotdb.confignode.rpc.thrift.TTimeSlotList;
+import org.apache.iotdb.confignode.rpc.thrift.TUnloadModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TUnsetSchemaTemplateReq;
import org.apache.iotdb.confignode.rpc.thrift.TUnsubscribeReq;
import org.apache.iotdb.confignode.rpc.thrift.TUpdateModelInfoReq;
@@ -2731,6 +2736,22 @@ public class ConfigManager implements IManager {
: status;
}
+ @Override
+ public TSStatus loadModel(TLoadModelReq req) {
+ TSStatus status = confirmLeader();
+ return status.getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode()
+ ? modelManager.loadModel(req)
+ : status;
+ }
+
+ @Override
+ public TSStatus unloadModel(TUnloadModelReq req) {
+ TSStatus status = confirmLeader();
+ return status.getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode()
+ ? modelManager.unloadModel(req)
+ : status;
+ }
+
@Override
public TShowModelResp showModel(TShowModelReq req) {
TSStatus status = confirmLeader();
@@ -2739,6 +2760,22 @@ public class ConfigManager implements IManager {
: new TShowModelResp(status);
}
+ @Override
+ public TShowLoadedModelResp showLoadedModel(TShowLoadedModelReq req) {
+ TSStatus status = confirmLeader();
+ return status.getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode()
+ ? modelManager.showLoadedModel(req)
+ : new TShowLoadedModelResp(status, Collections.emptyMap());
+ }
+
+ @Override
+ public TShowAIDevicesResp showAIDevices() {
+ TSStatus status = confirmLeader();
+ return status.getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode()
+ ? modelManager.showAIDevices()
+ : new TShowAIDevicesResp(status, Collections.emptyList());
+ }
+
@Override
public TGetModelInfoResp getModelInfo(TGetModelInfoReq req) {
TSStatus status = confirmLeader();
diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/IManager.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/IManager.java
index bc080198cb6..348d973adf8 100644
--- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/IManager.java
+++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/IManager.java
@@ -124,6 +124,7 @@ import org.apache.iotdb.confignode.rpc.thrift.TGetTimeSlotListResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetTriggerTableResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetUDFTableResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetUdfTableReq;
+import org.apache.iotdb.confignode.rpc.thrift.TLoadModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TMigrateRegionReq;
import org.apache.iotdb.confignode.rpc.thrift.TPermissionInfoResp;
import org.apache.iotdb.confignode.rpc.thrift.TPipeConfigTransferReq;
@@ -135,6 +136,7 @@ import org.apache.iotdb.confignode.rpc.thrift.TSchemaNodeManagementResp;
import org.apache.iotdb.confignode.rpc.thrift.TSchemaPartitionTableResp;
import org.apache.iotdb.confignode.rpc.thrift.TSetDataNodeStatusReq;
import org.apache.iotdb.confignode.rpc.thrift.TSetSchemaTemplateReq;
+import org.apache.iotdb.confignode.rpc.thrift.TShowAIDevicesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowAINodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowCQResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowClusterResp;
@@ -143,6 +145,8 @@ import org.apache.iotdb.confignode.rpc.thrift.TShowConfigNodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDataNodes4InformationSchemaResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDataNodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDatabaseResp;
+import org.apache.iotdb.confignode.rpc.thrift.TShowLoadedModelReq;
+import org.apache.iotdb.confignode.rpc.thrift.TShowLoadedModelResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TShowModelResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowPipePluginReq;
@@ -158,6 +162,7 @@ import org.apache.iotdb.confignode.rpc.thrift.TShowVariablesResp;
import org.apache.iotdb.confignode.rpc.thrift.TStartPipeReq;
import org.apache.iotdb.confignode.rpc.thrift.TStopPipeReq;
import org.apache.iotdb.confignode.rpc.thrift.TSubscribeReq;
+import org.apache.iotdb.confignode.rpc.thrift.TUnloadModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TUnsetSchemaTemplateReq;
import org.apache.iotdb.confignode.rpc.thrift.TUnsubscribeReq;
import org.apache.iotdb.consensus.common.DataSet;
@@ -862,9 +867,21 @@ public interface IManager {
/** Drop a model. */
TSStatus dropModel(TDropModelReq req);
+ /** Load the specific model to the specific devices. */
+ TSStatus loadModel(TLoadModelReq req);
+
+ /** Unload the specific model from the specific devices. */
+ TSStatus unloadModel(TUnloadModelReq req);
+
/** Return the model table. */
TShowModelResp showModel(TShowModelReq req);
+ /** Return the loaded model instances. */
+ TShowLoadedModelResp showLoadedModel(TShowLoadedModelReq req);
+
+ /** Return all available AI devices. */
+ TShowAIDevicesResp showAIDevices();
+
/** Update the model state */
TGetModelInfoResp getModelInfo(TGetModelInfoReq req);
diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ModelManager.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ModelManager.java
index e9d9ff97510..88143af03e9 100644
--- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ModelManager.java
+++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ModelManager.java
@@ -19,12 +19,15 @@
package org.apache.iotdb.confignode.manager;
+import org.apache.iotdb.ainode.rpc.thrift.TShowLoadedModelsReq;
+import org.apache.iotdb.ainode.rpc.thrift.TShowLoadedModelsResp;
import org.apache.iotdb.ainode.rpc.thrift.TShowModelsReq;
import org.apache.iotdb.ainode.rpc.thrift.TShowModelsResp;
import org.apache.iotdb.common.rpc.thrift.TEndPoint;
import org.apache.iotdb.common.rpc.thrift.TSStatus;
import org.apache.iotdb.commons.client.ainode.AINodeClient;
import org.apache.iotdb.commons.client.ainode.AINodeClientManager;
+import org.apache.iotdb.commons.client.exception.ClientManagerException;
import org.apache.iotdb.commons.model.ModelInformation;
import org.apache.iotdb.commons.model.ModelStatus;
import org.apache.iotdb.commons.model.ModelType;
@@ -32,14 +35,20 @@ import org.apache.iotdb.confignode.consensus.request.read.model.GetModelInfoPlan
import org.apache.iotdb.confignode.consensus.request.write.model.CreateModelPlan;
import org.apache.iotdb.confignode.consensus.request.write.model.UpdateModelInfoPlan;
import org.apache.iotdb.confignode.consensus.response.model.GetModelInfoResp;
+import org.apache.iotdb.confignode.exception.NoAvailableAINodeException;
import org.apache.iotdb.confignode.persistence.ModelInfo;
import org.apache.iotdb.confignode.rpc.thrift.TAINodeInfo;
import org.apache.iotdb.confignode.rpc.thrift.TCreateModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TDropModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TGetModelInfoReq;
import org.apache.iotdb.confignode.rpc.thrift.TGetModelInfoResp;
+import org.apache.iotdb.confignode.rpc.thrift.TLoadModelReq;
+import org.apache.iotdb.confignode.rpc.thrift.TShowAIDevicesResp;
+import org.apache.iotdb.confignode.rpc.thrift.TShowLoadedModelReq;
+import org.apache.iotdb.confignode.rpc.thrift.TShowLoadedModelResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TShowModelResp;
+import org.apache.iotdb.confignode.rpc.thrift.TUnloadModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TUpdateModelInfoReq;
import org.apache.iotdb.consensus.exception.ConsensusException;
import org.apache.iotdb.rpc.TSStatusCode;
@@ -92,20 +101,33 @@ public class ModelManager {
return configManager.getProcedureManager().dropModel(req.getModelId());
}
- public TShowModelResp showModel(final TShowModelReq req) {
- List<TAINodeInfo> registeredAINodes =
- configManager.getNodeManager().getRegisteredAINodeInfoList();
- if (registeredAINodes.isEmpty()) {
- return new TShowModelResp()
- .setStatus(
- new TSStatus(TSStatusCode.NO_AVAILABLE_AINODE.getStatusCode())
- .setMessage("Show models failed due to there is no AINode available"));
+ public TSStatus loadModel(TLoadModelReq req) {
+ try (AINodeClient client = getAINodeClient()) {
+ org.apache.iotdb.ainode.rpc.thrift.TLoadModelReq loadModelReq =
+ new org.apache.iotdb.ainode.rpc.thrift.TLoadModelReq(
+ req.existingModelId, req.deviceIdList);
+ return client.loadModel(loadModelReq);
+ } catch (Exception e) {
+ LOGGER.warn("Failed to load model due to", e);
+ return new TSStatus(TSStatusCode.AI_NODE_INTERNAL_ERROR.getStatusCode())
+ .setMessage(e.getMessage());
}
- TAINodeInfo registeredAINode = registeredAINodes.get(0);
- TEndPoint targetAINodeEndPoint =
- new TEndPoint(registeredAINode.getInternalAddress(), registeredAINode.getInternalPort());
- try (AINodeClient client =
- AINodeClientManager.getInstance().borrowClient(targetAINodeEndPoint)) {
+ }
+
+ public TSStatus unloadModel(TUnloadModelReq req) {
+ try (AINodeClient client = getAINodeClient()) {
+ org.apache.iotdb.ainode.rpc.thrift.TUnloadModelReq unloadModelReq =
+ new org.apache.iotdb.ainode.rpc.thrift.TUnloadModelReq(req.modelId, req.deviceIdList);
+ return client.unloadModel(unloadModelReq);
+ } catch (Exception e) {
+ LOGGER.warn("Failed to unload model due to", e);
+ return new TSStatus(TSStatusCode.AI_NODE_INTERNAL_ERROR.getStatusCode())
+ .setMessage(e.getMessage());
+ }
+ }
+
+ public TShowModelResp showModel(final TShowModelReq req) {
+ try (AINodeClient client = getAINodeClient()) {
TShowModelsReq showModelsReq = new TShowModelsReq();
if (req.isSetModelId()) {
showModelsReq.setModelId(req.getModelId());
@@ -122,7 +144,43 @@ public class ModelManager {
LOGGER.warn("Failed to show models due to", e);
return new TShowModelResp()
.setStatus(
- new TSStatus(TSStatusCode.CAN_NOT_CONNECT_AINODE.getStatusCode())
+ new TSStatus(TSStatusCode.AI_NODE_INTERNAL_ERROR.getStatusCode())
+ .setMessage(e.getMessage()));
+ }
+ }
+
+ public TShowLoadedModelResp showLoadedModel(final TShowLoadedModelReq req) {
+ try (AINodeClient client = getAINodeClient()) {
+ TShowLoadedModelsReq showModelsReq =
+ new TShowLoadedModelsReq().setDeviceIdList(req.getDeviceIdList());
+ TShowLoadedModelsResp resp = client.showLoadedModels(showModelsReq);
+ TShowLoadedModelResp res =
+ new TShowLoadedModelResp()
+ .setStatus(new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode()));
+ res.setDeviceLoadedModelsMap(resp.getDeviceLoadedModelsMap());
+ return res;
+ } catch (Exception e) {
+ LOGGER.warn("Failed to show loaded models due to", e);
+ return new TShowLoadedModelResp()
+ .setStatus(
+ new TSStatus(TSStatusCode.AI_NODE_INTERNAL_ERROR.getStatusCode())
+ .setMessage(e.getMessage()));
+ }
+ }
+
+ public TShowAIDevicesResp showAIDevices() {
+ try (AINodeClient client = getAINodeClient()) {
+ org.apache.iotdb.ainode.rpc.thrift.TShowAIDevicesResp resp = client.showAIDevices();
+ TShowAIDevicesResp res =
+ new TShowAIDevicesResp()
+ .setStatus(new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode()));
+ res.setDeviceIdList(resp.getDeviceIdList());
+ return res;
+ } catch (Exception e) {
+ LOGGER.warn("Failed to show AI devices due to", e);
+ return new TShowAIDevicesResp()
+ .setStatus(
+ new TSStatus(TSStatusCode.AI_NODE_INTERNAL_ERROR.getStatusCode())
.setMessage(e.getMessage()));
}
}
@@ -190,6 +248,16 @@ public class ModelManager {
}
}
+ private AINodeClient getAINodeClient() throws NoAvailableAINodeException, ClientManagerException {
+ List<TAINodeInfo> aiNodeInfo = configManager.getNodeManager().getRegisteredAINodeInfoList();
+ if (aiNodeInfo.isEmpty()) {
+ throw new NoAvailableAINodeException();
+ }
+ TEndPoint targetAINodeEndPoint =
+ new TEndPoint(aiNodeInfo.get(0).getInternalAddress(), aiNodeInfo.get(0).getInternalPort());
+ return AINodeClientManager.getInstance().borrowClient(targetAINodeEndPoint);
+ }
+
public List<Integer> getModelDistributions(String modelName) {
return modelInfo.getNodeIds(modelName);
}
diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/ConfigNodeRPCServiceProcessor.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/ConfigNodeRPCServiceProcessor.java
index 958324c0b51..0de826ef542 100644
--- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/ConfigNodeRPCServiceProcessor.java
+++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/ConfigNodeRPCServiceProcessor.java
@@ -173,6 +173,7 @@ import org.apache.iotdb.confignode.rpc.thrift.TGetTimeSlotListResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetTriggerTableResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetUDFTableResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetUdfTableReq;
+import org.apache.iotdb.confignode.rpc.thrift.TLoadModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TLoginReq;
import org.apache.iotdb.confignode.rpc.thrift.TMigrateRegionReq;
import org.apache.iotdb.confignode.rpc.thrift.TPermissionInfoResp;
@@ -190,6 +191,7 @@ import org.apache.iotdb.confignode.rpc.thrift.TSetDataReplicationFactorReq;
import org.apache.iotdb.confignode.rpc.thrift.TSetSchemaReplicationFactorReq;
import org.apache.iotdb.confignode.rpc.thrift.TSetSchemaTemplateReq;
import org.apache.iotdb.confignode.rpc.thrift.TSetTimePartitionIntervalReq;
+import org.apache.iotdb.confignode.rpc.thrift.TShowAIDevicesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowAINodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowCQResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowClusterResp;
@@ -198,6 +200,8 @@ import org.apache.iotdb.confignode.rpc.thrift.TShowConfigNodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDataNodes4InformationSchemaResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDataNodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDatabaseResp;
+import org.apache.iotdb.confignode.rpc.thrift.TShowLoadedModelReq;
+import org.apache.iotdb.confignode.rpc.thrift.TShowLoadedModelResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TShowModelResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowPipePluginReq;
@@ -221,6 +225,7 @@ import org.apache.iotdb.confignode.rpc.thrift.TSubscribeReq;
import org.apache.iotdb.confignode.rpc.thrift.TSystemConfigurationResp;
import org.apache.iotdb.confignode.rpc.thrift.TTestOperation;
import org.apache.iotdb.confignode.rpc.thrift.TThrottleQuotaResp;
+import org.apache.iotdb.confignode.rpc.thrift.TUnloadModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TUnsetSchemaTemplateReq;
import org.apache.iotdb.confignode.rpc.thrift.TUnsubscribeReq;
import org.apache.iotdb.confignode.rpc.thrift.TUpdateModelInfoReq;
@@ -1323,11 +1328,31 @@ public class ConfigNodeRPCServiceProcessor implements IConfigNodeRPCService.Ifac
return configManager.dropModel(req);
}
+ @Override
+ public TSStatus loadModel(TLoadModelReq req) {
+ return configManager.loadModel(req);
+ }
+
+ @Override
+ public TSStatus unloadModel(TUnloadModelReq req) {
+ return configManager.unloadModel(req);
+ }
+
@Override
public TShowModelResp showModel(TShowModelReq req) {
return configManager.showModel(req);
}
+ @Override
+ public TShowLoadedModelResp showLoadedModel(TShowLoadedModelReq req) {
+ return configManager.showLoadedModel(req);
+ }
+
+ @Override
+ public TShowAIDevicesResp showAIDevices() {
+ return configManager.showAIDevices();
+ }
+
@Override
public TGetModelInfoResp getModelInfo(TGetModelInfoReq req) {
return configManager.getModelInfo(req);
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ConfigNodeClient.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ConfigNodeClient.java
index 6a27ad10f93..a21127b1d7d 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ConfigNodeClient.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ConfigNodeClient.java
@@ -132,6 +132,7 @@ import org.apache.iotdb.confignode.rpc.thrift.TGetTimeSlotListResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetTriggerTableResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetUDFTableResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetUdfTableReq;
+import org.apache.iotdb.confignode.rpc.thrift.TLoadModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TLoginReq;
import org.apache.iotdb.confignode.rpc.thrift.TMigrateRegionReq;
import org.apache.iotdb.confignode.rpc.thrift.TPermissionInfoResp;
@@ -149,6 +150,7 @@ import org.apache.iotdb.confignode.rpc.thrift.TSetDataReplicationFactorReq;
import org.apache.iotdb.confignode.rpc.thrift.TSetSchemaReplicationFactorReq;
import org.apache.iotdb.confignode.rpc.thrift.TSetSchemaTemplateReq;
import org.apache.iotdb.confignode.rpc.thrift.TSetTimePartitionIntervalReq;
+import org.apache.iotdb.confignode.rpc.thrift.TShowAIDevicesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowAINodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowCQResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowClusterResp;
@@ -157,6 +159,8 @@ import org.apache.iotdb.confignode.rpc.thrift.TShowConfigNodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDataNodes4InformationSchemaResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDataNodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDatabaseResp;
+import org.apache.iotdb.confignode.rpc.thrift.TShowLoadedModelReq;
+import org.apache.iotdb.confignode.rpc.thrift.TShowLoadedModelResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TShowModelResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowPipePluginReq;
@@ -180,6 +184,7 @@ import org.apache.iotdb.confignode.rpc.thrift.TSubscribeReq;
import org.apache.iotdb.confignode.rpc.thrift.TSystemConfigurationResp;
import org.apache.iotdb.confignode.rpc.thrift.TTestOperation;
import org.apache.iotdb.confignode.rpc.thrift.TThrottleQuotaResp;
+import org.apache.iotdb.confignode.rpc.thrift.TUnloadModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TUnsetSchemaTemplateReq;
import org.apache.iotdb.confignode.rpc.thrift.TUnsubscribeReq;
import org.apache.iotdb.confignode.rpc.thrift.TUpdateModelInfoReq;
@@ -1314,6 +1319,29 @@ public class ConfigNodeClient implements IConfigNodeRPCService.Iface, ThriftClie
() -> client.showModel(req), resp -> !updateConfigNodeLeader(resp.status));
}
+ @Override
+ public TShowLoadedModelResp showLoadedModel(TShowLoadedModelReq req) throws TException {
+ return executeRemoteCallWithRetry(
+ () -> client.showLoadedModel(req), resp -> !updateConfigNodeLeader(resp.status));
+ }
+
+ @Override
+ public TShowAIDevicesResp showAIDevices() throws TException {
+ return executeRemoteCallWithRetry(
+ () -> client.showAIDevices(), resp -> !updateConfigNodeLeader(resp.status));
+ }
+
+ @Override
+ public TSStatus loadModel(TLoadModelReq req) throws TException {
+ return executeRemoteCallWithRetry(
+ () -> client.loadModel(req), status -> !updateConfigNodeLeader(status));
+ }
+
+ public TSStatus unloadModel(TUnloadModelReq req) throws TException {
+ return executeRemoteCallWithRetry(
+ () -> client.unloadModel(req), status -> !updateConfigNodeLeader(status));
+ }
+
@Override
public TGetModelInfoResp getModelInfo(TGetModelInfoReq req) throws TException {
return executeRemoteCallWithRetry(
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/table/v1/handler/ExecuteStatementHandler.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/table/v1/handler/ExecuteStatementHandler.java
index fb706ded2ae..1b273753139 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/table/v1/handler/ExecuteStatementHandler.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/table/v1/handler/ExecuteStatementHandler.java
@@ -23,6 +23,7 @@ import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.Explain;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ExplainAnalyze;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.Query;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.RelationalAuthorStatement;
+import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowAIDevices;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowAINodes;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowCluster;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowClusterId;
@@ -36,6 +37,7 @@ import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowDataNodes;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowDevice;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowFunctions;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowIndex;
+import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowLoadedModels;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowModels;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowPipePlugins;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowPipes;
@@ -80,6 +82,8 @@ public class ExecuteStatementHandler {
INVALID_STATEMENT_CLASSES.add(ShowFunctions.class);
INVALID_STATEMENT_CLASSES.add(ShowIndex.class);
INVALID_STATEMENT_CLASSES.add(ShowModels.class);
+ INVALID_STATEMENT_CLASSES.add(ShowLoadedModels.class);
+ INVALID_STATEMENT_CLASSES.add(ShowAIDevices.class);
INVALID_STATEMENT_CLASSES.add(ShowPipePlugins.class);
INVALID_STATEMENT_CLASSES.add(ShowPipes.class);
INVALID_STATEMENT_CLASSES.add(ShowQueriesStatement.class);
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/v1/handler/ExecuteStatementHandler.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/v1/handler/ExecuteStatementHandler.java
index 7eec34964bc..f1c621a4aa4 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/v1/handler/ExecuteStatementHandler.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/v1/handler/ExecuteStatementHandler.java
@@ -22,6 +22,8 @@ import org.apache.iotdb.db.queryengine.plan.statement.StatementType;
import org.apache.iotdb.db.queryengine.plan.statement.crud.QueryStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.GetRegionIdStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.ShowStatement;
+import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.ShowAIDevicesStatement;
+import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.ShowLoadedModelsStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.ShowModelsStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.template.DropSchemaTemplateStatement;
import org.apache.iotdb.db.queryengine.plan.statement.sys.AuthorStatement;
@@ -32,6 +34,8 @@ public class ExecuteStatementHandler {
public static boolean validateStatement(Statement statement) {
return !(statement instanceof QueryStatement)
&& !(statement instanceof ShowModelsStatement)
+ && !(statement instanceof ShowAIDevicesStatement)
+ && !(statement instanceof ShowLoadedModelsStatement)
&& !(statement instanceof ShowStatement
&& !(statement instanceof DropSchemaTemplateStatement))
&& !(statement instanceof AuthorStatement
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/v1/handler/QueryDataSetHandler.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/v1/handler/QueryDataSetHandler.java
index 8accae7991b..55623ecad21 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/v1/handler/QueryDataSetHandler.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/v1/handler/QueryDataSetHandler.java
@@ -26,6 +26,8 @@ import org.apache.iotdb.db.queryengine.plan.statement.crud.QueryStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.GetRegionIdStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.ShowChildPathsStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.ShowStatement;
+import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.ShowAIDevicesStatement;
+import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.ShowLoadedModelsStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.ShowModelsStatement;
import org.apache.iotdb.db.queryengine.plan.statement.sys.AuthorStatement;
import org.apache.iotdb.rpc.TSStatusCode;
@@ -56,6 +58,8 @@ public class QueryDataSetHandler {
throws IoTDBException {
if (statement instanceof ShowStatement
|| statement instanceof ShowModelsStatement
+ || statement instanceof ShowAIDevicesStatement
+ || statement instanceof ShowLoadedModelsStatement
|| statement instanceof AuthorStatement
|| statement instanceof GetRegionIdStatement) {
return fillShowPlanDataSet(queryExecution, actualRowSizeLimit);
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/v2/handler/ExecuteStatementHandler.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/v2/handler/ExecuteStatementHandler.java
index 53bf7f896a9..00e43d17cce 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/v2/handler/ExecuteStatementHandler.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/v2/handler/ExecuteStatementHandler.java
@@ -22,6 +22,8 @@ import org.apache.iotdb.db.queryengine.plan.statement.StatementType;
import org.apache.iotdb.db.queryengine.plan.statement.crud.QueryStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.GetRegionIdStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.ShowStatement;
+import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.ShowAIDevicesStatement;
+import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.ShowLoadedModelsStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.ShowModelsStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.template.DropSchemaTemplateStatement;
import org.apache.iotdb.db.queryengine.plan.statement.sys.AuthorStatement;
@@ -32,6 +34,8 @@ public class ExecuteStatementHandler {
public static boolean validateStatement(Statement statement) {
return !(statement instanceof QueryStatement)
&& !(statement instanceof ShowModelsStatement)
+ && !(statement instanceof ShowAIDevicesStatement)
+ && !(statement instanceof ShowLoadedModelsStatement)
&& !(statement instanceof ShowStatement
&& !(statement instanceof DropSchemaTemplateStatement))
&& !(statement instanceof AuthorStatement
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/v2/handler/QueryDataSetHandler.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/v2/handler/QueryDataSetHandler.java
index fed6e3ec80a..b89c4f768a7 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/v2/handler/QueryDataSetHandler.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/v2/handler/QueryDataSetHandler.java
@@ -26,6 +26,8 @@ import org.apache.iotdb.db.queryengine.plan.statement.crud.QueryStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.GetRegionIdStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.ShowChildPathsStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.ShowStatement;
+import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.ShowAIDevicesStatement;
+import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.ShowLoadedModelsStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.ShowModelsStatement;
import org.apache.iotdb.db.queryengine.plan.statement.sys.AuthorStatement;
import org.apache.iotdb.rpc.TSStatusCode;
@@ -56,6 +58,8 @@ public class QueryDataSetHandler {
throws IoTDBException {
if (statement instanceof ShowStatement
|| statement instanceof ShowModelsStatement
+ || statement instanceof ShowAIDevicesStatement
+ || statement instanceof ShowLoadedModelsStatement
|| statement instanceof AuthorStatement
|| statement instanceof GetRegionIdStatement) {
return fillShowPlanDataSet(queryExecution, actualRowSizeLimit);
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/ClientRPCServiceImpl.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/ClientRPCServiceImpl.java
index 20cc3dd3c37..4aa87cda1a0 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/ClientRPCServiceImpl.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/ClientRPCServiceImpl.java
@@ -325,7 +325,6 @@ public class ClientRPCServiceImpl implements IClientRPCServiceWithHandler {
ExecutionResult result;
if (clientSession.getSqlDialect() == IClientSession.SqlDialect.TREE) {
Statement s = StatementGenerator.createStatement(statement, clientSession.getZoneId());
-
if (s instanceof SetSqlDialectStatement) {
setSqlDialect = true;
}
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/common/header/DatasetHeaderFactory.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/common/header/DatasetHeaderFactory.java
index c69dee793b9..a9e737ac06e 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/common/header/DatasetHeaderFactory.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/common/header/DatasetHeaderFactory.java
@@ -211,6 +211,14 @@ public class DatasetHeaderFactory {
return new DatasetHeader(ColumnHeaderConstant.showModelsColumnHeaders, true);
}
+ public static DatasetHeader getShowLoadedModelsHeader() {
+ return new DatasetHeader(ColumnHeaderConstant.showLoadedModelsColumnHeaders, true);
+ }
+
+ public static DatasetHeader getShowAIDevicesHeader() {
+ return new DatasetHeader(ColumnHeaderConstant.showAIDevicesColumnHeaders, true);
+ }
+
public static DatasetHeader getShowLogicalViewHeader() {
return new DatasetHeader(ColumnHeaderConstant.showLogicalViewColumnHeaders, true);
}
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/Coordinator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/Coordinator.java
index ca72d2f3151..a1aef5fff60 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/Coordinator.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/Coordinator.java
@@ -77,6 +77,7 @@ import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ExtendRegion;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.Flush;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.KillQuery;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.LoadConfiguration;
+import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.LoadModel;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.MigrateRegion;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.PipeStatement;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ReconstructRegion;
@@ -93,6 +94,7 @@ import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.SetProperties;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.SetSqlDialect;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.SetSystemStatus;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.SetTableComment;
+import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowAIDevices;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowAINodes;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowCluster;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowClusterId;
@@ -104,6 +106,7 @@ import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowCurrentUser;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowDB;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowDataNodes;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowFunctions;
+import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowLoadedModels;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowModels;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowRegions;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowTables;
@@ -112,6 +115,7 @@ import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowVersion;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.StartRepairData;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.StopRepairData;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.SubscriptionStatement;
+import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.UnloadModel;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.Use;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.WrappedInsertStatement;
import org.apache.iotdb.db.queryengine.plan.relational.sql.parser.SqlParser;
@@ -461,7 +465,11 @@ public class Coordinator {
|| statement instanceof CreateModel
|| statement instanceof CreateTraining
|| statement instanceof ShowModels
+ || statement instanceof ShowAIDevices
|| statement instanceof DropModel
+ || statement instanceof LoadModel
+ || statement instanceof UnloadModel
+ || statement instanceof ShowLoadedModels
|| statement instanceof RemoveRegion) {
return new ConfigExecution(
queryContext,
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/TableConfigTaskVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/TableConfigTaskVisitor.java
index b40096a562d..c48f7488cfc 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/TableConfigTaskVisitor.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/TableConfigTaskVisitor.java
@@ -58,7 +58,11 @@ import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ShowVariab
import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ai.CreateModelTask;
import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ai.CreateTrainingTask;
import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ai.DropModelTask;
+import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ai.LoadModelTask;
+import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ai.ShowAIDevicesTask;
+import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ai.ShowLoadedModelsTask;
import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ai.ShowModelsTask;
+import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ai.UnloadModelTask;
import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.region.ExtendRegionTask;
import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.region.MigrateRegionTask;
import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.region.ReconstructRegionTask;
@@ -154,6 +158,7 @@ import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.Flush;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.KillQuery;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.Literal;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.LoadConfiguration;
+import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.LoadModel;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.LongLiteral;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.MigrateRegion;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.Node;
@@ -173,6 +178,7 @@ import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.SetProperties;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.SetSqlDialect;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.SetSystemStatus;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.SetTableComment;
+import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowAIDevices;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowAINodes;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowCluster;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowClusterId;
@@ -184,6 +190,7 @@ import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowCurrentUser;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowDB;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowDataNodes;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowFunctions;
+import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowLoadedModels;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowModels;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowPipePlugins;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowPipes;
@@ -197,6 +204,7 @@ import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.StartPipe;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.StartRepairData;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.StopPipe;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.StopRepairData;
+import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.UnloadModel;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.Use;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ViewFieldDefinition;
import org.apache.iotdb.db.queryengine.plan.relational.sql.rewrite.StatementRewrite;
@@ -1415,4 +1423,28 @@ public class TableConfigTaskVisitor extends AstVisitor<IConfigTask, MPPQueryCont
context.setQueryType(QueryType.WRITE);
return new DropModelTask(node.getModelId());
}
+
+ @Override
+ protected IConfigTask visitShowLoadedModels(ShowLoadedModels node, MPPQueryContext context) {
+ context.setQueryType(QueryType.READ);
+ return new ShowLoadedModelsTask(node.getDeviceIdList());
+ }
+
+ @Override
+ protected IConfigTask visitShowAIDevices(ShowAIDevices node, MPPQueryContext context) {
+ context.setQueryType(QueryType.READ);
+ return new ShowAIDevicesTask();
+ }
+
+ @Override
+ protected IConfigTask visitLoadModel(LoadModel node, MPPQueryContext context) {
+ context.setQueryType(QueryType.WRITE);
+ return new LoadModelTask(node.getModelId(), node.getDeviceIdList());
+ }
+
+ @Override
+ protected IConfigTask visitUnloadModel(UnloadModel node, MPPQueryContext context) {
+ context.setQueryType(QueryType.WRITE);
+ return new UnloadModelTask(node.getModelId(), node.getDeviceIdList());
+ }
}
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/TreeConfigTaskVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/TreeConfigTaskVisitor.java
index 5be65a433d8..04ccc59580c 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/TreeConfigTaskVisitor.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/TreeConfigTaskVisitor.java
@@ -65,7 +65,11 @@ import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.UnSetTTLTa
import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ai.CreateModelTask;
import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ai.CreateTrainingTask;
import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ai.DropModelTask;
+import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ai.LoadModelTask;
+import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ai.ShowAIDevicesTask;
+import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ai.ShowLoadedModelsTask;
import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ai.ShowModelsTask;
+import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ai.UnloadModelTask;
import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.region.ExtendRegionTask;
import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.region.MigrateRegionTask;
import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.region.ReconstructRegionTask;
@@ -148,8 +152,12 @@ import org.apache.iotdb.db.queryengine.plan.statement.metadata.UnSetTTLStatement
import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.CreateModelStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.CreateTrainingStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.DropModelStatement;
+import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.LoadModelStatement;
+import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.ShowAIDevicesStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.ShowAINodesStatement;
+import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.ShowLoadedModelsStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.ShowModelsStatement;
+import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.UnloadModelStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.pipe.AlterPipeStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.pipe.CreatePipePluginStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.pipe.CreatePipeStatement;
@@ -811,6 +819,31 @@ public class TreeConfigTaskVisitor extends StatementVisitor<IConfigTask, MPPQuer
return new ShowModelsTask(showModelsStatement.getModelId());
}
+ @Override
+ public IConfigTask visitShowLoadedModels(
+ ShowLoadedModelsStatement showLoadedModelsStatement, MPPQueryContext context) {
+ return new ShowLoadedModelsTask(showLoadedModelsStatement.getDeviceIdList());
+ }
+
+ @Override
+ public IConfigTask visitShowAIDevices(
+ ShowAIDevicesStatement showAIDevicesStatement, MPPQueryContext context) {
+ return new ShowAIDevicesTask();
+ }
+
+ @Override
+ public IConfigTask visitLoadModel(
+ LoadModelStatement loadModelStatement, MPPQueryContext context) {
+ return new LoadModelTask(loadModelStatement.getModelId(), loadModelStatement.getDeviceIdList());
+ }
+
+ @Override
+ public IConfigTask visitUnloadModel(
+ UnloadModelStatement unloadModelStatement, MPPQueryContext context) {
+ return new UnloadModelTask(
+ unloadModelStatement.getModelId(), unloadModelStatement.getDeviceIdList());
+ }
+
@Override
public IConfigTask visitShowCurrentUser(ShowCurrentUserStatement node, MPPQueryContext context) {
return new ShowCurrentUserTask(context.getSession().getUserName());
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
index 8227d5b4676..aa5f3034703 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
@@ -125,18 +125,22 @@ import org.apache.iotdb.confignode.rpc.thrift.TGetTimeSlotListResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetTriggerTableResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetUDFTableResp;
import org.apache.iotdb.confignode.rpc.thrift.TGetUdfTableReq;
+import org.apache.iotdb.confignode.rpc.thrift.TLoadModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TMigrateRegionReq;
import org.apache.iotdb.confignode.rpc.thrift.TPipeConfigTransferReq;
import org.apache.iotdb.confignode.rpc.thrift.TPipeConfigTransferResp;
import org.apache.iotdb.confignode.rpc.thrift.TReconstructRegionReq;
import org.apache.iotdb.confignode.rpc.thrift.TRegionInfo;
import org.apache.iotdb.confignode.rpc.thrift.TRemoveRegionReq;
+import org.apache.iotdb.confignode.rpc.thrift.TShowAIDevicesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowAINodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowCQResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowClusterResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowConfigNodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDataNodesResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowDatabaseResp;
+import org.apache.iotdb.confignode.rpc.thrift.TShowLoadedModelReq;
+import org.apache.iotdb.confignode.rpc.thrift.TShowLoadedModelResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TShowModelResp;
import org.apache.iotdb.confignode.rpc.thrift.TShowPipeInfo;
@@ -156,6 +160,7 @@ import org.apache.iotdb.confignode.rpc.thrift.TSpaceQuotaResp;
import org.apache.iotdb.confignode.rpc.thrift.TStartPipeReq;
import org.apache.iotdb.confignode.rpc.thrift.TStopPipeReq;
import org.apache.iotdb.confignode.rpc.thrift.TThrottleQuotaResp;
+import org.apache.iotdb.confignode.rpc.thrift.TUnloadModelReq;
import org.apache.iotdb.confignode.rpc.thrift.TUnsetSchemaTemplateReq;
import org.apache.iotdb.db.conf.IoTDBDescriptor;
import org.apache.iotdb.db.exception.BatchProcessException;
@@ -199,6 +204,8 @@ import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ShowRegion
import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ShowTTLTask;
import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ShowTriggersTask;
import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ShowVariablesTask;
+import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ai.ShowAIDevicesTask;
+import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ai.ShowLoadedModelsTask;
import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ai.ShowModelsTask;
import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.region.ExtendRegionTask;
import org.apache.iotdb.db.queryengine.plan.execution.config.metadata.region.MigrateRegionTask;
@@ -3382,6 +3389,82 @@ public class ClusterConfigTaskExecutor implements IConfigTaskExecutor {
return future;
}
+ @Override
+ public SettableFuture<ConfigTaskResult> showLoadedModels(List<String> deviceIdList) {
+ final SettableFuture<ConfigTaskResult> future = SettableFuture.create();
+ try (final ConfigNodeClient client =
+ CONFIG_NODE_CLIENT_MANAGER.borrowClient(ConfigNodeInfo.CONFIG_REGION_ID)) {
+ final TShowLoadedModelReq req = new TShowLoadedModelReq();
+ if (deviceIdList != null) {
+ req.setDeviceIdList(deviceIdList);
+ }
+ final TShowLoadedModelResp resp = client.showLoadedModel(req);
+ if (resp.getStatus().getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
+ future.setException(new IoTDBException(resp.getStatus()));
+ return future;
+ }
+ ShowLoadedModelsTask.buildTsBlock(resp, future);
+ } catch (final ClientManagerException | TException e) {
+ future.setException(e);
+ }
+ return future;
+ }
+
+ @Override
+ public SettableFuture<ConfigTaskResult> showAIDevices() {
+ final SettableFuture<ConfigTaskResult> future = SettableFuture.create();
+ try (final ConfigNodeClient client =
+ CONFIG_NODE_CLIENT_MANAGER.borrowClient(ConfigNodeInfo.CONFIG_REGION_ID)) {
+ final TShowAIDevicesResp resp = client.showAIDevices();
+ if (resp.getStatus().getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
+ future.setException(new IoTDBException(resp.getStatus()));
+ return future;
+ }
+ ShowAIDevicesTask.buildTsBlock(resp, future);
+ } catch (final ClientManagerException | TException e) {
+ future.setException(e);
+ }
+ return future;
+ }
+
+ @Override
+ public SettableFuture<ConfigTaskResult> loadModel(
+ String existingModelId, List<String> deviceIdList) {
+ final SettableFuture<ConfigTaskResult> future = SettableFuture.create();
+ try (final ConfigNodeClient client =
+ CONFIG_NODE_CLIENT_MANAGER.borrowClient(ConfigNodeInfo.CONFIG_REGION_ID)) {
+ final TLoadModelReq req = new TLoadModelReq(existingModelId, deviceIdList);
+ final TSStatus result = client.loadModel(req);
+ if (TSStatusCode.SUCCESS_STATUS.getStatusCode() != result.getCode()) {
+ future.setException(new IoTDBException(result));
+ } else {
+ future.set(new ConfigTaskResult(TSStatusCode.SUCCESS_STATUS));
+ }
+ } catch (final ClientManagerException | TException e) {
+ future.setException(e);
+ }
+ return future;
+ }
+
+ @Override
+ public SettableFuture<ConfigTaskResult> unloadModel(
+ String existingModelId, List<String> deviceIdList) {
+ final SettableFuture<ConfigTaskResult> future = SettableFuture.create();
+ try (final ConfigNodeClient client =
+ CONFIG_NODE_CLIENT_MANAGER.borrowClient(ConfigNodeInfo.CONFIG_REGION_ID)) {
+ final TUnloadModelReq req = new TUnloadModelReq(existingModelId, deviceIdList);
+ final TSStatus result = client.unloadModel(req);
+ if (TSStatusCode.SUCCESS_STATUS.getStatusCode() != result.getCode()) {
+ future.setException(new IoTDBException(result));
+ } else {
+ future.set(new ConfigTaskResult(TSStatusCode.SUCCESS_STATUS));
+ }
+ } catch (final ClientManagerException | TException e) {
+ future.setException(e);
+ }
+ return future;
+ }
+
@Override
public SettableFuture<ConfigTaskResult> createTraining(
String modelId,
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/IConfigTaskExecutor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/IConfigTaskExecutor.java
index 8ad06a41c51..69ee3a06f89 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/IConfigTaskExecutor.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/IConfigTaskExecutor.java
@@ -423,6 +423,14 @@ public interface IConfigTaskExecutor {
SettableFuture<ConfigTaskResult> showModels(String modelId);
+ SettableFuture<ConfigTaskResult> showLoadedModels(List<String> deviceIdList);
+
+ SettableFuture<ConfigTaskResult> showAIDevices();
+
+ SettableFuture<ConfigTaskResult> loadModel(String existingModelId, List<String> deviceIdList);
+
+ SettableFuture<ConfigTaskResult> unloadModel(String existingModelId, List<String> deviceIdList);
+
SettableFuture<ConfigTaskResult> createTraining(
String modelId,
boolean isTableModel,
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/ai/LoadModelTask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/ai/LoadModelTask.java
new file mode 100644
index 00000000000..eac0c737477
--- /dev/null
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/ai/LoadModelTask.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ai;
+
+import org.apache.iotdb.db.queryengine.plan.execution.config.ConfigTaskResult;
+import org.apache.iotdb.db.queryengine.plan.execution.config.IConfigTask;
+import org.apache.iotdb.db.queryengine.plan.execution.config.executor.IConfigTaskExecutor;
+
+import com.google.common.util.concurrent.ListenableFuture;
+
+import java.util.List;
+
+public class LoadModelTask implements IConfigTask {
+
+ private final String modelId;
+ private final List<String> deviceIdList;
+
+ public LoadModelTask(String modelId, List<String> deviceIdList) {
+ this.modelId = modelId;
+ this.deviceIdList = deviceIdList;
+ }
+
+ @Override
+ public ListenableFuture<ConfigTaskResult> execute(IConfigTaskExecutor configTaskExecutor)
+ throws InterruptedException {
+ return configTaskExecutor.loadModel(modelId, deviceIdList);
+ }
+}
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/ai/ShowAIDevicesTask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/ai/ShowAIDevicesTask.java
new file mode 100644
index 00000000000..d2cdd967595
--- /dev/null
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/ai/ShowAIDevicesTask.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ai;
+
+import org.apache.iotdb.commons.schema.column.ColumnHeader;
+import org.apache.iotdb.commons.schema.column.ColumnHeaderConstant;
+import org.apache.iotdb.confignode.rpc.thrift.TShowAIDevicesResp;
+import org.apache.iotdb.db.queryengine.common.header.DatasetHeader;
+import org.apache.iotdb.db.queryengine.common.header.DatasetHeaderFactory;
+import org.apache.iotdb.db.queryengine.plan.execution.config.ConfigTaskResult;
+import org.apache.iotdb.db.queryengine.plan.execution.config.IConfigTask;
+import org.apache.iotdb.db.queryengine.plan.execution.config.executor.IConfigTaskExecutor;
+import org.apache.iotdb.rpc.TSStatusCode;
+
+import com.google.common.util.concurrent.ListenableFuture;
+import com.google.common.util.concurrent.SettableFuture;
+import org.apache.tsfile.enums.TSDataType;
+import org.apache.tsfile.read.common.block.TsBlockBuilder;
+import org.apache.tsfile.utils.BytesUtils;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class ShowAIDevicesTask implements IConfigTask {
+
+ @Override
+ public ListenableFuture<ConfigTaskResult> execute(IConfigTaskExecutor configTaskExecutor)
+ throws InterruptedException {
+ return configTaskExecutor.showAIDevices();
+ }
+
+ public static void buildTsBlock(
+ TShowAIDevicesResp resp, SettableFuture<ConfigTaskResult> future) {
+ List<TSDataType> outputDataTypes =
+ ColumnHeaderConstant.showAIDevicesColumnHeaders.stream()
+ .map(ColumnHeader::getColumnType)
+ .collect(Collectors.toList());
+ TsBlockBuilder builder = new TsBlockBuilder(outputDataTypes);
+ for (String deviceId : resp.getDeviceIdList()) {
+ builder.getTimeColumnBuilder().writeLong(0L);
+ builder.getColumnBuilder(0).writeBinary(BytesUtils.valueOf(deviceId));
+ builder.declarePosition();
+ }
+ DatasetHeader datasetHeader = DatasetHeaderFactory.getShowAIDevicesHeader();
+ future.set(new ConfigTaskResult(TSStatusCode.SUCCESS_STATUS, builder.build(), datasetHeader));
+ }
+}
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/ai/ShowLoadedModelsTask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/ai/ShowLoadedModelsTask.java
new file mode 100644
index 00000000000..5beb8a6a5aa
--- /dev/null
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/ai/ShowLoadedModelsTask.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ai;
+
+import org.apache.iotdb.commons.schema.column.ColumnHeader;
+import org.apache.iotdb.commons.schema.column.ColumnHeaderConstant;
+import org.apache.iotdb.confignode.rpc.thrift.TShowLoadedModelResp;
+import org.apache.iotdb.db.queryengine.common.header.DatasetHeader;
+import org.apache.iotdb.db.queryengine.common.header.DatasetHeaderFactory;
+import org.apache.iotdb.db.queryengine.plan.execution.config.ConfigTaskResult;
+import org.apache.iotdb.db.queryengine.plan.execution.config.IConfigTask;
+import org.apache.iotdb.db.queryengine.plan.execution.config.executor.IConfigTaskExecutor;
+import org.apache.iotdb.rpc.TSStatusCode;
+
+import com.google.common.util.concurrent.ListenableFuture;
+import com.google.common.util.concurrent.SettableFuture;
+import org.apache.tsfile.enums.TSDataType;
+import org.apache.tsfile.read.common.block.TsBlockBuilder;
+import org.apache.tsfile.utils.BytesUtils;
+
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+public class ShowLoadedModelsTask implements IConfigTask {
+
+ private final List<String> deviceIdList;
+
+ public ShowLoadedModelsTask(List<String> deviceIdList) {
+ this.deviceIdList = deviceIdList;
+ }
+
+ @Override
+ public ListenableFuture<ConfigTaskResult> execute(IConfigTaskExecutor configTaskExecutor)
+ throws InterruptedException {
+ return configTaskExecutor.showLoadedModels(deviceIdList);
+ }
+
+ public static void buildTsBlock(
+ TShowLoadedModelResp resp, SettableFuture<ConfigTaskResult> future) {
+ List<TSDataType> outputDataTypes =
+ ColumnHeaderConstant.showLoadedModelsColumnHeaders.stream()
+ .map(ColumnHeader::getColumnType)
+ .collect(Collectors.toList());
+ TsBlockBuilder builder = new TsBlockBuilder(outputDataTypes);
+ for (String deviceId : resp.getDeviceLoadedModelsMap().keySet()) {
+ for (Map.Entry<String, Integer> instanceEntry :
+ resp.getDeviceLoadedModelsMap().get(deviceId).entrySet()) {
+ String modelId = instanceEntry.getKey();
+ Integer count = instanceEntry.getValue();
+ builder.getTimeColumnBuilder().writeLong(0L);
+ builder.getColumnBuilder(0).writeBinary(BytesUtils.valueOf(deviceId));
+ builder.getColumnBuilder(1).writeBinary(BytesUtils.valueOf(modelId));
+ builder.getColumnBuilder(2).writeInt(count);
+ builder.declarePosition();
+ }
+ }
+ DatasetHeader datasetHeader = DatasetHeaderFactory.getShowLoadedModelsHeader();
+ future.set(new ConfigTaskResult(TSStatusCode.SUCCESS_STATUS, builder.build(), datasetHeader));
+ }
+}
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/ai/UnloadModelTask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/ai/UnloadModelTask.java
new file mode 100644
index 00000000000..528a6c49373
--- /dev/null
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/ai/UnloadModelTask.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.db.queryengine.plan.execution.config.metadata.ai;
+
+import org.apache.iotdb.db.queryengine.plan.execution.config.ConfigTaskResult;
+import org.apache.iotdb.db.queryengine.plan.execution.config.IConfigTask;
+import org.apache.iotdb.db.queryengine.plan.execution.config.executor.IConfigTaskExecutor;
+
+import com.google.common.util.concurrent.ListenableFuture;
+
+import java.util.List;
+
+public class UnloadModelTask implements IConfigTask {
+
+ private final String modelId;
+ private final List<String> deviceIdList;
+
+ public UnloadModelTask(String modelId, List<String> deviceIdList) {
+ this.modelId = modelId;
+ this.deviceIdList = deviceIdList;
+ }
+
+ @Override
+ public ListenableFuture<ConfigTaskResult> execute(IConfigTaskExecutor configTaskExecutor)
+ throws InterruptedException {
+ return configTaskExecutor.unloadModel(modelId, deviceIdList);
+ }
+}
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/ASTVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/ASTVisitor.java
index 328cb6c5e18..73f1bb0ffbe 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/ASTVisitor.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/ASTVisitor.java
@@ -188,8 +188,12 @@ import org.apache.iotdb.db.queryengine.plan.statement.metadata.UnSetTTLStatement
import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.CreateModelStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.CreateTrainingStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.DropModelStatement;
+import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.LoadModelStatement;
+import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.ShowAIDevicesStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.ShowAINodesStatement;
+import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.ShowLoadedModelsStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.ShowModelsStatement;
+import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.UnloadModelStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.pipe.AlterPipeStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.pipe.CreatePipePluginStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.pipe.CreatePipeStatement;
@@ -267,6 +271,8 @@ import org.apache.tsfile.file.metadata.enums.CompressionType;
import org.apache.tsfile.file.metadata.enums.TSEncoding;
import org.apache.tsfile.read.common.TimeRange;
import org.apache.tsfile.utils.TimeDuration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.FileNotFoundException;
import java.net.URI;
@@ -314,6 +320,8 @@ import static org.apache.iotdb.db.utils.constant.SqlConstant.SUBSTRING_START;
/** Parse AST to Statement. */
public class ASTVisitor extends IoTDBSqlParserBaseVisitor<Statement> {
+ private static final Logger LOGGER = LoggerFactory.getLogger(ASTVisitor.class);
+
private static final IoTDBConfig CONFIG = IoTDBDescriptor.getInstance().getConfig();
private static final String DELETE_RANGE_ERROR_MSG =
@@ -1367,6 +1375,27 @@ public class ASTVisitor extends IoTDBSqlParserBaseVisitor<Statement> {
}
}
+ private static List<String> convertToDeviceIdList(Token rawDeviceString) {
+ String rawString = rawDeviceString.getText();
+ rawString = rawString.substring(1, rawString.length() - 1);
+ String[] deviceIdList = rawString.split(",");
+ List<String> result = new ArrayList<>();
+ for (String deviceId : deviceIdList) {
+ deviceId = deviceId.trim();
+ if (deviceId.equals("cpu")) {
+ result.add("cpu");
+ continue;
+ }
+ try {
+ Integer.valueOf(deviceId);
+ } catch (NumberFormatException e) {
+ throw new SemanticException("Device id should be 'cpu' or integer");
+ }
+ result.add(deviceId);
+ }
+ return result;
+ }
+
@Override
public Statement visitCreateModel(IoTDBSqlParser.CreateModelContext ctx) {
if (ctx.uriClause() == null) {
@@ -1415,6 +1444,22 @@ public class ASTVisitor extends IoTDBSqlParserBaseVisitor<Statement> {
return createModelStatement;
}
+ @Override
+ public Statement visitLoadModel(IoTDBSqlParser.LoadModelContext ctx) {
+ String modelId = parseIdentifier(ctx.existingModelId.getText());
+ validateModelId(modelId);
+ List<String> deviceIdList = convertToDeviceIdList(ctx.deviceIdList);
+ return new LoadModelStatement(modelId, deviceIdList);
+ }
+
+ @Override
+ public Statement visitUnloadModel(IoTDBSqlParser.UnloadModelContext ctx) {
+ String modelId = parseIdentifier(ctx.existingModelId.getText());
+ validateModelId(modelId);
+ List<String> deviceIdList = convertToDeviceIdList(ctx.deviceIdList);
+ return new UnloadModelStatement(modelId, deviceIdList);
+ }
+
// Drop Model =====================================================================
@Override
public Statement visitDropModel(IoTDBSqlParser.DropModelContext ctx) {
@@ -1431,6 +1476,16 @@ public class ASTVisitor extends IoTDBSqlParserBaseVisitor<Statement> {
return statement;
}
+ @Override
+ public Statement visitShowLoadedModels(IoTDBSqlParser.ShowLoadedModelsContext ctx) {
+ return new ShowLoadedModelsStatement(
+ ctx.deviceIdList != null ? convertToDeviceIdList(ctx.deviceIdList) : null);
+ }
+
+ public Statement visitShowAIDevices(IoTDBSqlParser.ShowAIDevicesContext ctx) {
+ return new ShowAIDevicesStatement();
+ }
+
/** Data Manipulation Language (DML). */
// Select Statement ========================================================================
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/AstVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/AstVisitor.java
index 80b5642fd6e..546320dbc53 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/AstVisitor.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/AstVisitor.java
@@ -741,6 +741,22 @@ public abstract class AstVisitor<R, C> {
return visitStatement(node, context);
}
+ protected R visitShowLoadedModels(ShowLoadedModels node, C context) {
+ return visitStatement(node, context);
+ }
+
+ protected R visitShowAIDevices(ShowAIDevices node, C context) {
+ return visitStatement(node, context);
+ }
+
+ protected R visitLoadModel(LoadModel node, C context) {
+ return visitStatement(node, context);
+ }
+
+ protected R visitUnloadModel(UnloadModel node, C context) {
+ return visitStatement(node, context);
+ }
+
protected R visitDropModel(DropModel node, C context) {
return visitStatement(node, context);
}
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/LoadModel.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/LoadModel.java
new file mode 100644
index 00000000000..519510043dc
--- /dev/null
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/LoadModel.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.db.queryengine.plan.relational.sql.ast;
+
+import java.util.List;
+import java.util.Objects;
+
+public class LoadModel extends Statement {
+
+ private final String modelId;
+ private final List<String> deviceIdList;
+
+ public LoadModel(String modelId, List<String> deviceIdList) {
+ super(null);
+ this.modelId = modelId;
+ this.deviceIdList = deviceIdList;
+ }
+
+ public String getModelId() {
+ return modelId;
+ }
+
+ public List<String> getDeviceIdList() {
+ return deviceIdList;
+ }
+
+ @Override
+ public <R, C> R accept(AstVisitor<R, C> visitor, C context) {
+ return visitor.visitLoadModel(this, context);
+ }
+
+ @Override
+ public List<? extends Node> getChildren() {
+ return null;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ LoadModel loadModel = (LoadModel) o;
+ return Objects.equals(modelId, loadModel.modelId)
+ && Objects.equals(deviceIdList, loadModel.deviceIdList);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(modelId, deviceIdList);
+ }
+
+ @Override
+ public String toString() {
+ return "LoadModel{" + "modelId='" + modelId + '\'' + ", deviceIdList=" + deviceIdList + '}';
+ }
+}
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowAIDevices.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowAIDevices.java
new file mode 100644
index 00000000000..40fec58b2f0
--- /dev/null
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowAIDevices.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.db.queryengine.plan.relational.sql.ast;
+
+import java.util.List;
+
+import static com.google.common.base.MoreObjects.toStringHelper;
+
+public class ShowAIDevices extends Statement {
+
+ public ShowAIDevices() {
+ super(null);
+ }
+
+ @Override
+ public <R, C> R accept(AstVisitor<R, C> visitor, C context) {
+ return visitor.visitShowAIDevices(this, context);
+ }
+
+ @Override
+ public List<? extends Node> getChildren() {
+ return null;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ return (obj != null) && (getClass() == obj.getClass());
+ }
+
+ @Override
+ public String toString() {
+ return toStringHelper(this).toString();
+ }
+}
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowLoadedModels.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowLoadedModels.java
new file mode 100644
index 00000000000..99dd60afd87
--- /dev/null
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowLoadedModels.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.db.queryengine.plan.relational.sql.ast;
+
+import java.util.List;
+import java.util.Objects;
+
+public class ShowLoadedModels extends Statement {
+
+ private final List<String> deviceIdList;
+
+ public ShowLoadedModels(List<String> deviceIdList) {
+ super(null);
+ this.deviceIdList = deviceIdList;
+ }
+
+ public List<String> getDeviceIdList() {
+ return deviceIdList;
+ }
+
+ @Override
+ public <R, C> R accept(AstVisitor<R, C> visitor, C context) {
+ return visitor.visitShowLoadedModels(this, context);
+ }
+
+ @Override
+ public List<? extends Node> getChildren() {
+ return null;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ShowLoadedModels that = (ShowLoadedModels) o;
+ return Objects.equals(deviceIdList, that.deviceIdList);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hashCode(deviceIdList);
+ }
+
+ @Override
+ public String toString() {
+ return "ShowLoadedModels{" + "deviceIdList=" + deviceIdList + '}';
+ }
+}
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/UnloadModel.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/UnloadModel.java
new file mode 100644
index 00000000000..4922d248b59
--- /dev/null
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/UnloadModel.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.db.queryengine.plan.relational.sql.ast;
+
+import java.util.List;
+import java.util.Objects;
+
+public class UnloadModel extends Statement {
+
+ private final String modelId;
+ private final List<String> deviceIdList;
+
+ public UnloadModel(String modelId, List<String> deviceIdList) {
+ super(null);
+ this.modelId = modelId;
+ this.deviceIdList = deviceIdList;
+ }
+
+ public String getModelId() {
+ return modelId;
+ }
+
+ public List<String> getDeviceIdList() {
+ return deviceIdList;
+ }
+
+ @Override
+ public <R, C> R accept(AstVisitor<R, C> visitor, C context) {
+ return visitor.visitUnloadModel(this, context);
+ }
+
+ @Override
+ public List<? extends Node> getChildren() {
+ return null;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ UnloadModel that = (UnloadModel) o;
+ return Objects.equals(modelId, that.modelId) && Objects.equals(deviceIdList, that.deviceIdList);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(modelId, deviceIdList);
+ }
+
+ @Override
+ public String toString() {
+ return "UnloadModel{" + "modelId='" + modelId + '\'' + ", deviceIdList=" + deviceIdList + '}';
+ }
+}
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/parser/AstBuilder.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/parser/AstBuilder.java
index a24d9a11db9..644a8de0472 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/parser/AstBuilder.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/parser/AstBuilder.java
@@ -120,6 +120,7 @@ import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.LikePredicate;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.Limit;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.Literal;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.LoadConfiguration;
+import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.LoadModel;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.LoadTsFile;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.LogicalExpression;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.LongLiteral;
@@ -172,6 +173,7 @@ import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.SetProperties;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.SetSqlDialect;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.SetSystemStatus;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.SetTableComment;
+import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowAIDevices;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowAINodes;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowCluster;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowClusterId;
@@ -185,6 +187,7 @@ import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowDataNodes;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowDevice;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowFunctions;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowIndex;
+import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowLoadedModels;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowModels;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowPipePlugins;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.ShowPipes;
@@ -218,6 +221,7 @@ import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.TableSubquery;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.Trim;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.TypeParameter;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.Union;
+import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.UnloadModel;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.Update;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.UpdateAssignment;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.Use;
@@ -3585,6 +3589,25 @@ public class AstBuilder extends RelationalSqlBaseVisitor<Node> {
}
}
+ private static List<String> convertToDeviceIdList(String rawDeviceString) {
+ String[] deviceIdList = rawDeviceString.split(",");
+ List<String> result = new ArrayList<>();
+ for (String deviceId : deviceIdList) {
+ deviceId = deviceId.trim();
+ if (deviceId.equals("cpu")) {
+ result.add("cpu");
+ continue;
+ }
+ try {
+ Integer.valueOf(deviceId);
+ } catch (NumberFormatException e) {
+ throw new SemanticException("Device id should be 'cpu' or integer");
+ }
+ result.add(deviceId);
+ }
+ return result;
+ }
+
@Override
public Node visitCreateModelStatement(RelationalSqlParser.CreateModelStatementContext ctx) {
String modelId = ctx.modelId.getText();
@@ -3614,6 +3637,22 @@ public class AstBuilder extends RelationalSqlBaseVisitor<Node> {
return new CreateModel(modelId, uri);
}
+ @Override
+ public Node visitLoadModelStatement(RelationalSqlParser.LoadModelStatementContext ctx) {
+ List<String> deviceIds = convertToDeviceIdList(unquote(ctx.deviceIdList.getText()));
+ String modelId = ctx.existingModelId.getText();
+ validateModelId(modelId);
+ return new LoadModel(modelId, deviceIds);
+ }
+
+ @Override
+ public Node visitUnloadModelStatement(RelationalSqlParser.UnloadModelStatementContext ctx) {
+ List<String> deviceIds = convertToDeviceIdList(unquote(ctx.deviceIdList.getText()));
+ String modelId = ctx.existingModelId.getText();
+ validateModelId(modelId);
+ return new UnloadModel(modelId, deviceIds);
+ }
+
@Override
public Node visitShowModelsStatement(RelationalSqlParser.ShowModelsStatementContext ctx) {
ShowModels showModels = new ShowModels();
@@ -3625,6 +3664,20 @@ public class AstBuilder extends RelationalSqlBaseVisitor<Node> {
return showModels;
}
+ @Override
+ public Node visitShowLoadedModelsStatement(
+ RelationalSqlParser.ShowLoadedModelsStatementContext ctx) {
+ return new ShowLoadedModels(
+ ctx.deviceIdList != null
+ ? convertToDeviceIdList(unquote(ctx.deviceIdList.getText()))
+ : null);
+ }
+
+ @Override
+ public Node visitShowAIDevicesStatement(RelationalSqlParser.ShowAIDevicesStatementContext ctx) {
+ return new ShowAIDevices();
+ }
+
@Override
public Node visitDropModelStatement(RelationalSqlParser.DropModelStatementContext ctx) {
String modelId = ctx.modelId.getText();
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/StatementVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/StatementVisitor.java
index 588c4dd9892..d2da4814541 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/StatementVisitor.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/StatementVisitor.java
@@ -79,8 +79,12 @@ import org.apache.iotdb.db.queryengine.plan.statement.metadata.UnSetTTLStatement
import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.CreateModelStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.CreateTrainingStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.DropModelStatement;
+import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.LoadModelStatement;
+import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.ShowAIDevicesStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.ShowAINodesStatement;
+import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.ShowLoadedModelsStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.ShowModelsStatement;
+import org.apache.iotdb.db.queryengine.plan.statement.metadata.model.UnloadModelStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.pipe.AlterPipeStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.pipe.CreatePipePluginStatement;
import org.apache.iotdb.db.queryengine.plan.statement.metadata.pipe.CreatePipeStatement;
@@ -311,6 +315,22 @@ public abstract class StatementVisitor<R, C> {
return visitStatement(showModelsModelStatement, context);
}
+ public R visitShowLoadedModels(ShowLoadedModelsStatement showLoadedModelsStatement, C context) {
+ return visitStatement(showLoadedModelsStatement, context);
+ }
+
+ public R visitShowAIDevices(ShowAIDevicesStatement showAIDevicesStatement, C context) {
+ return visitStatement(showAIDevicesStatement, context);
+ }
+
+ public R visitLoadModel(LoadModelStatement loadModelStatement, C context) {
+ return visitStatement(loadModelStatement, context);
+ }
+
+ public R visitUnloadModel(UnloadModelStatement unloadModelStatement, C context) {
+ return visitStatement(unloadModelStatement, context);
+ }
+
/** Data Manipulation Language (DML) */
// Select Statement
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/model/LoadModelStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/model/LoadModelStatement.java
new file mode 100644
index 00000000000..e3e2e3bc4f4
--- /dev/null
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/model/LoadModelStatement.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.db.queryengine.plan.statement.metadata.model;
+
+import org.apache.iotdb.commons.path.PartialPath;
+import org.apache.iotdb.db.queryengine.plan.analyze.QueryType;
+import org.apache.iotdb.db.queryengine.plan.statement.IConfigStatement;
+import org.apache.iotdb.db.queryengine.plan.statement.Statement;
+import org.apache.iotdb.db.queryengine.plan.statement.StatementVisitor;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Objects;
+
+public class LoadModelStatement extends Statement implements IConfigStatement {
+
+ private final String modelId;
+ private final List<String> deviceIdList;
+
+ public LoadModelStatement(String modelId, List<String> deviceIdList) {
+ this.modelId = modelId;
+ this.deviceIdList = deviceIdList;
+ }
+
+ public String getModelId() {
+ return modelId;
+ }
+
+ public List<String> getDeviceIdList() {
+ return deviceIdList;
+ }
+
+ @Override
+ public QueryType getQueryType() {
+ return QueryType.WRITE;
+ }
+
+ @Override
+ public List<? extends PartialPath> getPaths() {
+ return Collections.emptyList();
+ }
+
+ @Override
+ public <R, C> R accept(StatementVisitor<R, C> visitor, C context) {
+ return visitor.visitLoadModel(this, context);
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ LoadModelStatement that = (LoadModelStatement) o;
+ return Objects.equals(modelId, that.modelId) && Objects.equals(deviceIdList, that.deviceIdList);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(modelId, deviceIdList);
+ }
+
+ @Override
+ public String toString() {
+ return "LoadModelStatement{"
+ + "modelId='"
+ + modelId
+ + '\''
+ + ", deviceIdList="
+ + deviceIdList
+ + '}';
+ }
+}
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/model/ShowAIDevicesStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/model/ShowAIDevicesStatement.java
new file mode 100644
index 00000000000..37156c621d7
--- /dev/null
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/model/ShowAIDevicesStatement.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.db.queryengine.plan.statement.metadata.model;
+
+import org.apache.iotdb.commons.path.PartialPath;
+import org.apache.iotdb.db.queryengine.plan.analyze.QueryType;
+import org.apache.iotdb.db.queryengine.plan.statement.IConfigStatement;
+import org.apache.iotdb.db.queryengine.plan.statement.Statement;
+import org.apache.iotdb.db.queryengine.plan.statement.StatementVisitor;
+
+import java.util.Collections;
+import java.util.List;
+
+public class ShowAIDevicesStatement extends Statement implements IConfigStatement {
+
+ public ShowAIDevicesStatement() {
+ // Do nothing
+ }
+
+ @Override
+ public <R, C> R accept(StatementVisitor<R, C> visitor, C context) {
+ return visitor.visitShowAIDevices(this, context);
+ }
+
+ @Override
+ public QueryType getQueryType() {
+ return QueryType.READ;
+ }
+
+ @Override
+ public List<? extends PartialPath> getPaths() {
+ return Collections.emptyList();
+ }
+}
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/model/ShowLoadedModelsStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/model/ShowLoadedModelsStatement.java
new file mode 100644
index 00000000000..dab7524c10c
--- /dev/null
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/model/ShowLoadedModelsStatement.java
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.db.queryengine.plan.statement.metadata.model;
+
+import org.apache.iotdb.commons.path.PartialPath;
+import org.apache.iotdb.db.queryengine.plan.analyze.QueryType;
+import org.apache.iotdb.db.queryengine.plan.statement.IConfigStatement;
+import org.apache.iotdb.db.queryengine.plan.statement.Statement;
+import org.apache.iotdb.db.queryengine.plan.statement.StatementVisitor;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Objects;
+
+public class ShowLoadedModelsStatement extends Statement implements IConfigStatement {
+
+ private final List<String> deviceIdList;
+
+ public ShowLoadedModelsStatement(List<String> deviceIdList) {
+ this.deviceIdList = deviceIdList;
+ }
+
+ public List<String> getDeviceIdList() {
+ return deviceIdList;
+ }
+
+ @Override
+ public QueryType getQueryType() {
+ return QueryType.READ;
+ }
+
+ @Override
+ public List<? extends PartialPath> getPaths() {
+ return Collections.emptyList();
+ }
+
+ @Override
+ public <R, C> R accept(StatementVisitor<R, C> visitor, C context) {
+ return visitor.visitShowLoadedModels(this, context);
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ShowLoadedModelsStatement that = (ShowLoadedModelsStatement) o;
+ return Objects.equals(deviceIdList, that.deviceIdList);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hashCode(deviceIdList);
+ }
+
+ @Override
+ public String toString() {
+ return "ShowLoadedModelsStatement{" + "deviceIdList=" + deviceIdList + '}';
+ }
+}
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/model/UnloadModelStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/model/UnloadModelStatement.java
new file mode 100644
index 00000000000..be5057a8f00
--- /dev/null
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/model/UnloadModelStatement.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.db.queryengine.plan.statement.metadata.model;
+
+import org.apache.iotdb.commons.path.PartialPath;
+import org.apache.iotdb.db.queryengine.plan.analyze.QueryType;
+import org.apache.iotdb.db.queryengine.plan.statement.IConfigStatement;
+import org.apache.iotdb.db.queryengine.plan.statement.Statement;
+import org.apache.iotdb.db.queryengine.plan.statement.StatementVisitor;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Objects;
+
+public class UnloadModelStatement extends Statement implements IConfigStatement {
+
+ private final String modelId;
+ private final List<String> deviceIdList;
+
+ public UnloadModelStatement(String modelId, List<String> deviceIdList) {
+ this.modelId = modelId;
+ this.deviceIdList = deviceIdList;
+ }
+
+ public String getModelId() {
+ return modelId;
+ }
+
+ public List<String> getDeviceIdList() {
+ return deviceIdList;
+ }
+
+ @Override
+ public QueryType getQueryType() {
+ return QueryType.WRITE;
+ }
+
+ @Override
+ public List<? extends PartialPath> getPaths() {
+ return Collections.emptyList();
+ }
+
+ @Override
+ public <R, C> R accept(StatementVisitor<R, C> visitor, C context) {
+ return visitor.visitUnloadModel(this, context);
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ UnloadModelStatement that = (UnloadModelStatement) o;
+ return Objects.equals(modelId, that.modelId) && Objects.equals(deviceIdList, that.deviceIdList);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(modelId, deviceIdList);
+ }
+
+ @Override
+ public String toString() {
+ return "UnloadModelStatement{"
+ + "modelId='"
+ + modelId
+ + '\''
+ + ", deviceIdList="
+ + deviceIdList
+ + '}';
+ }
+}
diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/ainode/AINodeClient.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/ainode/AINodeClient.java
index 99479256664..d82647c141a 100644
--- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/ainode/AINodeClient.java
+++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/ainode/AINodeClient.java
@@ -26,11 +26,16 @@ import org.apache.iotdb.ainode.rpc.thrift.TForecastReq;
import org.apache.iotdb.ainode.rpc.thrift.TForecastResp;
import org.apache.iotdb.ainode.rpc.thrift.TInferenceReq;
import org.apache.iotdb.ainode.rpc.thrift.TInferenceResp;
+import org.apache.iotdb.ainode.rpc.thrift.TLoadModelReq;
import org.apache.iotdb.ainode.rpc.thrift.TRegisterModelReq;
import org.apache.iotdb.ainode.rpc.thrift.TRegisterModelResp;
+import org.apache.iotdb.ainode.rpc.thrift.TShowAIDevicesResp;
+import org.apache.iotdb.ainode.rpc.thrift.TShowLoadedModelsReq;
+import org.apache.iotdb.ainode.rpc.thrift.TShowLoadedModelsResp;
import org.apache.iotdb.ainode.rpc.thrift.TShowModelsReq;
import org.apache.iotdb.ainode.rpc.thrift.TShowModelsResp;
import org.apache.iotdb.ainode.rpc.thrift.TTrainingReq;
+import org.apache.iotdb.ainode.rpc.thrift.TUnloadModelReq;
import org.apache.iotdb.ainode.rpc.thrift.TWindowParams;
import org.apache.iotdb.common.rpc.thrift.TEndPoint;
import org.apache.iotdb.common.rpc.thrift.TSStatus;
@@ -175,6 +180,30 @@ public class AINodeClient implements AutoCloseable, ThriftClient {
}
}
+ public TSStatus loadModel(TLoadModelReq req) throws TException {
+ try {
+ return client.loadModel(req);
+ } catch (TException e) {
+ logger.warn(
+ "Failed to connect to AINode from ConfigNode when executing {}: {}",
+ Thread.currentThread().getStackTrace()[1].getMethodName(),
+ e.getMessage());
+ throw new TException(MSG_CONNECTION_FAIL);
+ }
+ }
+
+ public TSStatus unloadModel(TUnloadModelReq req) throws TException {
+ try {
+ return client.unloadModel(req);
+ } catch (TException e) {
+ logger.warn(
+ "Failed to connect to AINode from ConfigNode when executing {}: {}",
+ Thread.currentThread().getStackTrace()[1].getMethodName(),
+ e.getMessage());
+ throw new TException(MSG_CONNECTION_FAIL);
+ }
+ }
+
public TShowModelsResp showModels(TShowModelsReq req) throws TException {
try {
return client.showModels(req);
@@ -187,6 +216,30 @@ public class AINodeClient implements AutoCloseable, ThriftClient {
}
}
+ public TShowLoadedModelsResp showLoadedModels(TShowLoadedModelsReq req) throws TException {
+ try {
+ return client.showLoadedModels(req);
+ } catch (TException e) {
+ logger.warn(
+ "Failed to connect to AINode from ConfigNode when executing {}: {}",
+ Thread.currentThread().getStackTrace()[1].getMethodName(),
+ e.getMessage());
+ throw new TException(MSG_CONNECTION_FAIL);
+ }
+ }
+
+ public TShowAIDevicesResp showAIDevices() throws TException {
+ try {
+ return client.showAIDevices();
+ } catch (TException e) {
+ logger.warn(
+ "Failed to connect to AINode from ConfigNode when executing {}: {}",
+ Thread.currentThread().getStackTrace()[1].getMethodName(),
+ e.getMessage());
+ throw new TException(MSG_CONNECTION_FAIL);
+ }
+ }
+
public TInferenceResp inference(
String modelId,
TsBlock inputTsBlock,
diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/column/ColumnHeaderConstant.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/column/ColumnHeaderConstant.java
index ff6e9bc42a6..1e2812fe9b3 100644
--- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/column/ColumnHeaderConstant.java
+++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/column/ColumnHeaderConstant.java
@@ -35,6 +35,7 @@ public class ColumnHeaderConstant {
public static final String ENDTIME = "__endTime";
public static final String VALUE = "Value";
public static final String DEVICE = "Device";
+ public static final String DEVICE_ID = "DeviceID";
public static final String EXPLAIN_ANALYZE = "Explain Analyze";
// column names for schema statement
@@ -80,6 +81,7 @@ public class ColumnHeaderConstant {
public static final String COUNT_NODES = "count(nodes)";
public static final String COUNT_TIMESERIES = "count(timeseries)";
public static final String COUNT_DATABASE = "count(database)";
+ public static final String COUNT_INSTANCES = "Count(instances)";
// column names for show cluster and show cluster details statements
public static final String NODE_ID = "NodeID";
@@ -622,6 +624,15 @@ public class ColumnHeaderConstant {
new ColumnHeader(COLUMN_CATEGORY, TSDataType.TEXT),
new ColumnHeader(STATE, TSDataType.TEXT));
+ public static final List<ColumnHeader> showLoadedModelsColumnHeaders =
+ ImmutableList.of(
+ new ColumnHeader(DEVICE_ID, TSDataType.TEXT),
+ new ColumnHeader(MODEL_TYPE, TSDataType.TEXT),
+ new ColumnHeader(COUNT_INSTANCES, TSDataType.INT32));
+
+ public static final List<ColumnHeader> showAIDevicesColumnHeaders =
+ ImmutableList.of(new ColumnHeader(DEVICE_ID, TSDataType.TEXT));
+
public static final List<ColumnHeader> showLogicalViewColumnHeaders =
ImmutableList.of(
new ColumnHeader(TIMESERIES, TSDataType.TEXT),
diff --git a/iotdb-core/relational-grammar/src/main/antlr4/org/apache/iotdb/db/relational/grammar/sql/RelationalSql.g4 b/iotdb-core/relational-grammar/src/main/antlr4/org/apache/iotdb/db/relational/grammar/sql/RelationalSql.g4
index 8aa8ac380d2..785fddc1ea5 100644
--- a/iotdb-core/relational-grammar/src/main/antlr4/org/apache/iotdb/db/relational/grammar/sql/RelationalSql.g4
+++ b/iotdb-core/relational-grammar/src/main/antlr4/org/apache/iotdb/db/relational/grammar/sql/RelationalSql.g4
@@ -165,6 +165,10 @@ statement
| createModelStatement
| dropModelStatement
| showModelsStatement
+ | showLoadedModelsStatement
+ | showAIDevicesStatement
+ | loadModelStatement
+ | unloadModelStatement
// View, Trigger, CQ, Quota are not supported yet
;
@@ -805,6 +809,23 @@ showModelsStatement
| SHOW MODELS modelId=identifier
;
+showLoadedModelsStatement
+ : SHOW LOADED MODELS
+ | SHOW LOADED MODELS deviceIdList=string
+ ;
+
+showAIDevicesStatement
+ : SHOW AI_DEVICES
+ ;
+
+loadModelStatement
+ : LOAD MODEL existingModelId=identifier TO DEVICES deviceIdList=string
+ ;
+
+unloadModelStatement
+ : UNLOAD MODEL existingModelId=identifier FROM DEVICES deviceIdList=string
+ ;
+
// ------------------------------------------- Query Statement ---------------------------------------------------------
queryStatement
: query #statementDefault
@@ -1380,6 +1401,7 @@ ADMIN: 'ADMIN';
AFTER: 'AFTER';
AINODE: 'AINODE';
AINODES: 'AINODES';
+AI_DEVICES: 'AI_DEVICES';
ALL: 'ALL';
ALTER: 'ALTER';
ANALYZE: 'ANALYZE';
@@ -1556,6 +1578,7 @@ LINEAR: 'LINEAR';
LIST: 'LIST';
LISTAGG: 'LISTAGG';
LOAD: 'LOAD';
+LOADED: 'LOADED';
LOCAL: 'LOCAL';
LOCALTIME: 'LOCALTIME';
LOCALTIMESTAMP: 'LOCALTIMESTAMP';
@@ -1735,6 +1758,7 @@ UNCONDITIONAL: 'UNCONDITIONAL';
UNION: 'UNION';
UNIQUE: 'UNIQUE';
UNKNOWN: 'UNKNOWN';
+UNLOAD: 'UNLOAD';
UNMATCHED: 'UNMATCHED';
UNNEST: 'UNNEST';
UNTIL: 'UNTIL';
diff --git a/iotdb-protocol/thrift-ainode/src/main/thrift/ainode.thrift b/iotdb-protocol/thrift-ainode/src/main/thrift/ainode.thrift
index e09d0360c84..c53b482ef77 100644
--- a/iotdb-protocol/thrift-ainode/src/main/thrift/ainode.thrift
+++ b/iotdb-protocol/thrift-ainode/src/main/thrift/ainode.thrift
@@ -111,6 +111,30 @@ struct TShowModelsResp {
5: optional map<string, string> stateMap
}
+struct TShowLoadedModelsReq {
+ 1: optional list<string> deviceIdList
+}
+
+struct TShowLoadedModelsResp {
+ 1: required common.TSStatus status
+ 2: required map<string, map<string, i32>> deviceLoadedModelsMap
+}
+
+struct TShowAIDevicesResp {
+ 1: required common.TSStatus status
+ 2: required list<string> deviceIdList
+}
+
+struct TLoadModelReq {
+ 1: required string existingModelId
+ 2: required list<string> deviceIdList
+}
+
+struct TUnloadModelReq {
+ 1: required string modelId
+ 2: required list<string> deviceIdList
+}
+
service IAINodeRPCService {
// -------------- For Config Node --------------
@@ -118,6 +142,10 @@ service IAINodeRPCService {
TShowModelsResp showModels(TShowModelsReq req)
+ TShowLoadedModelsResp showLoadedModels(TShowLoadedModelsReq req)
+
+ TShowAIDevicesResp showAIDevices()
+
common.TSStatus deleteModel(TDeleteModelReq req)
TRegisterModelResp registerModel(TRegisterModelReq req)
@@ -126,6 +154,10 @@ service IAINodeRPCService {
common.TSStatus createTrainingTask(TTrainingReq req)
+ common.TSStatus loadModel(TLoadModelReq req)
+
+ common.TSStatus unloadModel(TUnloadModelReq req)
+
// -------------- For Data Node --------------
TInferenceResp inference(TInferenceReq req)
diff --git a/iotdb-protocol/thrift-confignode/src/main/thrift/confignode.thrift b/iotdb-protocol/thrift-confignode/src/main/thrift/confignode.thrift
index b869d29cde3..18655a31a11 100644
--- a/iotdb-protocol/thrift-confignode/src/main/thrift/confignode.thrift
+++ b/iotdb-protocol/thrift-confignode/src/main/thrift/confignode.thrift
@@ -1070,6 +1070,30 @@ struct TShowModelResp {
5: optional map<string, string> stateMap
}
+struct TShowLoadedModelReq {
+ 1: optional list<string> deviceIdList
+}
+
+struct TShowLoadedModelResp {
+ 1: required common.TSStatus status
+ 2: required map<string, map<string, i32>> deviceLoadedModelsMap
+}
+
+struct TShowAIDevicesResp {
+ 1: required common.TSStatus status
+ 2: required list<string> deviceIdList
+}
+
+struct TLoadModelReq {
+ 1: required string existingModelId
+ 2: required list<string> deviceIdList
+}
+
+struct TUnloadModelReq {
+ 1: required string modelId
+ 2: required list<string> deviceIdList
+}
+
struct TGetModelInfoReq {
1: required string modelId
}
@@ -1984,6 +2008,30 @@ service IConfigNodeRPCService {
*/
TShowModelResp showModel(TShowModelReq req)
+ /**
+ * Return the loaded model table
+ */
+ TShowLoadedModelResp showLoadedModel(TShowLoadedModelReq req)
+
+ /**
+ * Return the available ai devices
+ */
+ TShowAIDevicesResp showAIDevices()
+
+ /**
+ * Load an existing model to specific devices
+ *
+ * @return SUCCESS_STATUS if the model loading task was submitted successfully
+ */
+ common.TSStatus loadModel(TLoadModelReq req)
+
+ /**
+ * Unload an existing model to specific devices
+ *
+ * @return SUCCESS_STATUS if the model unloading task was submitted successfully
+ */
+ common.TSStatus unloadModel(TUnloadModelReq req)
+
/**
* Return the model info by model_id
*/
(iotdb) 05/15: [AINode][Bug fix] Concurrent inference (#16518)
Posted by yo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
yongzao pushed a commit to branch rc/2.0.6
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit c7a614c8ccfa235ad1785521a6480d131e0a9133
Author: Yongzao <yo...@apache.org>
AuthorDate: Mon Sep 29 13:55:38 2025 +0800
[AINode][Bug fix] Concurrent inference (#16518)
* trigger CI
* bug fix 4 show loaded models
(cherry picked from commit b4dde12d4cf6fddc283d63ce2b82635e6f9510c0)
---
.../ainode/it/AINodeConcurrentInferenceIT.java | 84 ++++++++++++++++++----
.../apache/iotdb/ainode/utils/AINodeTestUtils.java | 7 +-
2 files changed, 75 insertions(+), 16 deletions(-)
diff --git a/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeConcurrentInferenceIT.java b/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeConcurrentInferenceIT.java
index c73fbeb2fbf..b5b987594d9 100644
--- a/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeConcurrentInferenceIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeConcurrentInferenceIT.java
@@ -22,15 +22,23 @@ package org.apache.iotdb.ainode.it;
import org.apache.iotdb.it.env.EnvFactory;
import org.apache.iotdb.itbase.env.BaseEnv;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableSet;
import org.junit.AfterClass;
+import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.sql.Connection;
+import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
import static org.apache.iotdb.ainode.utils.AINodeTestUtils.concurrentInference;
@@ -38,6 +46,11 @@ public class AINodeConcurrentInferenceIT {
private static final Logger LOGGER = LoggerFactory.getLogger(AINodeConcurrentInferenceIT.class);
+ private static final Map<String, String> MODEL_ID_TO_TYPE_MAP =
+ ImmutableMap.of(
+ "timer_xl", "Timer-XL",
+ "sundial", "Timer-Sundial");
+
@BeforeClass
public static void setUp() throws Exception {
// Init 1C1D1A cluster environment
@@ -91,12 +104,17 @@ public class AINodeConcurrentInferenceIT {
Statement statement = connection.createStatement()) {
final int threadCnt = 4;
final int loop = 10;
+ final int predictLength = 96;
statement.execute(String.format("LOAD MODEL %s TO DEVICES \"cpu\"", modelId));
+ checkModelOnSpecifiedDevice(statement, MODEL_ID_TO_TYPE_MAP.get(modelId), "cpu");
concurrentInference(
statement,
- String.format("CALL INFERENCE(%s, \"SELECT s FROM root.AI\")", modelId),
+ String.format(
+ "CALL INFERENCE(%s, \"SELECT s FROM root.AI\", predict_length=%d)",
+ modelId, predictLength),
threadCnt,
- loop);
+ loop,
+ predictLength);
statement.execute(String.format("UNLOAD MODEL %s FROM DEVICES \"cpu\"", modelId));
}
}
@@ -111,14 +129,20 @@ public class AINodeConcurrentInferenceIT {
throws SQLException, InterruptedException {
try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TREE_SQL_DIALECT);
Statement statement = connection.createStatement()) {
- final int threadCnt = 4;
- final int loop = 10;
- statement.execute(String.format("LOAD MODEL %s TO DEVICES \"0,1\"", modelId));
+ final int threadCnt = 10;
+ final int loop = 100;
+ final int predictLength = 512;
+ final String devices = "0,1";
+ statement.execute(String.format("LOAD MODEL %s TO DEVICES \"%s\"", modelId, devices));
+ checkModelOnSpecifiedDevice(statement, MODEL_ID_TO_TYPE_MAP.get(modelId), devices);
concurrentInference(
statement,
- String.format("CALL INFERENCE(%s, \"SELECT s FROM root.AI\")", modelId),
+ String.format(
+ "CALL INFERENCE(%s, \"SELECT s FROM root.AI\", predict_length=%d)",
+ modelId, predictLength),
threadCnt,
- loop);
+ loop,
+ predictLength);
statement.execute(String.format("UNLOAD MODEL %s FROM DEVICES \"0,1\"", modelId));
}
}
@@ -134,15 +158,18 @@ public class AINodeConcurrentInferenceIT {
Statement statement = connection.createStatement()) {
final int threadCnt = 4;
final int loop = 10;
+ final int predictLength = 96;
statement.execute(String.format("LOAD MODEL %s TO DEVICES \"cpu\"", modelId));
+ checkModelOnSpecifiedDevice(statement, MODEL_ID_TO_TYPE_MAP.get(modelId), "cpu");
long startTime = System.currentTimeMillis();
concurrentInference(
statement,
String.format(
- "SELECT * FROM FORECAST(model_id=>'%s', input=>(SELECT time,s FROM root.AI) ORDER BY time)",
- modelId),
+ "SELECT * FROM FORECAST(model_id=>'%s', input=>(SELECT time,s FROM root.AI) ORDER BY time), predict_length=>%d",
+ modelId, predictLength),
threadCnt,
- loop);
+ loop,
+ predictLength);
long endTime = System.currentTimeMillis();
LOGGER.info(
String.format(
@@ -163,15 +190,19 @@ public class AINodeConcurrentInferenceIT {
Statement statement = connection.createStatement()) {
final int threadCnt = 10;
final int loop = 100;
- statement.execute(String.format("LOAD MODEL %s TO DEVICES \"0,1\"", modelId));
+ final int predictLength = 512;
+ final String devices = "0,1";
+ statement.execute(String.format("LOAD MODEL %s TO DEVICES \"%s\"", modelId, devices));
+ checkModelOnSpecifiedDevice(statement, MODEL_ID_TO_TYPE_MAP.get(modelId), devices);
long startTime = System.currentTimeMillis();
concurrentInference(
statement,
String.format(
- "SELECT * FROM FORECAST(model_id=>'%s', input=>(SELECT time,s FROM root.AI) ORDER BY time)",
- modelId),
+ "SELECT * FROM FORECAST(model_id=>'%s', input=>(SELECT time,s FROM root.AI) ORDER BY time), predict_length=>%d",
+ modelId, predictLength),
threadCnt,
- loop);
+ loop,
+ predictLength);
long endTime = System.currentTimeMillis();
LOGGER.info(
String.format(
@@ -180,4 +211,29 @@ public class AINodeConcurrentInferenceIT {
statement.execute(String.format("UNLOAD MODEL %s FROM DEVICES \"0,1\"", modelId));
}
}
+
+ private void checkModelOnSpecifiedDevice(Statement statement, String modelType, String device)
+ throws SQLException, InterruptedException {
+ for (int retry = 0; retry < 10; retry++) {
+ Set<String> targetDevices = ImmutableSet.copyOf(device.split(","));
+ Set<String> foundDevices = new HashSet<>();
+ try (final ResultSet resultSet =
+ statement.executeQuery(String.format("SHOW LOADED MODELS %s", device))) {
+ while (resultSet.next()) {
+ String deviceId = resultSet.getString(1);
+ String loadedModelType = resultSet.getString(2);
+ int count = resultSet.getInt(3);
+ if (loadedModelType.equals(modelType) && targetDevices.contains(deviceId)) {
+ Assert.assertTrue(count > 1);
+ foundDevices.add(deviceId);
+ }
+ }
+ if (foundDevices.containsAll(targetDevices)) {
+ return;
+ }
+ }
+ TimeUnit.SECONDS.sleep(3);
+ }
+ Assert.fail("Model " + modelType + " is not loaded on device " + device);
+ }
}
diff --git a/integration-test/src/test/java/org/apache/iotdb/ainode/utils/AINodeTestUtils.java b/integration-test/src/test/java/org/apache/iotdb/ainode/utils/AINodeTestUtils.java
index 31e498ae729..cbb0b03b229 100644
--- a/integration-test/src/test/java/org/apache/iotdb/ainode/utils/AINodeTestUtils.java
+++ b/integration-test/src/test/java/org/apache/iotdb/ainode/utils/AINodeTestUtils.java
@@ -60,7 +60,8 @@ public class AINodeTestUtils {
}
}
- public static void concurrentInference(Statement statement, String sql, int threadCnt, int loop)
+ public static void concurrentInference(
+ Statement statement, String sql, int threadCnt, int loop, int expectedOutputLength)
throws InterruptedException {
Thread[] threads = new Thread[threadCnt];
for (int i = 0; i < threadCnt; i++) {
@@ -70,9 +71,11 @@ public class AINodeTestUtils {
try {
for (int j = 0; j < loop; j++) {
try (ResultSet resultSet = statement.executeQuery(sql)) {
+ int outputCnt = 0;
while (resultSet.next()) {
- // do nothing
+ outputCnt++;
}
+ assertEquals(expectedOutputLength, outputCnt);
} catch (SQLException e) {
fail(e.getMessage());
}
(iotdb) 01/15: [AINode] Refactor code base
Posted by yo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
yongzao pushed a commit to branch rc/2.0.6
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit a1ee17ceac50dfcc0605d5bb58711b9186b86024
Author: Yongzao <53...@qq.com>
AuthorDate: Tue Dec 16 13:29:41 2025 +0800
[AINode] Refactor code base
---
iotdb-core/ainode/.gitignore | 2 +-
.../core/inference/inference_request_pool.py | 197 ------------------
iotdb-core/ainode/{ => iotdb}/ainode/__init__.py | 0
iotdb-core/ainode/iotdb/ainode/conf/git.properties | 3 -
.../ainode/{ => iotdb}/ainode/core/__init__.py | 0
.../ainode/{ => iotdb}/ainode/core/ai_node.py | 2 +-
.../ainode/{ => iotdb}/ainode/core/config.py | 2 +-
.../ainode/{ => iotdb}/ainode/core/constant.py | 2 +-
.../ainode/{ => iotdb}/ainode/core/exception.py | 0
.../{ => iotdb}/ainode/core/inference/__init__.py | 0
.../ainode/core/inference/batcher}/__init__.py | 0
.../inference/batcher/abstract_batcher.py} | 29 ++-
.../ainode/core/inference/batcher/basic_batcher.py | 63 ++++++
.../ainode/core/inference/dispatcher}/__init__.py | 0
.../inference/dispatcher/abstract_dispatcher.py} | 32 ++-
.../core/inference/dispatcher/basic_dispatcher.py | 60 ++++++
.../ainode/core/inference/inference_request.py | 18 +-
.../core/inference/inference_request_pool.py | 223 +++++++++++++++++++++
.../core/inference/pool_scheduler}/__init__.py | 0
.../pool_scheduler/abstract_pool_scheduler.py | 86 ++++++++
.../pool_scheduler/basic_pool_scheduler.py | 193 ++++++++++++++++++
.../core/inference/request_scheduler}/__init__.py | 0
.../abstract_request_scheduler.py} | 2 +-
.../request_scheduler/basic_request_scheduler.py} | 11 +-
.../ainode/core/inference/strategy}/__init__.py | 0
.../strategy/abstract_inference_pipeline.py | 0
.../strategy/timer_sundial_inference_pipeline.py | 6 +-
.../strategy/timerxl_inference_pipeline.py | 12 +-
.../{ => iotdb}/ainode/core/inference/utils.py | 0
.../ainode/core/ingress}/__init__.py | 0
.../{ => iotdb}/ainode/core/ingress/dataset.py | 0
.../{ => iotdb}/ainode/core/ingress/iotdb.py | 4 +-
iotdb-core/ainode/{ => iotdb}/ainode/core/log.py | 0
.../ainode/core/manager}/__init__.py | 0
.../ainode/core/manager/cluster_manager.py | 0
.../ainode/core/manager/inference_manager.py | 16 +-
.../ainode/core/manager/model_manager.py | 4 +-
.../{ => iotdb}/ainode/core/manager/utils.py | 2 +-
.../rpc => iotdb/ainode/core/model}/__init__.py | 0
.../ainode/core/model/built_in_model_factory.py | 8 +-
.../{ => iotdb}/ainode/core/model/model_enums.py | 0
.../{ => iotdb}/ainode/core/model/model_factory.py | 6 +-
.../{ => iotdb}/ainode/core/model/model_info.py | 2 +-
.../{ => iotdb}/ainode/core/model/model_storage.py | 8 +-
.../ainode/core/model/sundial}/__init__.py | 0
.../core/model/sundial/configuration_sundial.py | 0
.../ainode/core/model/sundial/flow_loss.py | 0
.../ainode/core/model/sundial/modeling_sundial.py | 5 +-
.../core/model/sundial/ts_generation_mixin.py | 0
.../ainode/core/model/timerxl}/__init__.py | 0
.../core/model/timerxl/configuration_timer.py | 0
.../ainode/core/model/timerxl/modeling_timer.py | 0
.../core/model/timerxl/ts_generation_mixin.py | 0
.../{ => iotdb}/ainode/core/model/uri_utils.py | 4 +-
.../core => iotdb/ainode/core/rpc}/__init__.py | 0
.../ainode/{ => iotdb}/ainode/core/rpc/client.py | 2 +-
.../ainode/{ => iotdb}/ainode/core/rpc/handler.py | 0
.../ainode/{ => iotdb}/ainode/core/rpc/service.py | 2 +-
.../ainode/{ => iotdb}/ainode/core/rpc/status.py | 0
.../ainode/{ => iotdb}/ainode/core/script.py | 6 +-
.../core => iotdb/ainode/core/util}/__init__.py | 0
.../{ => iotdb}/ainode/core/util/activation.py | 0
.../ainode/{ => iotdb}/ainode/core/util/cache.py | 2 +-
.../{ => iotdb}/ainode/core/util/decorator.py | 0
.../ainode/core/util/huggingface_cache.py | 0
.../ainode/{ => iotdb}/ainode/core/util/lock.py | 0
.../ainode/{ => iotdb}/ainode/core/util/masking.py | 0
.../ainode/{ => iotdb}/ainode/core/util/serde.py | 2 +-
68 files changed, 740 insertions(+), 276 deletions(-)
diff --git a/iotdb-core/ainode/.gitignore b/iotdb-core/ainode/.gitignore
index c30efa5f662..8cc2098c3fd 100644
--- a/iotdb-core/ainode/.gitignore
+++ b/iotdb-core/ainode/.gitignore
@@ -12,7 +12,7 @@
/iotdb/table_session_pool.py
# generated by maven
-/ainode/conf/
+/iotdb/ainode/conf/
# .whl of ainode, generated by Poetry
/dist/
diff --git a/iotdb-core/ainode/ainode/core/inference/inference_request_pool.py b/iotdb-core/ainode/ainode/core/inference/inference_request_pool.py
deleted file mode 100644
index 4bf594860f7..00000000000
--- a/iotdb-core/ainode/ainode/core/inference/inference_request_pool.py
+++ /dev/null
@@ -1,197 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-import gc
-import random
-import threading
-import time
-
-import numpy as np
-import torch
-import torch.multiprocessing as mp
-from transformers import PretrainedConfig
-
-from ainode.core.config import AINodeDescriptor
-from ainode.core.constant import INFERENCE_LOG_FILE_NAME_PREFIX_TEMPLATE
-from ainode.core.inference.scheduler.basic_scheduler import BasicScheduler
-from ainode.core.log import Logger
-from ainode.core.manager.model_manager import ModelManager
-
-
-class InferenceRequestPool(mp.Process):
- """
- The request pool to handle inference for a specific model.
- """
-
- FIX_SEED = 2021
- WAITING_INTERVAL_IN_MS = (
- AINodeDescriptor().get_config().get_ain_inference_batch_interval_in_ms()
- ) # How often to check for requests in the waiting/running queue
-
- def __init__(
- self,
- pool_id: int,
- model_id: str,
- config: PretrainedConfig,
- request_queue: mp.Queue,
- result_queue: mp.Queue,
- ready_event,
- **pool_kwargs,
- ):
- super().__init__()
- self.pool_id = pool_id
- self.model_id = model_id
- self.config = config
- self.pool_kwargs = pool_kwargs
- self.model = None
- self._model_manager = None
- self.device = None
- self.ready_event = ready_event
-
- self._threads = []
- self._waiting_queue = request_queue # Requests that are waiting to be processed
- self._running_queue = mp.Queue() # Requests that are currently being processed
- self._finished_queue = result_queue # Requests that are finished
- self._scheduler = BasicScheduler(
- self._waiting_queue, self._running_queue, self._finished_queue, self.pool_id
- )
- self._stop_event = mp.Event()
-
- # Fix inference seed
- random.seed(self.FIX_SEED)
- torch.manual_seed(self.FIX_SEED)
- np.random.seed(self.FIX_SEED)
-
- def _warm_up_and_estimate_memory(self):
- # TODO: Test per token memory usage, add support for cpu in the future
- torch.cuda.empty_cache()
- gc.collect()
- dummy_input = torch.zeros(
- (1, self.config.input_token_len), dtype=torch.float32
- ).to(self.device)
-
- # force cuda synchronization to avoid any asynchronous memory allocation issues
- torch.cuda.reset_peak_memory_stats(self.device)
- torch.cuda.synchronize(self.device)
- memory_before_warmup = torch.cuda.memory_allocated(self.device)
- self.logger.info(
- f"[Inference][Device-{self.device}][Pool-{self.pool_id}] Before warm-up, peak memory usage: {memory_before_warmup:.2f} bytes"
- )
-
- # warm-up
- with torch.no_grad():
- self.model.generate(dummy_input, max_new_tokens=1)
- torch.cuda.synchronize(self.device)
- peak_memory_1_token = torch.cuda.max_memory_allocated(self.device)
- self.logger.info(
- f"[Inference][Device-{self.device}][Pool-{self.pool_id}] Baseline memory usage for 1 token: {peak_memory_1_token:.2f} bytes"
- )
- self.logger.info(
- f"[Inference][Device-{self.device}][Pool-{self.pool_id}] Differentiation : {peak_memory_1_token-memory_before_warmup:.2f} bytes"
- )
-
- def _activate_requests(self):
- requests = self._scheduler.schedule_activate()
- for request in requests:
- request.inputs = request.inference_pipeline.preprocess_inputs(
- request.inputs
- )
- request.mark_running()
- self._running_queue.put(request)
- self.logger.debug(
- f"[Inference][Device-{self.device}][Pool-{self.pool_id}][ID-{request.req_id}] Request is activated with inputs shape {request.inputs.shape}"
- )
-
- def _requests_activate_loop(self):
- while not self._stop_event.is_set():
- time.sleep(self.WAITING_INTERVAL_IN_MS / 1000)
- self._activate_requests()
-
- def _step(self):
- requests = self._scheduler.schedule_step()
- # TODO: We need a batcher to accelerate the concurrent inference
- for request in requests:
- if self.model_id == "sundial":
- request.inputs = request.inputs.to(self.device)
- output = self.model.generate(
- request.inputs,
- max_new_tokens=request.max_new_tokens,
- num_samples=10,
- revin=True,
- )
- request.output_tensor = request.output_tensor.to(self.device)
- request.write_step_output(output[0].mean(dim=0))
- elif self.model_id == "timer_xl":
- request.inputs = request.inputs.to(self.device)
- output = self.model.generate(
- request.inputs,
- max_new_tokens=request.max_new_tokens,
- revin=True,
- )
- request.output_tensor = request.output_tensor.to(self.device)
- request.write_step_output(output[0])
- request.inference_pipeline.post_decode()
- if request.is_finished():
- request.inference_pipeline.post_inference()
- self.logger.debug(
- f"[Inference][Device-{self.device}][Pool-{self.pool_id}][ID-{request.req_id}] Request is finished"
- )
- # ensure the output tensor is on CPU before sending to result queue
- request.output_tensor = request.output_tensor.cpu()
- self._finished_queue.put(request)
- else:
- self.logger.debug(
- f"[Inference][Device-{self.device}][Pool-{self.pool_id}][ID-{request.req_id}] Request is not finished, re-queueing"
- )
- self._waiting_queue.put(request)
-
- def _requests_execute_loop(self):
- while not self._stop_event.is_set():
- time.sleep(self.WAITING_INTERVAL_IN_MS / 1000)
- self._step()
-
- def run(self):
- self._model_manager = ModelManager()
- self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
- self.logger = Logger(
- INFERENCE_LOG_FILE_NAME_PREFIX_TEMPLATE.format(self.device)
- )
- self._scheduler.device = self.device
- self.model = self._model_manager.load_model(self.model_id, {}).to(self.device)
- self.ready_event.set()
-
- # self._warm_up_and_estimate_memory()
-
- activate_daemon = threading.Thread(
- target=self._requests_activate_loop, daemon=True
- )
- self._threads.append(activate_daemon)
- activate_daemon.start()
- execute_daemon = threading.Thread(
- target=self._requests_execute_loop, daemon=True
- )
- self._threads.append(execute_daemon)
- execute_daemon.start()
- for thread in self._threads:
- thread.join()
- self.logger.info(
- f"[Inference][Device-{self.device}][Pool-{self.pool_id}] InferenceRequestPool exited cleanly."
- )
-
- def stop(self):
- self._stop_event.set()
diff --git a/iotdb-core/ainode/ainode/__init__.py b/iotdb-core/ainode/iotdb/ainode/__init__.py
similarity index 100%
rename from iotdb-core/ainode/ainode/__init__.py
rename to iotdb-core/ainode/iotdb/ainode/__init__.py
diff --git a/iotdb-core/ainode/iotdb/ainode/conf/git.properties b/iotdb-core/ainode/iotdb/ainode/conf/git.properties
deleted file mode 100644
index a298fc3dc61..00000000000
--- a/iotdb-core/ainode/iotdb/ainode/conf/git.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-#Generated by Git-Commit-Id-Plugin
-git.commit.id.abbrev=391429b
-git.dirty=false
diff --git a/iotdb-core/ainode/ainode/core/__init__.py b/iotdb-core/ainode/iotdb/ainode/core/__init__.py
similarity index 100%
copy from iotdb-core/ainode/ainode/core/__init__.py
copy to iotdb-core/ainode/iotdb/ainode/core/__init__.py
diff --git a/iotdb-core/ainode/ainode/core/ai_node.py b/iotdb-core/ainode/iotdb/ainode/core/ai_node.py
similarity index 99%
rename from iotdb-core/ainode/ainode/core/ai_node.py
rename to iotdb-core/ainode/iotdb/ainode/core/ai_node.py
index 71536344391..4fe2a9b97dc 100644
--- a/iotdb-core/ainode/ainode/core/ai_node.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/ai_node.py
@@ -22,7 +22,7 @@ from datetime import datetime
import psutil
-from ainode.core.config import AINodeDescriptor
+from iotdb.ainode.core.config import AINodeDescriptor
from ainode.core.constant import AINODE_SYSTEM_FILE_NAME
from ainode.core.log import Logger
from ainode.core.rpc.client import ClientManager
diff --git a/iotdb-core/ainode/ainode/core/config.py b/iotdb-core/ainode/iotdb/ainode/core/config.py
similarity index 99%
rename from iotdb-core/ainode/ainode/core/config.py
rename to iotdb-core/ainode/iotdb/ainode/core/config.py
index d0244b3784e..4e9843c143e 100644
--- a/iotdb-core/ainode/ainode/core/config.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/config.py
@@ -47,7 +47,7 @@ from ainode.core.constant import (
AINODE_THRIFT_COMPRESSION_ENABLED,
AINODE_VERSION_INFO,
)
-from ainode.core.exception import BadNodeUrlError
+from iotdb.ainode.core.exception import BadNodeUrlError
from ainode.core.log import Logger
from ainode.core.util.decorator import singleton
from ainode.thrift.common.ttypes import TEndPoint
diff --git a/iotdb-core/ainode/ainode/core/constant.py b/iotdb-core/ainode/iotdb/ainode/core/constant.py
similarity index 99%
rename from iotdb-core/ainode/ainode/core/constant.py
rename to iotdb-core/ainode/iotdb/ainode/core/constant.py
index 9db8aec1d5b..954380b225f 100644
--- a/iotdb-core/ainode/ainode/core/constant.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/constant.py
@@ -21,7 +21,7 @@ import os
from enum import Enum
from typing import List
-from ainode.core.model.model_enums import BuiltInModelType
+from iotdb.ainode.core.model.model_enums import BuiltInModelType
from ainode.thrift.common.ttypes import TEndPoint
AINODE_VERSION_INFO = "UNKNOWN"
diff --git a/iotdb-core/ainode/ainode/core/exception.py b/iotdb-core/ainode/iotdb/ainode/core/exception.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/exception.py
rename to iotdb-core/ainode/iotdb/ainode/core/exception.py
diff --git a/iotdb-core/ainode/ainode/core/inference/__init__.py b/iotdb-core/ainode/iotdb/ainode/core/inference/__init__.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/inference/__init__.py
rename to iotdb-core/ainode/iotdb/ainode/core/inference/__init__.py
diff --git a/iotdb-core/ainode/ainode/core/inference/scheduler/__init__.py b/iotdb-core/ainode/iotdb/ainode/core/inference/batcher/__init__.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/inference/scheduler/__init__.py
rename to iotdb-core/ainode/iotdb/ainode/core/inference/batcher/__init__.py
diff --git a/iotdb-core/ainode/iotdb/ainode/conf/pom.properties b/iotdb-core/ainode/iotdb/ainode/core/inference/batcher/abstract_batcher.py
similarity index 58%
rename from iotdb-core/ainode/iotdb/ainode/conf/pom.properties
rename to iotdb-core/ainode/iotdb/ainode/core/inference/batcher/abstract_batcher.py
index 96a8d57baa0..7b668e93a8f 100644
--- a/iotdb-core/ainode/iotdb/ainode/conf/pom.properties
+++ b/iotdb-core/ainode/iotdb/ainode/core/inference/batcher/abstract_batcher.py
@@ -1,4 +1,3 @@
-#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
@@ -15,7 +14,29 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
+#
+
+from abc import ABC, abstractmethod
+from typing import List
+
+from iotdb.ainode.core.inference.inference_request import InferenceRequest
+
+
+class AbstractBatcher(ABC):
+ """
+ Abstract base class for batchers that batch inference requests.
+ """
+
+ def __init__(self):
+ """
+ Args:
+
+ """
+ pass
-artifactId=iotdb-ainode
-groupId=org.apache.iotdb
-version=2.0.6-SNAPSHOT
\ No newline at end of file
+ @abstractmethod
+ def batch_request(self, reqs: List[InferenceRequest]):
+ """
+ batch given requests, such that they can be delivered to the model and be executed concurrently.
+ """
+ pass
diff --git a/iotdb-core/ainode/iotdb/ainode/core/inference/batcher/basic_batcher.py b/iotdb-core/ainode/iotdb/ainode/core/inference/batcher/basic_batcher.py
new file mode 100644
index 00000000000..591a0d7c1dd
--- /dev/null
+++ b/iotdb-core/ainode/iotdb/ainode/core/inference/batcher/basic_batcher.py
@@ -0,0 +1,63 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+from typing import List
+
+import torch
+
+from iotdb.ainode.core.inference.batcher.abstract_batcher import AbstractBatcher
+from iotdb.ainode.core.inference.inference_request import InferenceRequest
+
+
+class BasicBatcher(AbstractBatcher):
+ """
+ Basic batcher for inference requests.
+ """
+
+ def __init__(self):
+ """
+ Args:
+
+ """
+
+ def batch_request(self, reqs: List[InferenceRequest]) -> torch.Tensor:
+ """
+ Batch given requests by simply concatenating their inputs, only requests with uniformed output length can be batched.
+
+ - Considering the current implementation of AINode, we might merely be piecing together the input for now.
+
+ Args:
+ reqs (List[InferenceRequest]): List of inference requests.
+
+ Returns:
+ torch.Tensor: Concatenated input tensor of shape
+ [sum(req.batch_size), length].
+ """
+ if not reqs:
+ raise ValueError("No requests provided to batch_request.")
+
+ # Ensure length consistency
+ length_set = {req.inputs.shape[1] for req in reqs}
+ if len(length_set) != 1:
+ raise ValueError(
+ f"All requests must have the same length, " f"but got {length_set}"
+ )
+
+ batch_inputs = torch.cat([req.inputs for req in reqs], dim=0)
+
+ return batch_inputs
diff --git a/iotdb-core/ainode/ainode/core/inference/strategy/__init__.py b/iotdb-core/ainode/iotdb/ainode/core/inference/dispatcher/__init__.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/inference/strategy/__init__.py
rename to iotdb-core/ainode/iotdb/ainode/core/inference/dispatcher/__init__.py
diff --git a/iotdb-core/ainode/ainode/core/rpc/status.py b/iotdb-core/ainode/iotdb/ainode/core/inference/dispatcher/abstract_dispatcher.py
similarity index 50%
copy from iotdb-core/ainode/ainode/core/rpc/status.py
copy to iotdb-core/ainode/iotdb/ainode/core/inference/dispatcher/abstract_dispatcher.py
index 37368b0068b..3abc1477a97 100644
--- a/iotdb-core/ainode/ainode/core/rpc/status.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/inference/dispatcher/abstract_dispatcher.py
@@ -16,18 +16,28 @@
# under the License.
#
-from ainode.core.constant import TSStatusCode
-from ainode.core.log import Logger
-from ainode.thrift.common.ttypes import TSStatus
+from abc import ABC, abstractmethod
+from typing import Dict
+from iotdb.ainode.core.inference.inference_request import InferenceRequest
+from iotdb.ainode.core.inference.inference_request_pool import PoolState
-def get_status(status_code: TSStatusCode, message: str = None) -> TSStatus:
- status = TSStatus(status_code.get_status_code())
- status.message = message
- return status
+class AbstractDispatcher(ABC):
+ """
+ Abstract base class for dispatchers that handle inference requests.
+ """
-def verify_success(status: TSStatus, err_msg: str) -> None:
- if status.code != TSStatusCode.SUCCESS_STATUS.get_status_code():
- Logger().warning(err_msg + ", error status is ", status)
- raise RuntimeError(str(status.code) + ": " + status.message)
+ def __init__(self, pool_states: Dict[int, PoolState]):
+ """
+ Args:
+ pool_states: Dictionary containing the states of inference request pools in the same pool group.
+ """
+ self.pool_states = pool_states
+
+ @abstractmethod
+ def dispatch_request(self, req: InferenceRequest, pool_ids: list[int]) -> int:
+ """
+ Dispatch an inference request to the appropriate pool.
+ """
+ pass
diff --git a/iotdb-core/ainode/iotdb/ainode/core/inference/dispatcher/basic_dispatcher.py b/iotdb-core/ainode/iotdb/ainode/core/inference/dispatcher/basic_dispatcher.py
new file mode 100644
index 00000000000..d06ba55546f
--- /dev/null
+++ b/iotdb-core/ainode/iotdb/ainode/core/inference/dispatcher/basic_dispatcher.py
@@ -0,0 +1,60 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+from iotdb.ainode.core.exception import InferenceModelInternalError
+from iotdb.ainode.core.inference.dispatcher.abstract_dispatcher import (
+ AbstractDispatcher,
+)
+from iotdb.ainode.core.inference.inference_request import InferenceRequest
+from iotdb.ainode.core.inference.inference_request_pool import PoolState
+from iotdb.ainode.core.log import Logger
+
+logger = Logger()
+
+
+class BasicDispatcher(AbstractDispatcher):
+ """
+ Basic dispatcher for inference requests.
+ """
+
+ def __init__(self, pool_states):
+ super().__init__(pool_states)
+
+ def _select_pool_by_hash(self, req, pool_ids) -> int:
+ """
+ Select a pool for the given request using a hash-based approach.
+ """
+ model_id = req.model_id
+ if not pool_ids:
+ raise InferenceModelInternalError(
+ f"No available pools for model {model_id}"
+ )
+ start_idx = hash(req.req_id) % len(pool_ids)
+ n = len(pool_ids)
+ for i in range(n):
+ pool_id = pool_ids[(start_idx + i) % n]
+ state = self.pool_states[pool_id]
+ if state == PoolState.RUNNING:
+ return pool_id
+ raise InferenceModelInternalError(
+ f"No RUNNING pools available for model {model_id}"
+ )
+
+ def dispatch_request(self, req: InferenceRequest, pool_ids: list[int]) -> int:
+ pool_idx = self._select_pool_by_hash(req, pool_ids)
+ return pool_idx
diff --git a/iotdb-core/ainode/ainode/core/inference/inference_request.py b/iotdb-core/ainode/iotdb/ainode/core/inference/inference_request.py
similarity index 84%
rename from iotdb-core/ainode/ainode/core/inference/inference_request.py
rename to iotdb-core/ainode/iotdb/ainode/core/inference/inference_request.py
index 2c45826fd26..82c72cc37ab 100644
--- a/iotdb-core/ainode/ainode/core/inference/inference_request.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/inference/inference_request.py
@@ -20,10 +20,11 @@ from typing import Any
import torch
-from ainode.core.inference.strategy.abstract_inference_pipeline import (
+from iotdb.ainode.core.inference.strategy.abstract_inference_pipeline import (
AbstractInferencePipeline,
)
-from ainode.core.log import Logger
+from iotdb.ainode.core.log import Logger
+from iotdb.ainode.core.util.atmoic_int import AtomicInt
logger = Logger()
@@ -38,6 +39,7 @@ class InferenceRequest:
def __init__(
self,
req_id: str,
+ model_id: str,
inputs: torch.Tensor,
inference_pipeline: AbstractInferencePipeline,
max_new_tokens: int = 96,
@@ -47,6 +49,7 @@ class InferenceRequest:
inputs = inputs.unsqueeze(0)
self.req_id = req_id
+ self.model_id = model_id
self.inputs = inputs
self.infer_kwargs = infer_kwargs
self.inference_pipeline = inference_pipeline
@@ -57,6 +60,8 @@ class InferenceRequest:
self.batch_size = inputs.size(0)
self.state = InferenceRequestState.WAITING
self.cur_step_idx = 0 # Current write position in the output step index
+ self.assigned_pool_id = -1 # The pool handling this request
+ self.assigned_device_id = -1 # The device handling this request
# Preallocate output buffer [batch_size, max_new_tokens]
self.output_tensor = torch.zeros(
@@ -106,15 +111,22 @@ class InferenceRequestProxy:
def __init__(self, req_id: str):
self.req_id = req_id
self.result = None
+ self._counter: AtomicInt = None
self._lock = threading.Lock()
self._condition = threading.Condition(self._lock)
def set_result(self, result: Any):
with self._lock:
self.result = result
+ if self._counter is not None:
+ self._counter.decrement_and_get()
self._condition.notify_all()
- def wait_for_completion(self) -> Any:
+ def set_counter(self, counter: AtomicInt):
+ with self._lock:
+ self._counter = counter
+
+ def wait_for_result(self) -> Any:
with self._lock:
self._condition.wait()
return self.result
diff --git a/iotdb-core/ainode/iotdb/ainode/core/inference/inference_request_pool.py b/iotdb-core/ainode/iotdb/ainode/core/inference/inference_request_pool.py
new file mode 100644
index 00000000000..6b054c91fe3
--- /dev/null
+++ b/iotdb-core/ainode/iotdb/ainode/core/inference/inference_request_pool.py
@@ -0,0 +1,223 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+import random
+import threading
+import time
+from collections import defaultdict
+from enum import Enum
+
+import numpy as np
+import torch
+import torch.multiprocessing as mp
+from transformers import PretrainedConfig
+
+from iotdb.ainode.core.config import AINodeDescriptor
+from iotdb.ainode.core.constant import INFERENCE_LOG_FILE_NAME_PREFIX_TEMPLATE
+from iotdb.ainode.core.inference.batcher.basic_batcher import BasicBatcher
+from iotdb.ainode.core.inference.inference_request import InferenceRequest
+from iotdb.ainode.core.inference.request_scheduler.basic_request_scheduler import (
+ BasicRequestScheduler,
+)
+from iotdb.ainode.core.log import Logger
+from iotdb.ainode.core.manager.model_manager import ModelManager
+from iotdb.ainode.core.model.model_enums import BuiltInModelType
+from iotdb.ainode.core.model.model_info import ModelInfo
+from iotdb.ainode.core.util.gpu_mapping import convert_device_id_to_torch_device
+
+
+class PoolState(Enum):
+ INITIALIZING = "INITIALIZING"
+ RUNNING = "RUNNING"
+ STOPPING = "STOPPING"
+
+
+class InferenceRequestPool(mp.Process):
+ """
+ The request pool to handle inference for a specific model.
+ """
+
+ FIX_SEED = 2021
+ WAITING_INTERVAL_IN_MS = (
+ AINodeDescriptor().get_config().get_ain_inference_batch_interval_in_ms()
+ ) # How often to check for requests in the waiting/running queue
+
+ def __init__(
+ self,
+ pool_id: int,
+ model_info: ModelInfo,
+ device: str,
+ config: PretrainedConfig,
+ request_queue: mp.Queue,
+ result_queue: mp.Queue,
+ ready_event,
+ **pool_kwargs,
+ ):
+ super().__init__()
+ self.pool_id = pool_id
+ self.model_info = model_info
+ self.config = config
+ self.pool_kwargs = pool_kwargs
+ self.ready_event = ready_event
+ self.device = convert_device_id_to_torch_device(device)
+
+ self._threads = []
+ self._waiting_queue = request_queue # Requests that are waiting to be processed
+ self._running_queue = mp.Queue() # Requests that are currently being processed
+ self._finished_queue = result_queue # Requests that are finished
+ self._request_scheduler = BasicRequestScheduler(
+ self._waiting_queue, self._running_queue, self._finished_queue, self.pool_id
+ )
+ self._batcher = BasicBatcher()
+ self._stop_event = mp.Event()
+
+ self._model = None
+ self._model_manager = None
+ self._logger = None
+
+ # Fix inference seed
+ random.seed(self.FIX_SEED)
+ torch.manual_seed(self.FIX_SEED)
+ np.random.seed(self.FIX_SEED)
+
+ def _activate_requests(self):
+ requests = self._request_scheduler.schedule_activate()
+ for request in requests:
+ request.inputs = request.inference_pipeline.preprocess_inputs(
+ request.inputs
+ )
+ request.mark_running()
+ self._running_queue.put(request)
+ self._logger.debug(
+ f"[Inference][Device-{self.device}][Pool-{self.pool_id}][Req-{request.req_id}] Request is activated with inputs shape {request.inputs.shape}"
+ )
+
+ def _requests_activate_loop(self):
+ while not self._stop_event.is_set():
+ time.sleep(self.WAITING_INTERVAL_IN_MS / 1000)
+ self._activate_requests()
+
+ def _step(self):
+ all_requests: list[InferenceRequest] = self._request_scheduler.schedule_step()
+
+ grouped_requests = defaultdict(list)
+ for req in all_requests:
+ key = (req.inputs.shape[1], req.max_new_tokens)
+ grouped_requests[key].append(req)
+ grouped_requests = list(grouped_requests.values())
+
+ for requests in grouped_requests:
+ batch_inputs = self._batcher.batch_request(requests).to(self.device)
+ if self.model_info.model_type == BuiltInModelType.SUNDIAL.value:
+ batch_output = self._model.generate(
+ batch_inputs,
+ max_new_tokens=requests[0].max_new_tokens,
+ num_samples=10,
+ revin=True,
+ )
+
+ offset = 0
+ for request in requests:
+ request.output_tensor = request.output_tensor.to(self.device)
+ cur_batch_size = request.batch_size
+ cur_output = batch_output[offset : offset + cur_batch_size]
+ offset += cur_batch_size
+ request.write_step_output(cur_output.mean(dim=1))
+
+ request.inference_pipeline.post_decode()
+ if request.is_finished():
+ request.inference_pipeline.post_inference()
+ self._logger.debug(
+ f"[Inference][Device-{self.device}][Pool-{self.pool_id}][ID-{request.req_id}] Request is finished"
+ )
+ # ensure the output tensor is on CPU before sending to result queue
+ request.output_tensor = request.output_tensor.cpu()
+ self._finished_queue.put(request)
+ else:
+ self._logger.debug(
+ f"[Inference][Device-{self.device}][Pool-{self.pool_id}][ID-{request.req_id}] Request is not finished, re-queueing"
+ )
+ self._waiting_queue.put(request)
+
+ elif self.model_info.model_type == BuiltInModelType.TIMER_XL.value:
+ batch_output = self._model.generate(
+ batch_inputs,
+ max_new_tokens=requests[0].max_new_tokens,
+ revin=True,
+ )
+
+ offset = 0
+ for request in requests:
+ request.output_tensor = request.output_tensor.to(self.device)
+ cur_batch_size = request.batch_size
+ cur_output = batch_output[offset : offset + cur_batch_size]
+ offset += cur_batch_size
+ request.write_step_output(cur_output)
+
+ request.inference_pipeline.post_decode()
+ if request.is_finished():
+ request.inference_pipeline.post_inference()
+ self._logger.debug(
+ f"[Inference][Device-{self.device}][Pool-{self.pool_id}][ID-{request.req_id}] Request is finished"
+ )
+ # ensure the output tensor is on CPU before sending to result queue
+ request.output_tensor = request.output_tensor.cpu()
+ self._finished_queue.put(request)
+ else:
+ self._logger.debug(
+ f"[Inference][Device-{self.device}][Pool-{self.pool_id}][ID-{request.req_id}] Request is not finished, re-queueing"
+ )
+ self._waiting_queue.put(request)
+
+ def _requests_execute_loop(self):
+ while not self._stop_event.is_set():
+ time.sleep(self.WAITING_INTERVAL_IN_MS / 1000)
+ self._step()
+
+ def run(self):
+ self._logger = Logger(
+ INFERENCE_LOG_FILE_NAME_PREFIX_TEMPLATE.format(self.device)
+ )
+ self._model_manager = ModelManager()
+ self._request_scheduler.device = self.device
+ self._model = self._model_manager.load_model(self.model_info.model_id, {}).to(
+ self.device
+ )
+ self.ready_event.set()
+
+ activate_daemon = threading.Thread(
+ target=self._requests_activate_loop, daemon=True
+ )
+ self._threads.append(activate_daemon)
+ activate_daemon.start()
+ execute_daemon = threading.Thread(
+ target=self._requests_execute_loop, daemon=True
+ )
+ self._threads.append(execute_daemon)
+ execute_daemon.start()
+ self._logger.info(
+ f"[Inference][Device-{self.device}][Pool-{self.pool_id}] InferenceRequestPool for model {self.model_info.model_id} is activated."
+ )
+ for thread in self._threads:
+ thread.join()
+ self._logger.info(
+ f"[Inference][Device-{self.device}][Pool-{self.pool_id}] InferenceRequestPool for model {self.model_info.model_id} exited cleanly."
+ )
+
+ def stop(self):
+ self._stop_event.set()
diff --git a/iotdb-core/ainode/ainode/core/ingress/__init__.py b/iotdb-core/ainode/iotdb/ainode/core/inference/pool_scheduler/__init__.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/ingress/__init__.py
rename to iotdb-core/ainode/iotdb/ainode/core/inference/pool_scheduler/__init__.py
diff --git a/iotdb-core/ainode/iotdb/ainode/core/inference/pool_scheduler/abstract_pool_scheduler.py b/iotdb-core/ainode/iotdb/ainode/core/inference/pool_scheduler/abstract_pool_scheduler.py
new file mode 100644
index 00000000000..19d21f5822d
--- /dev/null
+++ b/iotdb-core/ainode/iotdb/ainode/core/inference/pool_scheduler/abstract_pool_scheduler.py
@@ -0,0 +1,86 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+from abc import ABC, abstractmethod
+from dataclasses import dataclass
+from enum import Enum
+from typing import Dict, List
+
+from iotdb.ainode.core.inference.pool_group import PoolGroup
+from iotdb.ainode.core.model.model_info import ModelInfo
+
+
+class ScaleActionType(Enum):
+ SCALE_UP = "Scale Up"
+ SCALE_DOWN = "Scale Down"
+
+
+@dataclass(frozen=True)
+class ScaleAction:
+ action: ScaleActionType
+ amount: int
+ model_id: str
+ device_id: str
+
+
+class AbstractPoolScheduler(ABC):
+ """
+ Abstract base class for pool scheduling strategies.
+ """
+
+ def __init__(self, request_pool_map: Dict[str, Dict[str, PoolGroup]]):
+ """
+ Args:
+ request_pool_map: Dict["model_id", Dict["device_id", PoolGroup]].
+ """
+ self._request_pool_map = request_pool_map
+
+ @abstractmethod
+ def schedule(self, model_id: str) -> List[ScaleAction]:
+ """
+ Schedule a scaling action for the given model_id.
+ """
+ pass
+
+ @abstractmethod
+ def schedule_load_model_to_device(
+ self, model_info: ModelInfo, device_id: str
+ ) -> List[ScaleAction]:
+ """
+ Schedule a series of actions to load the model to the device.
+ Args:
+ model_info: The model to be loaded.
+ device_id: The device to load the model to.
+ Returns:
+ A list of ScaleAction to be performed.
+ """
+ pass
+
+ @abstractmethod
+ def schedule_unload_model_from_device(
+ self, model_info: ModelInfo, device_id: str
+ ) -> List[ScaleAction]:
+ """
+ Schedule a series of actions to unload the model from the device.
+ Args:
+ model_info: The model to be unloaded.
+ device_id: The device to unload the model from.
+ Returns:
+ A list of ScaleAction to be performed.
+ """
+ pass
diff --git a/iotdb-core/ainode/iotdb/ainode/core/inference/pool_scheduler/basic_pool_scheduler.py b/iotdb-core/ainode/iotdb/ainode/core/inference/pool_scheduler/basic_pool_scheduler.py
new file mode 100644
index 00000000000..6a2bd2b619a
--- /dev/null
+++ b/iotdb-core/ainode/iotdb/ainode/core/inference/pool_scheduler/basic_pool_scheduler.py
@@ -0,0 +1,193 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+from typing import Dict, List, Optional
+
+import torch
+
+from iotdb.ainode.core.exception import InferenceModelInternalError
+from iotdb.ainode.core.inference.pool_group import PoolGroup
+from iotdb.ainode.core.inference.pool_scheduler.abstract_pool_scheduler import (
+ AbstractPoolScheduler,
+ ScaleAction,
+ ScaleActionType,
+)
+from iotdb.ainode.core.log import Logger
+from iotdb.ainode.core.manager.model_manager import ModelManager
+from iotdb.ainode.core.manager.utils import (
+ INFERENCE_EXTRA_MEMORY_RATIO,
+ INFERENCE_MEMORY_USAGE_RATIO,
+ MODEL_MEM_USAGE_MAP,
+ estimate_pool_size,
+ evaluate_system_resources,
+)
+from iotdb.ainode.core.model.model_info import BUILT_IN_LTSM_MAP, ModelInfo
+from iotdb.ainode.core.util.gpu_mapping import convert_device_id_to_torch_device
+
+logger = Logger()
+
+
+def _estimate_shared_pool_size_by_total_mem(
+ device: torch.device,
+ existing_model_infos: List[ModelInfo],
+ new_model_info: Optional[ModelInfo] = None,
+) -> Dict[str, int]:
+ """
+ Estimate pool counts for (existing_model_ids + new_model_id) by equally
+ splitting the device's TOTAL memory among models.
+
+ Returns:
+ mapping {model_id: pool_num}
+ """
+ # Extract unique model IDs
+ all_models = existing_model_infos + (
+ [new_model_info] if new_model_info is not None else []
+ )
+
+ # Seize memory usage for each model
+ mem_usages: Dict[str, float] = {}
+ for model_info in all_models:
+ mem_usages[model_info.model_id] = (
+ MODEL_MEM_USAGE_MAP[model_info.model_type] * INFERENCE_EXTRA_MEMORY_RATIO
+ )
+
+ # Evaluate system resources and get TOTAL memory
+ system_res = evaluate_system_resources(device)
+ # TODO: Its better to consider free memory, but we need to track the memory usage of existing pools
+ total_mem = system_res.get("total_mem")
+
+ usable_mem = total_mem * INFERENCE_MEMORY_USAGE_RATIO
+ if usable_mem <= 0:
+ logger.error(
+ f"[Inference][Device-{device}] No usable memory on device. total={total_mem / 1024 ** 2:.2f} MB, usable={usable_mem / 1024 ** 2:.2f} MB"
+ )
+
+ # Each model gets an equal share of the TOTAL memory
+ num_models = len(all_models)
+ per_model_share = usable_mem / num_models # TODO: Implement more strategies later
+
+ # Calculate pool allocation for each model
+ allocation: Dict[str, int] = {}
+ for model_info in all_models:
+ pool_num = int(per_model_share // mem_usages[model_info.model_id])
+ if pool_num <= 0:
+ logger.warning(
+ f"[Inference][Device-{device}] Not enough TOTAL memory to guarantee at least 1 pool for model {model_info.model_id}, no pool will be scheduled for this model. "
+ f"Per-model share={per_model_share / 1024 ** 2:.2f} MB, need>={mem_usages[model_info.model_id] / 1024 ** 2:.2f} MB"
+ )
+ allocation[model_info.model_id] = pool_num
+ logger.info(
+ f"[Inference][Device-{device}] Shared pool allocation (by TOTAL memory): {allocation}"
+ )
+ return allocation
+
+
+class BasicPoolScheduler(AbstractPoolScheduler):
+ """
+ A basic scheduler to init the request pools. In short, different kind of models will equally share the available resource of the located device, and scale down actions are always ahead of scale up.
+ """
+
+ def __init__(self, request_pool_map: Dict[str, Dict[str, PoolGroup]]):
+ super().__init__(request_pool_map)
+ self._model_manager = ModelManager()
+
+ def schedule(self, model_id: str) -> List[ScaleAction]:
+ """
+ Schedule a scaling action for the given model_id.
+ """
+ if model_id not in self._request_pool_map:
+ pool_num = estimate_pool_size(self.DEFAULT_DEVICE, model_id)
+ if pool_num <= 0:
+ raise InferenceModelInternalError(
+ f"Not enough memory to run model {model_id}."
+ )
+ return [ScaleAction(ScaleActionType.SCALE_UP, pool_num, model_id)]
+
+ def schedule_load_model_to_device(
+ self, model_info: ModelInfo, device_id: str
+ ) -> List[ScaleAction]:
+ existing_model_infos = [
+ self._model_manager.get_model_info(existing_model_id)
+ for existing_model_id, pool_group_map in self._request_pool_map.items()
+ if existing_model_id != model_info.model_id and device_id in pool_group_map
+ ]
+ allocation_result = _estimate_shared_pool_size_by_total_mem(
+ device=convert_device_id_to_torch_device(device_id),
+ existing_model_infos=existing_model_infos,
+ new_model_info=model_info,
+ )
+ return self._convert_allocation_result_to_scale_actions(
+ allocation_result, device_id
+ )
+
+ def schedule_unload_model_from_device(
+ self, model_info: ModelInfo, device_id: str
+ ) -> List[ScaleAction]:
+ existing_model_infos = [
+ self._model_manager.get_model_info(existing_model_id)
+ for existing_model_id, pool_group_map in self._request_pool_map.items()
+ if existing_model_id != model_info.model_id and device_id in pool_group_map
+ ]
+ allocation_result = (
+ _estimate_shared_pool_size_by_total_mem(
+ device=convert_device_id_to_torch_device(device_id),
+ existing_model_infos=existing_model_infos,
+ new_model_info=None,
+ )
+ if len(existing_model_infos) > 0
+ else {model_info.model_id: 0}
+ )
+ if len(existing_model_infos) > 0:
+ allocation_result[model_info.model_id] = 0
+ return self._convert_allocation_result_to_scale_actions(
+ allocation_result, device_id
+ )
+
+ def _convert_allocation_result_to_scale_actions(
+ self, allocation_result: Dict[str, int], device_id: str
+ ) -> List[ScaleAction]:
+ """
+ Convert the model allocation result to List[ScaleAction], where the scale down actions are always ahead of the scale up.
+ """
+ actions = []
+ for model_id, target_num in allocation_result.items():
+ current_num = self._request_pool_map.get(model_id, {}).get(device_id, None)
+ current_num = current_num.get_pool_count() if current_num else 0
+ diff = target_num - current_num
+ if diff > 0:
+ actions.append(
+ ScaleAction(
+ action=ScaleActionType.SCALE_UP,
+ amount=diff,
+ model_id=model_id,
+ device_id=device_id,
+ )
+ )
+ elif diff < 0:
+ actions.append(
+ ScaleAction(
+ action=ScaleActionType.SCALE_DOWN,
+ amount=-diff,
+ model_id=model_id,
+ device_id=device_id,
+ )
+ )
+ sorted_actions = sorted(
+ actions, key=lambda a: (0 if a.action == ScaleActionType.SCALE_DOWN else 1)
+ )
+ return sorted_actions
diff --git a/iotdb-core/ainode/ainode/core/manager/__init__.py b/iotdb-core/ainode/iotdb/ainode/core/inference/request_scheduler/__init__.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/manager/__init__.py
rename to iotdb-core/ainode/iotdb/ainode/core/inference/request_scheduler/__init__.py
diff --git a/iotdb-core/ainode/ainode/core/inference/scheduler/abstract_scheduler.py b/iotdb-core/ainode/iotdb/ainode/core/inference/request_scheduler/abstract_request_scheduler.py
similarity index 98%
rename from iotdb-core/ainode/ainode/core/inference/scheduler/abstract_scheduler.py
rename to iotdb-core/ainode/iotdb/ainode/core/inference/request_scheduler/abstract_request_scheduler.py
index 8bc34e529c7..a6c2fe53cae 100644
--- a/iotdb-core/ainode/ainode/core/inference/scheduler/abstract_scheduler.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/inference/request_scheduler/abstract_request_scheduler.py
@@ -19,7 +19,7 @@
from abc import ABC, abstractmethod
-class AbstractScheduler(ABC):
+class AbstractRequestScheduler(ABC):
"""
Abstract base class for inference scheduling strategies.
diff --git a/iotdb-core/ainode/ainode/core/inference/scheduler/basic_scheduler.py b/iotdb-core/ainode/iotdb/ainode/core/inference/request_scheduler/basic_request_scheduler.py
similarity index 89%
rename from iotdb-core/ainode/ainode/core/inference/scheduler/basic_scheduler.py
rename to iotdb-core/ainode/iotdb/ainode/core/inference/request_scheduler/basic_request_scheduler.py
index 65dee81ca1c..ef5d37a18a1 100644
--- a/iotdb-core/ainode/ainode/core/inference/scheduler/basic_scheduler.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/inference/request_scheduler/basic_request_scheduler.py
@@ -21,16 +21,17 @@ import os
import psutil
import torch
-from ainode.core.inference.inference_request import InferenceRequest
-from ainode.core.inference.scheduler.abstract_scheduler import AbstractScheduler
-from ainode.core.log import Logger
+from iotdb.ainode.core.inference.request_scheduler.abstract_request_scheduler import (
+ AbstractRequestScheduler,
+)
+from iotdb.ainode.core.log import Logger
logger = Logger()
-class BasicScheduler(AbstractScheduler):
+class BasicRequestScheduler(AbstractRequestScheduler):
"""
- A simple FIFO scheduler that selects requests based on memory availability and activation/step size.
+ A simple FIFO request scheduler that selects requests based on memory availability and activation/step size.
"""
def __init__(
diff --git a/iotdb-core/ainode/ainode/core/model/__init__.py b/iotdb-core/ainode/iotdb/ainode/core/inference/strategy/__init__.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/model/__init__.py
rename to iotdb-core/ainode/iotdb/ainode/core/inference/strategy/__init__.py
diff --git a/iotdb-core/ainode/ainode/core/inference/strategy/abstract_inference_pipeline.py b/iotdb-core/ainode/iotdb/ainode/core/inference/strategy/abstract_inference_pipeline.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/inference/strategy/abstract_inference_pipeline.py
rename to iotdb-core/ainode/iotdb/ainode/core/inference/strategy/abstract_inference_pipeline.py
diff --git a/iotdb-core/ainode/ainode/core/inference/strategy/timer_sundial_inference_pipeline.py b/iotdb-core/ainode/iotdb/ainode/core/inference/strategy/timer_sundial_inference_pipeline.py
similarity index 88%
rename from iotdb-core/ainode/ainode/core/inference/strategy/timer_sundial_inference_pipeline.py
rename to iotdb-core/ainode/iotdb/ainode/core/inference/strategy/timer_sundial_inference_pipeline.py
index ffa76751713..17c88e32fb5 100644
--- a/iotdb-core/ainode/ainode/core/inference/strategy/timer_sundial_inference_pipeline.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/inference/strategy/timer_sundial_inference_pipeline.py
@@ -18,11 +18,11 @@
import torch
-from ainode.core.exception import InferenceModelInternalError
-from ainode.core.inference.strategy.abstract_inference_pipeline import (
+from iotdb.ainode.core.exception import InferenceModelInternalError
+from iotdb.ainode.core.inference.strategy.abstract_inference_pipeline import (
AbstractInferencePipeline,
)
-from ainode.core.model.sundial.configuration_sundial import SundialConfig
+from iotdb.ainode.core.model.sundial.configuration_sundial import SundialConfig
class TimerSundialInferencePipeline(AbstractInferencePipeline):
diff --git a/iotdb-core/ainode/ainode/core/inference/strategy/timerxl_inference_pipeline.py b/iotdb-core/ainode/iotdb/ainode/core/inference/strategy/timerxl_inference_pipeline.py
similarity index 71%
rename from iotdb-core/ainode/ainode/core/inference/strategy/timerxl_inference_pipeline.py
rename to iotdb-core/ainode/iotdb/ainode/core/inference/strategy/timerxl_inference_pipeline.py
index 4add928cb38..dc1dd304f68 100644
--- a/iotdb-core/ainode/ainode/core/inference/strategy/timerxl_inference_pipeline.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/inference/strategy/timerxl_inference_pipeline.py
@@ -18,11 +18,11 @@
import torch
-from ainode.core.exception import InferenceModelInternalError
-from ainode.core.inference.strategy.abstract_inference_pipeline import (
+from iotdb.ainode.core.exception import InferenceModelInternalError
+from iotdb.ainode.core.inference.strategy.abstract_inference_pipeline import (
AbstractInferencePipeline,
)
-from ainode.core.model.timerxl.configuration_timer import TimerConfig
+from iotdb.ainode.core.model.timerxl.configuration_timer import TimerConfig
class TimerXLInferencePipeline(AbstractInferencePipeline):
@@ -39,13 +39,13 @@ class TimerXLInferencePipeline(AbstractInferencePipeline):
raise InferenceModelInternalError(
f"[Inference] Input shape must be: [batch_size, seq_len], but receives {inputs.shape}"
)
- # TODO: Disassemble and adapt with TimerXL's ts_generation_mixin.py
+ # Considering that we are currently using the generate function interface, it seems that no pre-processing is required
return inputs
def post_decode(self):
- # TODO: Disassemble and adapt with TimerXL's ts_generation_mixin.py
+ # Considering that we are currently using the generate function interface, it seems that no post-processing is required
pass
def post_inference(self):
- # TODO: Disassemble and adapt with TimerXL's ts_generation_mixin.py
+ # Considering that we are currently using the generate function interface, it seems that no post-processing is required
pass
diff --git a/iotdb-core/ainode/ainode/core/inference/utils.py b/iotdb-core/ainode/iotdb/ainode/core/inference/utils.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/inference/utils.py
rename to iotdb-core/ainode/iotdb/ainode/core/inference/utils.py
diff --git a/iotdb-core/ainode/ainode/core/model/sundial/__init__.py b/iotdb-core/ainode/iotdb/ainode/core/ingress/__init__.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/model/sundial/__init__.py
rename to iotdb-core/ainode/iotdb/ainode/core/ingress/__init__.py
diff --git a/iotdb-core/ainode/ainode/core/ingress/dataset.py b/iotdb-core/ainode/iotdb/ainode/core/ingress/dataset.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/ingress/dataset.py
rename to iotdb-core/ainode/iotdb/ainode/core/ingress/dataset.py
diff --git a/iotdb-core/ainode/ainode/core/ingress/iotdb.py b/iotdb-core/ainode/iotdb/ainode/core/ingress/iotdb.py
similarity index 99%
rename from iotdb-core/ainode/ainode/core/ingress/iotdb.py
rename to iotdb-core/ainode/iotdb/ainode/core/ingress/iotdb.py
index 2d1bb74016f..792d64b2980 100644
--- a/iotdb-core/ainode/ainode/core/ingress/iotdb.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/ingress/iotdb.py
@@ -23,8 +23,8 @@ from iotdb.utils.Field import Field
from iotdb.utils.IoTDBConstants import TSDataType
from torch.utils.data import Dataset
-from ainode.core.config import AINodeDescriptor
-from ainode.core.ingress.dataset import BasicDatabaseForecastDataset
+from iotdb.ainode.core.config import AINodeDescriptor
+from iotdb.ainode.core.ingress import BasicDatabaseForecastDataset
from ainode.core.log import Logger
from ainode.core.util.cache import MemoryLRUCache
from ainode.core.util.decorator import singleton
diff --git a/iotdb-core/ainode/ainode/core/log.py b/iotdb-core/ainode/iotdb/ainode/core/log.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/log.py
rename to iotdb-core/ainode/iotdb/ainode/core/log.py
diff --git a/iotdb-core/ainode/ainode/core/model/timerxl/__init__.py b/iotdb-core/ainode/iotdb/ainode/core/manager/__init__.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/model/timerxl/__init__.py
rename to iotdb-core/ainode/iotdb/ainode/core/manager/__init__.py
diff --git a/iotdb-core/ainode/ainode/core/manager/cluster_manager.py b/iotdb-core/ainode/iotdb/ainode/core/manager/cluster_manager.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/manager/cluster_manager.py
rename to iotdb-core/ainode/iotdb/ainode/core/manager/cluster_manager.py
diff --git a/iotdb-core/ainode/ainode/core/manager/inference_manager.py b/iotdb-core/ainode/iotdb/ainode/core/manager/inference_manager.py
similarity index 97%
rename from iotdb-core/ainode/ainode/core/manager/inference_manager.py
rename to iotdb-core/ainode/iotdb/ainode/core/manager/inference_manager.py
index fe7adbc2396..65f4abacfca 100644
--- a/iotdb-core/ainode/ainode/core/manager/inference_manager.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/manager/inference_manager.py
@@ -15,21 +15,19 @@
# specific language governing permissions and limitations
# under the License.
#
-import gc
import threading
import time
from abc import ABC, abstractmethod
from typing import Dict, List
import pandas as pd
-import psutil
import torch
import torch.multiprocessing as mp
from iotdb.tsfile.utils.tsblock_serde import deserialize
-from ainode.core.config import AINodeDescriptor
+from iotdb.ainode.core.config import AINodeDescriptor
from ainode.core.constant import TSStatusCode
-from ainode.core.exception import (
+from iotdb.ainode.core.exception import (
InferenceModelInternalError,
InvalidWindowArgumentError,
NumericalRangeException,
@@ -39,11 +37,11 @@ from ainode.core.inference.inference_request import (
InferenceRequest,
InferenceRequestProxy,
)
-from ainode.core.inference.inference_request_pool import InferenceRequestPool
-from ainode.core.inference.strategy.timer_sundial_inference_pipeline import (
+from iotdb.ainode.core.inference.inference_request_pool import InferenceRequestPool
+from iotdb.ainode.core.inference.strategy import (
TimerSundialInferencePipeline,
)
-from ainode.core.inference.strategy.timerxl_inference_pipeline import (
+from iotdb.ainode.core.inference.strategy import (
TimerXLInferencePipeline,
)
from ainode.core.inference.utils import generate_req_id
@@ -56,9 +54,9 @@ from ainode.core.manager.utils import (
from ainode.core.model.sundial.configuration_sundial import SundialConfig
from ainode.core.model.sundial.modeling_sundial import SundialForPrediction
from ainode.core.model.timerxl.configuration_timer import TimerConfig
-from ainode.core.model.timerxl.modeling_timer import TimerForPrediction
+from iotdb.ainode.core.model.timerxl.modeling_timer import TimerForPrediction
from ainode.core.rpc.status import get_status
-from ainode.core.util.serde import convert_to_binary
+from iotdb.ainode.core.util.serde import convert_to_binary
from ainode.thrift.ainode.ttypes import (
TForecastReq,
TForecastResp,
diff --git a/iotdb-core/ainode/ainode/core/manager/model_manager.py b/iotdb-core/ainode/iotdb/ainode/core/manager/model_manager.py
similarity index 97%
rename from iotdb-core/ainode/ainode/core/manager/model_manager.py
rename to iotdb-core/ainode/iotdb/ainode/core/manager/model_manager.py
index 69b163afd97..818311ed57f 100644
--- a/iotdb-core/ainode/ainode/core/manager/model_manager.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/manager/model_manager.py
@@ -21,12 +21,12 @@ from torch import nn
from yaml import YAMLError
from ainode.core.constant import TSStatusCode
-from ainode.core.exception import (
+from iotdb.ainode.core.exception import (
BadConfigValueError,
InvalidUriError,
)
from ainode.core.log import Logger
-from ainode.core.model.model_enums import BuiltInModelType, ModelStates
+from iotdb.ainode.core.model.model_enums import BuiltInModelType, ModelStates
from ainode.core.model.model_info import ModelInfo
from ainode.core.model.model_storage import ModelStorage
from ainode.core.rpc.status import get_status
diff --git a/iotdb-core/ainode/ainode/core/manager/utils.py b/iotdb-core/ainode/iotdb/ainode/core/manager/utils.py
similarity index 98%
rename from iotdb-core/ainode/ainode/core/manager/utils.py
rename to iotdb-core/ainode/iotdb/ainode/core/manager/utils.py
index 5fbd444c38c..65106e08e08 100644
--- a/iotdb-core/ainode/ainode/core/manager/utils.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/manager/utils.py
@@ -21,7 +21,7 @@ import gc
import psutil
import torch
-from ainode.core.config import AINodeDescriptor
+from iotdb.ainode.core.config import AINodeDescriptor
from ainode.core.log import Logger
from ainode.core.manager.model_manager import ModelManager
from ainode.core.model.model_info import BUILT_IN_LTSM_MAP
diff --git a/iotdb-core/ainode/ainode/core/rpc/__init__.py b/iotdb-core/ainode/iotdb/ainode/core/model/__init__.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/rpc/__init__.py
rename to iotdb-core/ainode/iotdb/ainode/core/model/__init__.py
diff --git a/iotdb-core/ainode/ainode/core/model/built_in_model_factory.py b/iotdb-core/ainode/iotdb/ainode/core/model/built_in_model_factory.py
similarity index 99%
rename from iotdb-core/ainode/ainode/core/model/built_in_model_factory.py
rename to iotdb-core/ainode/iotdb/ainode/core/model/built_in_model_factory.py
index f1bf4952fe2..a95af34990b 100644
--- a/iotdb-core/ainode/ainode/core/model/built_in_model_factory.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/model/built_in_model_factory.py
@@ -29,13 +29,13 @@ from sktime.forecasting.exp_smoothing import ExponentialSmoothing
from sktime.forecasting.naive import NaiveForecaster
from sktime.forecasting.trend import STLForecaster
-from ainode.core.config import AINodeDescriptor
+from iotdb.ainode.core.config import AINodeDescriptor
from ainode.core.constant import (
MODEL_CONFIG_FILE_IN_JSON,
MODEL_WEIGHTS_FILE_IN_SAFETENSORS,
AttributeName,
)
-from ainode.core.exception import (
+from iotdb.ainode.core.exception import (
BuiltInModelNotSupportError,
InferenceModelInternalError,
ListRangeException,
@@ -44,10 +44,10 @@ from ainode.core.exception import (
WrongAttributeTypeError,
)
from ainode.core.log import Logger
-from ainode.core.model.model_enums import BuiltInModelType
+from iotdb.ainode.core.model.model_enums import BuiltInModelType
from ainode.core.model.model_info import TIMER_REPO_ID
from ainode.core.model.sundial import modeling_sundial
-from ainode.core.model.timerxl import modeling_timer
+from iotdb.ainode.core.model.timerxl import modeling_timer
logger = Logger()
diff --git a/iotdb-core/ainode/ainode/core/model/model_enums.py b/iotdb-core/ainode/iotdb/ainode/core/model/model_enums.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/model/model_enums.py
rename to iotdb-core/ainode/iotdb/ainode/core/model/model_enums.py
diff --git a/iotdb-core/ainode/ainode/core/model/model_factory.py b/iotdb-core/ainode/iotdb/ainode/core/model/model_factory.py
similarity index 98%
rename from iotdb-core/ainode/ainode/core/model/model_factory.py
rename to iotdb-core/ainode/iotdb/ainode/core/model/model_factory.py
index 5bbcf321644..c90222108ad 100644
--- a/iotdb-core/ainode/ainode/core/model/model_factory.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/model/model_factory.py
@@ -26,15 +26,15 @@ from ainode.core.constant import (
MODEL_CONFIG_FILE_IN_YAML,
MODEL_WEIGHTS_FILE_IN_PT,
)
-from ainode.core.exception import BadConfigValueError, InvalidUriError
+from iotdb.ainode.core.exception import BadConfigValueError, InvalidUriError
from ainode.core.log import Logger
-from ainode.core.model.model_enums import ModelFileType
+from iotdb.ainode.core.model.model_enums import ModelFileType
from ainode.core.model.uri_utils import (
UriType,
download_file,
download_snapshot_from_hf,
)
-from ainode.core.util.serde import get_data_type_byte_from_str
+from iotdb.ainode.core.util.serde import get_data_type_byte_from_str
from ainode.thrift.ainode.ttypes import TConfigs
logger = Logger()
diff --git a/iotdb-core/ainode/ainode/core/model/model_info.py b/iotdb-core/ainode/iotdb/ainode/core/model/model_info.py
similarity index 99%
rename from iotdb-core/ainode/ainode/core/model/model_info.py
rename to iotdb-core/ainode/iotdb/ainode/core/model/model_info.py
index 6226179dbcb..7cf15e68225 100644
--- a/iotdb-core/ainode/ainode/core/model/model_info.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/model/model_info.py
@@ -24,7 +24,7 @@ from ainode.core.constant import (
MODEL_WEIGHTS_FILE_IN_PT,
MODEL_WEIGHTS_FILE_IN_SAFETENSORS,
)
-from ainode.core.model.model_enums import (
+from iotdb.ainode.core.model.model_enums import (
BuiltInModelType,
ModelCategory,
ModelFileType,
diff --git a/iotdb-core/ainode/ainode/core/model/model_storage.py b/iotdb-core/ainode/iotdb/ainode/core/model/model_storage.py
similarity index 98%
rename from iotdb-core/ainode/ainode/core/model/model_storage.py
rename to iotdb-core/ainode/iotdb/ainode/core/model/model_storage.py
index ebfa9211811..93f695805dd 100644
--- a/iotdb-core/ainode/ainode/core/model/model_storage.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/model/model_storage.py
@@ -26,13 +26,13 @@ from typing import Dict
import torch
from torch import nn
-from ainode.core.config import AINodeDescriptor
+from iotdb.ainode.core.config import AINodeDescriptor
from ainode.core.constant import (
MODEL_CONFIG_FILE_IN_JSON,
MODEL_WEIGHTS_FILE_IN_PT,
TSStatusCode,
)
-from ainode.core.exception import (
+from iotdb.ainode.core.exception import (
BuiltInModelDeletionError,
ModelNotExistError,
UnsupportedError,
@@ -42,13 +42,13 @@ from ainode.core.model.built_in_model_factory import (
download_built_in_ltsm_from_hf_if_necessary,
fetch_built_in_model,
)
-from ainode.core.model.model_enums import (
+from iotdb.ainode.core.model.model_enums import (
BuiltInModelType,
ModelCategory,
ModelFileType,
ModelStates,
)
-from ainode.core.model.model_factory import fetch_model_by_uri
+from iotdb.ainode.core.model.model_factory import fetch_model_by_uri
from ainode.core.model.model_info import (
BUILT_IN_LTSM_MAP,
BUILT_IN_MACHINE_LEARNING_MODEL_MAP,
diff --git a/iotdb-core/ainode/ainode/core/util/__init__.py b/iotdb-core/ainode/iotdb/ainode/core/model/sundial/__init__.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/util/__init__.py
rename to iotdb-core/ainode/iotdb/ainode/core/model/sundial/__init__.py
diff --git a/iotdb-core/ainode/ainode/core/model/sundial/configuration_sundial.py b/iotdb-core/ainode/iotdb/ainode/core/model/sundial/configuration_sundial.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/model/sundial/configuration_sundial.py
rename to iotdb-core/ainode/iotdb/ainode/core/model/sundial/configuration_sundial.py
diff --git a/iotdb-core/ainode/ainode/core/model/sundial/flow_loss.py b/iotdb-core/ainode/iotdb/ainode/core/model/sundial/flow_loss.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/model/sundial/flow_loss.py
rename to iotdb-core/ainode/iotdb/ainode/core/model/sundial/flow_loss.py
diff --git a/iotdb-core/ainode/ainode/core/model/sundial/modeling_sundial.py b/iotdb-core/ainode/iotdb/ainode/core/model/sundial/modeling_sundial.py
similarity index 99%
rename from iotdb-core/ainode/ainode/core/model/sundial/modeling_sundial.py
rename to iotdb-core/ainode/iotdb/ainode/core/model/sundial/modeling_sundial.py
index 2e6b436fbda..f66b4b13f22 100644
--- a/iotdb-core/ainode/ainode/core/model/sundial/modeling_sundial.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/model/sundial/modeling_sundial.py
@@ -16,13 +16,10 @@
# under the License.
#
-import os
from typing import List, Optional, Tuple, Union
import torch
import torch.nn.functional as F
-from huggingface_hub import hf_hub_download
-from safetensors.torch import load_file as load_safetensors
from torch import nn
from transformers import Cache, DynamicCache, PreTrainedModel
from transformers.activations import ACT2FN
@@ -35,7 +32,7 @@ from transformers.modeling_outputs import (
from ainode.core.log import Logger
from ainode.core.model.sundial.configuration_sundial import SundialConfig
from ainode.core.model.sundial.flow_loss import FlowLoss
-from ainode.core.model.sundial.ts_generation_mixin import TSGenerationMixin
+from iotdb.ainode.core.model.sundial.ts_generation_mixin import TSGenerationMixin
logger = Logger()
diff --git a/iotdb-core/ainode/ainode/core/model/sundial/ts_generation_mixin.py b/iotdb-core/ainode/iotdb/ainode/core/model/sundial/ts_generation_mixin.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/model/sundial/ts_generation_mixin.py
rename to iotdb-core/ainode/iotdb/ainode/core/model/sundial/ts_generation_mixin.py
diff --git a/iotdb-core/ainode/ainode/core/__init__.py b/iotdb-core/ainode/iotdb/ainode/core/model/timerxl/__init__.py
similarity index 100%
copy from iotdb-core/ainode/ainode/core/__init__.py
copy to iotdb-core/ainode/iotdb/ainode/core/model/timerxl/__init__.py
diff --git a/iotdb-core/ainode/ainode/core/model/timerxl/configuration_timer.py b/iotdb-core/ainode/iotdb/ainode/core/model/timerxl/configuration_timer.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/model/timerxl/configuration_timer.py
rename to iotdb-core/ainode/iotdb/ainode/core/model/timerxl/configuration_timer.py
diff --git a/iotdb-core/ainode/ainode/core/model/timerxl/modeling_timer.py b/iotdb-core/ainode/iotdb/ainode/core/model/timerxl/modeling_timer.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/model/timerxl/modeling_timer.py
rename to iotdb-core/ainode/iotdb/ainode/core/model/timerxl/modeling_timer.py
diff --git a/iotdb-core/ainode/ainode/core/model/timerxl/ts_generation_mixin.py b/iotdb-core/ainode/iotdb/ainode/core/model/timerxl/ts_generation_mixin.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/model/timerxl/ts_generation_mixin.py
rename to iotdb-core/ainode/iotdb/ainode/core/model/timerxl/ts_generation_mixin.py
diff --git a/iotdb-core/ainode/ainode/core/model/uri_utils.py b/iotdb-core/ainode/iotdb/ainode/core/model/uri_utils.py
similarity index 97%
rename from iotdb-core/ainode/ainode/core/model/uri_utils.py
rename to iotdb-core/ainode/iotdb/ainode/core/model/uri_utils.py
index de2fb2a1848..59f03057e85 100644
--- a/iotdb-core/ainode/ainode/core/model/uri_utils.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/model/uri_utils.py
@@ -28,9 +28,9 @@ from ainode.core.constant import (
DEFAULT_RECONNECT_TIMEOUT,
DEFAULT_RECONNECT_TIMES,
)
-from ainode.core.exception import UnsupportedError
+from iotdb.ainode.core.exception import UnsupportedError
from ainode.core.log import Logger
-from ainode.core.model.model_enums import ModelFileType
+from iotdb.ainode.core.model.model_enums import ModelFileType
from ainode.core.model.model_info import get_model_file_type
HTTP_PREFIX = "http://"
diff --git a/iotdb-core/ainode/ainode/core/__init__.py b/iotdb-core/ainode/iotdb/ainode/core/rpc/__init__.py
similarity index 100%
copy from iotdb-core/ainode/ainode/core/__init__.py
copy to iotdb-core/ainode/iotdb/ainode/core/rpc/__init__.py
diff --git a/iotdb-core/ainode/ainode/core/rpc/client.py b/iotdb-core/ainode/iotdb/ainode/core/rpc/client.py
similarity index 99%
rename from iotdb-core/ainode/ainode/core/rpc/client.py
rename to iotdb-core/ainode/iotdb/ainode/core/rpc/client.py
index c595000bb0f..dc9d84de9ae 100644
--- a/iotdb-core/ainode/ainode/core/rpc/client.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/rpc/client.py
@@ -21,7 +21,7 @@ from thrift.protocol import TBinaryProtocol, TCompactProtocol
from thrift.Thrift import TException
from thrift.transport import TSocket, TTransport
-from ainode.core.config import AINodeDescriptor
+from iotdb.ainode.core.config import AINodeDescriptor
from ainode.core.constant import TSStatusCode
from ainode.core.log import Logger
from ainode.core.rpc.status import verify_success
diff --git a/iotdb-core/ainode/ainode/core/rpc/handler.py b/iotdb-core/ainode/iotdb/ainode/core/rpc/handler.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/rpc/handler.py
rename to iotdb-core/ainode/iotdb/ainode/core/rpc/handler.py
diff --git a/iotdb-core/ainode/ainode/core/rpc/service.py b/iotdb-core/ainode/iotdb/ainode/core/rpc/service.py
similarity index 98%
rename from iotdb-core/ainode/ainode/core/rpc/service.py
rename to iotdb-core/ainode/iotdb/ainode/core/rpc/service.py
index b97abeee65b..8642f62fc20 100644
--- a/iotdb-core/ainode/ainode/core/rpc/service.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/rpc/service.py
@@ -21,7 +21,7 @@ from thrift.protocol import TBinaryProtocol, TCompactProtocol
from thrift.server import TServer
from thrift.transport import TSocket, TTransport
-from ainode.core.config import AINodeDescriptor
+from iotdb.ainode.core.config import AINodeDescriptor
from ainode.core.log import Logger
from ainode.core.rpc.handler import AINodeRPCServiceHandler
from ainode.thrift.ainode import IAINodeRPCService
diff --git a/iotdb-core/ainode/ainode/core/rpc/status.py b/iotdb-core/ainode/iotdb/ainode/core/rpc/status.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/rpc/status.py
rename to iotdb-core/ainode/iotdb/ainode/core/rpc/status.py
diff --git a/iotdb-core/ainode/ainode/core/script.py b/iotdb-core/ainode/iotdb/ainode/core/script.py
similarity index 95%
rename from iotdb-core/ainode/ainode/core/script.py
rename to iotdb-core/ainode/iotdb/ainode/core/script.py
index a01ce691dc7..dd3efa11ac8 100644
--- a/iotdb-core/ainode/ainode/core/script.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/script.py
@@ -21,10 +21,10 @@ import sys
import torch.multiprocessing as mp
-from ainode.core.ai_node import AINode
-from ainode.core.config import AINodeDescriptor
+from iotdb.ainode.core.ai_node import AINode
+from iotdb.ainode.core.config import AINodeDescriptor
from ainode.core.constant import TSStatusCode
-from ainode.core.exception import MissingConfigError
+from iotdb.ainode.core.exception import MissingConfigError
from ainode.core.log import Logger
from ainode.core.rpc.client import ClientManager
from ainode.thrift.common.ttypes import (
diff --git a/iotdb-core/ainode/ainode/core/__init__.py b/iotdb-core/ainode/iotdb/ainode/core/util/__init__.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/__init__.py
rename to iotdb-core/ainode/iotdb/ainode/core/util/__init__.py
diff --git a/iotdb-core/ainode/ainode/core/util/activation.py b/iotdb-core/ainode/iotdb/ainode/core/util/activation.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/util/activation.py
rename to iotdb-core/ainode/iotdb/ainode/core/util/activation.py
diff --git a/iotdb-core/ainode/ainode/core/util/cache.py b/iotdb-core/ainode/iotdb/ainode/core/util/cache.py
similarity index 98%
rename from iotdb-core/ainode/ainode/core/util/cache.py
rename to iotdb-core/ainode/iotdb/ainode/core/util/cache.py
index e0cfd588316..40e2b8d5771 100644
--- a/iotdb-core/ainode/ainode/core/util/cache.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/util/cache.py
@@ -18,7 +18,7 @@
import sys
from collections import OrderedDict
-from ainode.core.config import AINodeDescriptor
+from iotdb.ainode.core.config import AINodeDescriptor
from ainode.core.util.decorator import singleton
diff --git a/iotdb-core/ainode/ainode/core/util/decorator.py b/iotdb-core/ainode/iotdb/ainode/core/util/decorator.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/util/decorator.py
rename to iotdb-core/ainode/iotdb/ainode/core/util/decorator.py
diff --git a/iotdb-core/ainode/ainode/core/util/huggingface_cache.py b/iotdb-core/ainode/iotdb/ainode/core/util/huggingface_cache.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/util/huggingface_cache.py
rename to iotdb-core/ainode/iotdb/ainode/core/util/huggingface_cache.py
diff --git a/iotdb-core/ainode/ainode/core/util/lock.py b/iotdb-core/ainode/iotdb/ainode/core/util/lock.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/util/lock.py
rename to iotdb-core/ainode/iotdb/ainode/core/util/lock.py
diff --git a/iotdb-core/ainode/ainode/core/util/masking.py b/iotdb-core/ainode/iotdb/ainode/core/util/masking.py
similarity index 100%
rename from iotdb-core/ainode/ainode/core/util/masking.py
rename to iotdb-core/ainode/iotdb/ainode/core/util/masking.py
diff --git a/iotdb-core/ainode/ainode/core/util/serde.py b/iotdb-core/ainode/iotdb/ainode/core/util/serde.py
similarity index 98%
rename from iotdb-core/ainode/ainode/core/util/serde.py
rename to iotdb-core/ainode/iotdb/ainode/core/util/serde.py
index affd96992ee..f8188209a37 100644
--- a/iotdb-core/ainode/ainode/core/util/serde.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/util/serde.py
@@ -21,7 +21,7 @@ from enum import Enum
import numpy as np
import pandas as pd
-from ainode.core.exception import BadConfigValueError
+from iotdb.ainode.core.exception import BadConfigValueError
class TSDataType(Enum):
(iotdb) 04/15: [AINode] Add a batcher for inference (#16411)
Posted by yo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
yongzao pushed a commit to branch rc/2.0.6
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 4e42ba6b52567a77e0ffd49dfc324837c2426493
Author: jtmer <10...@users.noreply.github.com>
AuthorDate: Tue Sep 16 09:17:05 2025 +0800
[AINode] Add a batcher for inference (#16411)
(cherry picked from commit 773433176dc4f1fad831be76f3274edf66b0ea95)
---
.../ainode/it/AINodeConcurrentInferenceIT.java | 70 +++++++++++++++++-----
.../iotdb/ainode/core/inference/pool_group.py | 4 +-
2 files changed, 57 insertions(+), 17 deletions(-)
diff --git a/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeConcurrentInferenceIT.java b/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeConcurrentInferenceIT.java
index b8ebfa9600b..c73fbeb2fbf 100644
--- a/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeConcurrentInferenceIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeConcurrentInferenceIT.java
@@ -81,61 +81,103 @@ public class AINodeConcurrentInferenceIT {
@Test
public void concurrentCPUCallInferenceTest() throws SQLException, InterruptedException {
+ concurrentCPUCallInferenceTest("timer_xl");
+ concurrentCPUCallInferenceTest("sundial");
+ }
+
+ private void concurrentCPUCallInferenceTest(String modelId)
+ throws SQLException, InterruptedException {
try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TREE_SQL_DIALECT);
Statement statement = connection.createStatement()) {
- statement.execute("LOAD MODEL sundial TO DEVICES \"cpu\"");
- concurrentInference(statement, "CALL INFERENCE(sundial, \"SELECT s FROM root.AI\")", 4, 10);
+ final int threadCnt = 4;
+ final int loop = 10;
+ statement.execute(String.format("LOAD MODEL %s TO DEVICES \"cpu\"", modelId));
+ concurrentInference(
+ statement,
+ String.format("CALL INFERENCE(%s, \"SELECT s FROM root.AI\")", modelId),
+ threadCnt,
+ loop);
+ statement.execute(String.format("UNLOAD MODEL %s FROM DEVICES \"cpu\"", modelId));
}
}
@Test
public void concurrentGPUCallInferenceTest() throws SQLException, InterruptedException {
+ concurrentGPUCallInferenceTest("timer_xl");
+ concurrentGPUCallInferenceTest("sundial");
+ }
+
+ private void concurrentGPUCallInferenceTest(String modelId)
+ throws SQLException, InterruptedException {
try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TREE_SQL_DIALECT);
Statement statement = connection.createStatement()) {
- statement.execute("LOAD MODEL sundial TO DEVICES \"0,1\"");
- concurrentInference(statement, "CALL INFERENCE(sundial, \"SELECT s FROM root.AI\")", 10, 100);
+ final int threadCnt = 4;
+ final int loop = 10;
+ statement.execute(String.format("LOAD MODEL %s TO DEVICES \"0,1\"", modelId));
+ concurrentInference(
+ statement,
+ String.format("CALL INFERENCE(%s, \"SELECT s FROM root.AI\")", modelId),
+ threadCnt,
+ loop);
+ statement.execute(String.format("UNLOAD MODEL %s FROM DEVICES \"0,1\"", modelId));
}
}
@Test
public void concurrentCPUForecastTest() throws SQLException, InterruptedException {
- try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TREE_SQL_DIALECT);
+ concurrentCPUForecastTest("timer_xl");
+ concurrentCPUForecastTest("sundial");
+ }
+
+ private void concurrentCPUForecastTest(String modelId) throws SQLException, InterruptedException {
+ try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TABLE_SQL_DIALECT);
Statement statement = connection.createStatement()) {
final int threadCnt = 4;
final int loop = 10;
- statement.execute("LOAD MODEL sundial TO DEVICES \"cpu\"");
+ statement.execute(String.format("LOAD MODEL %s TO DEVICES \"cpu\"", modelId));
long startTime = System.currentTimeMillis();
concurrentInference(
statement,
- "SELECT * FROM FORECAST(model_id=>'sundial', input=>(SELECT time,s FROM root.AI) ORDER BY time)",
+ String.format(
+ "SELECT * FROM FORECAST(model_id=>'%s', input=>(SELECT time,s FROM root.AI) ORDER BY time)",
+ modelId),
threadCnt,
loop);
long endTime = System.currentTimeMillis();
LOGGER.info(
String.format(
- "Timer-Sundial concurrent inference %d reqs (%d threads, %d loops) in CPU takes time: %dms",
- threadCnt * loop, threadCnt, loop, endTime - startTime));
+ "Model %s concurrent inference %d reqs (%d threads, %d loops) in CPU takes time: %dms",
+ modelId, threadCnt * loop, threadCnt, loop, endTime - startTime));
+ statement.execute(String.format("UNLOAD MODEL %s FROM DEVICES \"cpu\"", modelId));
}
}
@Test
public void concurrentGPUForecastTest() throws SQLException, InterruptedException {
- try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TREE_SQL_DIALECT);
+ concurrentGPUForecastTest("timer_xl");
+ concurrentGPUForecastTest("sundial");
+ }
+
+ public void concurrentGPUForecastTest(String modelId) throws SQLException, InterruptedException {
+ try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TABLE_SQL_DIALECT);
Statement statement = connection.createStatement()) {
final int threadCnt = 10;
final int loop = 100;
- statement.execute("LOAD MODEL sundial TO DEVICES \"0,1\"");
+ statement.execute(String.format("LOAD MODEL %s TO DEVICES \"0,1\"", modelId));
long startTime = System.currentTimeMillis();
concurrentInference(
statement,
- "SELECT * FROM FORECAST(model_id=>'sundial', input=>(SELECT time,s FROM root.AI) ORDER BY time)",
+ String.format(
+ "SELECT * FROM FORECAST(model_id=>'%s', input=>(SELECT time,s FROM root.AI) ORDER BY time)",
+ modelId),
threadCnt,
loop);
long endTime = System.currentTimeMillis();
LOGGER.info(
String.format(
- "Timer-Sundial concurrent inference %d reqs (%d threads, %d loops) in GPU takes time: %dms",
- threadCnt * loop, threadCnt, loop, endTime - startTime));
+ "Model %s concurrent inference %d reqs (%d threads, %d loops) in GPU takes time: %dms",
+ modelId, threadCnt * loop, threadCnt, loop, endTime - startTime));
+ statement.execute(String.format("UNLOAD MODEL %s FROM DEVICES \"0,1\"", modelId));
}
}
}
diff --git a/iotdb-core/ainode/iotdb/ainode/core/inference/pool_group.py b/iotdb-core/ainode/iotdb/ainode/core/inference/pool_group.py
index a7004549db0..96dce845585 100644
--- a/iotdb-core/ainode/iotdb/ainode/core/inference/pool_group.py
+++ b/iotdb-core/ainode/iotdb/ainode/core/inference/pool_group.py
@@ -19,9 +19,7 @@ from typing import Dict, Tuple
import torch.multiprocessing as mp
-from iotdb.ainode.core.exception import (
- InferenceModelInternalError,
-)
+from iotdb.ainode.core.exception import InferenceModelInternalError
from iotdb.ainode.core.inference.dispatcher.basic_dispatcher import BasicDispatcher
from iotdb.ainode.core.inference.inference_request import (
InferenceRequest,