Skip to content

Commit fe70c10

Browse files
vaibhavatlanAryamanz29
authored andcommitted
Added doc strings
1 parent 7310f96 commit fe70c10

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

pyatlan/model/assets/core/a_i_model.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,14 @@ def processes_creator(
7171
ai_model: AIModel,
7272
dataset_dict: Dict[AIDatasetType, list],
7373
) -> List[Process]:
74+
"""
75+
Creates a list of Process objects representing the relationships between an AI model and its datasets.
76+
77+
:param ai_model: the AI model for which to create processes
78+
:param dataset_dict: dictionary mapping AI dataset types to lists of assets
79+
:returns: list of Process objects representing the AI model's data lineage
80+
:raises ValueError: when the AI model is missing required attributes (guid or name)
81+
"""
7482
if not ai_model.guid or not ai_model.name:
7583
raise ValueError("AI model must have both guid and name attributes")
7684
process_list = []
@@ -103,6 +111,14 @@ def processes_creator(
103111

104112
@classmethod
105113
def processes_batch_save(cls, client, process_list: List[Process]) -> List:
114+
"""
115+
Saves a list of Process objects to Atlan in batches to optimize performance.
116+
We save the processes in batches of 20.
117+
118+
:param client: Atlan client instance for making API calls
119+
:param process_list: list of Process objects to save
120+
:returns: list of API responses from each batch save operation
121+
"""
106122
batch_size = 20
107123
total_processes = len(process_list)
108124
responses = []

0 commit comments

Comments
 (0)