mmaul / clml

Common Lisp Machine Learning Library
Other
259 stars 36 forks source link

Multi-threading in SBCL via Slime is not working #2

Closed hendersonmpa closed 9 years ago

hendersonmpa commented 9 years ago

Thanks for providing a quicklisp compatible , documented version of this library. I am trying to use it with:

When I run the following example using SBCL started in the terminal everything works, four threads are created, return the result and close. When I run the same code from within SLIME the following works just fine:

(setf *read-default-float-format* 'double-float)
(ql:quickload :clml)
(in-package :clml.decision-tree.random-forest)

(defparameter *bc-train*)
(setf *bc-train* (read-data-from-file (clml.utility.data:fetch "https://mmaul.github.io/clml.data/sample/bc.train.csv")
                                  :type :csv
                                  :csv-type-spec
                                  (append (loop for i below 9 collect 'double-float) '(string))))

When I attempt to train the random forest with make-regression-forest:

 (defparameter *regression-forest*)
 (setf *regression-forest* (make-regression-forest *bc-train* "Cell.size"))

The following happens:

I would like to use SLIME to experiment with this package and would be happy to try to use a different multi-threading approach if needed.

I have posted the same question on stack overflow since this seems slime specific. Thanks again for the great work.

mmaul commented 9 years ago

I was able to replicate the issue. Resolved by changing package to #:future package from #:fork-future.