Open nealmcb opened 3 years ago
Note also that I ran the tests as described at https://github.com/QuantEcon/MatchingMarkets.py/tree/master/tests
and they all worked up to Plotting Tests
, where I got the same error I noted above.
...
Non-Stochastic brute search
Optimization terminated successfully.
Current function value: -1036.000000
Iterations: 49
Function evaluations: 133
Results: [1.02182617]
Plotting Tests
---PLEASE VERIFY THAT GRAPHS ARE RENDERED ON YOUR SCREEN---
+++++++
Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/srv/s/games/MatchingMarkets.py/matchingmarkets/tests.py", line 154, in FullTest
market.update(discount=rng.random_sample,
File "/srv/s/games/MatchingMarkets.py/matchingmarkets/market.py", line 393, in update
nx.draw_networkx_edges(self.Graph, self.graph_pos,
TypeError: draw_networkx_edges() got an unexpected keyword argument 'labels'
My PR #8 seems to resolve the API issue.
Now I'm seeing this PULP_CBC_CMD
test failure:
...
Plotting Tests complete
============================
Pulp Test
Testing zero subtraction
Testing inconsistant lp solution
Test failed: var x == 0.0 != 4
Tests failed for solver <matchingmarkets.algorithms.pulp.solvers.PULP_CBC_CMD object at 0x7efc65d16f40>
* Solver <class 'matchingmarkets.algorithms.pulp.solvers.PULP_CBC_CMD'> failed.
Note also that several messages that seem like warnings, simply because I didn't install all the solvers, also come out, e.g.:
Solver <class 'matchingmarkets.algorithms.pulp.solvers.CPLEX_DLL'> unavailable
Hi,
Sorry about taking so much time to respond. I haven't worked on this project in a while.
I added a setup.py
you should be able to run normally. If it sees more use, I can add it to pip without too much trouble.
Try it and running python -m unittest discover test
to run the unit test suite and it should work. If it doesn't I'll investigate, thanks.
Excellent - thank you!
The updates fixed the error I encountered in testing, and all the tests now pass.
I note that I got what seemed like a more complete test by running FullTest()
, which may be worth mentioning some more in the documentation. The FullTest did surface a warning or two, which may or may not be worth some attention.
[run FullTest manually]
...
Non-Stochastic brute search
Warning: Maximum number of function evaluations has been exceeded.
Warning: Either final optimization did not succeed or `finish` does not return `statuscode` as its last argument.
Results: [6.76774276]
...
Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created.
/srv/s/games/MatchingMarkets.py/matchingmarkets/market.py:332: RuntimeWarning: divide by zero encountered in double_scalars
k=(1/(0.9*np.sqrt(len(
iteration done
(That divide by zero line RuntimeWarning was copied in from a run before my full install, so it may be spurious.)
Thanks again!
Yeah that warning is because it would be too long to set up a brute force search that converges in the test suite
Some more hints in the README on how to pull in the dependencies and run this would be helpful.
So far this worked for me to avoid import errors:
Then, since I don't see a
pyproject.toml
orsetup.py
, I just tried to run python from the root directory of the project, as cloned via git.But I'm guessing that I'm getting different versions than you are, since I get these errors:
It looks like I have networkx version 2.5.