guofei9987 / guofei9987/scikit-opt
Google colab GPU环境下导包报错
- Dominant language
- Python
- Stars
- 6.7k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
RuntimeError Traceback (most recent call last)
in ()
----> 1 from sko.PSO import PSO
2 from sko.GA import GA
4 frames
/usr/local/lib/python3.7/dist-packages/sko/__init__.py in ()
1 __version__ = '0.6.5'
2
----> 3 from . import DE, GA, PSO, SA, ACA, AFSA, IA, tools
4
5
/usr/local/lib/python3.7/dist-packages/sko/DE.py in ()
9 from abc import ABCMeta, abstractmethod
10 from .operators import crossover, mutation, ranking, selection
---> 11 from .GA import GeneticAlgorithmBase, GA
12
13
/usr/local/lib/python3.7/dist-packages/sko/GA.py in ()
7 import numpy as np
8 from .base import SkoBase
----> 9 from sko.tools import func_transformer
10 from abc import ABCMeta, abstractmethod
11 from .operators import crossover, mutation, ranking, selection
/usr/local/lib/python3.7/dist-packages/sko/tools.py in ()
7
8 if sys.platform != 'win32':
----> 9 multiprocessing.set_start_method('fork')
10
11
/usr/lib/python3.7/multiprocessing/context.py in set_start_method(self, method, force)
240 def set_start_method(self, method, force=False):
241 if self._actual_context is not None and not force:
--> 242 raise RuntimeError('context has already been set')
243 if method is None and force:
244 self._actual_context = None
RuntimeError: context has already been set
Contributor guide
Assessment
This issue has not been assessed yet.