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
Faster is_orthogonal_array #16295
Comments
Branch: u/ncohen/16295 |
Last 10 new commits:
|
Commit: |
comment:4
Nathann, The code looks good and I have tested on an example different from your doc test. The following run fine: make, I had trouble making the pdf documentation and then went back to devel branch to check it worked Ok there. It did and then when I moved back to u/ncohen/16295 it worked. I am not sure what happened I think this needs two things:
|
comment:5
Hellllooooo !!
Yeah, we had the same problems just one hour ago when Volker tried to merge #16277 or #16235... And it does not happen again because Sphinx is totall unreliable. I expect it to ocome from the dependencies, not from this ticket
Once this patch is applied there is no python version inside of
Once more, this function removes the purely python one. Nathann |
comment:6
Hi Nathann, You should avoid using
If you do so, you need to move up the Vincent |
comment:7
Yoooooooo !!
It is good to know, but I really do not think that this is the critical part here Nathann |
comment:8
Sorry, I had changed branches and then opened orthogonal_array.py in an editor and so thought is_orthogonal_array was still there. Here is my timing data with Cython:
with Python:
this shows a significant improvement in speed. However I think this needs to be fixed:
If it is passed t=3 it should at least alert the user that it is going to override this with t=2 Here is what I think should be done:
|
comment:9
p.s. where is sage_free documented? |
comment:10
Hello !
Done.
Guys, it is very important that you understand that this is what is called "taste", and that it makes absolutely no difference in the runtimes. If you want to make changes like that, it would be cool to implement it yourself instead of asking me to do it for you. I just did it, because I need the patch to get in quick.
Done.
I cannot test that.
Done. Nathann |
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
|
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:13
Brett : the performance improvements are particularly nice for LARGE designs ! I implemented this because I wanted to check that we could indeed produce all the OA promised in our MOLS table, but some (in particularly prime powers, for k gets very large) took VERY long. With this, it is really faster and checking that the OA is an OA is not the bottleneck anymore when playing with designs. Nathann |
comment:14
A bugfix. Nathann |
comment:16
Vincent, What does it mean that "any" is not properly cythonized. Does this just mean it is not efficient or does it mean there could be problems with future versions of cython? brett |
comment:17
To look at the new code for this patch, I updated master and develop. Then I tried
and recieved
how do I update this branch? thanks |
comment:18
As suggestedin the developers guide, I just ran
I am not sure what to do, the developers guide does not help here. brett |
comment:19
Replying to @brettpim:
Why do you need this? This brings you to the stable Sage release (6.2). |
comment:20
Replying to @brettpim:
how about doing this without |
comment:52
I just tried
but this did not work to push my revision up. What command do I use? |
comment:53
Hello !
You seem to want to use "git trac" but it is not installed. This being said if you downloaded the branch without using "git trac" I don't think that just pushing is going to work. What is the output of
It should push your current branch to public/16295. Nathann |
comment:54
The Sage developers guide says "git trac puch" not "git push trac" here is what I get when I do it the right way around:
|
comment:55
Okay. So you noticed that the "right way" did not work. Can you try the "wrong way", i.e. the line I gave you above ? From the error message you got I think it will work. The reason is simple : you cannot simply "push" to my branch because you have no write access to it. All branches whose name is u/my_login/whatever can only be written by guys whose login is my_login. public/whatever branches can be written by anybody, though. Nathann |
comment:56
your command worked but it creates a new branch and that is inoptimal
Does this get attached to the right ticket? |
comment:57
Don't worry about branches, nobody has to pay for them. Anyway you cannot write on my branch (which is not my doing) so there is no other way.
It does not get attached to any ticket. You just added a branch on the trac server. Now I can look at it, we can discuss it, and if we agree with what is inside I will push it on the branch which is on this ticket. Or I will change this ticket's branch to public/16295 if it is easier. Nathann |
comment:58
Replying to @brettpim:
Why do you think this is not optimal? This is a normal way to go. Surely if there already was public/16295 branch you'd rather pushed there. But there was none. You can't push into someone else's branch. only into public/ ones. |
comment:59
Replying to @dimpase:
I thought that that if there was a way for me to write to the patch's branch then having to create another is inoptimal, but if this is how it works then that is no problem. |
comment:60
Replying to @brettpim:
(you can use
surely, you can't push in an u/TRAC-USERNAME branch, that's why |
comment:61
Nathann, I think if MOLS people are going to be using this code then we should add the additional 2 columns in when a MOLS gets transformed to a OA. In that case all the error messages I have changed are correct and this is what MOLS people will expect |
comment:62
Brett, Here is the behaviour of your branch
The index issues come from problem I mentionned in comment 51.
Here is what my branch u/ncohen/16295_v2 (mentionned in comment 50) does :
Our terminology is almost the same (we can replace "matrix" with "square" if you prefer). The interest of mine is that you do not have to add MOLS-specific code to the Nathann |
comment:63
Nathann, I strongly feel that it would be much more consistent with
to have in my opinion as a design theorist, the behaviour you cite in comment 62 of my code is all correct. In the second example the squares ARE orthogonal, they are just NOT latin. if you add the additional two columns the behaviour will be reported. brett |
comment:64
Hello !
You claim again that my code does something that somebody (a user ?) "in design theory" might not expect. Can you tell me what it is ? Or is the function okay for the user's point of view, while you think that the way it is coded is "something that people in design theory" would not expect ?
I would have agreed if the function only returned This is why it does not make sense to me to build a homogeneous input only to dissassemble it immediately afterwards. Besides, I expect that my commented code is sufficient for anybody "who does design theory" to understand what exactly happens.
It is not. The function is named "are_mutually_orthogonal_latin_squares". It should return True if the input consists of mutually orthogonal latin squares.
I agree with that, I am just showing that your branch returns wrong results. If this is fixed the results will be correct. This being said, if this is fixed then what you said just above, i.e. that the function should return True even when the input does not consist of latin squares, will not hold anymore. And so according to you the function will return wrong results. Nathann |
comment:65
Two details that may help you decide :
Nathann |
comment:66
I updated my branch starting from u/ncohen/16295_v2 by adding your commit to it. I removed the "if" in Nathann |
comment:68
Brett ? |
comment:69
Hi Nathann, We waited too long for that ticket and many tickets are depending on this one. For me the review is basically done as the function does what is specified. I added one nice doctest at Vincent |
comment:70
AHahahah. Funny doctest. I was actually thinking that "indeed, this function is used a LOT in the code, but that it is only tested on True instances. With your doctest, it makes it a bit more interesting than
Thanks ! Nathann New commits:
|
Changed branch from u/ncohen/16295 to u/vdelecroix/16295 |
Reviewer: Vincent Delecroix, Brett Stevens |
comment:72
OK, I am (mostly) happy. What do I do to approve this patch? brett |
Changed branch from u/vdelecroix/16295 to |
As the ticket claims this ticket implements a Cython version of
is_orthogonal_array
, which is then called by is_transversal_design andare_mutually_orthogonal_latin_squares
.Also sets a
check=False
in the code which slowed things down. As a resultthe tests are checked faster in the designs/ folder !Nathann
Depends on #16236
CC: @videlec @KPanComputes @dimpase
Component: combinatorial designs
Author: Nathann Cohen
Branch/Commit:
02f1247
Reviewer: Vincent Delecroix, Brett Stevens
Issue created by migration from https://trac.sagemath.org/ticket/16295
The text was updated successfully, but these errors were encountered: