singularity-energy/open-grid-emissions

gridemissions seems to be breaking

Closed this issue · 0 comments

After updating the repository and environment as part of #258, it seems that the cvxpy solver in gridemissions is no longer working. The error message states that it is unable to find the "OSQP" solver, although this is not explicitly stated as a solver in the code.

I'm going to try and see if I can fix this, but also wanted to mention @gailin-p in case you have any thoughts.

2022-12-10 16:23:11,016 - clean - INFO - Running BaDataCvxCleaner for 13223 rows
(CVXPY) Dec 10 04:23:26 PM: Encountered unexpected exception importing solver OSQP:
ImportError('DLL load failed while importing qdldl: The specified module could not be found.')
(CVXPY) Dec 10 04:23:26 PM: Encountered unexpected exception importing solver OSQP:
ImportError('DLL load failed while importing qdldl: The specified module could not be found.')
(CVXPY) Dec 10 04:23:26 PM: Encountered unexpected exception importing solver OSQP:
ImportError('DLL load failed while importing qdldl: The specified module could not be found.')
(CVXPY) Dec 10 04:23:26 PM: Encountered unexpected exception importing solver OSQP:
ImportError('DLL load failed while importing qdldl: The specified module could not be found.')
A:\miniconda3\envs\oge_update\lib\site-packages\cvxpy\problems\problem.py:1337: UserWarning: Solution may be inaccurate. Try another solver, adjusting the solver settings, or solve with verbose=True for more information.
  warnings.warn(
A:\miniconda3\envs\oge_update\lib\site-packages\cvxpy\problems\problem.py:1337: UserWarning: Solution may be inaccurate. Try another solver, adjusting the solver settings, or solve with verbose=True for more information.
  warnings.warn(
A:\miniconda3\envs\oge_update\lib\site-packages\cvxpy\problems\problem.py:1337: UserWarning: Solution may be inaccurate. Try another solver, adjusting the solver settings, or solve with verbose=True for more information.
  warnings.warn(
A:\miniconda3\envs\oge_update\lib\site-packages\cvxpy\problems\problem.py:1337: UserWarning: Solution may be inaccurate. Try another solver, adjusting the solver settings, or solve with verbose=True for more information.
  warnings.warn(
A:\miniconda3\envs\oge_update\lib\site-packages\cvxpy\problems\problem.py:1337: UserWarning: Solution may be inaccurate. Try another solver, adjusting the solver settings, or solve with verbose=True for more information.
  warnings.warn(
A:\miniconda3\envs\oge_update\lib\site-packages\cvxpy\problems\problem.py:1337: UserWarning: Solution may be inaccurate. Try another solver, adjusting the solver settings, or solve with verbose=True for more information.
  warnings.warn(
A:\miniconda3\envs\oge_update\lib\site-packages\cvxpy\problems\problem.py:1337: UserWarning: Solution may be inaccurate. Try another solver, adjusting the solver settings, or solve with verbose=True for more information.
  warnings.warn(
A:\miniconda3\envs\oge_update\lib\site-packages\cvxpy\problems\problem.py:1337: UserWarning: Solution may be inaccurate. Try another solver, adjusting the solver settings, or solve with verbose=True for more information.
  warnings.warn(
A:\miniconda3\envs\oge_update\lib\site-packages\cvxpy\problems\problem.py:1337: UserWarning: Solution may be inaccurate. Try another solver, adjusting the solver settings, or solve with verbose=True for more information.
  warnings.warn(
A:\miniconda3\envs\oge_update\lib\site-packages\cvxpy\problems\problem.py:1337: UserWarning: Solution may be inaccurate. Try another solver, adjusting the solver settings, or solve with verbose=True for more information.
  warnings.warn(
A:\miniconda3\envs\oge_update\lib\site-packages\cvxpy\problems\problem.py:1337: UserWarning: Solution may be inaccurate. Try another solver, adjusting the solver settings, or solve with verbose=True for more information.
  warnings.warn(
A:\miniconda3\envs\oge_update\lib\site-packages\cvxpy\problems\problem.py:1337: UserWarning: Solution may be inaccurate. Try another solver, adjusting the solver settings, or solve with verbose=True for more information.
  warnings.warn(
A:\miniconda3\envs\oge_update\lib\site-packages\cvxpy\problems\problem.py:1337: UserWarning: Solution may be inaccurate. Try another solver, adjusting the solver settings, or solve with verbose=True for more information.
  warnings.warn(
A:\miniconda3\envs\oge_update\lib\site-packages\cvxpy\problems\problem.py:1337: UserWarning: Solution may be inaccurate. Try another solver, adjusting the solver settings, or solve with verbose=True for more information.
  warnings.warn(
A:\miniconda3\envs\oge_update\lib\site-packages\cvxpy\problems\problem.py:1337: UserWarning: Solution may be inaccurate. Try another solver, adjusting the solver settings, or solve with verbose=True for more information.
  warnings.warn(
A:\miniconda3\envs\oge_update\lib\site-packages\cvxpy\problems\problem.py:1337: UserWarning: Solution may be inaccurate. Try another solver, adjusting the solver settings, or solve with verbose=True for more information.
  warnings.warn(
A:\miniconda3\envs\oge_update\lib\site-packages\cvxpy\problems\problem.py:1337: UserWarning: Solution may be inaccurate. Try another solver, adjusting the solver settings, or solve with verbose=True for more information.
  warnings.warn(
Traceback (most recent call last):
  File "a:\GitHub\open-grid-emissions\src\data_pipeline.py", line 500, in <module>
    main()
  File "a:\GitHub\open-grid-emissions\src\data_pipeline.py", line 325, in main
    eia930.clean_930(year, small=args.small, path_prefix=path_prefix)
  File "a:\GitHub\open-grid-emissions\src\eia930.py", line 152, in clean_930
    print("    Running physics-based data cleaning")
  File "A:\miniconda3\envs\oge_update\lib\site-packages\gridemissions\workflows.py", line 97, in make_dataset
    cleaner.process(debug=False)
  File "A:\miniconda3\envs\oge_update\lib\site-packages\gridemissions\clean.py", line 945, in process
    results = dask.compute(*results, scheduler="processes")
  File "A:\miniconda3\envs\oge_update\lib\site-packages\dask\base.py", line 600, in compute
    results = schedule(dsk, keys, **kwargs)
  File "A:\miniconda3\envs\oge_update\lib\site-packages\dask\multiprocessing.py", line 233, in get
    result = get_async(
  File "A:\miniconda3\envs\oge_update\lib\site-packages\dask\local.py", line 511, in get_async
    raise_exception(exc, tb)
  File "A:\miniconda3\envs\oge_update\lib\site-packages\dask\multiprocessing.py", line 111, in reraise
    raise exc
dask.multiprocessing.SolverError: Solver 'ECOS' failed. Try another solver, or solve with verbose=True for more information.

Traceback
---------
  File "A:\miniconda3\envs\oge_update\lib\site-packages\dask\local.py", line 224, in execute_task
    result = _execute_task(task, data)
  File "A:\miniconda3\envs\oge_update\lib\site-packages\dask\core.py", line 119, in _execute_task
    return func(*(_execute_task(a, cache) for a in args))
  File "A:\miniconda3\envs\oge_update\lib\site-packages\dask\utils.py", line 71, in apply
    return func(*args, **kwargs)
  File "A:\miniconda3\envs\oge_update\lib\site-packages\gridemissions\clean.py", line 849, in cvx_solve
    prob.solve()
  File "A:\miniconda3\envs\oge_update\lib\site-packages\cvxpy\problems\problem.py", line 481, in solve
    return solve_func(self, *args, **kwargs)
  File "A:\miniconda3\envs\oge_update\lib\site-packages\cvxpy\problems\problem.py", line 1020, in _solve
    self.unpack_results(solution, solving_chain, inverse_data)
  File "A:\miniconda3\envs\oge_update\lib\site-packages\cvxpy\problems\problem.py", line 1345, in unpack_results
    raise error.SolverError(