Skip to content

Commit

Permalink
Version 1.4.20
Browse files Browse the repository at this point in the history
  • Loading branch information
quantumfusion committed Nov 21, 2024
1 parent b073652 commit 8a5a0f0
Show file tree
Hide file tree
Showing 270 changed files with 2,951 additions and 221 deletions.
5 changes: 4 additions & 1 deletion abacusai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
from .chat_session import ChatSession
from .chatllm_referral_invite import ChatllmReferralInvite
from .client import AgentResponse, ApiClient, ApiException, ClientOptions, ReadOnlyClient, _request_context
from .code_autocomplete_response import CodeAutocompleteResponse
from .code_edit_response import CodeEditResponse
from .code_source import CodeSource
from .compute_point_info import ComputePointInfo
from .concatenation_config import ConcatenationConfig
Expand Down Expand Up @@ -111,6 +113,7 @@
from .holdout_analysis import HoldoutAnalysis
from .holdout_analysis_version import HoldoutAnalysisVersion
from .hosted_model_token import HostedModelToken
from .image_gen_settings import ImageGenSettings
from .indexing_config import IndexingConfig
from .inferred_database_column_to_feature_mappings import InferredDatabaseColumnToFeatureMappings
from .inferred_feature_mappings import InferredFeatureMappings
Expand Down Expand Up @@ -221,4 +224,4 @@
from .workflow_node_template import WorkflowNodeTemplate


__version__ = "1.4.19"
__version__ = "1.4.20"
13 changes: 8 additions & 5 deletions abacusai/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ class Agent(AbstractApiClass):
agentExecutionConfig (dict): The config for arguments used to execute the agent.
latestAgentVersion (AgentVersion): The latest agent version.
codeSource (CodeSource): If a python model, information on the source code
draftWorkflowGraph (WorkflowGraph): The saved draft state of the workflow graph for the agent.
workflowGraph (WorkflowGraph): The workflow graph for the agent.
"""

def __init__(self, client, name=None, agentId=None, createdAt=None, projectId=None, notebookId=None, predictFunctionName=None, sourceCode=None, agentConfig=None, memory=None, trainingRequired=None, agentExecutionConfig=None, codeSource={}, latestAgentVersion={}, workflowGraph={}):
def __init__(self, client, name=None, agentId=None, createdAt=None, projectId=None, notebookId=None, predictFunctionName=None, sourceCode=None, agentConfig=None, memory=None, trainingRequired=None, agentExecutionConfig=None, codeSource={}, latestAgentVersion={}, draftWorkflowGraph={}, workflowGraph={}):
super().__init__(client, agentId)
self.name = name
self.agent_id = agentId
Expand All @@ -42,12 +43,14 @@ def __init__(self, client, name=None, agentId=None, createdAt=None, projectId=No
self.code_source = client._build_class(CodeSource, codeSource)
self.latest_agent_version = client._build_class(
AgentVersion, latestAgentVersion)
self.draft_workflow_graph = client._build_class(
WorkflowGraph, draftWorkflowGraph)
self.workflow_graph = client._build_class(WorkflowGraph, workflowGraph)
self.deprecated_keys = {}

def __repr__(self):
repr_dict = {f'name': repr(self.name), f'agent_id': repr(self.agent_id), f'created_at': repr(self.created_at), f'project_id': repr(self.project_id), f'notebook_id': repr(self.notebook_id), f'predict_function_name': repr(self.predict_function_name), f'source_code': repr(self.source_code), f'agent_config': repr(
self.agent_config), f'memory': repr(self.memory), f'training_required': repr(self.training_required), f'agent_execution_config': repr(self.agent_execution_config), f'code_source': repr(self.code_source), f'latest_agent_version': repr(self.latest_agent_version), f'workflow_graph': repr(self.workflow_graph)}
repr_dict = {f'name': repr(self.name), f'agent_id': repr(self.agent_id), f'created_at': repr(self.created_at), f'project_id': repr(self.project_id), f'notebook_id': repr(self.notebook_id), f'predict_function_name': repr(self.predict_function_name), f'source_code': repr(self.source_code), f'agent_config': repr(self.agent_config), f'memory': repr(
self.memory), f'training_required': repr(self.training_required), f'agent_execution_config': repr(self.agent_execution_config), f'code_source': repr(self.code_source), f'latest_agent_version': repr(self.latest_agent_version), f'draft_workflow_graph': repr(self.draft_workflow_graph), f'workflow_graph': repr(self.workflow_graph)}
class_name = "Agent"
repr_str = ',\n '.join([f'{key}={value}' for key, value in repr_dict.items(
) if getattr(self, key, None) is not None and key not in self.deprecated_keys])
Expand All @@ -60,8 +63,8 @@ def to_dict(self):
Returns:
dict: The dict value representation of the class parameters
"""
resp = {'name': self.name, 'agent_id': self.agent_id, 'created_at': self.created_at, 'project_id': self.project_id, 'notebook_id': self.notebook_id, 'predict_function_name': self.predict_function_name, 'source_code': self.source_code, 'agent_config': self.agent_config, 'memory': self.memory,
'training_required': self.training_required, 'agent_execution_config': self.agent_execution_config, 'code_source': self._get_attribute_as_dict(self.code_source), 'latest_agent_version': self._get_attribute_as_dict(self.latest_agent_version), 'workflow_graph': self._get_attribute_as_dict(self.workflow_graph)}
resp = {'name': self.name, 'agent_id': self.agent_id, 'created_at': self.created_at, 'project_id': self.project_id, 'notebook_id': self.notebook_id, 'predict_function_name': self.predict_function_name, 'source_code': self.source_code, 'agent_config': self.agent_config, 'memory': self.memory, 'training_required': self.training_required,
'agent_execution_config': self.agent_execution_config, 'code_source': self._get_attribute_as_dict(self.code_source), 'latest_agent_version': self._get_attribute_as_dict(self.latest_agent_version), 'draft_workflow_graph': self._get_attribute_as_dict(self.draft_workflow_graph), 'workflow_graph': self._get_attribute_as_dict(self.workflow_graph)}
return {key: value for key, value in resp.items() if value is not None and key not in self.deprecated_keys}

