From 1079111b7c5c1a7b092aac6eef64f9569a9fb844 Mon Sep 17 00:00:00 2001 From: Hatem Helal Date: Tue, 10 Oct 2023 10:30:36 +0000 Subject: [PATCH] fix pre-commit checks --- notebooks/binom_factor_table.ipynb | 25 ++++++++++++++------ pyscf_ipu/experimental/binom_factor_table.py | 4 ++++ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/notebooks/binom_factor_table.ipynb b/notebooks/binom_factor_table.ipynb index ee8a835..ee2258e 100644 --- a/notebooks/binom_factor_table.ipynb +++ b/notebooks/binom_factor_table.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 5, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -35,7 +35,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 2, "metadata": {}, "outputs": [ { @@ -60,9 +60,16 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 3, "metadata": {}, "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:absl:No GPU/TPU found, falling back to CPU. (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.)\n" + ] + }, { "name": "stdout", "output_type": "stream", @@ -142,7 +149,7 @@ "a**3 + 9*a**2*b + 9*a*b**2 + b**3" ] }, - "execution_count": 7, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } @@ -174,7 +181,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 4, "metadata": {}, "outputs": [ { @@ -235,7 +242,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 5, "metadata": {}, "outputs": [ { @@ -419,7 +426,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 6, "metadata": {}, "outputs": [ { @@ -486,7 +493,11 @@ "inds, weights[inds]\n", "\n", "with open(\"../pyscf_ipu/experimental/binom_factor_table.py\", \"w\") as f:\n", + " print(\"# Copyright (c) 2023 Graphcore Ltd. All rights reserved.\", file=f)\n", " print(\"# AUTOGENERATED from notebooks/binom_factor_table.ipynb\", file=f)\n", + " print(\"# fmt: off\", file=f)\n", + " print(\"# flake8: noqa\", file=f)\n", + " print(\"# isort: skip_file\", file=f)\n", " print(\"from numpy import array\", file=f)\n", " print(\"binom_factor_table = \", repr((inds, weights[inds])), file=f)\n", "\n", diff --git a/pyscf_ipu/experimental/binom_factor_table.py b/pyscf_ipu/experimental/binom_factor_table.py index 6fb1bde..6f4041f 100644 --- a/pyscf_ipu/experimental/binom_factor_table.py +++ b/pyscf_ipu/experimental/binom_factor_table.py @@ -1,4 +1,8 @@ +# Copyright (c) 2023 Graphcore Ltd. All rights reserved. # AUTOGENERATED from notebooks/binom_factor_table.ipynb +# fmt: off +# flake8: noqa +# isort: skip_file from numpy import array binom_factor_table = ((array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2,