Closed olegranmo closed 1 year ago
Will investigate. I believe this is because the cuda kernels are not registered as assets during install, and is then simply omitted during install
Great :-)
@olegranmo Could you try the following:
create a MANIFEST.in
in the root directory with the following contents:
recursive-include tmu/clause_bank/cuda *.cu
Inside setup.py
, include the following argument include_package_data=True,
pip install git+https://github.com/cair/tmu.git
Solved the problem - thanks!
This error does not occur with local install (pip3 install -e .), however, occurs with remote install (pip3 install tmu):
2023-04-17 06:40:30,320 - tmu.models.classification.vanilla_classifier - DEBUG - Initializing clause bank.... Traceback (most recent call last): File "./examples/experimental/classification/IMDbWordPredictionConvolutionDemo.py", line 125, in
tm.fit(X_train, Y_train)
File "/home/oleg/.local/lib/python3.8/site-packages/tmu/models/classification/vanilla_classifier.py", line 148, in fit
self.init(X, Y)
File "/home/oleg/.local/lib/python3.8/site-packages/tmu/models/classification/base_classification.py", line 32, in init
self.init_clause_bank(X, Y)
File "/home/oleg/.local/lib/python3.8/site-packages/tmu/models/classification/vanilla_classifier.py", line 126, in init_clause_bank
self.clause_banks = [clause_bank_type(clause_bankargs) for in range(self.number_of_classes)]
File "/home/oleg/.local/lib/python3.8/site-packages/tmu/models/classification/vanilla_classifier.py", line 126, in
self.clause_banks = [clause_bank_type( clause_bankargs) for in range(self.number_of_classes)]
File "/home/oleg/.local/lib/python3.8/site-packages/tmu/clause_bank/clause_bank_cuda.py", line 92, in init
mod = load_cuda_kernel(parameters, "cuda/calculate_clause_outputs_predict.cu")
File "/home/oleg/.local/lib/python3.8/site-packages/tmu/clause_bank/clause_bank_cuda.py", line 55, in load_cuda_kernel
with path.open("r") as f:
File "/usr/lib/python3.8/pathlib.py", line 1222, in open
return io.open(self, mode, buffering, encoding, errors, newline,
File "/usr/lib/python3.8/pathlib.py", line 1078, in _opener
return self._accessor.open(self, flags, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/oleg/.local/lib/python3.8/site-packages/tmu/clause_bank/cuda/calculate_clause_outputs_predict.cu'