Skip to content

Commit 14384a8

Browse files
committed
push init code after cleanup
1 parent 1c71ba9 commit 14384a8

File tree

1,408 files changed

+295486
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,408 files changed

+295486
-1
lines changed

CODE_OF_CONDUCT.md

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to make participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies within all project spaces, and it also applies when
49+
an individual is representing the project or its community in public spaces.
50+
Examples of representing a project or community include using an official
51+
project e-mail address, posting via an official social media account, or acting
52+
as an appointed representative at an online or offline event. Representation of
53+
a project may be further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at <[email protected]>. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq
77+

CONTRIBUTING.md

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Contributing to Facebook AI Research Sequence-to-Sequence Toolkit (fairseq)
2+
We want to make contributing to this project as easy and transparent as
3+
possible.
4+
5+
## Pull Requests
6+
We actively welcome your pull requests.
7+
8+
1. Fork the repo and create your branch from `main`.
9+
2. If you've added code that should be tested, add tests.
10+
3. If you've changed APIs, update the documentation.
11+
4. Ensure the test suite passes.
12+
5. Make sure your code lints.
13+
6. If you haven't already, complete the Contributor License Agreement ("CLA").
14+
15+
## Contributor License Agreement ("CLA")
16+
In order to accept your pull request, we need you to submit a CLA. You only need
17+
to do this once to work on any of Facebook's open source projects.
18+
19+
Complete your CLA here: <https://code.facebook.com/cla>
20+
21+
## Issues
22+
We use GitHub issues to track public bugs. Please ensure your description is
23+
clear and has sufficient instructions to be able to reproduce the issue.
24+
25+
## License
26+
By contributing to Facebook AI Research Sequence-to-Sequence Toolkit (fairseq),
27+
you agree that your contributions will be licensed under the LICENSE file in
28+
the root directory of this source tree.
29+
30+
## Pre-commit hooks
31+
In order to ensure your code lints, there are pre-commit hooks configured in the repository which you can install.
32+
After installation, they will automatically run each time you commit.
33+
An abbreviated guide is given below; for more information, refer to [the offical pre-commit documentation](https://pre-commit.com/).
34+
35+
### Installation
36+
```
37+
pip install pre-commit
38+
pre-commit install
39+
```
40+
41+
### Usage
42+
Just commit your changes:
43+
```
44+
git commit -m "My informative commit message"
45+
```
46+
47+
If there was a failure, you will get feedback
48+
```
49+
[INFO] Initializing environment for https://github.com/PyCQA/flake8.
50+
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
51+
[INFO] Once installed this environment will be reused.
52+
[INFO] This may take a few minutes...
53+
[INFO] Installing environment for https://github.com/PyCQA/flake8.
54+
[INFO] Once installed this environment will be reused.
55+
[INFO] This may take a few minutes...
56+
Trim Trailing Whitespace.................................................Failed
57+
- hook id: trailing-whitespace
58+
- exit code: 1
59+
- files were modified by this hook
60+
Fixing examples/nllb/modeling/wmt15_benchmark/eval_langs2.sh
61+
Fix End of Files.........................................................Failed
62+
- hook id: end-of-file-fixer
63+
- exit code: 1
64+
- files were modified by this hook
65+
Fixing examples/few_shot/scripts/schedule_jobs_few_shot.py
66+
flake8...................................................................Passed
67+
```
68+
69+
Certain hooks modify your files to comply.
70+
To include these modifications, you will need to add them (i.e. `git add ...`) and commit again.
71+
72+
If all is well, you should see something like:
73+
```
74+
Trim Trailing Whitespace.................................................Passed
75+
Fix End of Files.........................................................Passed
76+
flake8...................................................................Passed
77+
[gshard-fix-ci 8698644e1] Fix lint, add pre-commit hooks
78+
10 files changed, 148 insertions(+), 110 deletions(-)
79+
create mode 100644 .flake8
80+
create mode 100644 .pre-commit-config.yaml
81+
rename examples/nllb/modeling/wmt15_benchmark/{eval_langs2.py => eval_langs2.sh} (99%)
82+
```

0 commit comments

Comments
 (0)