fabricatio 0.2.7.dev1__cp312-cp312-manylinux_2_34_x86_64.whl → 0.2.7.dev3__cp312-cp312-manylinux_2_34_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,10 @@ from typing import Any, Callable, List, Optional
6
6
  from fabricatio.fs import safe_text_read
7
7
  from fabricatio.journal import logger
8
8
  from fabricatio.models.action import Action
9
- from fabricatio.models.extra import Article, ArticleEssence, ArticleOutline, ArticleProposal
9
+ from fabricatio.models.extra.article_essence import ArticleEssence
10
+ from fabricatio.models.extra.article_main import Article
11
+ from fabricatio.models.extra.article_outline import ArticleOutline
12
+ from fabricatio.models.extra.article_proposal import ArticleProposal
10
13
  from fabricatio.models.task import Task
11
14
  from fabricatio.models.utils import ok
12
15
 
@@ -55,19 +58,23 @@ class GenerateArticleProposal(Action):
55
58
  **_,
56
59
  ) -> Optional[ArticleProposal]:
57
60
  if article_briefing is None and article_briefing_path is None and task_input is None:
58
- logger.info("Task not approved, since ")
61
+ logger.error("Task not approved, since all inputs are None.")
59
62
  return None
60
- if article_briefing_path is None and task_input:
61
- article_briefing_path = await self.awhich_pathstr(
62
- f"{task_input.briefing}\nExtract the path of file which contains the article briefing."
63
- )
64
63
 
65
64
  return (
66
65
  await self.propose(
67
66
  ArticleProposal,
68
67
  briefing := (
69
68
  article_briefing
70
- or safe_text_read(ok(article_briefing_path, "Could not find the path of file to read."))
69
+ or safe_text_read(
70
+ ok(
71
+ article_briefing_path
72
+ or await self.awhich_pathstr(
73
+ f"{task_input.briefing}\nExtract the path of file which contains the article briefing."
74
+ ),
75
+ "Could not find the path of file to read.",
76
+ )
77
+ )
71
78
  ),
72
79
  **self.prepend_sys_msg(),
73
80
  )
@@ -85,13 +92,28 @@ class GenerateOutline(Action):
85
92
  article_proposal: ArticleProposal,
86
93
  **_,
87
94
  ) -> Optional[ArticleOutline]:
88
- return (
89
- await self.propose(
90
- ArticleOutline,
91
- article_proposal.as_prompt(),
92
- **self.prepend_sys_msg(),
95
+ out = await self.propose(
96
+ ArticleOutline,
97
+ article_proposal.as_prompt(),
98
+ **self.prepend_sys_msg(),
99
+ )
100
+
101
+ manual = await self.draft_rating_manual(
102
+ topic=(
103
+ topic
104
+ := "Fix the internal referring error, make sure there is no more `ArticleRef` pointing to a non-existing article component."
105
+ ),
106
+ )
107
+ while err := out.resolve_ref_error():
108
+ logger.warning(f"Found error in the outline: \n{err}")
109
+ out = await self.correct_obj(
110
+ out,
111
+ reference=f"# Referring Error\n{err}",
112
+ topic=topic,
113
+ rating_manual=manual,
114
+ supervisor_check=False,
93
115
  )
94
- ).update_ref(article_proposal)
116
+ return out.update_ref(article_proposal)
95
117
 
96
118
 
97
119
  class CorrectProposal(Action):
@@ -134,10 +156,42 @@ class GenerateArticle(Action):
134
156
  ) -> Optional[Article]:
135
157
  article: Article = Article.from_outline(article_outline).update_ref(article_outline)
136
158
 
