Skip to content

DeepTalk-singleST.ipynb tutorial not running #11

@kmccrock

Description

@kmccrock

Hello, I get an error trying to convert tensor to numpy from dt.Train. See below.

I installed my environment according to the GitHub readme and just confirmed my versions match. I have not been able to install from the environment.yml file though, I get version compatibility errors.

I modified your code to handle this conversion, but now I do not get the .model file which I need for dt.run_predict.

Thanks!
-Kyle

File ~/Desktop/DeepTalk Tutorial/DeepTalk-main/DeepTalk_ST/src/utils/evaluation.py:105, in run_evaluation_main(test_edges, prediction_data, true_data, threshold, header)
102 y_pred[i] = 1
104 y_true = np.array(true_data)
--> 105 y_scores = np.array(prediction_data)
107 ps, rs, _ = precision_recall_curve(y_true, y_scores)
...
--> 621 return self.numpy()
622 else:
623 return self.numpy().astype(dtype, copy=False)

TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions