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

chore: add run use case example to GH workflow #310

Merged
merged 2 commits into from
Apr 18, 2024

Conversation

jfrery
Copy link
Contributor

@jfrery jfrery commented Sep 28, 2023

@jfrery jfrery requested a review from a team as a code owner September 28, 2023 16:11
@cla-bot cla-bot bot added the cla-signed label Sep 28, 2023
@jfrery
Copy link
Contributor Author

jfrery commented Sep 28, 2023

RomanBredehoft
RomanBredehoft previously approved these changes Sep 28, 2023
Copy link
Contributor

@RomanBredehoft RomanBredehoft left a comment

Choose a reason for hiding this comment

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

looks good I think, you'll be able to test it after merging it in main anyway since it's a new workflow

@jfrery
Copy link
Contributor Author

jfrery commented Sep 28, 2023

looks good I think, you'll be able to test it after merging it in main anyway since it's a new workflow

I already tested it in the link above. You can trigger a workflow by setting the on: push in a workflow file such that it runs even if not merged in main.

@andrei-stoian-zama
Copy link
Collaborator

ran in https://github.com/zama-ai/concrete-ml/actions/runs/6340447046/job/17221915611

Looks fishy to me:

2023-09-28T14:45:31.4359697Z  - Notebook KaggleTitanic.ipynb executed in 00h:01m:07s
2023-09-28T14:47:46.0308361Z  - Notebook Cifar10.ipynb executed in 00h:00m:08s
2023-09-28T14:50:05.8887772Z  - Notebook FromImageNetToCifar.ipynb executed in 00h:00m:04s
2023-09-28T14:50:10.4400263Z  - Notebook CifarQuantizationAwareTraining.ipynb executed in 00h:00m:05s
2023-09-28T14:50:18.0455244Z  - Notebook CifarInFhe.ipynb executed in 00h:00m:08s
2023-09-28T14:50:23.6504987Z  - Notebook CifarInFheWithSmallerAccumulators.ipynb executed in 00h:00m:05s
2023-09-28T15:01:09.0179678Z  - Notebook SentimentClassification.ipynb executed in 00h:00m:08s

@jfrery jfrery force-pushed the chore/add_run_use_case_example branch 2 times, most recently from 1339a20 to d946b95 Compare September 29, 2023 15:14
@jfrery jfrery closed this Dec 13, 2023
@RomanBredehoft
Copy link
Contributor

why was this closed @jfrery ?

@jfrery
Copy link
Contributor Author

jfrery commented Dec 13, 2023

Not sure if this is useful. We never needed it.

@jfrery jfrery reopened this Dec 13, 2023
fd0r
fd0r previously approved these changes Feb 5, 2024
@jfrery jfrery force-pushed the chore/add_run_use_case_example branch 2 times, most recently from 3f74619 to 5b77be9 Compare March 19, 2024 15:00
@jfrery jfrery marked this pull request as draft April 15, 2024 08:22
@jfrery jfrery force-pushed the chore/add_run_use_case_example branch 8 times, most recently from d35ff40 to b8433a9 Compare April 15, 2024 17:39
@jfrery jfrery force-pushed the chore/add_run_use_case_example branch from 38cd25e to 33e1cc8 Compare April 17, 2024 12:12
@jfrery jfrery marked this pull request as ready for review April 17, 2024 12:12
kcelia
kcelia previously approved these changes Apr 17, 2024
benchmarks/glm.py Outdated Show resolved Hide resolved
@jfrery jfrery force-pushed the chore/add_run_use_case_example branch from 0dee236 to 5621f00 Compare April 17, 2024 12:39
@@ -2,11 +2,14 @@
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

EXAMPLE_NAME=cifar_brevitas_finetuning
EXAMPLE_NAME=cifar_brevitas_training
Copy link
Contributor

@RomanBredehoft RomanBredehoft Apr 17, 2024

Choose a reason for hiding this comment

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

here and in the following makefiles, I believe the EXAMPLE_NAME and JUPYTER_RUN are useless as only TIME_NB is used to run the notebooks/files

so I would remove them as it's a bit confusing why we have two jupyter nbconvert --to notebook --inplace --execute occurences (here and in time_notebook_execution.sh)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes bad copy paste here thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

I see that you kept EXAMPLE_NAME here (and below), are these necessary ? I don't see how they are used !

also I can see some jupyter nbconvert --to notebook --inplace --execute in some makefiles below, so I guess you're not finished !

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch. I am not using the folder name as example name to print logs. This can be remove. Let me clean the Makefile.

Copy link
Contributor

Choose a reason for hiding this comment

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

thanks for cleaning up things ! I still see one remaining EXAMPLE_NAME in this exact makefile, but the other ones look fine

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed bad rebase. It's fixed

@jfrery jfrery requested a review from RomanBredehoft April 17, 2024 14:11
@jfrery jfrery force-pushed the chore/add_run_use_case_example branch from 868efd9 to 7051a21 Compare April 18, 2024 10:47
@jfrery jfrery force-pushed the chore/add_run_use_case_example branch from 7051a21 to d97152f Compare April 18, 2024 12:14
Copy link
Contributor

@RomanBredehoft RomanBredehoft left a comment

Choose a reason for hiding this comment

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

looks great, thanks a lot !

Copy link

Coverage passed ✅

Coverage details

---------- coverage: platform linux, python 3.8.18-final-0 -----------
Name    Stmts   Miss  Cover   Missing
-------------------------------------
TOTAL    7548      0   100%

59 files skipped due to complete coverage.

Copy link
Contributor

@fd0r fd0r left a comment

Choose a reason for hiding this comment

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

Might be a dumb question but don't we also want to open a PR with the new run of the use-case or is this just for testing purposes? (cc @jfrery )

@jfrery
Copy link
Contributor Author

jfrery commented Apr 18, 2024

Might be a dumb question but don't we also want to open a PR with the new run of the use-case or is this just for testing purposes?

What is a PR with the new run? If you mean the updated notebooks, we add a discussion on this.

@fd0r
Copy link
Contributor

fd0r commented Apr 18, 2024

Might be a dumb question but don't we also want to open a PR with the new run of the use-case or is this just for testing purposes?

What is a PR with the new run? If you mean the updated notebooks, we add a discussion on this.

Thanks for the link to the discussion, makes sense!

echo "*** Processing example ${EXAMPLE_NAME}"
else
continue
CURRENT_DIR=$(pwd)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we check somehow that the CURRENT_DIR is the root of the repo? or shouldn't we force CURRENT_DIR to the root of the repo?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am expecting the GH action to put me in the root of the repo. Not sure what path we should force it to. Depends on the GH action I suppose.

Copy link
Contributor

Choose a reason for hiding this comment

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

$PATH_OF_SCRIPT / .. / .. or something like that? Don't know how easy it is to get from bash. I'm fine with the current solution.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes indeed we could use path from script. A bit annoying but maybe safer. I can add this quickly in another PR why not.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done -> #627 will merge this one first

Copy link
Contributor

@fd0r fd0r left a comment

Choose a reason for hiding this comment

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

Looks good to me, nice to have a make file per use-case, is this something that should also be used by our users? 🤔

Copy link
Collaborator

@andrei-stoian-zama andrei-stoian-zama left a comment

Choose a reason for hiding this comment

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

Great work! thanks

@jfrery jfrery merged commit a6c06f9 into main Apr 18, 2024
12 checks passed
@jfrery jfrery deleted the chore/add_run_use_case_example branch April 18, 2024 15:13
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.

5 participants