You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "karthikreddy-02 (via GitHub)" <gi...@apache.org> on 2026/03/20 03:55:46 UTC
[PR] feat(AINode): [Issue-17301] Import PatchTST-FM-R1 architecture and re… [iotdb]
karthikreddy-02 opened a new pull request, #17327:
URL: https://github.com/apache/iotdb/pull/17327
Description
This Draft PR tracks the integration of IBM's PatchTST-FM-R1 into the AINode built-in model registry, resolving [Issue #17301](https://github.com/apache/iotdb/issues/17301).
Current Progress:
Imported custom patchtst_fm architecture files (
configuration_patchtst_fm.py
and
modeling_patchtst_fm.py
) from the IBM Granite TSFM repository, as they are not natively supported in standard transformers yet.
Registered the model in BUILTIN_HF_TRANSFORMERS_MODEL_MAP under
model_info.py
.
Next Steps (WIP):
Implement PatchTSTFMPipeline extending
ForecastPipeline
for tensor reshaping.
Add integration tests.
This PR has:
x been self-reviewed.
added documentation for new or modified features or behaviors.
added Javadocs for most classes and all non-trivial methods.
added or updated version, license, or notice information
added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage.
added integration tests.
been tested in a test IoTDB cluster.
Key changed/added classes (or packages if there are too many classes) in this PR
iotdb.ainode.core.model.patchtst_fm.configuration_patchtst_fm (Added)
iotdb.ainode.core.model.patchtst_fm.modeling_patchtst_fm (Added)
iotdb.ainode.core.model.model_info.BUILTIN_HF_TRANSFORMERS_MODEL_MAP (Modified)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(AINode): [Issue-17301] Import PatchTST-FM-R1 architecture and re… [iotdb]
Posted by "karthikreddy-02 (via GitHub)" <gi...@apache.org>.
karthikreddy-02 commented on code in PR #17327:
URL: https://github.com/apache/iotdb/pull/17327#discussion_r3004784509
##########
integration-test/src/test/java/org/apache/iotdb/ainode/utils/AINodeTestUtils.java:
##########
@@ -60,35 +60,36 @@ public class AINodeTestUtils {
new AbstractMap.SimpleEntry<>(
"moirai2", new FakeModelInfo("moirai2", "moirai", "builtin", "active")),
new AbstractMap.SimpleEntry<>(
- "toto", new FakeModelInfo("toto", "toto", "builtin", "active")))
+ "toto", new FakeModelInfo("toto", "toto", "builtin", "active")),
+ new AbstractMap.SimpleEntry<>(
+ "patchtst_fm", new FakeModelInfo("patchtst_fm", "patchtst_fm", "builtin", "active")))
Review Comment:
I have officially reverted AINodeTestUtils.java as requested! Thanks for catching that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(AINode): [Issue-17301] Import PatchTST-FM-R1 architecture and re… [iotdb]
Posted by "karthikreddy-02 (via GitHub)" <gi...@apache.org>.
karthikreddy-02 commented on code in PR #17327:
URL: https://github.com/apache/iotdb/pull/17327#discussion_r3003993051
##########
iotdb-core/ainode/iotdb/ainode/core/model/model_info.py:
##########
@@ -158,4 +158,16 @@ def __repr__(self):
},
transformers_registered=True,
),
+ "patchtst_fm": ModelInfo(
+ model_id = "patchtst_fm",
+ category=ModelCategory.BUILTIN,
+ state=ModelStates.INACTIVE,
+ model_type="patchtst_fm",
+ pipeline_cls="pipeline_patchtst_fm.PatchTSTFMPipeline",
+ repo_id="ibm-research/patchtst-fm-r1",
+ auto_map={
+ "AutoConfig": "configuration_patchtst_fm.PatchTSTFMConfig",
+ "AutoModelForCausalLM": "modeling_patchtst_fm.PatchTSTFMForPrediction",
+ },
Review Comment:
<img width="644" height="404" alt="Screenshot 2026-03-27 at 22 31 01" src="https://github.com/user-attachments/assets/2d063f7b-cbf8-4d3a-8a62-0cfa3eb022e1" />
<img width="655" height="260" alt="Screenshot 2026-03-27 at 22 31 32" src="https://github.com/user-attachments/assets/18c2d638-2dd5-43fd-bb6a-427ab9b835db" />
Hi @CRZbulabula! Thank you for the review. I have successfully resolved all your requests: fully formatted the code via black & isort, appended all Apache 2.0 license headers, modified the root LICENSE file, gracefully bypassed the CC-BY-NC-SA model weights download, and verified the successful SQL execution locally (screenshot attached).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(AINode): [Issue-17301] Import PatchTST-FM-R1 architecture and re… [iotdb]
Posted by "CRZbulabula (via GitHub)" <gi...@apache.org>.
CRZbulabula commented on code in PR #17327:
URL: https://github.com/apache/iotdb/pull/17327#discussion_r3020717080
##########
integration-test/src/test/java/org/apache/iotdb/ainode/utils/AINodeTestUtils.java:
##########
@@ -60,35 +60,36 @@ public class AINodeTestUtils {
new AbstractMap.SimpleEntry<>(
"moirai2", new FakeModelInfo("moirai2", "moirai", "builtin", "active")),
new AbstractMap.SimpleEntry<>(
- "toto", new FakeModelInfo("toto", "toto", "builtin", "active")))
+ "toto", new FakeModelInfo("toto", "toto", "builtin", "active")),
+ new AbstractMap.SimpleEntry<>(
+ "patchtst_fm", new FakeModelInfo("patchtst_fm", "patchtst_fm", "builtin", "active")))
Review Comment:
@karthikreddy-02 The ModelManageIT should be fixed, and you should rebase the latest master code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(AINode): [Issue-17301] Import PatchTST-FM-R1 architecture and re… [iotdb]
Posted by "CRZbulabula (via GitHub)" <gi...@apache.org>.
CRZbulabula commented on code in PR #17327:
URL: https://github.com/apache/iotdb/pull/17327#discussion_r3004814403
##########
integration-test/src/test/java/org/apache/iotdb/ainode/utils/AINodeTestUtils.java:
##########
@@ -60,35 +60,36 @@ public class AINodeTestUtils {
new AbstractMap.SimpleEntry<>(
"moirai2", new FakeModelInfo("moirai2", "moirai", "builtin", "active")),
new AbstractMap.SimpleEntry<>(
- "toto", new FakeModelInfo("toto", "toto", "builtin", "active")))
+ "toto", new FakeModelInfo("toto", "toto", "builtin", "active")),
+ new AbstractMap.SimpleEntry<>(
+ "patchtst_fm", new FakeModelInfo("patchtst_fm", "patchtst_fm", "builtin", "active")))
Review Comment:
It seems that you have disrupted the original Java code format. Please run `mvn spotless:apply -P with-integration-tests` in the project source root, otherwise all CI will fail.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(AINode): [Issue-17301] Import PatchTST-FM-R1 architecture and re… [iotdb]
Posted by "CRZbulabula (via GitHub)" <gi...@apache.org>.
CRZbulabula commented on code in PR #17327:
URL: https://github.com/apache/iotdb/pull/17327#discussion_r2971193250
##########
iotdb-core/ainode/iotdb/ainode/core/model/model_info.py:
##########
@@ -158,4 +158,16 @@ def __repr__(self):
},
transformers_registered=True,
),
+ "patchtst_fm": ModelInfo(
+ model_id = "patchtst_fm",
+ category=ModelCategory.BUILTIN,
+ state=ModelStates.INACTIVE,
+ model_type="patchtst_fm",
+ pipeline_cls="pipeline_patchtst_fm.PatchTSTFMPipeline",
+ repo_id="ibm-research/patchtst-fm-r1",
+ auto_map={
+ "AutoConfig": "configuration_patchtst_fm.PatchTSTFMConfig",
+ "AutoModelForCausalLM": "modeling_patchtst_fm.PatchTSTFMForPrediction",
+ },
Review Comment:
Should append `transformers_registered=True` here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(AINode): [Issue-17301] Import PatchTST-FM-R1 architecture and re… [iotdb]
Posted by "karthikreddy-02 (via GitHub)" <gi...@apache.org>.
karthikreddy-02 commented on code in PR #17327:
URL: https://github.com/apache/iotdb/pull/17327#discussion_r3058033537
##########
integration-test/src/test/java/org/apache/iotdb/ainode/utils/AINodeTestUtils.java:
##########
@@ -60,35 +60,36 @@ public class AINodeTestUtils {
new AbstractMap.SimpleEntry<>(
"moirai2", new FakeModelInfo("moirai2", "moirai", "builtin", "active")),
new AbstractMap.SimpleEntry<>(
- "toto", new FakeModelInfo("toto", "toto", "builtin", "active")))
+ "toto", new FakeModelInfo("toto", "toto", "builtin", "active")),
+ new AbstractMap.SimpleEntry<>(
+ "patchtst_fm", new FakeModelInfo("patchtst_fm", "patchtst_fm", "builtin", "active")))
Review Comment:
@CRZbulabula can you approve CI? Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(AINode): [Issue-17301] Import PatchTST-FM-R1 architecture and re… [iotdb]
Posted by "karthikreddy-02 (via GitHub)" <gi...@apache.org>.
karthikreddy-02 commented on code in PR #17327:
URL: https://github.com/apache/iotdb/pull/17327#discussion_r3003993051
##########
iotdb-core/ainode/iotdb/ainode/core/model/model_info.py:
##########
@@ -158,4 +158,16 @@ def __repr__(self):
},
transformers_registered=True,
),
+ "patchtst_fm": ModelInfo(
+ model_id = "patchtst_fm",
+ category=ModelCategory.BUILTIN,
+ state=ModelStates.INACTIVE,
+ model_type="patchtst_fm",
+ pipeline_cls="pipeline_patchtst_fm.PatchTSTFMPipeline",
+ repo_id="ibm-research/patchtst-fm-r1",
+ auto_map={
+ "AutoConfig": "configuration_patchtst_fm.PatchTSTFMConfig",
+ "AutoModelForCausalLM": "modeling_patchtst_fm.PatchTSTFMForPrediction",
+ },
Review Comment:
<img width="644" height="404" alt="Screenshot 2026-03-27 at 22 31 01" src="https://github.com/user-attachments/assets/2d063f7b-cbf8-4d3a-8a62-0cfa3eb022e1" />
<img width="655" height="260" alt="Screenshot 2026-03-27 at 22 31 32" src="https://github.com/user-attachments/assets/18c2d638-2dd5-43fd-bb6a-427ab9b835db" />
Please take a look at the attached screenshots and let me know your thoughts. Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(AINode): [Issue-17301] Import PatchTST-FM-R1 architecture and re… [iotdb]
Posted by "CRZbulabula (via GitHub)" <gi...@apache.org>.
CRZbulabula commented on code in PR #17327:
URL: https://github.com/apache/iotdb/pull/17327#discussion_r3004696855
##########
integration-test/src/test/java/org/apache/iotdb/ainode/utils/AINodeTestUtils.java:
##########
@@ -60,35 +60,36 @@ public class AINodeTestUtils {
new AbstractMap.SimpleEntry<>(
"moirai2", new FakeModelInfo("moirai2", "moirai", "builtin", "active")),
new AbstractMap.SimpleEntry<>(
- "toto", new FakeModelInfo("toto", "toto", "builtin", "active")))
+ "toto", new FakeModelInfo("toto", "toto", "builtin", "active")),
+ new AbstractMap.SimpleEntry<>(
+ "patchtst_fm", new FakeModelInfo("patchtst_fm", "patchtst_fm", "builtin", "active")))
Review Comment:
Please revert updates in this file, because we cannot automatically download the model weight, CI for this model will never success.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(AINode): [Issue-17301] Import PatchTST-FM-R1 architecture and re… [iotdb]
Posted by "karthikreddy-02 (via GitHub)" <gi...@apache.org>.
karthikreddy-02 commented on code in PR #17327:
URL: https://github.com/apache/iotdb/pull/17327#discussion_r3019541045
##########
integration-test/src/test/java/org/apache/iotdb/ainode/utils/AINodeTestUtils.java:
##########
@@ -60,35 +60,36 @@ public class AINodeTestUtils {
new AbstractMap.SimpleEntry<>(
"moirai2", new FakeModelInfo("moirai2", "moirai", "builtin", "active")),
new AbstractMap.SimpleEntry<>(
- "toto", new FakeModelInfo("toto", "toto", "builtin", "active")))
+ "toto", new FakeModelInfo("toto", "toto", "builtin", "active")),
+ new AbstractMap.SimpleEntry<>(
+ "patchtst_fm", new FakeModelInfo("patchtst_fm", "patchtst_fm", "builtin", "active")))
Review Comment:
@CRZbulabula Let me know the next steps to get this merged. Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org