Skip to content

Commit

Permalink
remove serializer exception
Browse files Browse the repository at this point in the history
Signed-off-by: Yotam Perlitz <[email protected]>
  • Loading branch information
perlitz committed Jan 20, 2025
1 parent 6a72f74 commit 7c4db9d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/unitxt/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,4 @@ class SQLDatabaseAsSchemaSerializer(SingleTypeSerializer):

def serialize(self, value: SQLDatabase, instance: Dict[str, Any]) -> str:
connector = get_db_connector(value["db_type"])(value)
try:
return connector.get_table_schema()
except Exception as e:
raise RuntimeError(
f"Failed to serialize SQL schema for database '{value.db_id}' using connector {connector.__class__.__name__}: {e}"
) from e
return connector.get_table_schema()

0 comments on commit 7c4db9d

Please sign in to comment.