Skip to content

Commit

Permalink
多开的问题解决,为Parallel用多进程导致
Browse files Browse the repository at this point in the history
新问题:找不到pyod库
  • Loading branch information
cgsdfc committed Sep 9, 2022
1 parent 6114b3e commit ee000d7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
12 changes: 6 additions & 6 deletions Application.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,11 @@ def run(self) -> None:
sig.emit(key)


if __name__ == "__main__":
import sys
# if __name__ == "__main__":
# import sys

app = QtWidgets.QApplication(sys.argv)
# app = QtWidgets.QApplication(sys.argv)

w = MyWindow()
w.show()
sys.exit(app.exec_())
# w = MyWindow()
# w.show()
# sys.exit(app.exec_())
5 changes: 4 additions & 1 deletion OutlierDetect.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,11 @@ def _load_data(self: DataConfig):
n_features=self.n_features,
random_state=self.seed,
)
d.X_train2d, d.X_test2d = Parallel(2)(
LOG.info(f'Begin TSNE')
d.X_train2d, d.X_test2d = Parallel(1)(
delayed(tsne)(X) for X in [d.X_train, d.X_test])
LOG.info('End TSNE')

return d

return _load_data(self)
Expand Down

0 comments on commit ee000d7

Please sign in to comment.