Open rachel3834 opened 1 year ago
The Fit Target button on MOP's TargetDetail page calls the management command fit_event_PSPL via Django's call_command function.
This operation fails to complete the fitting process, and fails reporting an error relating to Python's multiprocessing module:
mop-dev-5f7cb5c897-hfxqb mop Fitting single event: OGLE-2023-BLG-1060 mop-dev-5f7cb5c897-hfxqb mop Fitting event: OGLE-2023-BLG-1060 mop-dev-5f7cb5c897-hfxqb mop FIT: Found 3 datasets and a total of 153 datapoints to model for event OGLE-2023-BLG-1060 mop-dev-5f7cb5c897-hfxqb mop FITTOOLS: established event mop-dev-5f7cb5c897-hfxqb mop FITTOOLS: appended 3 telescopes mop-dev-5f7cb5c897-hfxqb mop check_event : Everything looks fine... mop-dev-5f7cb5c897-hfxqb mop [2023-09-14 00:35:09 +0000] [23] [INFO] Parent changed, shutting down: <Worker 7> mop-dev-5f7cb5c897-hfxqb mop [2023-09-14 00:35:09 +0000] [23] [INFO] Worker exiting (pid: 7) mop-dev-5f7cb5c897-hfxqb mop Internal Server Error: /targets/1506/ mop-dev-5f7cb5c897-hfxqb mop Traceback (most recent call last): mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner mop-dev-5f7cb5c897-hfxqb mop response = get_response(request) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py", line 199, in _get_response mop-dev-5f7cb5c897-hfxqb mop response = self.process_exception_by_middleware(e, request) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py", line 362, in process_exception_by_middleware mop-dev-5f7cb5c897-hfxqb mop response = middleware_method(request, exception) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/tom_common/middleware.py", line 29, in process_exception mop-dev-5f7cb5c897-hfxqb mop raise exception mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response mop-dev-5f7cb5c897-hfxqb mop response = wrapped_callback(request, *callback_args, callback_kwargs) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/views/generic/base.py", line 104, in view mop-dev-5f7cb5c897-hfxqb mop return self.dispatch(request, *args, *kwargs) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/guardian/mixins.py", line 213, in dispatch mop-dev-5f7cb5c897-hfxqb mop return super().dispatch(request, args, kwargs) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/views/generic/base.py", line 143, in dispatch mop-dev-5f7cb5c897-hfxqb mop return handler(request, *args, kwargs) mop-dev-5f7cb5c897-hfxqb mop File "/mop/mop/views.py", line 17, in get mop-dev-5f7cb5c897-hfxqb mop call_command('fit_event_PSPL', target_name, cores=0, stdout=out) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/core/management/init.py", line 194, in call_command mop-dev-5f7cb5c897-hfxqb mop return command.execute(*args, *defaults) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 458, in execute mop-dev-5f7cb5c897-hfxqb mop output = self.handle(args, options) mop-dev-5f7cb5c897-hfxqb mop File "/mop/mop/management/commands/fit_event_PSPL.py", line 37, in handle mop-dev-5f7cb5c897-hfxqb mop result = run_fit(target, cores=options['cores']) mop-dev-5f7cb5c897-hfxqb mop File "/mop/mop/management/commands/fit_need_events_PSPL.py", line 50, in run_fit mop-dev-5f7cb5c897-hfxqb mop (model_params, model_telescope) = fittools.fit_pspl_omega2(target.ra, target.dec, datasets) mop-dev-5f7cb5c897-hfxqb mop File "/mop/mop/toolbox/fittools.py", line 78, in fit_pspl_omega2 mop-dev-5f7cb5c897-hfxqb mop fit_tap = TRF_fit.TRFfit(pspl, loss_function='soft_l1') mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/pyLIMA/fits/LM_fit.py", line 26, in init mop-dev-5f7cb5c897-hfxqb mop super().init(model, telescopes_fluxes_method=telescopes_fluxes_method, mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/pyLIMA/fits/ML_fit.py", line 67, in init mop-dev-5f7cb5c897-hfxqb mop self.trials = Manager().list() # to be recognize by all process during mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/managers.py", line 723, in temp mop-dev-5f7cb5c897-hfxqb mop token, exp = self._create(typeid, *args, kwds) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/managers.py", line 606, in _create mop-dev-5f7cb5c897-hfxqb mop conn = self._Client(self._address, authkey=self._authkey) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/connection.py", line 508, in Client mop-dev-5f7cb5c897-hfxqb mop answer_challenge(c, authkey) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/connection.py", line 752, in answer_challenge mop-dev-5f7cb5c897-hfxqb mop message = connection.recv_bytes(256) # reject large message mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/connection.py", line 216, in recv_bytes mop-dev-5f7cb5c897-hfxqb mop buf = self._recv_bytes(maxlength) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/connection.py", line 414, in _recv_bytes mop-dev-5f7cb5c897-hfxqb mop buf = self._recv(4) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/connection.py", line 379, in _recv mop-dev-5f7cb5c897-hfxqb mop chunk = read(handle, remaining) mop-dev-5f7cb5c897-hfxqb mop BlockingIOError: [Errno 11] Resource temporarily unavailable mop-dev-5f7cb5c897-hfxqb mop Internal Server Error: /targets/1506/ mop-dev-5f7cb5c897-hfxqb mop Traceback (most recent call last): mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner mop-dev-5f7cb5c897-hfxqb mop response = get_response(request) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py", line 199, in _get_response mop-dev-5f7cb5c897-hfxqb mop response = self.process_exception_by_middleware(e, request) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py", line 362, in process_exception_by_middleware mop-dev-5f7cb5c897-hfxqb mop response = middleware_method(request, exception) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/tom_common/middleware.py", line 29, in process_exception mop-dev-5f7cb5c897-hfxqb mop raise exception mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response mop-dev-5f7cb5c897-hfxqb mop response = wrapped_callback(request, *callback_args, *callback_kwargs) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/views/generic/base.py", line 104, in view mop-dev-5f7cb5c897-hfxqb mop return self.dispatch(request, args, kwargs) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/guardian/mixins.py", line 213, in dispatch mop-dev-5f7cb5c897-hfxqb mop return super().dispatch(request, *args, kwargs) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/views/generic/base.py", line 143, in dispatch mop-dev-5f7cb5c897-hfxqb mop return handler(request, *args, *kwargs) mop-dev-5f7cb5c897-hfxqb mop File "/mop/mop/views.py", line 17, in get mop-dev-5f7cb5c897-hfxqb mop call_command('fit_event_PSPL', target_name, cores=0, stdout=out) mop-dev-5f7cb5c897-hfxqb nginx 10.100.22.168 - - [14/Sep/2023:00:35:10 +0000] "GET /targets/1506/?fit_event=True HTTP/1.1" 500 174797 "http://mop-dev.lco.gtn/targets/1506/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/117.0" "172.16.4.138" mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/core/management/init.py", line 194, in call_command mop-dev-5f7cb5c897-hfxqb mop return command.execute(args, defaults) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 458, in execute mop-dev-5f7cb5c897-hfxqb mop output = self.handle(*args, *options) mop-dev-5f7cb5c897-hfxqb mop File "/mop/mop/management/commands/fit_event_PSPL.py", line 37, in handle mop-dev-5f7cb5c897-hfxqb mop result = run_fit(target, cores=options['cores']) mop-dev-5f7cb5c897-hfxqb mop File "/mop/mop/management/commands/fit_need_events_PSPL.py", line 50, in run_fit mop-dev-5f7cb5c897-hfxqb mop (model_params, model_telescope) = fittools.fit_pspl_omega2(target.ra, target.dec, datasets) mop-dev-5f7cb5c897-hfxqb mop File "/mop/mop/toolbox/fittools.py", line 78, in fit_pspl_omega2 mop-dev-5f7cb5c897-hfxqb mop fit_tap = TRF_fit.TRFfit(pspl, loss_function='soft_l1') mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/pyLIMA/fits/LM_fit.py", line 26, in init mop-dev-5f7cb5c897-hfxqb mop super().init(model, telescopes_fluxes_method=telescopes_fluxes_method, mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/pyLIMA/fits/ML_fit.py", line 67, in init mop-dev-5f7cb5c897-hfxqb mop self.trials = Manager().list() # to be recognize by all process during mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/managers.py", line 723, in temp mop-dev-5f7cb5c897-hfxqb mop token, exp = self._create(typeid, args, **kwds) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/managers.py", line 606, in _create mop-dev-5f7cb5c897-hfxqb mop conn = self._Client(self._address, authkey=self._authkey) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/connection.py", line 508, in Client mop-dev-5f7cb5c897-hfxqb mop answer_challenge(c, authkey) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/connection.py", line 752, in answer_challenge mop-dev-5f7cb5c897-hfxqb mop message = connection.recv_bytes(256) # reject large message mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/connection.py", line 216, in recv_bytes mop-dev-5f7cb5c897-hfxqb mop buf = self._recv_bytes(maxlength) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/connection.py", line 414, in _recv_bytes mop-dev-5f7cb5c897-hfxqb mop buf = self._recv(4) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/connection.py", line 379, in _recv mop-dev-5f7cb5c897-hfxqb mop chunk = read(handle, remaining) mop-dev-5f7cb5c897-hfxqb mop BlockingIOError: [Errno 11] Resource temporarily unavailable
However, if I call this management command from the commandline in the AWS pod, it works fine:
Fitting single event: OGLE-2023-BLG-1060 Fitting event: OGLE-2023-BLG-1060 FIT: Found 3 datasets and a total of 153 datapoints to model for event OGLE-2023-BLG-1060 FITTOOLS: established event FITTOOLS: appended 3 telescopes check_event : Everything looks fine... FITTOOLS: Set model 1, static PSPL FITTOOLS: model 1 fit boundaries: t0: [2456350.84273, 2460211.2596369935] tE: [1.0, 3000.0] u0: [0.0, 2.0] initial_guess : Initial parameters guess SUCCESS Using guess: [2460199.9534473536, 0.3986034527545734, 42.61485012369046, 4082.1178096757244, -449.86169383181266, 11047.863711119995, 0.0, 8305.000583692688, 0.0] fit : Trust Region Reflective fit SUCCESS best_model: [2460202.5784194306, 2.602090556033264e-12, 43.83730190663164, 3016.210975903218, 655.7479416388787, 340.59459072748865, 1621.2297675020925, 235.1503022483872, 1274.9162771390086] chi2: 457.94918659452014 FITTOOLS: model 1 fitted parameters {'t0': 2460202.57842, 'u0': 0.0, 'tE': 43.8373, 'fsource_Tel_0': 3016.21098, 'fblend_Tel_0': 655.74794, 'fsource_Tel_1': 340.59459, 'fblend_Tel_1': 1621.22977, 'fsource_Tel_2': 235.1503, 'fblend_Tel_2': 1274.91628, 'chi2': 1274.916, 'piEN': 0.0, 'piEE': 0.0, 'red_chi2': 8.854, 'Source_magnitude': 18.701, 'Blend_magnitude': 20.358, 'Baseline_magnitude': 18.488, 'Fit_covariance': array([[ 4.54790534e-01, -2.60934039e+04, -1.09077690e+00, 2.16146087e+02, -2.15047888e+02, 6.19342540e+01, -2.32715276e+02, 4.36391570e+01, -1.74600108e+02], [-2.60934039e+04, 1.51830507e+09, 6.19308579e+04, -1.23280087e+07, 1.22669613e+07, -3.50150418e+06, 1.29997286e+07, -2.45139620e+06, 9.39302155e+06], [-1.09077690e+00, 6.19308579e+04, 4.21858662e+01, -4.74344489e+03, 4.61121399e+03, -4.58785654e+02, 6.10090694e+02, -3.18845222e+02, 4.54838083e+02], [ 2.16146087e+02, -1.23280087e+07, -4.74344489e+03, 5.70070297e+05, -5.57226512e+05, 6.25691574e+04, -1.16208302e+05, 4.36176033e+04, -8.69409611e+04], [-2.15047888e+02, 1.22669613e+07, 4.61121399e+03, -5.57226512e+05, 5.45851557e+05, -6.14038984e+04, 1.15479122e+05, -4.28111539e+04, 8.64063246e+04], [ 6.19342540e+01, -3.50150418e+06, -4.58785654e+02, 6.25691574e+04, -6.14038984e+04, 1.09830851e+04, -3.30226069e+04, 7.73005690e+03, -2.54389063e+04], [-2.32715276e+02, 1.29997286e+07, 6.10090694e+02, -1.16208302e+05, 1.15479122e+05, -3.30226069e+04, 1.27238827e+05, -2.34209569e+04, 9.97327662e+04], [ 4.36391570e+01, -2.45139620e+06, -3.18845222e+02, 4.36176033e+04, -4.28111539e+04, 7.73005690e+03, -2.34209569e+04, 5.47735994e+03, -1.87461090e+04], [-1.74600108e+02, 9.39302155e+06, 4.54838083e+02, -8.69409611e+04, 8.64063246e+04, -2.54389063e+04, 9.97327662e+04, -1.87461090e+04, 9.30132232e+04]]), 'fit_parameters': OrderedDict([('t0', [0, [2456350.84273, 2460211.2596369935]]), ('u0', [1, [0.0, 2.0]]), ('tE', [2, [1.0, 3000.0]]), ('fsource_Tel_0', [3, (0.0, 10009.214583192937)]), ('fblend_Tel_0', [4, (-10009.214583192937, 10009.214583192937)]), ('fsource_Tel_1', [5, (0.0, 11047.863711119995)]), ('fblend_Tel_1', [6, (-11047.863711119995, 11047.863711119995)]), ('fsource_Tel_2', [7, (0.0, 8305.000583692688)]), ('fblend_Tel_2', [8, (-8305.000583692688, 8305.000583692688)])]), 'SW_test': nan, 'AD_test': nan, 'KS_test': nan, 'chi2_dof': nan} FITTOOLS: model 1 evaluated parameters {'t0': 2460202.57842, 'u0': 0.0, 'tE': 43.8373, 'fsource_Tel_0': 3016.21098, 'fblend_Tel_0': 655.74794, 'fsource_Tel_1': 340.59459, 'fblend_Tel_1': 1621.22977, 'fsource_Tel_2': 235.1503, 'fblend_Tel_2': 1274.91628, 'chi2': 1274.916, 'piEN': 0.0, 'piEE': 0.0, 'red_chi2': 8.854, 'Source_magnitude': 18.701, 'Blend_magnitude': 20.358, 'Baseline_magnitude': 18.488, 'Fit_covariance': array([[ 4.54790534e-01, -2.60934039e+04, -1.09077690e+00, 2.16146087e+02, -2.15047888e+02, 6.19342540e+01, -2.32715276e+02, 4.36391570e+01, -1.74600108e+02], [-2.60934039e+04, 1.51830507e+09, 6.19308579e+04, -1.23280087e+07, 1.22669613e+07, -3.50150418e+06, 1.29997286e+07, -2.45139620e+06, 9.39302155e+06], [-1.09077690e+00, 6.19308579e+04, 4.21858662e+01, -4.74344489e+03, 4.61121399e+03, -4.58785654e+02, 6.10090694e+02, -3.18845222e+02, 4.54838083e+02], [ 2.16146087e+02, -1.23280087e+07, -4.74344489e+03, 5.70070297e+05, -5.57226512e+05, 6.25691574e+04, -1.16208302e+05, 4.36176033e+04, -8.69409611e+04], [-2.15047888e+02, 1.22669613e+07, 4.61121399e+03, -5.57226512e+05, 5.45851557e+05, -6.14038984e+04, 1.15479122e+05, -4.28111539e+04, 8.64063246e+04], [ 6.19342540e+01, -3.50150418e+06, -4.58785654e+02, 6.25691574e+04, -6.14038984e+04, 1.09830851e+04, -3.30226069e+04, 7.73005690e+03, -2.54389063e+04], [-2.32715276e+02, 1.29997286e+07, 6.10090694e+02, -1.16208302e+05, 1.15479122e+05, -3.30226069e+04, 1.27238827e+05, -2.34209569e+04, 9.97327662e+04], [ 4.36391570e+01, -2.45139620e+06, -3.18845222e+02, 4.36176033e+04, -4.28111539e+04, 7.73005690e+03, -2.34209569e+04, 5.47735994e+03, -1.87461090e+04], [-1.74600108e+02, 9.39302155e+06, 4.54838083e+02, -8.69409611e+04, 8.64063246e+04, -2.54389063e+04, 9.97327662e+04, -1.87461090e+04, 9.30132232e+04]]), 'fit_parameters': OrderedDict([('t0', [0, [2456350.84273, 2460211.2596369935]]), ('u0', [1, [0.0, 2.0]]), ('tE', [2, [1.0, 3000.0]]), ('fsource_Tel_0', [3, (0.0, 10009.214583192937)]), ('fblend_Tel_0', [4, (-10009.214583192937, 10009.214583192937)]), ('fsource_Tel_1', [5, (0.0, 11047.863711119995)]), ('fblend_Tel_1', [6, (-11047.863711119995, 11047.863711119995)]), ('fsource_Tel_2', [7, (0.0, 8305.000583692688)]), ('fblend_Tel_2', [8, (-8305.000583692688, 8305.000583692688)])]), 'SW_test': nan, 'AD_test': nan, 'KS_test': nan, 'chi2_dof': nan} FITTOOLS: fit no-blend model? True FITTOOLS: Set model 2, static PSPL without blending FITTOOLS: model 2 fit boundaries: t0: [2456350.84273, 2460211.2596369935] tE: [1.0, 3000.0] u0: [0.0, 2.0] initial_guess : Initial parameters guess SUCCESS Using guess: [2460199.9534473536, 0.3986034527545734, 42.61485012369046, 3659.9893057160225, 2725.696300584958, 2778.638590625312] fit : Trust Region Reflective fit SUCCESS best_model: [2460202.895267906, 6.841332276563048e-14, 7.077440751853317, 3762.1926430405133, 2878.4721623252694, 2033.2917747834365] chi2: 815.1043271661866 FITTOOLS: model 2 fitted parameters {'t0': 2460202.57842, 'u0': 0.0, 'tE': 43.8373, 'fsource_Tel_0': 3016.21098, 'fblend_Tel_0': 655.74794, 'fsource_Tel_1': 340.59459, 'fblend_Tel_1': 1621.22977, 'fsource_Tel_2': 235.1503, 'fblend_Tel_2': 1274.91628, 'chi2': 1274.916, 'piEN': 0.0, 'piEE': 0.0, 'red_chi2': 8.854, 'Source_magnitude': 18.701, 'Blend_magnitude': 20.358, 'Baseline_magnitude': 18.488, 'Fit_covariance': array([[ 4.54790534e-01, -2.60934039e+04, -1.09077690e+00, 2.16146087e+02, -2.15047888e+02, 6.19342540e+01, -2.32715276e+02, 4.36391570e+01, -1.74600108e+02], [-2.60934039e+04, 1.51830507e+09, 6.19308579e+04, -1.23280087e+07, 1.22669613e+07, -3.50150418e+06, 1.29997286e+07, -2.45139620e+06, 9.39302155e+06], [-1.09077690e+00, 6.19308579e+04, 4.21858662e+01, -4.74344489e+03, 4.61121399e+03, -4.58785654e+02, 6.10090694e+02, -3.18845222e+02, 4.54838083e+02], [ 2.16146087e+02, -1.23280087e+07, -4.74344489e+03, 5.70070297e+05, -5.57226512e+05, 6.25691574e+04, -1.16208302e+05, 4.36176033e+04, -8.69409611e+04], [-2.15047888e+02, 1.22669613e+07, 4.61121399e+03, -5.57226512e+05, 5.45851557e+05, -6.14038984e+04, 1.15479122e+05, -4.28111539e+04, 8.64063246e+04], [ 6.19342540e+01, -3.50150418e+06, -4.58785654e+02, 6.25691574e+04, -6.14038984e+04, 1.09830851e+04, -3.30226069e+04, 7.73005690e+03, -2.54389063e+04], [-2.32715276e+02, 1.29997286e+07, 6.10090694e+02, -1.16208302e+05, 1.15479122e+05, -3.30226069e+04, 1.27238827e+05, -2.34209569e+04, 9.97327662e+04], [ 4.36391570e+01, -2.45139620e+06, -3.18845222e+02, 4.36176033e+04, -4.28111539e+04, 7.73005690e+03, -2.34209569e+04, 5.47735994e+03, -1.87461090e+04], [-1.74600108e+02, 9.39302155e+06, 4.54838083e+02, -8.69409611e+04, 8.64063246e+04, -2.54389063e+04, 9.97327662e+04, -1.87461090e+04, 9.30132232e+04]]), 'fit_parameters': OrderedDict([('t0', [0, [2456350.84273, 2460211.2596369935]]), ('u0', [1, [0.0, 2.0]]), ('tE', [2, [1.0, 3000.0]]), ('fsource_Tel_0', [3, (0.0, 10009.214583192937)]), ('fblend_Tel_0', [4, (-10009.214583192937, 10009.214583192937)]), ('fsource_Tel_1', [5, (0.0, 11047.863711119995)]), ('fblend_Tel_1', [6, (-11047.863711119995, 11047.863711119995)]), ('fsource_Tel_2', [7, (0.0, 8305.000583692688)]), ('fblend_Tel_2', [8, (-8305.000583692688, 8305.000583692688)])]), 'SW_test': nan, 'AD_test': nan, 'KS_test': nan, 'chi2_dof': nan} FITTOOLS: model 2 evaluated parameters {'t0': 2460202.57842, 'u0': 0.0, 'tE': 43.8373, 'fsource_Tel_0': 3016.21098, 'fblend_Tel_0': 655.74794, 'fsource_Tel_1': 340.59459, 'fblend_Tel_1': 1621.22977, 'fsource_Tel_2': 235.1503, 'fblend_Tel_2': 1274.91628, 'chi2': 1274.916, 'piEN': 0.0, 'piEE': 0.0, 'red_chi2': 8.854, 'Source_magnitude': 18.701, 'Blend_magnitude': 20.358, 'Baseline_magnitude': 18.488, 'Fit_covariance': array([[ 4.54790534e-01, -2.60934039e+04, -1.09077690e+00, 2.16146087e+02, -2.15047888e+02, 6.19342540e+01, -2.32715276e+02, 4.36391570e+01, -1.74600108e+02], [-2.60934039e+04, 1.51830507e+09, 6.19308579e+04, -1.23280087e+07, 1.22669613e+07, -3.50150418e+06, 1.29997286e+07, -2.45139620e+06, 9.39302155e+06], [-1.09077690e+00, 6.19308579e+04, 4.21858662e+01, -4.74344489e+03, 4.61121399e+03, -4.58785654e+02, 6.10090694e+02, -3.18845222e+02, 4.54838083e+02], [ 2.16146087e+02, -1.23280087e+07, -4.74344489e+03, 5.70070297e+05, -5.57226512e+05, 6.25691574e+04, -1.16208302e+05, 4.36176033e+04, -8.69409611e+04], [-2.15047888e+02, 1.22669613e+07, 4.61121399e+03, -5.57226512e+05, 5.45851557e+05, -6.14038984e+04, 1.15479122e+05, -4.28111539e+04, 8.64063246e+04], [ 6.19342540e+01, -3.50150418e+06, -4.58785654e+02, 6.25691574e+04, -6.14038984e+04, 1.09830851e+04, -3.30226069e+04, 7.73005690e+03, -2.54389063e+04], [-2.32715276e+02, 1.29997286e+07, 6.10090694e+02, -1.16208302e+05, 1.15479122e+05, -3.30226069e+04, 1.27238827e+05, -2.34209569e+04, 9.97327662e+04], [ 4.36391570e+01, -2.45139620e+06, -3.18845222e+02, 4.36176033e+04, -4.28111539e+04, 7.73005690e+03, -2.34209569e+04, 5.47735994e+03, -1.87461090e+04], [-1.74600108e+02, 9.39302155e+06, 4.54838083e+02, -8.69409611e+04, 8.64063246e+04, -2.54389063e+04, 9.97327662e+04, -1.87461090e+04, 9.30132232e+04]]), 'fit_parameters': OrderedDict([('t0', [0, [2456350.84273, 2460211.2596369935]]), ('u0', [1, [0.0, 2.0]]), ('tE', [2, [1.0, 3000.0]]), ('fsource_Tel_0', [3, (0.0, 10009.214583192937)]), ('fblend_Tel_0', [4, (-10009.214583192937, 10009.214583192937)]), ('fsource_Tel_1', [5, (0.0, 11047.863711119995)]), ('fblend_Tel_1', [6, (-11047.863711119995, 11047.863711119995)]), ('fsource_Tel_2', [7, (0.0, 8305.000583692688)]), ('fblend_Tel_2', [8, (-8305.000583692688, 8305.000583692688)])]), 'SW_test': nan, 'AD_test': nan, 'KS_test': nan, 'chi2_dof': nan} FITTOOLS: Using model 2 as best-fit model FITTOOLS: generated model lightcurve FIT: completed modeling process for OGLE-2023-BLG-1060 /usr/local/lib/python3.10/site-packages/django/db/models/fields/init.py:1595: RuntimeWarning:
DateTimeField ReducedDatum.timestamp received a naive datetime (2018-06-29 08:15:27.243860) while time zone support is active.
FIT: Searched for existing models <QuerySet [<ReducedDatum: ReducedDatum object (2321208)>]> FIT: Stored model lightcurve for event OGLE-2023-BLG-1060 Fitted parameters for OGLE-2023-BLG-1060: {'Alive': True, 'Last_fit': 2460201.516280174, 't0': 2460202.89527, 'u0': 0.0, 'tE': 7.07744, 'piEN': 0.0, 'piEE': 0.0, 'Source_magnitude': 18.461, 'Blend_magnitude': nan, 'Baseline_magnitude': 18.461, 'Fit_covariance': array([[ 4.72338657e-03, 1.17925089e-03, 3.44260940e-02, -1.05781825e-03, -7.26734588e+00, -5.38086623e+00], [ 1.17925089e-03, 4.52931248e-04, 1.15192688e-02, -3.90522806e-04, -2.74398009e+00, -2.11707696e+00], [ 3.44260940e-02, 1.15192688e-02, 3.05964123e-01, -9.41917698e-03, -6.99882105e+01, -5.36284677e+01], [-1.05781825e-03, -3.90522806e-04, -9.41917698e-03, 1.83896553e+03, 2.15603096e+00, 1.65249992e+00], [-7.26734588e+00, -2.74398010e+00, -6.99882105e+01, 2.15603096e+00, 1.67097545e+04, 1.27342639e+04], [-5.38086623e+00, -2.11707696e+00, -5.36284677e+01, 1.65249992e+00, 1.27342639e+04, 9.99307899e+03]]), 'chi2': 2033.292, 'red_chi2': 13.832, 'KS_test': nan, 'AD_test': nan, 'SW_test': nan}
Note that this behaviour is only seen in MOP deployed in AWS and not in localhost testing.
This is despite the fact that this fitting process uses TRFfit, which does not use the multiprocessor module.
The Fit Target button on MOP's TargetDetail page calls the management command fit_event_PSPL via Django's call_command function.
This operation fails to complete the fitting process, and fails reporting an error relating to Python's multiprocessing module:
mop-dev-5f7cb5c897-hfxqb mop Fitting single event: OGLE-2023-BLG-1060 mop-dev-5f7cb5c897-hfxqb mop Fitting event: OGLE-2023-BLG-1060 mop-dev-5f7cb5c897-hfxqb mop FIT: Found 3 datasets and a total of 153 datapoints to model for event OGLE-2023-BLG-1060 mop-dev-5f7cb5c897-hfxqb mop FITTOOLS: established event mop-dev-5f7cb5c897-hfxqb mop FITTOOLS: appended 3 telescopes mop-dev-5f7cb5c897-hfxqb mop check_event : Everything looks fine... mop-dev-5f7cb5c897-hfxqb mop [2023-09-14 00:35:09 +0000] [23] [INFO] Parent changed, shutting down: <Worker 7> mop-dev-5f7cb5c897-hfxqb mop [2023-09-14 00:35:09 +0000] [23] [INFO] Worker exiting (pid: 7) mop-dev-5f7cb5c897-hfxqb mop Internal Server Error: /targets/1506/ mop-dev-5f7cb5c897-hfxqb mop Traceback (most recent call last): mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner mop-dev-5f7cb5c897-hfxqb mop response = get_response(request) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py", line 199, in _get_response mop-dev-5f7cb5c897-hfxqb mop response = self.process_exception_by_middleware(e, request) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py", line 362, in process_exception_by_middleware mop-dev-5f7cb5c897-hfxqb mop response = middleware_method(request, exception) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/tom_common/middleware.py", line 29, in process_exception mop-dev-5f7cb5c897-hfxqb mop raise exception mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response mop-dev-5f7cb5c897-hfxqb mop response = wrapped_callback(request, *callback_args, callback_kwargs) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/views/generic/base.py", line 104, in view mop-dev-5f7cb5c897-hfxqb mop return self.dispatch(request, *args, *kwargs) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/guardian/mixins.py", line 213, in dispatch mop-dev-5f7cb5c897-hfxqb mop return super().dispatch(request, args, kwargs) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/views/generic/base.py", line 143, in dispatch mop-dev-5f7cb5c897-hfxqb mop return handler(request, *args, kwargs) mop-dev-5f7cb5c897-hfxqb mop File "/mop/mop/views.py", line 17, in get mop-dev-5f7cb5c897-hfxqb mop call_command('fit_event_PSPL', target_name, cores=0, stdout=out) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/core/management/init.py", line 194, in call_command mop-dev-5f7cb5c897-hfxqb mop return command.execute(*args, *defaults) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 458, in execute mop-dev-5f7cb5c897-hfxqb mop output = self.handle(args, options) mop-dev-5f7cb5c897-hfxqb mop File "/mop/mop/management/commands/fit_event_PSPL.py", line 37, in handle mop-dev-5f7cb5c897-hfxqb mop result = run_fit(target, cores=options['cores']) mop-dev-5f7cb5c897-hfxqb mop File "/mop/mop/management/commands/fit_need_events_PSPL.py", line 50, in run_fit mop-dev-5f7cb5c897-hfxqb mop (model_params, model_telescope) = fittools.fit_pspl_omega2(target.ra, target.dec, datasets) mop-dev-5f7cb5c897-hfxqb mop File "/mop/mop/toolbox/fittools.py", line 78, in fit_pspl_omega2 mop-dev-5f7cb5c897-hfxqb mop fit_tap = TRF_fit.TRFfit(pspl, loss_function='soft_l1') mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/pyLIMA/fits/LM_fit.py", line 26, in init mop-dev-5f7cb5c897-hfxqb mop super().init(model, telescopes_fluxes_method=telescopes_fluxes_method, mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/pyLIMA/fits/ML_fit.py", line 67, in init mop-dev-5f7cb5c897-hfxqb mop self.trials = Manager().list() # to be recognize by all process during mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/managers.py", line 723, in temp mop-dev-5f7cb5c897-hfxqb mop token, exp = self._create(typeid, *args, kwds) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/managers.py", line 606, in _create mop-dev-5f7cb5c897-hfxqb mop conn = self._Client(self._address, authkey=self._authkey) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/connection.py", line 508, in Client mop-dev-5f7cb5c897-hfxqb mop answer_challenge(c, authkey) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/connection.py", line 752, in answer_challenge mop-dev-5f7cb5c897-hfxqb mop message = connection.recv_bytes(256) # reject large message mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/connection.py", line 216, in recv_bytes mop-dev-5f7cb5c897-hfxqb mop buf = self._recv_bytes(maxlength) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/connection.py", line 414, in _recv_bytes mop-dev-5f7cb5c897-hfxqb mop buf = self._recv(4) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/connection.py", line 379, in _recv mop-dev-5f7cb5c897-hfxqb mop chunk = read(handle, remaining) mop-dev-5f7cb5c897-hfxqb mop BlockingIOError: [Errno 11] Resource temporarily unavailable mop-dev-5f7cb5c897-hfxqb mop Internal Server Error: /targets/1506/ mop-dev-5f7cb5c897-hfxqb mop Traceback (most recent call last): mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner mop-dev-5f7cb5c897-hfxqb mop response = get_response(request) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py", line 199, in _get_response mop-dev-5f7cb5c897-hfxqb mop response = self.process_exception_by_middleware(e, request) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py", line 362, in process_exception_by_middleware mop-dev-5f7cb5c897-hfxqb mop response = middleware_method(request, exception) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/tom_common/middleware.py", line 29, in process_exception mop-dev-5f7cb5c897-hfxqb mop raise exception mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response mop-dev-5f7cb5c897-hfxqb mop response = wrapped_callback(request, *callback_args, *callback_kwargs) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/views/generic/base.py", line 104, in view mop-dev-5f7cb5c897-hfxqb mop return self.dispatch(request, args, kwargs) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/guardian/mixins.py", line 213, in dispatch mop-dev-5f7cb5c897-hfxqb mop return super().dispatch(request, *args, kwargs) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/views/generic/base.py", line 143, in dispatch mop-dev-5f7cb5c897-hfxqb mop return handler(request, *args, *kwargs) mop-dev-5f7cb5c897-hfxqb mop File "/mop/mop/views.py", line 17, in get mop-dev-5f7cb5c897-hfxqb mop call_command('fit_event_PSPL', target_name, cores=0, stdout=out) mop-dev-5f7cb5c897-hfxqb nginx 10.100.22.168 - - [14/Sep/2023:00:35:10 +0000] "GET /targets/1506/?fit_event=True HTTP/1.1" 500 174797 "http://mop-dev.lco.gtn/targets/1506/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/117.0" "172.16.4.138" mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/core/management/init.py", line 194, in call_command mop-dev-5f7cb5c897-hfxqb mop return command.execute(args, defaults) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 458, in execute mop-dev-5f7cb5c897-hfxqb mop output = self.handle(*args, *options) mop-dev-5f7cb5c897-hfxqb mop File "/mop/mop/management/commands/fit_event_PSPL.py", line 37, in handle mop-dev-5f7cb5c897-hfxqb mop result = run_fit(target, cores=options['cores']) mop-dev-5f7cb5c897-hfxqb mop File "/mop/mop/management/commands/fit_need_events_PSPL.py", line 50, in run_fit mop-dev-5f7cb5c897-hfxqb mop (model_params, model_telescope) = fittools.fit_pspl_omega2(target.ra, target.dec, datasets) mop-dev-5f7cb5c897-hfxqb mop File "/mop/mop/toolbox/fittools.py", line 78, in fit_pspl_omega2 mop-dev-5f7cb5c897-hfxqb mop fit_tap = TRF_fit.TRFfit(pspl, loss_function='soft_l1') mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/pyLIMA/fits/LM_fit.py", line 26, in init mop-dev-5f7cb5c897-hfxqb mop super().init(model, telescopes_fluxes_method=telescopes_fluxes_method, mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/site-packages/pyLIMA/fits/ML_fit.py", line 67, in init mop-dev-5f7cb5c897-hfxqb mop self.trials = Manager().list() # to be recognize by all process during mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/managers.py", line 723, in temp mop-dev-5f7cb5c897-hfxqb mop token, exp = self._create(typeid, args, **kwds) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/managers.py", line 606, in _create mop-dev-5f7cb5c897-hfxqb mop conn = self._Client(self._address, authkey=self._authkey) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/connection.py", line 508, in Client mop-dev-5f7cb5c897-hfxqb mop answer_challenge(c, authkey) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/connection.py", line 752, in answer_challenge mop-dev-5f7cb5c897-hfxqb mop message = connection.recv_bytes(256) # reject large message mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/connection.py", line 216, in recv_bytes mop-dev-5f7cb5c897-hfxqb mop buf = self._recv_bytes(maxlength) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/connection.py", line 414, in _recv_bytes mop-dev-5f7cb5c897-hfxqb mop buf = self._recv(4) mop-dev-5f7cb5c897-hfxqb mop File "/usr/local/lib/python3.10/multiprocessing/connection.py", line 379, in _recv mop-dev-5f7cb5c897-hfxqb mop chunk = read(handle, remaining) mop-dev-5f7cb5c897-hfxqb mop BlockingIOError: [Errno 11] Resource temporarily unavailable
However, if I call this management command from the commandline in the AWS pod, it works fine:
Fitting single event: OGLE-2023-BLG-1060 Fitting event: OGLE-2023-BLG-1060 FIT: Found 3 datasets and a total of 153 datapoints to model for event OGLE-2023-BLG-1060 FITTOOLS: established event FITTOOLS: appended 3 telescopes check_event : Everything looks fine... FITTOOLS: Set model 1, static PSPL FITTOOLS: model 1 fit boundaries: t0: [2456350.84273, 2460211.2596369935] tE: [1.0, 3000.0] u0: [0.0, 2.0] initial_guess : Initial parameters guess SUCCESS Using guess: [2460199.9534473536, 0.3986034527545734, 42.61485012369046, 4082.1178096757244, -449.86169383181266, 11047.863711119995, 0.0, 8305.000583692688, 0.0] fit : Trust Region Reflective fit SUCCESS best_model: [2460202.5784194306, 2.602090556033264e-12, 43.83730190663164, 3016.210975903218, 655.7479416388787, 340.59459072748865, 1621.2297675020925, 235.1503022483872, 1274.9162771390086] chi2: 457.94918659452014 FITTOOLS: model 1 fitted parameters {'t0': 2460202.57842, 'u0': 0.0, 'tE': 43.8373, 'fsource_Tel_0': 3016.21098, 'fblend_Tel_0': 655.74794, 'fsource_Tel_1': 340.59459, 'fblend_Tel_1': 1621.22977, 'fsource_Tel_2': 235.1503, 'fblend_Tel_2': 1274.91628, 'chi2': 1274.916, 'piEN': 0.0, 'piEE': 0.0, 'red_chi2': 8.854, 'Source_magnitude': 18.701, 'Blend_magnitude': 20.358, 'Baseline_magnitude': 18.488, 'Fit_covariance': array([[ 4.54790534e-01, -2.60934039e+04, -1.09077690e+00, 2.16146087e+02, -2.15047888e+02, 6.19342540e+01, -2.32715276e+02, 4.36391570e+01, -1.74600108e+02], [-2.60934039e+04, 1.51830507e+09, 6.19308579e+04, -1.23280087e+07, 1.22669613e+07, -3.50150418e+06, 1.29997286e+07, -2.45139620e+06, 9.39302155e+06], [-1.09077690e+00, 6.19308579e+04, 4.21858662e+01, -4.74344489e+03, 4.61121399e+03, -4.58785654e+02, 6.10090694e+02, -3.18845222e+02, 4.54838083e+02], [ 2.16146087e+02, -1.23280087e+07, -4.74344489e+03, 5.70070297e+05, -5.57226512e+05, 6.25691574e+04, -1.16208302e+05, 4.36176033e+04, -8.69409611e+04], [-2.15047888e+02, 1.22669613e+07, 4.61121399e+03, -5.57226512e+05, 5.45851557e+05, -6.14038984e+04, 1.15479122e+05, -4.28111539e+04, 8.64063246e+04], [ 6.19342540e+01, -3.50150418e+06, -4.58785654e+02, 6.25691574e+04, -6.14038984e+04, 1.09830851e+04, -3.30226069e+04, 7.73005690e+03, -2.54389063e+04], [-2.32715276e+02, 1.29997286e+07, 6.10090694e+02, -1.16208302e+05, 1.15479122e+05, -3.30226069e+04, 1.27238827e+05, -2.34209569e+04, 9.97327662e+04], [ 4.36391570e+01, -2.45139620e+06, -3.18845222e+02, 4.36176033e+04, -4.28111539e+04, 7.73005690e+03, -2.34209569e+04, 5.47735994e+03, -1.87461090e+04], [-1.74600108e+02, 9.39302155e+06, 4.54838083e+02, -8.69409611e+04, 8.64063246e+04, -2.54389063e+04, 9.97327662e+04, -1.87461090e+04, 9.30132232e+04]]), 'fit_parameters': OrderedDict([('t0', [0, [2456350.84273, 2460211.2596369935]]), ('u0', [1, [0.0, 2.0]]), ('tE', [2, [1.0, 3000.0]]), ('fsource_Tel_0', [3, (0.0, 10009.214583192937)]), ('fblend_Tel_0', [4, (-10009.214583192937, 10009.214583192937)]), ('fsource_Tel_1', [5, (0.0, 11047.863711119995)]), ('fblend_Tel_1', [6, (-11047.863711119995, 11047.863711119995)]), ('fsource_Tel_2', [7, (0.0, 8305.000583692688)]), ('fblend_Tel_2', [8, (-8305.000583692688, 8305.000583692688)])]), 'SW_test': nan, 'AD_test': nan, 'KS_test': nan, 'chi2_dof': nan} FITTOOLS: model 1 evaluated parameters {'t0': 2460202.57842, 'u0': 0.0, 'tE': 43.8373, 'fsource_Tel_0': 3016.21098, 'fblend_Tel_0': 655.74794, 'fsource_Tel_1': 340.59459, 'fblend_Tel_1': 1621.22977, 'fsource_Tel_2': 235.1503, 'fblend_Tel_2': 1274.91628, 'chi2': 1274.916, 'piEN': 0.0, 'piEE': 0.0, 'red_chi2': 8.854, 'Source_magnitude': 18.701, 'Blend_magnitude': 20.358, 'Baseline_magnitude': 18.488, 'Fit_covariance': array([[ 4.54790534e-01, -2.60934039e+04, -1.09077690e+00, 2.16146087e+02, -2.15047888e+02, 6.19342540e+01, -2.32715276e+02, 4.36391570e+01, -1.74600108e+02], [-2.60934039e+04, 1.51830507e+09, 6.19308579e+04, -1.23280087e+07, 1.22669613e+07, -3.50150418e+06, 1.29997286e+07, -2.45139620e+06, 9.39302155e+06], [-1.09077690e+00, 6.19308579e+04, 4.21858662e+01, -4.74344489e+03, 4.61121399e+03, -4.58785654e+02, 6.10090694e+02, -3.18845222e+02, 4.54838083e+02], [ 2.16146087e+02, -1.23280087e+07, -4.74344489e+03, 5.70070297e+05, -5.57226512e+05, 6.25691574e+04, -1.16208302e+05, 4.36176033e+04, -8.69409611e+04], [-2.15047888e+02, 1.22669613e+07, 4.61121399e+03, -5.57226512e+05, 5.45851557e+05, -6.14038984e+04, 1.15479122e+05, -4.28111539e+04, 8.64063246e+04], [ 6.19342540e+01, -3.50150418e+06, -4.58785654e+02, 6.25691574e+04, -6.14038984e+04, 1.09830851e+04, -3.30226069e+04, 7.73005690e+03, -2.54389063e+04], [-2.32715276e+02, 1.29997286e+07, 6.10090694e+02, -1.16208302e+05, 1.15479122e+05, -3.30226069e+04, 1.27238827e+05, -2.34209569e+04, 9.97327662e+04], [ 4.36391570e+01, -2.45139620e+06, -3.18845222e+02, 4.36176033e+04, -4.28111539e+04, 7.73005690e+03, -2.34209569e+04, 5.47735994e+03, -1.87461090e+04], [-1.74600108e+02, 9.39302155e+06, 4.54838083e+02, -8.69409611e+04, 8.64063246e+04, -2.54389063e+04, 9.97327662e+04, -1.87461090e+04, 9.30132232e+04]]), 'fit_parameters': OrderedDict([('t0', [0, [2456350.84273, 2460211.2596369935]]), ('u0', [1, [0.0, 2.0]]), ('tE', [2, [1.0, 3000.0]]), ('fsource_Tel_0', [3, (0.0, 10009.214583192937)]), ('fblend_Tel_0', [4, (-10009.214583192937, 10009.214583192937)]), ('fsource_Tel_1', [5, (0.0, 11047.863711119995)]), ('fblend_Tel_1', [6, (-11047.863711119995, 11047.863711119995)]), ('fsource_Tel_2', [7, (0.0, 8305.000583692688)]), ('fblend_Tel_2', [8, (-8305.000583692688, 8305.000583692688)])]), 'SW_test': nan, 'AD_test': nan, 'KS_test': nan, 'chi2_dof': nan} FITTOOLS: fit no-blend model? True FITTOOLS: Set model 2, static PSPL without blending FITTOOLS: model 2 fit boundaries: t0: [2456350.84273, 2460211.2596369935] tE: [1.0, 3000.0] u0: [0.0, 2.0] initial_guess : Initial parameters guess SUCCESS Using guess: [2460199.9534473536, 0.3986034527545734, 42.61485012369046, 3659.9893057160225, 2725.696300584958, 2778.638590625312] fit : Trust Region Reflective fit SUCCESS best_model: [2460202.895267906, 6.841332276563048e-14, 7.077440751853317, 3762.1926430405133, 2878.4721623252694, 2033.2917747834365] chi2: 815.1043271661866 FITTOOLS: model 2 fitted parameters {'t0': 2460202.57842, 'u0': 0.0, 'tE': 43.8373, 'fsource_Tel_0': 3016.21098, 'fblend_Tel_0': 655.74794, 'fsource_Tel_1': 340.59459, 'fblend_Tel_1': 1621.22977, 'fsource_Tel_2': 235.1503, 'fblend_Tel_2': 1274.91628, 'chi2': 1274.916, 'piEN': 0.0, 'piEE': 0.0, 'red_chi2': 8.854, 'Source_magnitude': 18.701, 'Blend_magnitude': 20.358, 'Baseline_magnitude': 18.488, 'Fit_covariance': array([[ 4.54790534e-01, -2.60934039e+04, -1.09077690e+00, 2.16146087e+02, -2.15047888e+02, 6.19342540e+01, -2.32715276e+02, 4.36391570e+01, -1.74600108e+02], [-2.60934039e+04, 1.51830507e+09, 6.19308579e+04, -1.23280087e+07, 1.22669613e+07, -3.50150418e+06, 1.29997286e+07, -2.45139620e+06, 9.39302155e+06], [-1.09077690e+00, 6.19308579e+04, 4.21858662e+01, -4.74344489e+03, 4.61121399e+03, -4.58785654e+02, 6.10090694e+02, -3.18845222e+02, 4.54838083e+02], [ 2.16146087e+02, -1.23280087e+07, -4.74344489e+03, 5.70070297e+05, -5.57226512e+05, 6.25691574e+04, -1.16208302e+05, 4.36176033e+04, -8.69409611e+04], [-2.15047888e+02, 1.22669613e+07, 4.61121399e+03, -5.57226512e+05, 5.45851557e+05, -6.14038984e+04, 1.15479122e+05, -4.28111539e+04, 8.64063246e+04], [ 6.19342540e+01, -3.50150418e+06, -4.58785654e+02, 6.25691574e+04, -6.14038984e+04, 1.09830851e+04, -3.30226069e+04, 7.73005690e+03, -2.54389063e+04], [-2.32715276e+02, 1.29997286e+07, 6.10090694e+02, -1.16208302e+05, 1.15479122e+05, -3.30226069e+04, 1.27238827e+05, -2.34209569e+04, 9.97327662e+04], [ 4.36391570e+01, -2.45139620e+06, -3.18845222e+02, 4.36176033e+04, -4.28111539e+04, 7.73005690e+03, -2.34209569e+04, 5.47735994e+03, -1.87461090e+04], [-1.74600108e+02, 9.39302155e+06, 4.54838083e+02, -8.69409611e+04, 8.64063246e+04, -2.54389063e+04, 9.97327662e+04, -1.87461090e+04, 9.30132232e+04]]), 'fit_parameters': OrderedDict([('t0', [0, [2456350.84273, 2460211.2596369935]]), ('u0', [1, [0.0, 2.0]]), ('tE', [2, [1.0, 3000.0]]), ('fsource_Tel_0', [3, (0.0, 10009.214583192937)]), ('fblend_Tel_0', [4, (-10009.214583192937, 10009.214583192937)]), ('fsource_Tel_1', [5, (0.0, 11047.863711119995)]), ('fblend_Tel_1', [6, (-11047.863711119995, 11047.863711119995)]), ('fsource_Tel_2', [7, (0.0, 8305.000583692688)]), ('fblend_Tel_2', [8, (-8305.000583692688, 8305.000583692688)])]), 'SW_test': nan, 'AD_test': nan, 'KS_test': nan, 'chi2_dof': nan} FITTOOLS: model 2 evaluated parameters {'t0': 2460202.57842, 'u0': 0.0, 'tE': 43.8373, 'fsource_Tel_0': 3016.21098, 'fblend_Tel_0': 655.74794, 'fsource_Tel_1': 340.59459, 'fblend_Tel_1': 1621.22977, 'fsource_Tel_2': 235.1503, 'fblend_Tel_2': 1274.91628, 'chi2': 1274.916, 'piEN': 0.0, 'piEE': 0.0, 'red_chi2': 8.854, 'Source_magnitude': 18.701, 'Blend_magnitude': 20.358, 'Baseline_magnitude': 18.488, 'Fit_covariance': array([[ 4.54790534e-01, -2.60934039e+04, -1.09077690e+00, 2.16146087e+02, -2.15047888e+02, 6.19342540e+01, -2.32715276e+02, 4.36391570e+01, -1.74600108e+02], [-2.60934039e+04, 1.51830507e+09, 6.19308579e+04, -1.23280087e+07, 1.22669613e+07, -3.50150418e+06, 1.29997286e+07, -2.45139620e+06, 9.39302155e+06], [-1.09077690e+00, 6.19308579e+04, 4.21858662e+01, -4.74344489e+03, 4.61121399e+03, -4.58785654e+02, 6.10090694e+02, -3.18845222e+02, 4.54838083e+02], [ 2.16146087e+02, -1.23280087e+07, -4.74344489e+03, 5.70070297e+05, -5.57226512e+05, 6.25691574e+04, -1.16208302e+05, 4.36176033e+04, -8.69409611e+04], [-2.15047888e+02, 1.22669613e+07, 4.61121399e+03, -5.57226512e+05, 5.45851557e+05, -6.14038984e+04, 1.15479122e+05, -4.28111539e+04, 8.64063246e+04], [ 6.19342540e+01, -3.50150418e+06, -4.58785654e+02, 6.25691574e+04, -6.14038984e+04, 1.09830851e+04, -3.30226069e+04, 7.73005690e+03, -2.54389063e+04], [-2.32715276e+02, 1.29997286e+07, 6.10090694e+02, -1.16208302e+05, 1.15479122e+05, -3.30226069e+04, 1.27238827e+05, -2.34209569e+04, 9.97327662e+04], [ 4.36391570e+01, -2.45139620e+06, -3.18845222e+02, 4.36176033e+04, -4.28111539e+04, 7.73005690e+03, -2.34209569e+04, 5.47735994e+03, -1.87461090e+04], [-1.74600108e+02, 9.39302155e+06, 4.54838083e+02, -8.69409611e+04, 8.64063246e+04, -2.54389063e+04, 9.97327662e+04, -1.87461090e+04, 9.30132232e+04]]), 'fit_parameters': OrderedDict([('t0', [0, [2456350.84273, 2460211.2596369935]]), ('u0', [1, [0.0, 2.0]]), ('tE', [2, [1.0, 3000.0]]), ('fsource_Tel_0', [3, (0.0, 10009.214583192937)]), ('fblend_Tel_0', [4, (-10009.214583192937, 10009.214583192937)]), ('fsource_Tel_1', [5, (0.0, 11047.863711119995)]), ('fblend_Tel_1', [6, (-11047.863711119995, 11047.863711119995)]), ('fsource_Tel_2', [7, (0.0, 8305.000583692688)]), ('fblend_Tel_2', [8, (-8305.000583692688, 8305.000583692688)])]), 'SW_test': nan, 'AD_test': nan, 'KS_test': nan, 'chi2_dof': nan} FITTOOLS: Using model 2 as best-fit model FITTOOLS: generated model lightcurve FIT: completed modeling process for OGLE-2023-BLG-1060 /usr/local/lib/python3.10/site-packages/django/db/models/fields/init.py:1595: RuntimeWarning:
DateTimeField ReducedDatum.timestamp received a naive datetime (2018-06-29 08:15:27.243860) while time zone support is active.
FIT: Searched for existing models <QuerySet [<ReducedDatum: ReducedDatum object (2321208)>]> FIT: Stored model lightcurve for event OGLE-2023-BLG-1060 Fitted parameters for OGLE-2023-BLG-1060: {'Alive': True, 'Last_fit': 2460201.516280174, 't0': 2460202.89527, 'u0': 0.0, 'tE': 7.07744, 'piEN': 0.0, 'piEE': 0.0, 'Source_magnitude': 18.461, 'Blend_magnitude': nan, 'Baseline_magnitude': 18.461, 'Fit_covariance': array([[ 4.72338657e-03, 1.17925089e-03, 3.44260940e-02, -1.05781825e-03, -7.26734588e+00, -5.38086623e+00], [ 1.17925089e-03, 4.52931248e-04, 1.15192688e-02, -3.90522806e-04, -2.74398009e+00, -2.11707696e+00], [ 3.44260940e-02, 1.15192688e-02, 3.05964123e-01, -9.41917698e-03, -6.99882105e+01, -5.36284677e+01], [-1.05781825e-03, -3.90522806e-04, -9.41917698e-03, 1.83896553e+03, 2.15603096e+00, 1.65249992e+00], [-7.26734588e+00, -2.74398010e+00, -6.99882105e+01, 2.15603096e+00, 1.67097545e+04, 1.27342639e+04], [-5.38086623e+00, -2.11707696e+00, -5.36284677e+01, 1.65249992e+00, 1.27342639e+04, 9.99307899e+03]]), 'chi2': 2033.292, 'red_chi2': 13.832, 'KS_test': nan, 'AD_test': nan, 'SW_test': nan}
Note that this behaviour is only seen in MOP deployed in AWS and not in localhost testing.