-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added RIOS #444
added RIOS #444
Conversation
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
@@ -0,0 +1,5 @@ | |||
#!/bin/bash | |||
|
|||
python setup.py install --prefix=$PREFIX |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the prefix needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If not, I think we can remove both the build.sh and the bld.bat and replace with a build/script
section.
This build won't succeed until the builds from conda-forge/gdal-feedstock#42 appear. Is this something that needs to be done manually? I had to add this same hack for testing: conda-forge/gdal-feedstock#35. Do we agree this needs to be fixed in Conda? |
These tests should pass now that conda-forge/gdal-feedstock#45 has merged. What is the best way to restart the checks? |
@gillins I re-started the CIs. |
Thanks! Any ideas why Travis is picking up the older GDAL (build 3) on OSX? |
It is actually picking up GDAL 2.0.0 rather than 2.0.2. This sometimes happens to me also. Very strange... |
I see Here is what is installed at test time:
Since you depend only on |
…g testing for some unknown reason
@gillins don't squash this PR because I want to use it as an example of the problem. But You can rebase against master to fix the AppVeyor failure. @pelson and @msarahan - python
- numpy
- gdal Even though they are the same the It is important to note that this problem did not happen on Linux. (Maybe because we are still using conda-buil 1.18.2 there.) Any ideas how we can fix that without pinning |
Just FYI, rebasing shouldn't be necessary as long as we restart the CI. It will always use the latest for |
@gillins pinning to the exact version did the trick, but that is not desirable. We must find what is wrong in conda-build and fix it. |
Yes I can see there is going to be a problem when we upgrade to GDAL 2.1.0 (to be released soon) - we are going to have to re-pin to this instead. |
We could just automate pinning throughout our stack. I was briefly chatting with @ocefpaf earlier about this. Not sure how seriously we want to follow this and how it would be automated, but after handling some dependency issues recently it might just make our lives easier. |
Indeed we must do that, but in this particular case here just getting the latest version should suffice, but that failed with latest |
Hmm...hard to say. Based on the test dependencies installed, it seems like it tries to get the latest version of everything, but must pick between |
I though about that, but since |
@mcg1969, could you please help understand how tiebreakers are resolved in the solver? We are a little unclear. In particular, we are thinking about the case where you have 2 dependencies, but you can have only 1 with the latest version and the other 1 must have an older version. How does the solver pick which dependency has the latest version. |
A true tie in conda is broken in an undefined/undetermined manner. It's not necessarily deterministic from run-to-run, either, because of natural sources of randomness in the ordering of the SAT constraints, such as Python's string hashing. But in my experience true ties are quite rare. Conda's approach is to solve an entire sequence of optimization problems, ratcheting down on the ambiguity. Ignoring features and removals for the moment, the optimization passes minimize the following metrics, in order. Once a metric has been minimized, it is locked in, and conda moves on to the next.
Strictly speaking I'd prefer to do just 2, 4, 6, and 7, but #1 in particular proved necessary in practice, because scenarios with very large version downgrade requirements would slow the solver intolerably. (I suppose I could get away with 1, 2, 4, 6, 7, but honestly nobody would notice the performance difference, I don't think, and keeping them simplifies the code, because each peak/sum pair of problems is solved by the same routine.) Minimizing version first, then build, makes a certain amount of practical sense, but it's also a performance win. Note that the optimization takes place on a pruned set of packages. If we eliminated the pruning pass, the solution might change. For instance, say Is it possible for there to be a tie when all is said and done? Possibly---and certainly in a conda-forge context where you're trying to game the version and build numbers. But I just don't see it that often. More importantly, I think that trying to understand tiebreakers is not what anyone concerned with package building should be doing. What you need to do is figure out how to unambiguously specify the exact packages you want. It's quite possible that will require additional capabilities in conda, such as the channel conflict improvements in the pipeline. |
One more general comment. I see someone above talking about the possibility that the solver is broken. Is that possible? Oh, my yes. It might be broken in the sense that we haven't implemented properly what I intended to implement; and it might be broken in the sense that the design is problematic. Anyone who lived through the 3.19-4.05 upgrades knows very well that the solver can be broken :-) So please don't misunderstand what I'm about to say: at this point, most thoughts that the solver is broken are likely to be wrong. The reasons are threefold. First of all, the dependency relationships between packages are opaque and complex, and are buried inside metadata that nobody ever sees unless they make a very deliberate effort to do so. It's quite difficult to reason about dependency relationships by hand. It's a lousy job for a human, an ideal one for a computer. Second, we haven't done the best job of helping people understand why And finally, optimization algorithms in general----particularly combinatorial ones like this---very often produce non-intuitive solutions. I've been doing mathematical optimization for a long time, and I can't tell you how many times I've looked at the solution to a problem and thought, "that can't be right". And then I take the time to mechanically verify it, and yes, it is... Sometimes I finally figure out why my intuition was wrong, sometimes I don't. Again, that is not meant to explain away conda's shortcomings or bugs. But it does help reinforce why I think that what we need to do is make it easier for package builders to be as precise as possible in specifying how they want their packages to be paired with dependencies. Version pinning, explicit channels, features (ugh), and dependency metapackages (a new idea I've been promoting) are all things we can do to help. Because relying solely on the underlying mathematics to get it right is going to produce some truly baffling results sometimes. |
As a scientist (who almost flunked Quantum Phisics 😜) I am worried about that randomness statement.
I disagree. In that particular case it would be nice if conda could use the stated dependencies The first pass got it right. The second did not. Conda decided for:
I see 3 downgrades ( I am not sure that pinning exactly is the way to way as the expected behavior* does not seems to be unreasonable. * The expected behavior being: Try to get the most up-to-date version of the specified dependencies. |
Another puzzling fact. I wanted to check if that
being picked up above was compiled against > conda search libnetcdf ⏎
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata: ......
libnetcdf 4.2.1.1 0 defaults
4.2.1.1 1 defaults
4.3.2 0 defaults
4.3.2 1 defaults
4.3.3.1 0 defaults
4.3.3.1 1 defaults
. 4.3.3.1 3 defaults I also think that the |
@ocefpaf, I think you may misunderstand me. If you present a set of specifications to But if The problem is that it's not always clear that's the case. I've seen this many times: people think conda should be selecting this package or that one, but it can't because some other package's dependency chains forbid it. |
@ocefpaf: if you can give me a |
@mcg1969 I am not asking for magic, just for a way to ensure the specified dependencies are preferred to be the most up-to-date than the secondary dependencies that will be downloaded with them.
I guess that the case in this PR is it, no? |
I'm not seeing a |
(Please understand my tunnel vision here---I'm not a package builder, and I don't do a lot of work on conda-build. If I'm going to reproduce a bug in dependency resolution I pretty much need a sequence of one or two |
I understand that. Note that the behavior we are seeing here is hard to reproduce. However, I am not familiar with the command |
Perhaps someone listening can help construct a good test case for me, isolated from conda-build? |
For the build install I assume the command is equivalent to something like this:
This assumes that
This picks up the right |
Ah, wait, I see something in your text above:
This may indeed be a clue, but it's hard to be sure since other things are going on. No, gdal is not weighted more than hdf5 just because it is in the recipe. The only differentiation I tried an experiment. I hacked my local metadata cache so that
I still get gdal 2.0.2 out of that. I'm observing that the total number of version downgrades |
ACTUALLY, I guess it depends on exactly how
or is it doing this?
The difference here of course is that EDIT: To be clear, I got the same result both ways, I just want to know exactly what |
Can someone give me a link to the Travis CI output? |
Could it be something as simple as the test environment is not picking up the |
No. the
https://travis-ci.org/conda-forge/staged-recipes/jobs/124909151 |
Grr. Well, I'm convinced the solver is getting bad input. I'm trying to reproduce this every which way I can think and I'm getting |
EDIT: Retracting that claim. It does look like a scoring issue. |
It looks like it is indeed due to subtleties in the scoring algorithm. The mathematics is doing the right thing. What conda-build is using for the test spec is akin to the shorter spec above; that is,
So this puts But I think we have a very simple answer here. We need to change the spec that |
Actually, that's obviously wrong, because the test and build dependencies are separate. But if they are the same, the specs passed to the solver should behave as described above. So this just means adding the |
Well. that was simpler than I thought. One line. |
As I say over in the PR:
I'm not convinced you should relax your |
Thanks for looking into this @mcg1969! |
Great job @mcg1969. |
Agreed - well done! |
http://rioshome.org/