Skip to content
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

docs: adding a Game of Life example #569

Merged
merged 1 commit into from
Sep 26, 2023
Merged

Conversation

bcm-at-zama
Copy link
Contributor

closes #457

@cla-bot cla-bot bot added the cla-signed label Sep 19, 2023
@bcm-at-zama bcm-at-zama force-pushed the adding_game_of_life_example branch 5 times, most recently from e922819 to 0aa183e Compare September 19, 2023 08:42
@bcm-at-zama bcm-at-zama marked this pull request as draft September 19, 2023 08:47
@bcm-at-zama bcm-at-zama force-pushed the adding_game_of_life_example branch from 0aa183e to 3e912df Compare September 19, 2023 08:56
@bcm-at-zama
Copy link
Contributor Author

Hey guys, nothing priority here, but I did an application example with the Game of Life we've presented at the sprint demo. When you have some time, could you review it, please? There should be a blog about it as well, in the coming weeks, to explain a bit how it works, and show some use of CP

@bcm-at-zama bcm-at-zama marked this pull request as ready for review September 19, 2023 13:16
@bcm-at-zama
Copy link
Contributor Author

Whoever wants to give it a review is welcome. Pinging maybe @BourgerieQuentin @umut-sahin @youben11 @rudy-6-4 ?

@bcm-at-zama bcm-at-zama force-pushed the adding_game_of_life_example branch from dac450f to 003b616 Compare September 19, 2023 13:33
docs/application-tutorial/game_of_life.py Outdated Show resolved Hide resolved
docs/application-tutorial/game_of_life.py Outdated Show resolved Hide resolved
docs/application-tutorial/game_of_life.py Outdated Show resolved Hide resolved
docs/application-tutorial/game_of_life.py Outdated Show resolved Hide resolved
docs/application-tutorial/game_of_life.py Outdated Show resolved Hide resolved
docs/application-tutorial/game_of_life.py Outdated Show resolved Hide resolved
@bcm-at-zama
Copy link
Contributor Author

New push, after @umut-sahin 's comments

@bcm-at-zama bcm-at-zama force-pushed the adding_game_of_life_example branch from 8d9cda1 to 8a6e6df Compare September 19, 2023 15:06
@bcm-at-zama
Copy link
Contributor Author

New push, after @umut-sahin 's comments

@bcm-at-zama bcm-at-zama force-pushed the adding_game_of_life_example branch from 5f01e8b to 079e70b Compare September 20, 2023 12:09
@bcm-at-zama
Copy link
Contributor Author

Added few lines to make the key generation separately, but still, the execution time of the first update is often significantly slower than the next ones.

@bcm-at-zama
Copy link
Contributor Author

Added the gif. Good with you, @umut-sahin @youben11 @BourgerieQuentin ?

@bcm-at-zama bcm-at-zama force-pushed the adding_game_of_life_example branch 2 times, most recently from 4839ccf to 7991881 Compare September 21, 2023 08:50
@bcm-at-zama
Copy link
Contributor Author

Squashing all commits locally

@BourgerieQuentin
Copy link
Member

I feel it missing some explanation of how is it implemented and why there are several implementation, maybe also some timings etc? wdyt?

@bcm-at-zama
Copy link
Contributor Author

I feel it missing some explanation of how is it implemented and why there are several implementation, maybe also some timings etc? wdyt?

I understand but my .md is much larger than existing .md's in this directory :)

cat docs/application-tutorial/key_value_database.md docs/application-tutorial/sha256.md
# Key Value Database

This is an interactive tutorial written as a Jupyter Notebook, which you can find [here](https://github.com/zama-ai/concrete/blob/main/docs/application-tutorial/key_value_database.ipynb).
# SHA-256

This is an interactive tutorial written as a Jupyter Notebook, which you can find [here](https://github.com/zama-ai/concrete/blob/main/docs/application-tutorial/sha256.ipynb).

I am writing a google doc, which will be published at some point, and we can add the link here. Is it ok with you? Or, do you want me to copy some parts of the doc here?

@BourgerieQuentin
Copy link
Member

Yes sure a blog + a future link into the doc will be great 👍

@bcm-at-zama
Copy link
Contributor Author

@bcm-at-zama
Copy link
Contributor Author

So, can I merge? I need approvals please

@bcm-at-zama
Copy link
Contributor Author

Or, if you want, I add a line in the .md to say "technical explanations are coming"?

Copy link
Contributor

@umut-sahin umut-sahin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move the python file to frontends/concrete-python/examples, and add game_of_life.md to SUMMARY.md 🙂

docs/application-tutorial/game_of_life.py Outdated Show resolved Hide resolved
docs/application-tutorial/game_of_life.py Outdated Show resolved Hide resolved
docs/application-tutorial/game_of_life.py Outdated Show resolved Hide resolved
docs/application-tutorial/game_of_life.py Outdated Show resolved Hide resolved
docs/application-tutorial/game_of_life.py Outdated Show resolved Hide resolved
docs/application-tutorial/game_of_life.py Outdated Show resolved Hide resolved
@bcm-at-zama bcm-at-zama force-pushed the adding_game_of_life_example branch from 7991881 to 336701a Compare September 21, 2023 10:37
@bcm-at-zama bcm-at-zama force-pushed the adding_game_of_life_example branch from 336701a to 11f106f Compare September 21, 2023 10:41
@bcm-at-zama bcm-at-zama force-pushed the adding_game_of_life_example branch 3 times, most recently from cf8e571 to 6951cce Compare September 21, 2023 10:48
@umut-sahin
Copy link
Contributor

My last comment is, maybe we can turn this into a notebook as well 🤔

@bcm-at-zama
Copy link
Contributor Author

Pushed fixes for @rudy-6-4 comments, except the import order: I don't know what you want, exactly

@bcm-at-zama
Copy link
Contributor Author

My last comment is, maybe we can turn this into a notebook as well 🤔

but, it's a game, why would we want a notebook

@umut-sahin
Copy link
Contributor

umut-sahin commented Sep 21, 2023

but, it's a game, why would we want a notebook

Right, forgot for a second 😁

@umut-sahin
Copy link
Contributor

All good for me then once the CI is green!

@bcm-at-zama bcm-at-zama force-pushed the adding_game_of_life_example branch 2 times, most recently from 7afe94d to b0fb6e7 Compare September 21, 2023 15:14
@bcm-at-zama
Copy link
Contributor Author

Tests are green. And normally, I have taken all your comments into account.

@bcm-at-zama bcm-at-zama force-pushed the adding_game_of_life_example branch from 24a5300 to 2c81312 Compare September 25, 2023 11:12
@bcm-at-zama bcm-at-zama force-pushed the adding_game_of_life_example branch from 2c81312 to abfaaa6 Compare September 25, 2023 14:15
@bcm-at-zama
Copy link
Contributor Author

There was another correctness issue:

FAILED private/var/folders/vv/vxg0wps1631b2129g22s6hs00000gn/T/tmp.6POUyu3s/tests/execution/test_mul.py::test_constant_mul[parameters1-x * 3]

@bcm-at-zama bcm-at-zama merged commit af63e90 into main Sep 26, 2023
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants