Skip to content

Commit

Permalink
drop black for ruff-format
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh committed Oct 29, 2023
1 parent 89a08ea commit 09de0a8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 21 deletions.
10 changes: 3 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,14 @@ default_install_hook_types: [pre-commit, commit-msg]

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.292
rev: v0.1.2
hooks:
- id: ruff
args: [--fix]

- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black-jupyter
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
rev: v1.6.1
hooks:
- id: mypy

Expand Down
9 changes: 0 additions & 9 deletions paper/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ @online{biewald_weights_2020
date = {2020},
url = {https://docs.wandb.ai/company/academics},
urldate = {2022-08-21},
abstract = {Machine Learning Experiment Tracking},
organization = {{Use Weights \& Biases for free to track experiments, collaborate, and publish results}}
}

Expand All @@ -20,7 +19,6 @@ @software{bradbury_jax_2018
author = {Bradbury, James and Frostig, Roy and Hawkins, Peter and Johnson, Matthew James and Leary, Chris and Maclaurin, Dougal and Necula, George and Paszke, Adam and VanderPlas, Jake and Wanderman-Milne, Skye and Zhang, Qiao},
date = {2018},
url = {http://github.com/google/jax},
abstract = {Composable transformations of Python+NumPy programs: differentiate, vectorize, JIT to GPU/TPU, and more},
version = {0.3.13}
}

Expand All @@ -31,7 +29,6 @@ @software{developers_tensorflow_2022
doi = {10.5281/zenodo.6574269},
url = {https://zenodo.org/record/6574269},
urldate = {2022-08-21},
abstract = {TensorFlow is an end-to-end open source platform for machine learning. It has a comprehensive, flexible ecosystem of tools, libraries, and community resources that lets researchers push the state-of-the-art in ML and developers easily build and deploy ML-powered applications.},
organization = {{Zenodo}}
}

Expand All @@ -45,7 +42,6 @@ @online{fey_fast_2019
doi = {10.48550/arXiv.1903.02428},
url = {http://arxiv.org/abs/1903.02428},
urldate = {2022-08-27},
abstract = {We introduce PyTorch Geometric, a library for deep learning on irregularly structured input data such as graphs, point clouds and manifolds, built upon PyTorch. In addition to general graph data structures and processing methods, it contains a variety of recently published methods from the domains of relational learning and 3D data processing. PyTorch Geometric achieves high data throughput by leveraging sparse GPU acceleration, by providing dedicated CUDA kernels and by introducing efficient mini-batch handling for input examples of different size. In this work, we present the library in detail and perform a comprehensive comparative study of the implemented methods in homogeneous evaluation scenarios.},
pubstate = {preprint},
keywords = {Computer Science - Machine Learning,Statistics - Machine Learning}
}
Expand All @@ -64,7 +60,6 @@ @article{harris_array_2020
doi = {10.1038/s41586-020-2649-2},
url = {https://www.nature.com/articles/s41586-020-2649-2},
urldate = {2022-08-21},
abstract = {Array programming provides a powerful, compact and expressive syntax for accessing, manipulating and operating on data in vectors, matrices and higher-dimensional arrays. NumPy is the primary array programming library for the Python language. It has an essential role in research analysis pipelines in fields as diverse as physics, chemistry, astronomy, geoscience, biology, psychology, materials science, engineering, finance and economics. For example, in astronomy, NumPy was an important part of the software stack used in the discovery of gravitational waves1 and in the first imaging of a black hole2. Here we review how a few fundamental array concepts lead to a simple and powerful programming paradigm for organizing, exploring and analysing scientific data. NumPy is the foundation upon which the scientific Python ecosystem is constructed. It is so pervasive that several projects, targeting audiences with specialized needs, have developed their own NumPy-like interfaces and array objects. Owing to its central position in the ecosystem, NumPy increasingly acts as an interoperability layer between such array computation libraries and, together with its application programming interface (API), provides a flexible framework to support the next decade of scientific and industrial analysis.},
issue = {7825},
keywords = {Computational neuroscience,Computational science,Computer science,Software,Solar physics}
}
Expand All @@ -82,7 +77,6 @@ @article{jumper_highly_2021
doi = {10.1038/s41586-021-03819-2},
url = {https://www.nature.com/articles/s41586-021-03819-2},
urldate = {2022-08-27},
abstract = {Proteins are essential to life, and understanding their structure can facilitate a mechanistic understanding of their function. Through an enormous experimental effort1–4, the structures of around 100,000 unique proteins have been determined5, but this represents a small fraction of the billions of known protein sequences6,7. Structural coverage is bottlenecked by the months to years of painstaking effort required to determine a single protein structure. Accurate computational approaches are needed to address this gap and to enable large-scale structural bioinformatics. Predicting the three-dimensional structure that a protein will adopt based solely on its amino acid sequence—the structure prediction component of the ‘protein folding problem’8—has been an important open research problem for more than 50~years9. Despite recent progress10–14, existing methods fall far~short of atomic accuracy, especially when no homologous structure is available. Here we provide the first computational method that can regularly predict protein structures with atomic accuracy even in cases in which no similar structure is known. We validated an entirely redesigned version of our neural network-based model, AlphaFold, in the challenging 14th Critical Assessment of protein Structure Prediction (CASP14)15, demonstrating accuracy competitive with experimental structures in a majority of cases and greatly outperforming other methods. Underpinning the latest version of AlphaFold is a novel machine learning approach that incorporates physical and biological knowledge about protein structure, leveraging multi-sequence alignments, into the design of the deep learning algorithm.},
issue = {7873},
keywords = {Computational biophysics,Machine learning,Protein structure predictions,Structural biology}
}
Expand All @@ -96,7 +90,6 @@ @unpublished{kendall_what_2017
eprintclass = {cs},
url = {http://arxiv.org/abs/1703.04977},
urldate = {2020-08-31},
abstract = {There are two major types of uncertainty one can model. Aleatoric uncertainty captures noise inherent in the observations. On the other hand, epistemic uncertainty accounts for uncertainty in the model -- uncertainty which can be explained away given enough data. Traditionally it has been difficult to model epistemic uncertainty in computer vision, but with new Bayesian deep learning tools this is now possible. We study the benefits of modeling epistemic vs. aleatoric uncertainty in Bayesian deep learning models for vision tasks. For this we present a Bayesian deep learning framework combining input-dependent aleatoric uncertainty together with epistemic uncertainty. We study models under the framework with per-pixel semantic segmentation and depth regression tasks. Further, our explicit uncertainty formulation leads to new loss functions for these tasks, which can be interpreted as learned attenuation. This makes the loss more robust to noisy data, also giving new state-of-the-art results on segmentation and depth regression benchmarks.},
keywords = {Computer Science - Computer Vision and Pattern Recognition}
}

Expand Down Expand Up @@ -124,7 +117,6 @@ @unpublished{lakshminarayanan_simple_2016
eprintclass = {cs, stat},
url = {http://arxiv.org/abs/1612.01474},
urldate = {2019-03-03},
abstract = {Deep neural networks (NNs) are powerful black box predictors that have recently achieved impressive performance on a wide spectrum of tasks. Quantifying predictive uncertainty in NNs is a challenging and yet unsolved problem. Bayesian NNs, which learn a distribution over weights, are currently the state-of-the-art for estimating predictive uncertainty; however these require significant modifications to the training procedure and are computationally expensive compared to standard (non-Bayesian) NNs. We propose an alternative to Bayesian NNs that is simple to implement, readily parallelizable, requires very little hyperparameter tuning, and yields high quality predictive uncertainty estimates. Through a series of experiments on classification and regression benchmarks, we demonstrate that our method produces well-calibrated uncertainty estimates which are as good or better than approximate Bayesian NNs. To assess robustness to dataset shift, we evaluate the predictive uncertainty on test examples from known and unknown distributions, and show that our method is able to express higher uncertainty on out-of-distribution examples. We demonstrate the scalability of our method by evaluating predictive uncertainty estimates on ImageNet.},
keywords = {Computer Science - Machine Learning,Statistics - Machine Learning}
}

Expand All @@ -139,7 +131,6 @@ @online{paszke_pytorch_2019
doi = {10.48550/arXiv.1912.01703},
url = {http://arxiv.org/abs/1912.01703},
urldate = {2022-08-27},
abstract = {Deep learning frameworks have often focused on either usability or speed, but not both. PyTorch is a machine learning library that shows that these two goals are in fact compatible: it provides an imperative and Pythonic programming style that supports code as a model, makes debugging easy and is consistent with other popular scientific computing libraries, while remaining efficient and supporting hardware accelerators such as GPUs. In this paper, we detail the principles that drove the implementation of PyTorch and how they are reflected in its architecture. We emphasize that every aspect of PyTorch is a regular Python program under the full control of its user. We also explain how the careful and pragmatic implementation of the key components of its runtime enables them to work together to achieve compelling performance. We demonstrate the efficiency of individual subsystems, as well as the overall speed of PyTorch on several common benchmarks.},
pubstate = {preprint},
keywords = {Computer Science - Machine Learning,Computer Science - Mathematical Software,Statistics - Machine Learning}
}
9 changes: 4 additions & 5 deletions tests/test_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def test_load_tb_events_strict(
events_dict = load_tb_events(glob("tests/runs/strict/run_*"), verbose=verbose)
actual_type = type(events_dict)
assert_dict = f"return type of load_tb_events() is {actual_type}, expected dict"
assert actual_type == dict, assert_dict
assert actual_type is dict, assert_dict

actual_keys = list(events_dict)
assert_keys = (
Expand Down Expand Up @@ -108,10 +108,9 @@ def test_load_tb_events_handle_dup_steps() -> None:
dic["dup_steps/foo"] for dic in [kept_first_dups, kept_last_dups, mean_dups]
)

pd.testing.assert_frame_equal((df_first + df_last) / 2, df_mean), (
"taking the average of keeping first and last duplicates gave different result "
"than taking the mean of duplicate steps"
)
# taking the average of keeping first and last duplicates should give same result
# as taking the mean of duplicate steps
pd.testing.assert_frame_equal((df_first + df_last) / 2, df_mean)


def test_load_tb_events_min_runs_per_step() -> None:
Expand Down

0 comments on commit 09de0a8

Please sign in to comment.