You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
make sure CI errors go away when tskit removes parent ordering #232
@rdinnager will want to enable the tskit tests for the Windows build once this is resolved; they are disabled for now, that that the Windows tests are green for him. So, tagging him here so he's in the loop.
OK, so. I have merged tskit C_0.99.15 into SLiM, resolved all the issues with it that I can see, run all my local tests on it including crosscheck (all tests are green except for three known cases where the test suite fails crosscheck for unrelated reasons), and merged that tskit_one_point_oh branch down into master. However, the CI tests are still failing with the same "Individuals must be provided in an order..." error. This is a bit surprising to me. The changes to tskit to remove the Individuals table ordering requirement are done, and are out in C_0.99.15, which is an official release. I thought that the CI tests automatically ran against the current release version of tskit, so I expected the tests to go green now that everything is in sync... but they didn't. @petrelharp, do you understand why?
HOWEVER, if I switch to (locally installed) tskit 0.4.0b1 to see if things will work when 0.4.0 is released, then I get the
def __init__(self, ts, reference_sequence=None, legacy_metadata=False):
self.legacy_metadata = legacy_metadata
if not (isinstance(ts.metadata, dict) and 'SLiM' in ts.metadata
and ts.metadata['SLiM']['file_version'] in compatible_slim_file_versions):
tables = ts.dump_tables()
if not (isinstance(tables.metadata, dict) and 'SLiM' in tables.metadata):
_set_metadata_from_provenance(tables)
if tables.metadata['SLiM']['file_version'] != slim_file_version:
_upgrade_old_tables(tables)
# cannot assign directly to keys of metadata
md = tables.metadata
md['SLiM']['file_version'] = slim_file_version
tables.metadata = md
ts = tables.tree_sequence()
super().__init__(ts._ll_tree_sequence)
> self.reference_sequence = reference_sequence
E AttributeError: can't set attribute
/home/peter/.local/lib/python3.9/site-packages/pyslim/slim_tree_sequence.py:170: AttributeError
then "C API 0.99.15" is marked "latest"? That's why I was expecting that this problem would fix itself. Hmm. Is the official Python release not in sync with the official C API release?
according to the log in the run you have linked above tskit 0.3.7 is being used. This is because you are using cached dependancies.
So, the mystery now is how to force a recache of the cached tskit 0.3.7, to move up to 0.4.0. @grahamgower or @rdinnager or @petrelharp anybody know? I'll start googling now but I don't know anything about this GitHub Actions stuff...
@benjeffery (tagging in the hopes you can provide a bit more guidance :->) then wrote:
The caching is based on a hash of treerec/tests/pip-requirements.txt so any change to that file will force the dependencies to be regenerated.
So, I'm looking at that file. It has:
setuptools
filelock
numpy
pytest
pytest-xdist
It does not list tskit or msprime; they are instead listed in treerec/tests/conda-requirements.txt. I wonder whether changing that file also forces a recache? And I wonder what sort of change I ought to make, to safely trigger the recache; are comments allowed in these files? Extraneous spaces?
A comment about all this ought to be added to treerec/tests/README.md once it is figured out.
So any change to the conda-requirements.txt or pip-requirements.txt should invalidate the cache. You can also bump the v10 in that key field to invalidate the cache. Given you want to explicitly use the newer tskit, I recommend adding tskit >= 0.4.0b1 to the pip-requirements.txt.
Hi @grahamgower. I was just about try to bumping that v10 to v11 to see if it did anything; thanks for the reassurance on that point. :->
Given you want to explicitly use the newer tskit, I recommend adding tskit >= 0.4.0b1 to the pip-requirements.txt.
So, right now tskit is listed in conda-requirements.txt not pip-requirements.txt. Are you proposing that I should add tskit >= 0.4.0b1 to pip-requirements.txt, or did you mean that I should change the existing line in conda-requirements.txt? Also, the b1 should not be needed, right? AFAIK version 0.4.0 is released.
Hi @grahamgower. I was just about try to bumping that v10 to v11 to see if it did anything; thanks for the reassurance on that point. :->
Given you want to explicitly use the newer tskit, I recommend adding tskit >= 0.4.0b1 to the pip-requirements.txt.
So, right now tskit is listed in conda-requirements.txt not pip-requirements.txt. Are you proposing that I should add tskit >= 0.4.0b1 to pip-requirements.txt, or did you mean that I should change the existing line in conda-requirements.txt? Also, the b1 should not be needed, right? AFAIK version 0.4.0 is released.
Oh, if its already in the conda-requirements, then yes, just whack in the version requirement there. And I didn't realise that tskit 0.4.0 had shipped --- not sure how I missed that .:0
The tests are still red, but now for reasons having to do with pyslim I think. So, @petrelharp, you can mark this as fixed when you've got that sorted. :->
Sorry for leading you astray - I thought tskit would be in treerec/tests/pip-requirements.txt. We have wheels for Windows, OSX and linux for all of Python 3.7->3.10 so you don't have to use conda.
Sorry for leading you astray - I thought tskit would be in treerec/tests/pip-requirements.txt.
No worries, got it sorted. Your help was extremely useful! :->
We have wheels for Windows, OSX and linux for all of Python 3.7->3.10 so you don't have to use conda.
Well, I guess the present CI design (now that I understand how to maintain it :->) works, so maybe if it ain't broke don't fix it, I don't know. Anyhow, none of this is in my wheelhouse at all (pun intended, I'm afraid :->), but if @grahamgower who designed the GitHub CI for SLiM wants to change it over to using wheels, I'd have no objection. I don't know what the pros/cons of that choice would be.
I don't recall precisely, but the conda bits were probably included to get msprime installed without gsl annoyances. Not sure if that's still needed (e.g. for windows).
I don't recall precisely, but the conda bits were probably included to get msprime installed without gsl annoyances. Not sure if that's still needed (e.g. for windows).
I am fine with "if it ain't broke, don't fix it" here; I don't see that it ought to really make any difference, except that maybe (?) it would remove the need to bump GitHub Action's cache, but now that I know how to do that, it's fine. :->
@rdinnager all tests are now green, yay! IIRC you had disabled the tskit tests for Windows somehow, so that you could get your tests on Windows to go green. I believe it is now time for you to re-enable them. If you point me towards how/where you did it, I'm happy to make the change. Thanks!
All tests are green, so this is fixed. I will open a separate issue on adding the tskit tests to the CI on Windows, since it sounds like that may not happen until after the 3.7 release cycle.
Activity
bhaller commentedon Nov 11, 2021
@rdinnager will want to enable the tskit tests for the Windows build once this is resolved; they are disabled for now, that that the Windows tests are green for him. So, tagging him here so he's in the loop.
bhaller commentedon Dec 8, 2021
OK, so. I have merged tskit C_0.99.15 into SLiM, resolved all the issues with it that I can see, run all my local tests on it including crosscheck (all tests are green except for three known cases where the test suite fails crosscheck for unrelated reasons), and merged that
tskit_one_point_ohbranch down intomaster. However, the CI tests are still failing with the same "Individuals must be provided in an order..." error. This is a bit surprising to me. The changes to tskit to remove the Individuals table ordering requirement are done, and are out in C_0.99.15, which is an official release. I thought that the CI tests automatically ran against the current release version of tskit, so I expected the tests to go green now that everything is in sync... but they didn't. @petrelharp, do you understand why?petrelharp commentedon Dec 9, 2021
Ok, this is expected, since the release version of tskit is still 0.3.7, and those tests are running using python (not the library internal to SLiM).
HOWEVER, if I switch to (locally installed) tskit 0.4.0b1 to see if things will work when 0.4.0 is released, then I get the
error. So, I need to deal with that first.
bhaller commentedon Dec 9, 2021
Aha. I guess there's something I don't understand about tskit releases, then, because if I go to:
https://github.com/tskit-dev/tskit/releases
then "C API 0.99.15" is marked "latest"? That's why I was expecting that this problem would fix itself. Hmm. Is the official Python release not in sync with the official C API release?
bhaller commentedon Dec 12, 2021
See tskit-dev/tskit#2065
bhaller commentedon Dec 12, 2021
So, Ben Jeffery (deliberately not tagged) wrote:
So, the mystery now is how to force a recache of the cached tskit 0.3.7, to move up to 0.4.0. @grahamgower or @rdinnager or @petrelharp anybody know? I'll start googling now but I don't know anything about this GitHub Actions stuff...
bhaller commentedon Dec 12, 2021
@benjeffery (tagging in the hopes you can provide a bit more guidance :->) then wrote:
So, I'm looking at that file. It has:
It does not list
tskitormsprime; they are instead listed intreerec/tests/conda-requirements.txt. I wonder whether changing that file also forces a recache? And I wonder what sort of change I ought to make, to safely trigger the recache; are comments allowed in these files? Extraneous spaces?A comment about all this ought to be added to
treerec/tests/README.mdonce it is figured out.grahamgower commentedon Dec 12, 2021
The cache step (docs here) has a
keyfield that defines when to invalidate the cache:So any change to the conda-requirements.txt or pip-requirements.txt should invalidate the cache. You can also bump the
v10in that key field to invalidate the cache. Given you want to explicitly use the newer tskit, I recommend addingtskit >= 0.4.0b1to thepip-requirements.txt.bhaller commentedon Dec 12, 2021
Hi @grahamgower. I was just about try to bumping that
v10tov11to see if it did anything; thanks for the reassurance on that point. :->So, right now
tskitis listed inconda-requirements.txtnotpip-requirements.txt. Are you proposing that I should addtskit >= 0.4.0b1topip-requirements.txt, or did you mean that I should change the existing line inconda-requirements.txt? Also, theb1should not be needed, right? AFAIK version0.4.0is released.grahamgower commentedon Dec 12, 2021
Oh, if its already in the conda-requirements, then yes, just whack in the version requirement there. And I didn't realise that tskit 0.4.0 had shipped --- not sure how I missed that .:0
grahamgower commentedon Dec 12, 2021
Yes, you can start a comment with a
#in both pip requirements and conda requirements files.bhaller commentedon Dec 12, 2021
OK, the tskit version issue appears to be fixed:
https://github.com/MesserLab/SLiM/runs/4498983347?check_suite_focus=true
Thanks for the help @grahamgower and @benjeffery.
The tests are still red, but now for reasons having to do with pyslim I think. So, @petrelharp, you can mark this as fixed when you've got that sorted. :->
benjeffery commentedon Dec 13, 2021
Sorry for leading you astray - I thought tskit would be in
treerec/tests/pip-requirements.txt. We have wheels for Windows, OSX and linux for all of Python 3.7->3.10 so you don't have to use conda.bhaller commentedon Dec 13, 2021
No worries, got it sorted. Your help was extremely useful! :->
Well, I guess the present CI design (now that I understand how to maintain it :->) works, so maybe if it ain't broke don't fix it, I don't know. Anyhow, none of this is in my wheelhouse at all (pun intended, I'm afraid :->), but if @grahamgower who designed the GitHub CI for SLiM wants to change it over to using wheels, I'd have no objection. I don't know what the pros/cons of that choice would be.
grahamgower commentedon Dec 13, 2021
I don't recall precisely, but the conda bits were probably included to get msprime installed without gsl annoyances. Not sure if that's still needed (e.g. for windows).
bhaller commentedon Dec 13, 2021
I am fine with "if it ain't broke, don't fix it" here; I don't see that it ought to really make any difference, except that maybe (?) it would remove the need to bump GitHub Action's cache, but now that I know how to do that, it's fine. :->
bhaller commentedon Dec 13, 2021
@rdinnager all tests are now green, yay! IIRC you had disabled the tskit tests for Windows somehow, so that you could get your tests on Windows to go green. I believe it is now time for you to re-enable them. If you point me towards how/where you did it, I'm happy to make the change. Thanks!
bhaller commentedon Dec 14, 2021
All tests are green, so this is fixed. I will open a separate issue on adding the tskit tests to the CI on Windows, since it sounds like that may not happen until after the 3.7 release cycle.