display_name=pipeline_info['display_name'],
description=pipeline_info['description'],
created_at=pipeline_info['created_at']
- )
+ ).to_dict()
logger.warning(f"Pipeline '{pipe_name}' not found")
return None
def __repr__(self):
return (f"PipelineInfo(pipeline_id={self.pipeline_id}, display_name={self.display_name}, "
- f"description={self.description}, created_at={self.created_at})")
\ No newline at end of file
+ f"description={self.description}, created_at={self.created_at})")
+
+ def to_dict(self):
+ return {
+ "pipeline_id":self.pipeline_id,
+ "display_name": self.display_name,
+ "description": self.description,
+ "created_at": self.created_at
+ }
\ No newline at end of file
try:
pipeline_info = fetch_pipeline_info_by_name(TRAININGMGR_CONFIG_OBJ, pipe_name)
if pipeline_info:
- api_response = pipeline_info
+ api_response = {"pipeline_info":pipeline_info}
response_code = status.HTTP_200_OK
else:
api_response = {"error": f"Pipeline '{pipe_name}' not found"}