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

Revive Nightly/Past CI #31159

Merged
merged 4 commits into from
Jun 20, 2024
Merged

Revive Nightly/Past CI #31159

merged 4 commits into from
Jun 20, 2024

Conversation

ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented May 31, 2024

What does this PR do?

The CI workflow files have changed a lot since this year:

The nightly/past CI workflow are currently not working due to the above changes. This PR revives these 2 workflow.

For Past CI

  • Previously, we run all torch/tf version in a single workflow run, which is too large and we can't access the workflow run page (This page is taking too long to load). This PR changes it to run in different scheduled time and using an index to determine which torch/tf version to run. However, each run will run against a different transformers commit which is not ideal, but acceptable for now.

Comment on lines -18 to -27
- name: Cleanup disk
run: |
sudo ls -l /usr/local/lib/
sudo ls -l /usr/share/
sudo du -sh /usr/local/lib/
sudo du -sh /usr/share/
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/share/dotnet
sudo du -sh /usr/local/lib/
sudo du -sh /usr/share/
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we don't need this anymore after using [intel-cpu, 8-cpu, ci]. I forgot to remove this in #31119

sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/share/dotnet
sudo du -sh /usr/local/lib/
sudo du -sh /usr/share/
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

same

Comment on lines +15 to +20
runner:
required: true
type: string
docker:
required: true
type: string
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

just to allow using different runner and docker image.

(eventually, we probably move all runner to ci group and we no longer need runner)

Comment on lines +75 to +85
- name: Update / Install some packages (for Past CI)
if: ${{ contains(inputs.docker, '-past-') }}
working-directory: /transformers
run: |
python3 -m pip install -U datasets

- name: Update / Install some packages (for Past CI)
if: ${{ contains(inputs.docker, '-past-') && contains(inputs.docker, '-pytorch-') }}
working-directory: /transformers
run: |
python3 -m pip install --no-cache-dir git+https://github.com/huggingface/accelerate@main#egg=accelerate
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

some particularity for past ci

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

just call some jobs defined in the (common) self-scheduled.yml

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

just call some jobs defined in the (common) self-scheduled.yml

Comment on lines +24 to +26
ci_event:
required: true
type: string
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

to show things like

  • Results of the Daily CI tests.
  • Results of the Nightly CI tests.
  • Results of the Past CI tests.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

just to make it more flexible to be called as daily/nightly/past CI

@@ -638,7 +638,7 @@ def get_reply_blocks(self, job_name, job_result, failures, device, text):

def get_new_model_failure_blocks(self, with_header=True, to_truncate=True):
if self.prev_ci_artifacts is None:
return {}
return []
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

a bug fix - it should be list

@ydshieh ydshieh marked this pull request as ready for review May 31, 2024 09:22
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@ydshieh ydshieh requested a review from LysandreJik May 31, 2024 09:28
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

  • I should probably rename this file

# 2:17 am on each Sunday and Thursday

- cron: "17 2 * * 0,4"
- cron: "17 2,14 * * *"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

trigger twice per day

Copy link
Member

Choose a reason for hiding this comment

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

Why twice a day?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The objective is simply to have the runs of all past versions finished in one weak.
We have currently 10 versions to run (and more after I add the torch 2.x versions).

And each run could be done within 12 hours, so that's why I put twice a day.
But that is not a hard call, we can change if we want.

Comment on lines +11 to +22
get_number:
name: Get number
runs-on: ubuntu-22.04
outputs:
run_number: ${{ steps.get_number.outputs.run_number }}
steps:
- name: Get number
id: get_number
run: |
echo "${{ github.run_number }}"
echo "$(python3 -c 'print(int(${{ github.run_number }}) % 10)')"
echo "run_number=$(python3 -c 'print(int(${{ github.run_number }}) % 10)')" >> $GITHUB_OUTPUT
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

an index to determine which torch/tf version to run

@LysandreJik
Copy link
Member

Awesome! Let me know when you'd like for me to review this

@ydshieh
Copy link
Collaborator Author

ydshieh commented May 31, 2024

Awesome! Let me know when you'd like for me to review this

Hi! It's ready for a review, but I could also walk you through a bit the changes next Tuesday if that would help and save time.

(I triggered some runs to make sure daily/nightly/past CIs will run, but maybe let me to perform a final check before merge on my side)

@ydshieh
Copy link
Collaborator Author

ydshieh commented May 31, 2024

I forgot to update utils/notification_service_quantization.py (tiny changes required too). I will update it.

Updated

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

Thanks Yih-Dar! This looks good to me!

It's a run-ception 🤯

# 2:17 am on each Sunday and Thursday

- cron: "17 2 * * 0,4"
- cron: "17 2,14 * * *"
Copy link
Member

Choose a reason for hiding this comment

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

Why twice a day?

@ydshieh ydshieh merged commit d4564df into main Jun 20, 2024
8 checks passed
@ydshieh ydshieh deleted the revive-nightly-past-ci branch June 20, 2024 16:57
itazap pushed a commit that referenced this pull request Jun 21, 2024
* build

* build

* build

* build

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants