Unit tests are not working properly right now, see here. It seems like they are looking for files that are not inside the repository.
Related, though: I strongly discourage adding binary files to git. This messes with the way git stores its history and will result in an ever ballooning repository.
2024-08-08T09:18:06.7617719Z [36;1mpython -m unittest[0m
2024-08-08T09:18:06.7685458Z shell: /usr/bin/bash -e {0}
2024-08-08T09:18:06.7685835Z env:
2024-08-08T09:18:06.7686338Z pythonLocation: /opt/hostedtoolcache/Python/3.9.19/x64
2024-08-08T09:18:06.7687009Z PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.19/x64/lib/pkgconfig
2024-08-08T09:18:06.7687596Z Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.19/x64
2024-08-08T09:18:06.7688232Z Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.19/x64
2024-08-08T09:18:06.7688840Z Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.19/x64
2024-08-08T09:18:06.7689395Z LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.19/x64/lib
2024-08-08T09:18:06.7689947Z ##[endgroup]
2024-08-08T09:21:57.5413148Z /home/runner/work/python-chebai/python-chebai/chebai/preprocessing/datasets/chebi.py:696: ResourceWarning: unclosed file <_io.BufferedWriter name='data/chebi_v200/raw/chebi.obo'>
2024-08-08T09:21:57.5414682Z open(chebi_path, "wb").write(r.content)
2024-08-08T09:24:34.1532598Z /home/runner/work/python-chebai/python-chebai/chebai/preprocessing/datasets/chebi.py:293: ResourceWarning: unclosed file <_io.BufferedWriter name='data/chebi_v200/ChEBI50/processed/data.pkl'>
2024-08-08T09:24:34.1534342Z pd.to_pickle(data, open(os.path.join(self.processed_dir_main, filename), "wb"))
2024-08-08T09:24:34.5374758Z Check for processed data in data/chebi_v200/ChEBI50/processed/smiles_token
2024-08-08T09:24:34.5375855Z Cross-validation enabled: False
2024-08-08T09:24:34.6079986Z
2024-08-08T09:24:34.6081192Z Check for processed data in data/chebi_v200/ChEBI50/processed
2024-08-08T09:24:34.6082150Z Missing raw data. Go fetch...
2024-08-08T09:24:34.6095203Z Load ChEBI ontology (v_200)
2024-08-08T09:24:34.6096086Z Compute transitive closure
2024-08-08T09:24:34.6096723Z Process graph
2024-08-08T09:24:34.6100210Z Transform data
2024-08-08T09:24:34.6101295Z Missing encoded data related to version 200, transform processed data into encoded data: data.pt
2024-08-08T09:24:34.6102128Z Processing 129184 lines...
2024-08-08T09:24:35.9607164Z 0%| | 0/129184 [00:00<?, ?it/s]
2024-08-08T09:24:53.5676857Z 100%|██████████| 129184/129184 [00:18<00:00, 6813.79it/s]
2024-08-08T09:24:58.6237216Z /home/runner/work/python-chebai/python-chebai/chebai/preprocessing/datasets/chebi.py:795: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
2024-08-08T09:24:58.6243140Z data_chebi_version = torch.load(os.path.join(self.processed_dir, filename))
2024-08-08T09:25:04.1718937Z /opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/iterstrat/ml_stratifiers.py:99: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
2024-08-08T09:25:04.1721144Z test_folds[sample_idx] = fold_idx
2024-08-08T09:26:45.1461138Z /opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/iterstrat/ml_stratifiers.py:99: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
2024-08-08T09:26:45.1464231Z test_folds[sample_idx] = fold_idx
2024-08-08T09:34:16.3157200Z .x.x.x/home/runner/work/python-chebai/python-chebai/chebai/preprocessing/datasets/chebi.py:696: ResourceWarning: unclosed file <_io.BufferedWriter name='data/chebi_v231/raw/chebi.obo'>
2024-08-08T09:34:16.3158656Z open(chebi_path, "wb").write(r.content)
2024-08-08T09:38:28.6883092Z /home/runner/work/python-chebai/python-chebai/chebai/preprocessing/datasets/chebi.py:293: ResourceWarning: unclosed file <_io.BufferedWriter name='data/chebi_v231/ChEBI50/processed/data.pkl'>
2024-08-08T09:38:28.6884809Z pd.to_pickle(data, open(os.path.join(self.processed_dir_main, filename), "wb"))
2024-08-08T09:38:29.3523378Z Check for processed data in data/chebi_v231/ChEBI50/processed/smiles_token
2024-08-08T09:38:29.3524730Z Cross-validation enabled: False
2024-08-08T09:38:29.4642874Z saving 771 tokens to /home/runner/work/python-chebai/python-chebai/chebai/preprocessing/bin/smiles_token/tokens.txt...
2024-08-08T09:38:29.4645357Z first 10 tokens: ['[*-]', '[Al-]', '[F-]', '.', '[H]', '[N]', '(', ')', '[Ag+]', 'C']
2024-08-08T09:38:29.4646215Z
2024-08-08T09:38:29.4646439Z Generate dynamic splits...
2024-08-08T09:38:29.4646778Z
2024-08-08T09:38:29.4646932Z Get test data split
2024-08-08T09:38:29.4647580Z Split dataset into train / val with given test set
2024-08-08T09:38:29.4648274Z Check for processed data in data/chebi_v231/ChEBI50/processed
2024-08-08T09:38:29.4648802Z Missing raw data. Go fetch...
2024-08-08T09:38:29.4649351Z Load ChEBI ontology (v_231)
2024-08-08T09:38:29.4649756Z Compute transitive closure
2024-08-08T09:38:29.4650106Z Process graph
2024-08-08T09:38:29.4650520Z Transform data
2024-08-08T09:38:29.4651574Z Missing encoded data related to version 231, transform processed data into encoded data: data.pt
2024-08-08T09:38:29.4652346Z Processing 185007 lines...
2024-08-08T09:38:31.4770943Z 0%| | 0/185007 [00:00<?, ?it/s]
2024-08-08T09:38:55.4696067Z 100%|██████████| 185007/185007 [00:26<00:00, 7114.34it/s]
2024-08-08T09:39:02.8494097Z Check for processed data in data/chebi_v231/ChEBI50/processed/smiles_token
2024-08-08T09:39:02.8495660Z Cross-validation enabled: False
2024-08-08T09:39:02.8504574Z /home/runner/work/python-chebai/python-chebai/chebai/preprocessing/datasets/chebi.py:795: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
2024-08-08T09:39:02.8509556Z data_chebi_version = torch.load(os.path.join(self.processed_dir, filename))
2024-08-08T09:39:11.9306293Z /opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/iterstrat/ml_stratifiers.py:99: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
2024-08-08T09:39:11.9309777Z test_folds[sample_idx] = fold_idx
2024-08-08T09:42:21.2227625Z /opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/iterstrat/ml_stratifiers.py:99: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
2024-08-08T09:42:21.2230731Z test_folds[sample_idx] = fold_idx
2024-08-08T09:45:13.1794753Z /home/runner/work/python-chebai/python-chebai/chebai/preprocessing/datasets/chebi.py:795: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
2024-08-08T09:45:13.1800152Z data_chebi_version = torch.load(os.path.join(self.processed_dir, filename))
2024-08-08T09:45:22.2159622Z /opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/iterstrat/ml_stratifiers.py:99: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
2024-08-08T09:45:22.2161516Z test_folds[sample_idx] = fold_idx
2024-08-08T09:48:32.5158833Z /opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/iterstrat/ml_stratifiers.py:99: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
2024-08-08T09:48:32.5160905Z test_folds[sample_idx] = fold_idx
2024-08-08T09:51:24.0432561Z ./home/runner/work/python-chebai/python-chebai/chebai/preprocessing/datasets/chebi.py:795: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
2024-08-08T09:51:24.0437672Z data_chebi_version = torch.load(os.path.join(self.processed_dir, filename))
2024-08-08T09:51:33.8374901Z /opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/iterstrat/ml_stratifiers.py:99: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
2024-08-08T09:51:33.8377890Z test_folds[sample_idx] = fold_idx
2024-08-08T09:54:38.9281022Z /home/runner/work/python-chebai/python-chebai/chebai/preprocessing/datasets/chebi.py:813: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
2024-08-08T09:54:38.9289386Z data_chebi_train_version = torch.load(
2024-08-08T09:54:44.6569859Z /opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/iterstrat/ml_stratifiers.py:99: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
2024-08-08T09:54:44.6572071Z test_folds[sample_idx] = fold_idx
2024-08-08T09:56:43.2875804Z .......E....E/home/runner/work/python-chebai/python-chebai/tests/testPubChemData.py:40: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
2024-08-08T09:56:43.2883411Z train_set = torch.load(os.path.join(processed_path, "train.pt"))
2024-08-08T09:56:43.2891829Z E/home/runner/work/python-chebai/python-chebai/tests/testTox21MolNetData.py:40: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
2024-08-08T09:56:43.2899790Z train_set = torch.load(os.path.join(processed_path, "train.pt"))
2024-08-08T09:56:43.2900480Z E
2024-08-08T09:56:43.2900868Z ======================================================================
2024-08-08T09:56:43.2902132Z ERROR: test_metric_against_realistic_data (tests.testCustomBalancedAccuracyMetric.TestCustomBalancedAccuracyMetric)
2024-08-08T09:56:43.2903527Z Test the custom metric against the standard on realistic data.
2024-08-08T09:56:43.2904504Z ----------------------------------------------------------------------
2024-08-08T09:56:43.2905160Z Traceback (most recent call last):
2024-08-08T09:56:43.2915954Z File "/home/runner/work/python-chebai/python-chebai/tests/testCustomBalancedAccuracyMetric.py", line 48, in test_metric_against_realistic_data
2024-08-08T09:56:43.2917531Z num_of_files = len(os.listdir(abs_path)) // 2
2024-08-08T09:56:43.2918982Z FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/work/python-chebai/python-chebai/tests/test_data/CheBIOver100_test'
2024-08-08T09:56:43.2920083Z
2024-08-08T09:56:43.2920291Z ======================================================================
2024-08-08T09:56:43.2921584Z ERROR: test_metric_against_realistic_data (tests.testCustomMacroF1Metric.TestCustomMacroF1Metric)
2024-08-08T09:56:43.2922787Z Test the custom metric against the standard on realistic data.
2024-08-08T09:56:43.2923695Z ----------------------------------------------------------------------
2024-08-08T09:56:43.2924355Z Traceback (most recent call last):
2024-08-08T09:56:43.2925920Z File "/home/runner/work/python-chebai/python-chebai/tests/testCustomMacroF1Metric.py", line 118, in test_metric_against_realistic_data
2024-08-08T09:56:43.2927279Z num_of_files = len(os.listdir(abs_path)) // 2
2024-08-08T09:56:43.2928686Z FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/work/python-chebai/python-chebai/tests/test_data/CheBIOver100_test'
2024-08-08T09:56:43.2929777Z
2024-08-08T09:56:43.2929994Z ======================================================================
2024-08-08T09:56:43.2930756Z ERROR: setUpClass (tests.testPubChemData.TestPubChemData)
2024-08-08T09:56:43.2931636Z ----------------------------------------------------------------------
2024-08-08T09:56:43.2932296Z Traceback (most recent call last):
2024-08-08T09:56:43.2933535Z File "/home/runner/work/python-chebai/python-chebai/tests/testPubChemData.py", line 30, in setUpClass
2024-08-08T09:56:43.2934690Z cls.getDataSplitsOverlaps()
2024-08-08T09:56:43.2936027Z File "/home/runner/work/python-chebai/python-chebai/tests/testPubChemData.py", line 40, in getDataSplitsOverlaps
2024-08-08T09:56:43.2937254Z train_set = torch.load(os.path.join(processed_path, "train.pt"))
2024-08-08T09:56:43.2938723Z File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/torch/serialization.py", line 1065, in load
2024-08-08T09:56:43.2940187Z with _open_file_like(f, 'rb') as opened_file:
2024-08-08T09:56:43.2941668Z File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/torch/serialization.py", line 468, in _open_file_like
2024-08-08T09:56:43.2942953Z return _open_file(name_or_buffer, mode)
2024-08-08T09:56:43.2944383Z File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/torch/serialization.py", line 449, in __init__
2024-08-08T09:56:43.2945603Z super().__init__(open(name, mode))
2024-08-08T09:56:43.2947057Z FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/work/python-chebai/python-chebai/data/Pubchem/processed/smiles_token/100000/train.pt'
2024-08-08T09:56:43.2948181Z
2024-08-08T09:56:43.2948369Z ======================================================================
2024-08-08T09:56:43.2949055Z ERROR: setUpClass (tests.testTox21MolNetData.TestTox21Data)
2024-08-08T09:56:43.2950086Z ----------------------------------------------------------------------
2024-08-08T09:56:43.2950660Z Traceback (most recent call last):
2024-08-08T09:56:43.2951768Z File "/home/runner/work/python-chebai/python-chebai/tests/testTox21MolNetData.py", line 30, in setUpClass
2024-08-08T09:56:43.2952795Z cls.getDataSplitsOverlaps()
2024-08-08T09:56:43.2953995Z File "/home/runner/work/python-chebai/python-chebai/tests/testTox21MolNetData.py", line 40, in getDataSplitsOverlaps
2024-08-08T09:56:43.2955184Z train_set = torch.load(os.path.join(processed_path, "train.pt"))
2024-08-08T09:56:43.2956556Z File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/torch/serialization.py", line 1065, in load
2024-08-08T09:56:43.2957714Z with _open_file_like(f, 'rb') as opened_file:
2024-08-08T09:56:43.2959048Z File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/torch/serialization.py", line 468, in _open_file_like
2024-08-08T09:56:43.2960191Z return _open_file(name_or_buffer, mode)
2024-08-08T09:56:43.2961413Z File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/torch/serialization.py", line 449, in __init__
2024-08-08T09:56:43.2962427Z super().__init__(open(name, mode))
2024-08-08T09:56:43.2963773Z FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/work/python-chebai/python-chebai/data/Tox21MN/processed/smiles_token/train.pt'
2024-08-08T09:56:43.2965005Z
2024-08-08T09:56:43.2965317Z ----------------------------------------------------------------------
2024-08-08T09:56:43.2965863Z Ran 20 tests in 2311.686s
2024-08-08T09:56:43.2966118Z
2024-08-08T09:56:43.2966297Z FAILED (errors=4, expected failures=3)
Unit tests are not working properly right now, see here. It seems like they are looking for files that are not inside the repository.
Related, though: I strongly discourage adding binary files to git. This messes with the way git stores its history and will result in an ever ballooning repository.