usuaero / optix Goto Github PK
View Code? Open in Web Editor NEWPython Gradient-Based Optimization Tool
License: MIT License
Python Gradient-Based Optimization Tool
License: MIT License
I ve had a problem running optix in Windows 11 which occurs either inside or outside of Pycharm IDE. It ssems to be related to multiprocessing.
Nothing is said in the Readme file about the running environment, I ve assumed it runs correctly in any Environment (Windows or Linux). I may have an installation problem.
import optix as opt
def objective_function(x):
return (x[0]-5) ** 2+4*(x[1]-2) ** 2
if name == 'main':
# Initial guess
xo =[-2.0, -2.0]
optimum = opt.minimize(objective_function, xo, file_tag='_test', n_search = 8, max_processors = 1, line_search = "quadratic", termination_tol = 1e-6, verbose = True)
Running trace as follows:
C:\Documentos\Artificial Inteligence\Optimization\Optix-master\Optix-master>python myptix.py
Traceback (most recent call last):
File "", line 1, in
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1264.0_x64__qbz5n2kfra8p0\Lib\multiprocessing\spawn.py", line 120, in spawn_main
exitcode = _main(fd, parent_sentinel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1264.0_x64__qbz5n2kfra8p0\Lib\multiprocessing\spawn.py", line 133, in _main
return self._bootstrap(parent_sentinel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: BaseProcess._bootstrap() takes 1 positional argument but 2 were given
Traceback (most recent call last):
File "", line 1, in
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1264.0_x64__qbz5n2kfra8p0\Lib\multiprocessing\spawn.py", line 120, in spawn_main
exitcode = _main(fd, parent_sentinel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1264.0_x64__qbz5n2kfra8p0\Lib\multiprocessing\spawn.py", line 133, in _main
return self._bootstrap(parent_sentinel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: BaseProcess._bootstrap() takes 1 positional argument but 2 were given
Traceback (most recent call last):
File "C:\Users\mvgfa\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\multiprocessing_on_dill\connection.py", line 312, in _recv_bytes
nread, err = ov.GetOverlappedResult(True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
BrokenPipeError: [WinError 109] O pipe foi finalizado
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Documentos\Artificial Inteligence\Optimization\Optix-master\Optix-master\myptix.py", line 12, in
optimum = opt.minimize(objective_function, xo, file_tag='_test', n_search = 8, max_processors = 1, line_search = "quadratic", termination_tol = 1e-6, verbose = True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Documentos\Artificial Inteligence\Optimization\Optix-master\Optix-master\optix\optix.py", line 212, in minimize
manager = mp.Manager()
^^^^^^^^^^^^
File "C:\Users\mvgfa\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\multiprocessing_on_dill\context.py", line 55, in Manager
m.start()
File "C:\Users\mvgfa\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\multiprocessing_on_dill\managers.py", line 483, in start
self._address = reader.recv()
^^^^^^^^^^^^^
File "C:\Users\mvgfa\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\multiprocessing_on_dill\connection.py", line 250, in recv buf = self._recv_bytes()
^^^^^^^^^^^^^^^^^^
File "C:\Users\mvgfa\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\multiprocessing_on_dill\connection.py", line 321, in _recv_bytes
raise EOFError
EOFError
Thanks for making this software available to test!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.