Refefer / fastxml

FastXML / PFastXML / PFastreXML - Implementation of Extreme Multi-label Classification
Other
149 stars 47 forks source link

Issue 34 #43

Open supercoder-dev opened 2 months ago

supercoder-dev commented 2 months ago

To solve the multiprocessing issue, we need to wrap the call to self._build_roots(X, y, weights) inside an if __name__ == '__main__': block. This ensures that the multiprocessing module works correctly when n_jobs is greater than one. To solve the problem, we need to modify the fork_call function to use multiprocessing.get_context('fork') for creating the process. Additionally, we need to ensure that the process creation is wrapped in a if __name__ == '__main__': block to avoid the RuntimeError.

Refefer commented 2 months ago

I'll try it out today; on first blush the changes seem reasonable.

It's also clearly time to drop python2 support.