Skip to content

Commit 22aa985

Browse files
committed
scope: version number should str not float
- as we are not doing any processing for number so its compatible to pass it as str
1 parent a52d8de commit 22aa985

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

chebai/preprocessing/datasets/scope/scope.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ class _SCOPeDataExtractor(_DynamicDataset, ABC):
3737
Additionally, it supports downloading related data like PDB sequence files.
3838
3939
Args:
40-
scope_version (float): The SCOPe version to use.
41-
scope_version_train (Optional[float]): The training SCOPe version, if different.
40+
scope_version (str): The SCOPe version to use.
41+
scope_version_train (Optional[str]): The training SCOPe version, if different.
4242
dynamic_data_split_seed (int, optional): The seed for random data splitting. Defaults to 42.
4343
splits_file_path (str, optional): Path to the splits CSV file. Defaults to None.
4444
**kwargs: Additional keyword arguments passed to DynamicDataset and XYBaseDataModule.
@@ -70,12 +70,12 @@ class _SCOPeDataExtractor(_DynamicDataset, ABC):
7070

7171
def __init__(
7272
self,
73-
scope_version: float,
74-
scope_version_train: Optional[float] = None,
73+
scope_version: str,
74+
scope_version_train: Optional[str] = None,
7575
**kwargs,
7676
):
77-
self.scope_version: float = scope_version
78-
self.scope_version_train: float = scope_version_train
77+
self.scope_version: str = scope_version
78+
self.scope_version_train: str = scope_version_train
7979

8080
super(_SCOPeDataExtractor, self).__init__(**kwargs)
8181

@@ -89,7 +89,7 @@ def __init__(
8989
)
9090

9191
@staticmethod
92-
def _get_scope_url(data_type: str, version_number: float) -> str:
92+
def _get_scope_url(data_type: str, version_number: str) -> str:
9393
"""
9494
Generates the URL for downloading SCOPe files.
9595
@@ -872,6 +872,6 @@ class SCOPeOverPartial2000(_SCOPeOverXPartial):
872872

873873

874874
if __name__ == "__main__":
875-
scope = SCOPeOver2000(scope_version=2.08)
875+
scope = SCOPeOver2000(scope_version="2.08")
876876
g = scope._extract_class_hierarchy("dummy/path")
877877
scope._graph_to_raw_dataset(g)

configs/data/scope/scope2000.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
class_path: chebai.preprocessing.datasets.scope.scope.SCOPeOver2000
22
init_args:
3-
scope_version: 2.08
3+
scope_version: "2.08"

0 commit comments

Comments
 (0)