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

build: apply a typical project boilerplate of BigScience repo #56

Merged

Conversation

tianjianjiang
Copy link
Contributor

@tianjianjiang tianjianjiang commented Aug 17, 2021

related: #57

Prepare GitHub actions for more regression tests in the future.

A side note: Poetry is optional for managing venv and dependencies, but syncing requirements(-dev).txt must be done manually for now.

I will describe some details with code review comments.

Comment on lines 19 to +20
{{"\n"}}Answer:
"""
""" # noqa W291
Copy link
Contributor Author

@tianjianjiang tianjianjiang Aug 17, 2021

Choose a reason for hiding this comment

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

Although the trailing whitespace after Answer: is understandable, load_dataset() may still remove it with tokenizer, cf. https://github.com/bigscience-workshop/evaluation/pull/56/files#r690616263

The noqa W291 is just to make flake8 happy. If the trailing whitespace can be removed from the template, then no need to have noqa here.

Comment on lines 22 to +23
{{"\n"}}Answer:
"""
""" # noqa W291
Copy link
Contributor Author

Choose a reason for hiding this comment

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

target-version = ['py38']

[tool.pytest.ini_options]
filterwarnings = ["ignore:the imp module is deprecated in favour of importlib:DeprecationWarning:tensorflow.*"]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

authors = ["Your Name <[email protected]>"]

[tool.poetry.dependencies]
python = "^3.8.11"
Copy link
Contributor Author

@tianjianjiang tianjianjiang Aug 17, 2021

Choose a reason for hiding this comment

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

python>=3.8.10 supports Apple Silicon and macOS BigSur. (3.8.11 is just a bug-fixing version.)
Personally I'm not using them. Just to ensure no one will get surprised by an incompatible version.


setup(
name="evaluation",
python_requires=">=3.8.11",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tianjianjiang tianjianjiang force-pushed the build-apply_project_boilerplate branch 2 times, most recently from dbefb41 to 61bd30c Compare August 17, 2021 18:19
Comment on lines +13 to +16
assert (
"Wound care encourages and speeds wound healing via cleaning and protection from reinjury or infection. "
"Depending on each patient's needs, it can range from the simplest first aid to entire nursing specialties "
"such as wound, ostomy, and continence nursing and burn center care.\n"
) in prompt
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is just a demo, not really a good test case. For better test cases, perhaps more PRs wanted.

"Depending on each patient's needs, it can range from the simplest first aid to entire nursing specialties "
"such as wound, ostomy, and continence nursing and burn center care.\n"
) in prompt
assert prompt.endswith("Answer:")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Prepare GitHub actions for more regression tests in the future.

A side note: Poetry is optional for managing venv and dependencies, but
syncing requirements(-dev).txt must be done manually for now.
@tianjianjiang tianjianjiang force-pushed the build-apply_project_boilerplate branch from 61bd30c to 0381bcc Compare August 17, 2021 18:27
@jaketae jaketae mentioned this pull request Aug 18, 2021
Copy link
Member

@jaketae jaketae left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. I generally agree with the line of changes you suggest, i.e. unit testing, GitHub workflows, and enforcing code style. Contrary to my original thought, the PR does not involve many merge conflicts (yet). Let's go ahead with the changes for now and brush up on the details as we go. LGTM!

@jaketae jaketae merged commit 58ae1bf into bigscience-workshop:main Aug 19, 2021
@jaketae jaketae mentioned this pull request Aug 19, 2021
@tianjianjiang
Copy link
Contributor Author

Contrary to my original thought, the PR does not involve many merge conflicts (yet). Let's go ahead with the changes for now and brush up on the details as we go. LGTM!

Sorry for the late reaction. I could have left those style changes out but too late for that. Thank you for the understanding!

@tianjianjiang tianjianjiang deleted the build-apply_project_boilerplate branch August 23, 2021 13:01
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.

2 participants