Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions chebai/preprocessing/datasets/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1267,16 +1267,3 @@ def processed_file_names_dict(self) -> dict:
if self.n_token_limit is not None:
return {"data": f"data_maxlen{self.n_token_limit}.pt"}
return {"data": "data.pt"}

@property
def classes_txt_file_path(self) -> str:
"""
Returns the filename for the classes text file.

Returns:
str: The filename for the classes text file.
"""
# This property also used in following places:
# - chebai/result/prediction.py: to load class names for csv columns names
# - chebai/cli.py: to link this property to `model.init_args.classes_txt_file_path`
return os.path.join(self.processed_dir_main, "classes.txt")
13 changes: 13 additions & 0 deletions chebai/preprocessing/datasets/chebi.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,19 @@ def processed_file_names_dict(self) -> dict:
}
return {"data": f"aug_data_var{self.aug_smiles_variations}.pt"}

@property
def classes_txt_file_path(self) -> str:
"""
Returns the filename for the classes text file.

Returns:
str: The filename for the classes text file.
"""
# This property also used in following places:
# - chebai/result/prediction.py: to load class names for csv columns names
# - chebai/cli.py: to link this property to `model.init_args.classes_txt_file_path`
return os.path.join(self.processed_dir_main, "classes.txt")


class ChEBIFromList(_ChEBIDataExtractor):
"""
Expand Down
Loading
Loading