-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add Transformers4Rec repo test #1049
Conversation
Documentation preview |
tox.ini
Outdated
passenv=GIT_COMMIT | ||
allowlist_externals = git | ||
commands = | ||
; the GIT_COMMIT env is the current commit of the core repo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be the current commit of models
repo.
.github/workflows/cpu-t4r.yml
Outdated
branch=main | ||
if [[ $ref_type == "tag"* ]] | ||
then | ||
git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/release*:refs/remotes/origin/release* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you leave a comment about what is happening here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is just standard boilerplate for fetching a shallow copy of minimal size
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be replaced with something like this now. Moved this into a reusable action in our .github repo.
- name: Get Branch name
id: get-branch-name
uses: NVIDIA-Merlin/.github/actions/branch-name@main
- name: Run tests
run: |
branch="${{ steps.get-branch-name.outputs.branch }}"
GIT_COMMIT=`git rev-parse HEAD` tox -e tox -e py38-transformers4rec-cpu -- $branch
Note that this doesn't currently work with our self-hosted runners because the action is implemented with docker and we can't run docker in our self-hosted runners
This PR adds Github actions that run the unit tests in
transformers4rec
. The motivation for adding these tests is to detect if changes in Dataloader could potentially break T4Rec since T4Rec now depends on Models. These downstream repo tests are similar to how they are set up in Core.