137
- for c, deps in article.iter_dfs_with_deps():
138
- out = await self.correct_obj(
139
- c, reference=f"{article_outline.referenced.as_prompt()}\n" + "\n".join(d.display() for d in deps)
159
+ writing_manual = await self.draft_rating_manual(
160
+ topic=(
161
+ topic_1
162
+ := "improve the content of the subsection to fit the outline. SHALL never add or remove any section or subsection, you can only add or delete paragraphs within the subsection."
163
+ ),
164
+ )
165
+ err_resolve_manual = await self.draft_rating_manual(
166
+ topic=(topic_2 := "this article component has violated the constrain, please correct it.")
167
+ )
168
+ for c, deps in article.iter_dfs_with_deps(chapter=False):
169
+ logger.info(f"Updating the article component: \n{c.display()}")
170
+
171
+ out = ok(
172
+ await self.correct_obj(
173
+ c,
174
+ reference=(
175
+ ref := f"{article_outline.referenced.as_prompt()}\n" + "\n".join(d.display() for d in deps)
176
+ ),
177
+ topic=topic_1,
178
+ rating_manual=writing_manual,
179
+ supervisor_check=False,
180
+ ),
181
+ "Could not correct the article component.",
140
182
  )
183
+ while err := c.resolve_update_error(out):
184
+ logger.warning(f"Found error in the article component: \n{err}")
185
+ out = ok(
186
+ await self.correct_obj(
187
+ out,
188
+ reference=f"{ref}\n\n# Violated Error\n{err}",
189
+ topic=topic_2,
190
+ rating_manual=err_resolve_manual,
191
+ supervisor_check=False,
192
+ ),
193
+ "Could not correct the article component.",
194
+ )
141
195
 
142
196
  c.update_from(out)
143
197
  return article
@@ -0,0 +1,35 @@
1
+ """A module for writing articles using RAG (Retrieval-Augmented Generation) capabilities."""
2
+
3
+ from typing import Optional
4
+
5
+ from fabricatio.capabilities.rag import RAG
6
+ from fabricatio.journal import logger
7
+ from fabricatio.models.action import Action
8
+ from fabricatio.models.extra.article_main import Article
9
+ from fabricatio.models.extra.article_outline import ArticleOutline
10
+
11
+
12
+ class GenerateArticleRAG(Action, RAG):
13
+ """Write an article based on the provided outline."""
14
+
15
+ output_key: str = "article"
16
+
17
+ async def _execute(self, article_outline: ArticleOutline, **cxt) -> Optional[Article]:
18
+ """Write an article based on the provided outline."""
19
+ logger.info(f"Writing an article based on the outline:\n{article_outline.title}")
20
+ refined_q = await self.arefined_query(article_outline.display())
21
+ return await self.propose(
22
+ Article,
23
+ article_outline.display(),
24
+ **self.prepend_sys_msg(f"{await self.aretrieve_compact(refined_q)}\n{self.briefing}"),
25
+ )
26
+
27
+
28
+ class WriteArticleFineGrind(Action, RAG):
29
+ """Fine-grind an article based on the provided outline."""
30
+
31
+ output_key: str = "article"
32
+
33
+ async def _execute(self, article_outline: ArticleOutline, **cxt) -> Optional[Article]:
34
+ """Fine-grind an article based on the provided outline."""
35
+ logger.info(f"Fine-grinding an article based on the outline:\n{article_outline.title}")
@@ -10,6 +10,7 @@ from fabricatio.journal import logger
10
10
  from fabricatio.models.generic import WithBriefing
11
11
  from fabricatio.models.kwargs_types import ValidateKwargs
12
12
  from fabricatio.models.usages import LLMUsage
13
+ from fabricatio.models.utils import override_kwargs
13
14
  from fabricatio.parser import JsonCapture
14
15
  from more_itertools import flatten, windowed
15
16
  from pydantic import NonNegativeInt, PositiveInt
@@ -126,13 +127,13 @@ class GiveRating(WithBriefing, LLMUsage):
126
127
  return await self.rate_fine_grind(to_rate, manual, score_range, **kwargs)
127
128
 
128
129
  async def draft_rating_manual(
129
- self, topic: str, criteria: Set[str], **kwargs: Unpack[ValidateKwargs[Dict[str, str]]]
130
+ self, topic: str, criteria: Optional[Set[str]] = None, **kwargs: Unpack[ValidateKwargs[Dict[str, str]]]
130
131
  ) -> Optional[Dict[str, str]]:
131
132
  """Drafts a rating manual based on a topic and dimensions.
132
133
 
133
134
  Args:
134
135
  topic (str): The topic for the rating manual.
135
- criteria (Set[str]): A set of dimensions for the rating manual.
136
+ criteria (Optional[Set[str]], optional): A set of criteria for the rating manual. If not specified, then this method will draft the criteria automatically.
136
137
  **kwargs (Unpack[ValidateKwargs]): Additional keyword arguments for the LLM usage.
137
138
 
138
139
  Returns:
@@ -148,6 +149,14 @@ class GiveRating(WithBriefing, LLMUsage):
148
149
  return json_data
149
150
  return None
150
151
 
152
+ criteria = criteria or await self.draft_rating_criteria(
153
+ topic, **self.prepend_sys_msg(override_kwargs(dict(kwargs), default=None))
154
+ )
155
+
156
+ if criteria is None:
157
+ logger.error(f"Failed to draft rating criteria for topic {topic}")
158
+ return None
159
+
151
160
  return await self.aask_validate(
152
161
  question=(
153
162
  TEMPLATE_MANAGER.render_template(
@@ -1,6 +1,6 @@
1
1
  """A module that provides functionality to rate tasks based on a rating manual and score range."""
2
2
 
3
- from typing import List, Optional, Self, Set, Unpack, cast
3
+ from typing import Dict, List, Optional, Self, Set, Unpack, cast
4
4
 
5
5
  from fabricatio._rust_instances import TEMPLATE_MANAGER
6
6
  from fabricatio.capabilities.propose import Propose
@@ -200,13 +200,14 @@ class Review(GiveRating, Propose):
200
200
  ReviewResult[Task[T]]: A review result containing identified problems and proposed solutions,
201
201
  with a reference to the original task.
202
202
  """
203
- return cast('ReviewResult[Task[T]]', await self.review_obj(task, **kwargs))
203
+ return cast("ReviewResult[Task[T]]", await self.review_obj(task, **kwargs))
204
204
 
205
205
  async def review_string(
206
206
  self,
207
207
  input_text: str,
208
208
  topic: str,
209
209
  criteria: Optional[Set[str]] = None,
210
+ rating_manual: Optional[Dict[str, str]] = None,
210
211
  **kwargs: Unpack[ValidateKwargs[ReviewResult[str]]],
211
212
  ) -> ReviewResult[str]:
212
213
  """Review a string based on specified topic and criteria.
@@ -219,6 +220,7 @@ class Review(GiveRating, Propose):
219
220
  topic (str): The subject topic for the review criteria.
220
221
  criteria (Optional[Set[str]], optional): A set of criteria for the review.
221
222
  If not provided, criteria will be drafted automatically. Defaults to None.
223
+ rating_manual (Optional[Dict[str,str]], optional): A dictionary of rating criteria and their corresponding scores.
222
224
  **kwargs (Unpack[ValidateKwargs]): Additional keyword arguments for the LLM usage.
223
225
 
224
226
  Returns:
@@ -227,12 +229,13 @@ class Review(GiveRating, Propose):
227
229
  """
228
230
  default = None
229
231
  if "default" in kwargs:
232
+ # this `default` is the default for the `propose` method
230
233
  default = kwargs.pop("default")
231
234
 
232
235
  criteria = criteria or (await self.draft_rating_criteria(topic, **kwargs))
233
236
  if not criteria:
234
237
  raise ValueError("No criteria provided for review.")
235
- manual = await self.draft_rating_manual(topic, criteria, **kwargs)
238
+ manual = rating_manual or await self.draft_rating_manual(topic, criteria, **kwargs)
236
239
 
237
240
  if default is not None:
238
241
  kwargs["default"] = default
fabricatio/decorators.py CHANGED
@@ -177,3 +177,35 @@ def use_temp_module[**P, R](modules: ModuleType | List[ModuleType]) -> Callable[
177
177
  return _wrapper
178
178
 
179
179
  return _decorator
180
+
181
+
182
+ def logging_exec_time[**P, R](func: Callable[P, R]) -> Callable[P, R]:
183
+ """Decorator to log the execution time of a function.
184
+
185
+ Args:
186
+ func (Callable): The function to be executed
187
+
188
+ Returns:
189
+ Callable: A decorator that wraps the function to log the execution time.
190
+ """
191
+ from time import time
192
+
193
+ if iscoroutinefunction(func):
194
+
195
+ @wraps(func)
196
+ async def _async_wrapper(*args: P.args, **kwargs: P.kwargs) -> R:
197
+ start_time = time()
198
+ result = await func(*args, **kwargs)
199
+ logger.debug(f"Execution time of `{func.__name__}`: {time() - start_time:.2f} s")
200
+ return result
201
+
202
+ return _async_wrapper
203
+
204
+ @wraps(func)
205
+ def _wrapper(*args: P.args, **kwargs: P.kwargs) -> R:
206
+ start_time = time()
207
+ result = func(*args, **kwargs)
208
+ logger.debug(f"Execution time of {func.__name__}: {(time() - start_time) * 1000:.2f} ms")
209
+ return result
210
+
211
+ return _wrapper
@@ -48,7 +48,7 @@ class Action(HandleTask, ProposeTask, Correct):
48
48
  self.description = self.description or self.__class__.__doc__ or ""
49
49
 
50
50
  @abstractmethod
51
- async def _execute(self,*_, **cxt) -> Any: # noqa: ANN002
51
+ async def _execute(self, *_, **cxt) -> Any: # noqa: ANN002
52
52
  """Execute the action logic with the provided context arguments.
53
53
 
54
54
  This method must be implemented by subclasses to define the actual behavior.
@@ -147,6 +147,8 @@ class WorkFlow(WithBriefing, ToolBoxUsage):
147
147
  Args:
148
148
  task: The task to be processed.
149
149
  """
150
+ logger.info(f"Start execute workflow: {self.name}")
151
+
150
152
  await task.start()
151
153
  await self._init_context(task)
152
154
 
@@ -155,12 +157,11 @@ class WorkFlow(WithBriefing, ToolBoxUsage):
155
157
  # Process each action in sequence
156
158
  for step in self._instances:
157
159
  current_action = step.name
158
- logger.debug(f"Executing step: {current_action}")
160
+ logger.info(f"Executing step: {current_action}")
159
161
 
160
162
  # Get current context and execute action
161
163
  context = await self._context.get()
162
164
  act_task = create_task(step.act(context))
163
-
164
165
  # Handle task cancellation
165
166
  if task.is_cancelled():
166
167
  act_task.cancel(f"Cancelled by task: {task.name}")
@@ -168,9 +169,10 @@ class WorkFlow(WithBriefing, ToolBoxUsage):
168
169
 
169
170
  # Update context with modified values
170
171
  modified_ctx = await act_task
172
+ logger.success(f"Step execution finished: {current_action}")
171
173
  await self._context.put(modified_ctx)
172
174
 
173
- logger.info(f"Finished executing workflow: {self.name}")
175
+ logger.success(f"Workflow execution finished: {self.name}")
174
176
 
175
177
  # Get final context and extract result
176
178
  final_ctx = await self._context.get()
@@ -184,9 +186,9 @@ class WorkFlow(WithBriefing, ToolBoxUsage):
184
186
 
185
187
  await task.finish(result)
186
188
 
187
- except RuntimeError as e:
188
- logger.error(f"Error during task: {current_action} execution: {e}")
189
- logger.error(traceback.format_exc())
189
+ except Exception as e: # noqa: BLE001
190
+ logger.critical(f"Error during task: {current_action} execution: {e}")
191
+ logger.critical(traceback.format_exc())
190
192
  await task.fail()
191
193
 
192
194
  async def _init_context[T](self, task: Task[T]) -> None:
@@ -0,0 +1,226 @@
1
+ """ArticleEssence: Semantic fingerprint of academic paper for structured analysis."""
2
+
3
+ from typing import List
4
+
5
+ from fabricatio.models.generic import Display, PrepareVectorization, ProposedAble
6
+ from pydantic import BaseModel, Field
7
+
8
+
9
+ class Equation(BaseModel):
10
+ """Mathematical formalism specification for research contributions.
11
+
12
+ Encodes equations with dual representation: semantic meaning and typeset-ready notation.
13
+ """
14
+
15
+ description: str
16
+ """Equation significance structured in three elements:
17
+ 1. Physical/conceptual meaning of the equation.
18
+ 2. Role in technical workflow (e.g., derivation, optimization, or analysis).
19
+ 3. Relationship to the paper's core contribution (e.g., theoretical foundation, empirical validation).
20
+ Example: "Defines constrained search space dimensionality reduction. Used in architecture optimization phase (Section 3.2). Enables 40% parameter reduction."
21
+ """
22
+
23
+ latex_code: str
24
+ """LaTeX representation following academic typesetting standards:
25
+ - Must use equation environment (e.g., `equation`, `align`).
26
+ - Multiline equations must align at '=' using `&`.
27
+ - Include unit annotations where applicable.
28
+ Example: "\\begin{equation} \\mathcal{L}_{NAS} = \\alpha \\|\\theta\\|_2 + \\beta H(p) \\end{equation}"
29
+ """
30
+
31
+
32
+ class Figure(BaseModel):
33
+ """Visual component specification for technical communication.
34
+
35
+ Combines graphical assets with structured academic captioning.Extracted from the article provided
36
+ """
37
+
38
+ description: str
39
+ """Figure interpretation guide containing:
40
+ 1. Key visual elements mapping (e.g., axes, legends, annotations).
41
+ 2. Data representation methodology (e.g., visualization type, statistical measures).
42
+ 3. Connection to research findings (e.g., supports hypothesis, demonstrates performance).
43
+ Example: "Architecture search space topology (left) vs. convergence curves (right). Demonstrates NAS efficiency gains through constrained search."
44
+ """
45
+
46
+ figure_caption: str
47
+ """Complete caption following Nature-style guidelines:
48
+ 1. Brief overview statement (首句总结).
49
+ 2. Technical detail layer (e.g., data sources, experimental conditions).
50
+ 3. Result implication (e.g., key insights, implications for future work).
51
+ Example: "Figure 3: Differentiable NAS framework. (a) Search space topology with constrained dimensions. (b) Training convergence across language pairs. Dashed lines indicate baseline methods."
52
+ """
53
+
54
+ figure_serial_number: int
55
+ """The Image serial number extracted from the Markdown article provided, the path usually in the form of `![](images/1.jpg)`, in this case the serial number is `1`"""
56
+
57
+
58
+ class Algorithm(BaseModel):
59
+ """Algorithm specification for research contributions."""
60
+
61
+ title: str
62
+ """Algorithm title with technical focus descriptor (e.g., 'Gradient Descent Optimization').
63
+
64
+ Tip: Do not attempt to translate the original element titles when generating JSON.
65
+ """
66
+
67
+ description: str
68
+ """Algorithm description with technical focus descriptor:
69
+ - Includes input/output specifications.
70
+ - Describes key steps and their purpose.
71
+ - Explains its role in the research workflow.
72
+ Example: "Proposed algorithm for neural architecture search. Inputs include search space constraints and training data. Outputs optimized architecture."
73
+ """
74
+
75
+
76
+ class Table(BaseModel):
77
+ """Table specification for research contributions."""
78
+
79
+ title: str
80
+ """Table title with technical focus descriptor (e.g., 'Comparison of Model Performance Metrics').
81
+
82
+ Tip: Do not attempt to translate the original element titles when generating JSON.
83
+ """
84
+
85
+ description: str
86
+ """Table description with technical focus descriptor:
87
+ - Includes data source and structure.
88
+ - Explains key columns/rows and their significance.
89
+ - Connects to research findings or hypotheses.
90
+ Example: "Performance metrics for different architectures. Columns represent accuracy, F1-score, and inference time. Highlights efficiency gains of proposed method."
91
+ """
92
+
93
+
94
+ class Highlightings(BaseModel):
95
+ """Technical showcase aggregator for research artifacts.
96
+
97
+ Curates core scientific components with machine-parseable annotations.
98
+ """
99
+
100
+ highlighted_equations: List[Equation]
101
+ """3-5 pivotal equations representing theoretical contributions:
102
+ - Each equation must be wrapped in $$ for display math.
103
+ - Contain at least one novel operator/symbol.
104
+ - Be referenced in Methods/Results sections.
105
+ Example: Equation describing proposed loss function.
106
+ """
107
+
108
+ highlighted_algorithms: List[Algorithm]
109
+ """1-2 key algorithms demonstrating methodological contributions:
110
+ - Include pseudocode or step-by-step descriptions.
111
+ - Highlight innovation in computational approach.
112
+ Example: Algorithm for constrained search space exploration.
113
+
114
+ Tip: Do not attempt to translate the original element titles when generating JSON.
115
+ """
116
+
117
+ highlighted_figures: List[Figure]
118
+ """4-6 key figures demonstrating:
119
+ 1. Framework overview (1 required).
120
+ 2. Quantitative results (2-3 required).
121
+ 3. Ablation studies (1 optional).
122
+ Each must appear in Results/Discussion chapters.
123
+ Example: Figure showing architecture topology and convergence curves.
124
+ """
125
+
126
+ highlighted_tables: List[Table]
127
+ """2-3 key tables summarizing:
128
+ - Comparative analysis of methods.
129
+ - Empirical results supporting claims.
130
+ Example: Table comparing model performance across datasets.
131
+
132
+ Tip: Do not attempt to translate the original element titles when generating JSON.
133
+ """
134
+
135
+
136
+ class ArticleEssence(ProposedAble, Display, PrepareVectorization):
137
+ """Semantic fingerprint of academic paper for structured analysis.
138
+
139
+ Encodes research artifacts with dual human-machine interpretability.
140
+ """
141
+
142
+ title: str = Field(...)
143
+ """Exact title of the original article without any modification.
144
+ Must be preserved precisely from the source material without:
145
+ - Translation
146
+ - Paraphrasing
147
+ - Adding/removing words
148
+ - Altering style or formatting
149
+ """
150
+
151
+ authors: List[str]
152
+ """Original author names exactly as they appear in the source document. No translation or paraphrasing.
153
+ Extract complete list without any modifications or formatting changes."""
154
+
155
+ keywords: List[str]
156
+ """Original keywords exactly as they appear in the source document. No translation or paraphrasing.
157
+ Extract the complete set without modifying format or terminology."""
158
+
159
+ publication_year: int
160
+ """Publication timestamp in ISO 8601 (YYYY format)."""
161
+
162
+ highlightings: Highlightings
163
+ """Technical highlight reel containing:
164
+ - Core equations (Theory)
165
+ - Key algorithms (Implementation)
166
+ - Critical figures (Results)
167
+ - Benchmark tables (Evaluation)"""
168
+
169
+ domain: List[str]
170
+ """Domain tags for research focus."""
171
+
172
+ abstract: str = Field(...)
173
+ """Three-paragraph structured abstract:
174
+ Paragraph 1: Problem & Motivation (2-3 sentences)
175
+ Paragraph 2: Methodology & Innovations (3-4 sentences)
176
+ Paragraph 3: Results & Impact (2-3 sentences)
177
+ Total length: 150-250 words"""
178
+
179
+ core_contributions: List[str]
180
+ """3-5 technical contributions using CRediT taxonomy verbs.
181
+ Each item starts with action verb.
182
+ Example:
183
+ - 'Developed constrained NAS framework'
184
+ - 'Established cross-lingual transfer metrics'"""
185
+
186
+ technical_novelty: List[str]
187
+ """Patent-style claims with technical specificity.
188
+ Format: 'A [system/method] comprising [novel components]...'
189
+ Example:
190
+ 'A neural architecture search system comprising:
191
+ a differentiable constrained search space;
192
+ multi-lingual transferability predictors...'"""
193
+
194
+ research_problems: List[str]
195
+ """Problem statements as how/why questions.
196
+ Example:
197
+ - 'How to reduce NAS computational overhead while maintaining search diversity?'
198
+ - 'Why do existing architectures fail in low-resource cross-lingual transfer?'"""
199
+
200
+ limitations: List[str]
201
+ """Technical limitations analysis containing:
202
+ 1. Constraint source (data/method/theory)
203
+ 2. Impact quantification
204
+ 3. Mitigation pathway
205
+ Example:
206
+ 'Methodology constraint: Single-objective optimization (affects 5% edge cases),
207
+ mitigated through future multi-task extension'"""
208
+
209
+ future_work: List[str]
210
+ """Research roadmap items with 3 horizons:
211
+ 1. Immediate extensions (1 year)
212
+ 2. Mid-term directions (2-3 years)
213
+ 3. Long-term vision (5+ years)
214
+ Example:
215
+ 'Short-term: Adapt framework for vision transformers (ongoing with CVPR submission)'"""
216
+
217
+ impact_analysis: List[str]
218
+ """Bibliometric impact projections:
219
+ - Expected citation counts (next 3 years)
220
+ - Target application domains
221
+ - Standard adoption potential
222
+ Example:
223
+ 'Predicted 150+ citations via integration into MMEngine (Alibaba OpenMMLab)'"""
224
+
225
+ def _prepare_vectorization_inner(self) -> str:
226
+ return self.model_dump_json()