aixplain.factories.data_factory
__author__
Copyright 2022 The aiXplain SDK authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Author: Duraikrishna Selvaraju, Thiago Castro Ferreira, Shreyas Sharma and Lucas Pavanelli Date: May 15th 2023 Description: Data Factory Class
DataFactory Objects
class DataFactory(AssetFactory)
Factory class for creating and managing data assets.
This class provides functionality for creating, retrieving, and managing data assets in the aiXplain platform. Data assets represent individual pieces of data (e.g., text, audio) that can be used in corpora or directly with models.
Attributes:
backend_url
str - Base URL for the aiXplain backend API.
get
@classmethod
def get(cls, data_id: Text) -> Data
Retrieve a data asset by its ID.
This method fetches a data asset from the platform using its unique identifier.
Arguments:
data_id
Text - Unique identifier of the data asset to retrieve.
Returns:
Data
- Retrieved data asset object with its configuration.
Raises:
Exception
- If:- Data asset ID is invalid or not found
- Authentication fails
- Service is unavailable