aixplain.modules.file
__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: aiXplain team Date: March 20th 2023 Description: File Class
File Objects
class File()
A class representing a file in the aiXplain platform.
This class provides functionality for managing files, which are used to store data samples in the platform. It supports various file types, compression formats, and data splits.
Attributes:
path
Union[Text, pathlib.Path] - File pathextension
Union[Text, FileType] - File extension (e.g. CSV, TXT, etc.)data_split
Optional[DataSplit] - Data split of the file.compression
Optional[Text] - Compression extension (e.g., .gz).
__init__
def __init__(path: Union[Text, pathlib.Path],
extension: Union[Text, FileType],
data_split: Optional[DataSplit] = None,
compression: Optional[Text] = None) -> None
Initialize a new File instance.
Arguments:
path
Union[Text, pathlib.Path] - File pathextension
Union[Text, FileType] - File extension (e.g. CSV, TXT, etc.)data_split
Optional[DataSplit], optional - Data split of the file. Defaults to None.compression
Optional[Text], optional - Compression extension (e.g., .gz). Defaults to None.