def refresh(self):
Expand Down
2 changes: 1 addition & 1 deletion abacusai/batch_prediction.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def __init__(self, client, batchPredictionId=None, createdAt=None, name=None, de
BatchPredictionArgs, globalPredictionArgs)
self.batch_prediction_args = client._build_class(getattr(
api_class, batchPredictionArgsType, BatchPredictionArgs) if batchPredictionArgsType else BatchPredictionArgs, batchPredictionArgs)
self.deprecated_keys = {'explanations', 'global_prediction_args'}
self.deprecated_keys = {'global_prediction_args', 'explanations'}

def __repr__(self):
repr_dict = {f'batch_prediction_id': repr(self.batch_prediction_id), f'created_at': repr(self.created_at), f'name': repr(self.name), f'deployment_id': repr(self.deployment_id), f'file_connector_output_location': repr(self.file_connector_output_location), f'database_connector_id': repr(self.database_connector_id), f'database_output_configuration': repr(self.database_output_configuration), f'file_output_format': repr(self.file_output_format), f'connector_type': repr(self.connector_type), f'legacy_input_location': repr(self.legacy_input_location), f'output_feature_group_id': repr(self.output_feature_group_id), f'feature_group_table_name': repr(self.feature_group_table_name), f'output_feature_group_table_name': repr(self.output_feature_group_table_name), f'summary_feature_group_table_name': repr(self.summary_feature_group_table_name), f'csv_input_prefix': repr(
Expand Down
2 changes: 1 addition & 1 deletion abacusai/batch_prediction_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def __init__(self, client, batchPredictionVersion=None, batchPredictionId=None,
BatchPredictionArgs, globalPredictionArgs)
self.batch_prediction_args = client._build_class(getattr(
api_class, batchPredictionArgsType, BatchPredictionArgs) if batchPredictionArgsType else BatchPredictionArgs, batchPredictionArgs)
self.deprecated_keys = {'explanations', 'global_prediction_args'}
self.deprecated_keys = {'global_prediction_args', 'explanations'}

def __repr__(self):
repr_dict = {f'batch_prediction_version': repr(self.batch_prediction_version), f'batch_prediction_id': repr(self.batch_prediction_id), f'status': repr(self.status), f'drift_monitor_status': repr(self.drift_monitor_status), f'deployment_id': repr(self.deployment_id), f'model_id': repr(self.model_id), f'model_version': repr(self.model_version), f'predictions_started_at': repr(self.predictions_started_at), f'predictions_completed_at': repr(self.predictions_completed_at), f'database_output_error': repr(self.database_output_error), f'total_predictions': repr(self.total_predictions), f'failed_predictions': repr(self.failed_predictions), f'database_connector_id': repr(self.database_connector_id), f'database_output_configuration': repr(self.database_output_configuration), f'file_connector_output_location': repr(self.file_connector_output_location), f'file_output_format': repr(self.file_output_format), f'connector_type': repr(self.connector_type), f'legacy_input_location': repr(self.legacy_input_location), f'error': repr(self.error), f'drift_monitor_error': repr(self.drift_monitor_error), f'monitor_warnings': repr(self.monitor_warnings), f'csv_input_prefix': repr(
Expand Down
Loading

0 comments on commit 8a5a0f0

Please sign in to comment.