From 442df07ca1a90f04c685cdae9f8e488bbffc2f83 Mon Sep 17 00:00:00 2001 From: Cristian Garcia Date: Fri, 7 Oct 2022 03:02:17 +0000 Subject: [PATCH] remove all trailing whitespaces --- .github/ISSUE_TEMPLATE/bug_report.md | 10 +-- .github/analytics/get_repo_metrics.py | 10 +-- .../analytics/issue_activity_since_date.gql | 6 +- .github/analytics/pr_data_query.gql | 6 +- .github/pull_request_template.md | 2 +- .github/workflows/build.yml | 6 +- CHANGELOG.md | 2 +- README.md | 8 +-- dev/.devcontainer/devcontainer.json | 6 +- docs/README.md | 10 +-- docs/_ext/codediff.py | 4 +- docs/_ext/codediff_test.py | 2 +- docs/_templates/autosummary/flax_module.rst | 4 +- docs/advanced_topics/contributing.md | 16 ++--- .../convert_pytorch_to_flax.rst | 68 +++++++++---------- docs/advanced_topics/lift.md | 6 +- docs/advanced_topics/linen_upgrade_guide.rst | 48 ++++++------- docs/advanced_topics/module_lifecycle.rst | 4 +- docs/advanced_topics/optax_update_guide.rst | 4 +- docs/conf.py | 2 +- docs/examples.rst | 26 +++---- docs/flip/1777-default-dtype.md | 2 +- docs/flip/2434-general-metadata.md | 8 +-- docs/getting_started.ipynb | 2 +- docs/getting_started.md | 2 +- docs/guides/extracting_intermediates.rst | 6 +- docs/guides/flax_basics.ipynb | 4 +- docs/guides/flax_basics.md | 4 +- docs/guides/index.rst | 1 - docs/guides/jax_for_the_impatient.ipynb | 4 +- docs/guides/jax_for_the_impatient.md | 4 +- docs/guides/lr_schedule.rst | 40 +++++------ docs/guides/model_surgery.rst | 6 +- docs/guides/setup_or_nncompact.rst | 14 ++-- docs/index.rst | 58 ++++++++-------- docs/mission.md | 4 +- docs/notebooks/full_eval.ipynb | 2 +- docs/notebooks/full_eval.md | 2 +- docs/notebooks/index.rst | 2 +- docs/notebooks/linen_intro.ipynb | 30 ++++---- docs/notebooks/linen_intro.md | 30 ++++---- docs/overview.md | 2 +- examples/README.md | 8 +-- .../imagenet/imagenet_fake_data_benchmark.py | 2 +- examples/nlp_seq/README.md | 4 +- examples/ppo/ppo_lib.py | 2 +- examples/sst2/input_pipeline_test.py | 2 +- flax/core/lift.py | 8 +-- flax/errors.py | 14 ++-- flax/linen/initializers.py | 2 +- flax/linen/linear.py | 4 +- flax/linen/module.py | 12 ++-- flax/linen/summary.py | 28 ++++---- flax/linen/transforms.py | 6 +- flax/training/checkpoints.py | 10 +-- flax/training/early_stopping.py | 6 +- flax/training/lr_schedule.py | 2 +- flax/traverse_util.py | 4 +- pytest.ini | 2 +- setup.cfg | 2 +- tests/checkpoints_test.py | 16 ++--- tests/core/core_scope_test.py | 6 +- tests/core/design/core_attention_test.py | 2 +- tests/core/design/core_auto_encoder_test.py | 4 +- tests/core/design/core_dense_test.py | 2 +- tests/core/design/core_scan_test.py | 6 +- tests/early_stopping_test.py | 20 +++--- tests/linen/linen_module_test.py | 2 +- tests/linen/linen_transforms_test.py | 12 ++-- tests/linen/summary_test.py | 48 ++++++------- tests/tensorboard_test.py | 4 +- tests/traverse_util_test.py | 12 ++-- 72 files changed, 364 insertions(+), 365 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 355334218..b645fea27 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -10,11 +10,11 @@ assignees: '' Provide as much information as possible. At least, this should include a description of your issue and steps to reproduce the problem. If possible also provide a summary of what steps or workarounds you have already tried. ### System information -- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): -- Flax, jax, jaxlib versions (obtain with `pip show flax jax jaxlib`: -- Python version: -- GPU/TPU model and memory: -- CUDA version (if applicable): +- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): +- Flax, jax, jaxlib versions (obtain with `pip show flax jax jaxlib`: +- Python version: +- GPU/TPU model and memory: +- CUDA version (if applicable): ### Problem you have encountered: diff --git a/.github/analytics/get_repo_metrics.py b/.github/analytics/get_repo_metrics.py index 8ebce468a..319ad8b09 100644 --- a/.github/analytics/get_repo_metrics.py +++ b/.github/analytics/get_repo_metrics.py @@ -110,7 +110,7 @@ def parse_single_query(data, query_type): Parses the data returned by `send_query` .. warning:: - + Like `send_query`, the logic here depends on the specific structure of the query (e.g. it must be an issue or PR query, and must have a total count). @@ -206,7 +206,7 @@ def _get_pr_features(prs): time_labeled_or_assigned = None time_merged_or_closed = None time_review = None - + if pr["reviews"]["nodes"]: review = pr["reviews"]["nodes"][0] time_review = _to_datetime(review["createdAt"]) @@ -258,9 +258,9 @@ def _shift_n_months(date: datetime, n: int) -> datetime: def _rolling_window( - df: pd.DataFrame, - f: Callable[[pd.DataFrame], pd.Series], - window_size: int = 6, + df: pd.DataFrame, + f: Callable[[pd.DataFrame], pd.Series], + window_size: int = 6, step: int = 1, ) -> pd.DataFrame: # start of month of the first issue diff --git a/.github/analytics/issue_activity_since_date.gql b/.github/analytics/issue_activity_since_date.gql index d23af57c9..5fa9a098f 100644 --- a/.github/analytics/issue_activity_since_date.gql +++ b/.github/analytics/issue_activity_since_date.gql @@ -1,7 +1,7 @@ { # Queries all the issues in a repo. For each issue, we get some basic data such as - # the number, state, labels, and title. The most important part is the 'timelineItems' - # which are the events that happened to the issue, we can use the information about + # the number, state, labels, and title. The most important part is the 'timelineItems' + # which are the events that happened to the issue, we can use the information about # the datetime about certain key events to define some metrics. Note that we are # getting more information than is probably needed but its fine for now. repository(owner: "_REPO_OWNER_", name: "_REPO_NAME_") { @@ -52,7 +52,7 @@ } } } - } + } } } } diff --git a/.github/analytics/pr_data_query.gql b/.github/analytics/pr_data_query.gql index c8a6de18e..867e0934f 100644 --- a/.github/analytics/pr_data_query.gql +++ b/.github/analytics/pr_data_query.gql @@ -1,9 +1,9 @@ query { # Queries all the Pull Requests in a repo. For each issue, we get some basic data such as - # the number, state, reviews, and title. The most important part is the 'timelineItems' - # which are the events that happened to the issue, we can use the information about + # the number, state, reviews, and title. The most important part is the 'timelineItems' + # which are the events that happened to the issue, we can use the information about # the datetime about certain key events to define some metrics. We also use the 'reviews' - # as indicators for certain metrics. Note that we are getting more information than is + # as indicators for certain metrics. Note that we are getting more information than is # probably needed but its fine for now. repository(owner:"_REPO_OWNER_", name:"_REPO_NAME_") { pullRequests(first:100) { diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 0cba729fa..dbc4a5a08 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -2,7 +2,7 @@