Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Speedup, refactoring and modernization#76

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fjwillemsen merged 40 commits intopython-constraint:masterfromfjwillemsen:speedup
Aug 30, 2023
Merged

Speedup, refactoring and modernization#76

fjwillemsen merged 40 commits intopython-constraint:masterfromfjwillemsen:speedup
Aug 30, 2023

Conversation

@fjwillemsen
Copy link
Member

@fjwillemsenfjwillemsen commentedAug 25, 2023
edited
Loading

Hi all! A while ago I implementedpython-constraint inKernel Tuner, an auto-tuning framework where we need to obtain all solutions on user-specified parameters and constraints before starting optimization.python-constraint works great, but it had some room for improvement, especially performance-wise.
I thus decided to forkpython-constraint and make some changes, the following:

  • Cythonized the package
  • Added theOptimizedBacktracking solver based onissue #62
  • Added type-hints to improve Cythonization
  • Added the MaxProd and MinProd constraints
  • Improved pre-processing for the MaxSum constraint
  • Optimized the Function constraint
  • AddedgetSolutionsOrderedList andgetSolutionsAsListDict functions for efficient result shaping
  • Overall optimization of common bottlenecks
  • Split the codebase into multiple files for convenience
  • Switched fromsetup.py topyproject.toml
  • Achieved and requires test coverage of at least 65%
  • Addednox for local testing against all supported Python versions
  • Addedruff for codestyle testing
  • Dropped Python 3.4, 3.5, 3.6, 3.7 support

In all, this results in a huge speedup of >150x on a benchmark of 112 synthetic searchspaces:
image

I'd like to hear what the mainainers think about these changes and would be happy to see them integrated! Before releasing this, I think it would be a good idea to revise the package publishing process, and consider switching to GitHub Actions (I can help with this). If there are any questions, please let me know!

…ll outside GIL; optimized non-forwardchecking instead
…nvalid outcomes, added preprocessing to MaxProdConstraint
@s-celles
Copy link
Member

Hi@fjwillemsen

Very pleased to see such a contribution. I'm no longuer maintaining this repository. I sent you and invite to be member ofhttps://github.com/python-constraint/ GH org and also grant you write access tohttps://github.com/python-constraint/python-constraint/
Feel free to take the lead on the project and improve it.
If you need something more just let me know.

Kind regards

Sébastien

@fjwillemsen
Copy link
MemberAuthor

@scls19fr thank you very much, I'll do my best :)
Perhaps it is not practical, but given that you will no longer maintain, could you make me owner instead of member? It appears I currently do not have access to the repository secrets, which prohibits a release on PyPI

@s-celles
Copy link
Member

Done.

@s-celles
Copy link
Member

https://pypi.org/project/python-constraint/ belongs to@niemeyer so I can't give you access.
You can either ask him or create a new PyPi project python-constraint2 or 3 for example.

@fjwillemsen
Copy link
MemberAuthor

Thank you! I have contacted@niemeyer via email, for continuity it would be ideal to keep it on the same package, I hope this will be possible.
Thank you very much for all of your contributions to python-constraint throughout the years!

@fjwillemsenfjwillemsen merged commitcd42626 intopython-constraint:masterAug 30, 2023
@s-celles
Copy link
Member

Great work! Thanks@fjwillemsen
Renaming master branch to main should also be considered
https://github.com/github/renaming

@fjwillemsen
Copy link
MemberAuthor

Good suggestion! Renamed master branch to main

s-celles reacted with thumbs up emoji

@fjwillemsenfjwillemsen deleted the speedup branchAugust 30, 2023 06:39
@fjwillemsen
Copy link
MemberAuthor

My emails to@niemeyer regarding PyPI access seem to go unanswered. @scls19fr could you perhaps get in touch with@niemeyer, or provide me with an alternative means of contact? My contact details are onmy website.

@s-celles
Copy link
Member

what about a new name?
python-constraint2 or 3 or something else.
So we could be totally free.
I think it will be the simplest solution.

@fjwillemsen
Copy link
MemberAuthor

Yes, definitely, I had already created apython-constaint2 for beta testing. However,python-constraint had 148,000 downloads in the past month, which is a very solid user base I would prefer not to abandon if we have a choice.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@fjwillemsen@s-celles

[8]ページ先頭

©2009-2025 Movatter.jp