-
Notifications
You must be signed in to change notification settings - Fork 712
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
KEP-2170: Add unit and Integration tests for model and dataset initializers #2323
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
# Private HuggingFace dataset test | ||
# ( | ||
# "HuggingFace - Private dataset", | ||
# "huggingface", | ||
# { | ||
# "storage_uri": "hf://username/private-dataset", | ||
# "use_real_token": True, | ||
# "expected_files": ["config.json", "dataset.safetensors"], | ||
# "expected_error": None | ||
# } | ||
# ), | ||
# Invalid HuggingFace dataset test |
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.
Do we have an access token for testing login and downloading resources from private 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.
Not yet, maybe we can track this in a separate issue that we should create Kubeflow-owned account in HF for the Token.
f4167e5
to
f6345df
Compare
Pull Request Test Coverage Report for Build 12840565631Details
💛 - Coveralls |
f6345df
to
1887c5b
Compare
8930b80
to
c6e0a83
Compare
Hi @andreyvelich , Could you help review this PR? I have some questions. Once the SDK's PR gets approved, I will modify it accordingly. Thank you! |
@seanlaii Sorry for the delay, sure, I will review it today |
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.
Thank you for this effort @seanlaii!
I left my initial thoughts.
Please take a look @Electronic-Waste @deepanker13 @kubeflow/wg-training-leads @varshaprasad96 @akshaychitneni @saileshd1402
08fbd57
to
d867237
Compare
Hi @andreyvelich , could you help review the PR? I addressed the comments. Thank you! |
Sorry for the delay @seanlaii! |
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.
@seanlaii Thanks for your contributions! I left some comments for you.
As for the e2e test's pattern, we can discuss later with @andreyvelich :)
d867237
to
5c24c97
Compare
Hi @andreyvelich @Electronic-Waste , I addressed the comments. Please help review the PR when you are available. Thank you! |
5c24c97
to
3f12b9a
Compare
7f06cf1
to
f9d9ef2
Compare
@@ -0,0 +1,75 @@ | |||
import os | |||
import runpy | |||
from test.integration.initializer_v2.utils import setup_temp_path # noqa: F401 |
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.
Add # noqa: F401
for bypassing lint error
F401 'pkg.initializer_v2.utils.utils_test.mock_env_vars' imported but unused
in flake8
.
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.
Is it really unused ?
I thought, we use it here:
self.temp_dir = setup_temp_path("DATASET_PATH") |
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's a known thing for flake8: https://stackoverflow.com/questions/75647682/how-can-i-resolve-flake8-unused-import-error-for-pytest-fixture-imported-from.
If we would like to remove this, I can implement the suggestion of creating a conftest.py
file to include all fixtures.
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.
Oh, I see.
If you could move them to conftest.py
as suggested by pytest that would be better, I think.
I guess, this file should live under test/integration/initializer_v2
, right ?
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.
Yes, I also created one under pkg/initialier_v2
to include the shared fixture used in the tests under this directory.
f9d9ef2
to
78fd239
Compare
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.
Thank you for the updates @seanlaii!
Just a few small comments from me.
/assign @kubeflow/wg-training-leads @Electronic-Waste @astefanutti
@@ -0,0 +1,75 @@ | |||
import os | |||
import runpy | |||
from test.integration.initializer_v2.utils import setup_temp_path # noqa: F401 |
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.
Is it really unused ?
I thought, we use it here:
self.temp_dir = setup_temp_path("DATASET_PATH") |
…lizers Signed-off-by: wei-chenglai <qazwsx0939059006@gmail.com>
70dfc5b
to
02d64b8
Compare
Signed-off-by: wei-chenglai <qazwsx0939059006@gmail.com>
02d64b8
to
87e33b8
Compare
What this PR does / why we need it:
I added unit tests and integration tests for model and dataset initializers.
Which issue(s) this PR fixes (optional, in
Fixes #<issue number>, #<issue number>, ...
format, will close the issue(s) when PR gets merged):Fixes #2305
Checklist: