Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 7, 2024
1 parent 65c9dd3 commit 3377533
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 43 deletions.
22 changes: 11 additions & 11 deletions examples/nbs/02-TextClassification.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "52697382",
"id": "0",
"metadata": {
"id": "52697382"
},
Expand All @@ -13,7 +13,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "e130bd40",
"id": "1",
"metadata": {
"id": "e130bd40"
},
Expand All @@ -28,7 +28,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "592802fe",
"id": "2",
"metadata": {
"id": "592802fe"
},
Expand All @@ -42,7 +42,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "uTrRNUfn5wg4",
"id": "3",
"metadata": {
"id": "uTrRNUfn5wg4"
},
Expand All @@ -55,7 +55,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "bf38e2b8",
"id": "4",
"metadata": {
"id": "bf38e2b8"
},
Expand All @@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "5fc8603f",
"id": "5",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
Expand Down Expand Up @@ -119,7 +119,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "pXjv4W2hSs20",
"id": "6",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
Expand Down Expand Up @@ -219,7 +219,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "9f5d0474",
"id": "7",
"metadata": {
"id": "9f5d0474",
"pycharm": {
Expand Down Expand Up @@ -251,7 +251,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "4a9c19a3",
"id": "8",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
Expand Down Expand Up @@ -508,7 +508,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d0b96bd0-3949-4dd5-b6d9-4fa6ac213e30",
"id": "9",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
Expand Down Expand Up @@ -536,7 +536,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "6a95bc01-4291-49a8-bea7-c76ba64bf42a",
"id": "10",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
Expand Down
12 changes: 6 additions & 6 deletions examples/nbs/04-RayDataset.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "9a226830",
"id": "0",
"metadata": {
"pycharm": {
"name": "#%% md\n"
Expand Down Expand Up @@ -43,7 +43,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "1fffc779",
"id": "1",
"metadata": {
"pycharm": {
"name": "#%%\n"
Expand All @@ -59,7 +59,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "b94e30dd",
"id": "2",
"metadata": {
"pycharm": {
"name": "#%%\n"
Expand All @@ -77,7 +77,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "3822e6bb",
"id": "3",
"metadata": {
"pycharm": {
"name": "#%%\n"
Expand All @@ -96,7 +96,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c53a4e2f",
"id": "4",
"metadata": {
"pycharm": {
"name": "#%%\n"
Expand All @@ -110,7 +110,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "31ac27eb",
"id": "5",
"metadata": {
"pycharm": {
"name": "#%%\n"
Expand Down
10 changes: 5 additions & 5 deletions examples/nbs/05-model_fit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "eb3a591f",
"id": "0",
"metadata": {},
"source": [
"<!--<badge>--><a href=\"https://colab.research.google.com/github/gradsflow/gradsflow/blob/main/examples/nbs/05-model_fit.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a><!--</badge>-->"
Expand All @@ -11,7 +11,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "62f766aa",
"id": "1",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -32,7 +32,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "5794bc62",
"id": "2",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -61,7 +61,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "fa61d539",
"id": "3",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -90,7 +90,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c4be173e",
"id": "4",
"metadata": {},
"outputs": [
{
Expand Down
30 changes: 15 additions & 15 deletions examples/nbs/06-AutoModel_fit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"cells": [
{
"cell_type": "markdown",
"id": "6f5e7c30",
"id": "0",
"metadata": {},
"source": [
"<!--<badge>--><a href=\"https://colab.research.google.com/github/gradsflow/gradsflow/blob/main/examples/nbs/06-AutoModel_fit.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a><!--</badge>-->"
]
},
{
"cell_type": "markdown",
"id": "29409c2e",
"id": "1",
"metadata": {},
"source": [
"This example shows how to search hyperparameters for a model with Tuner module."
Expand All @@ -19,7 +19,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "babe34df",
"id": "2",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -32,7 +32,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "b61db9fd",
"id": "3",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -43,7 +43,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "52430b02",
"id": "4",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -57,7 +57,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "067473d3",
"id": "5",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -75,7 +75,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c46e0094",
"id": "6",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -85,7 +85,7 @@
},
{
"cell_type": "markdown",
"id": "dd8d5d58",
"id": "7",
"metadata": {},
"source": [
"## Registering hyperparameters\n",
Expand All @@ -99,7 +99,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "f16828b3",
"id": "8",
"metadata": {},
"outputs": [
{
Expand All @@ -122,7 +122,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "8b4af23b",
"id": "9",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -139,7 +139,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "ef6926ed",
"id": "10",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -364,7 +364,7 @@
},
{
"cell_type": "markdown",
"id": "85178f72",
"id": "11",
"metadata": {},
"source": [
"### The second way to register hyperparameters is to use Tuner module."
Expand All @@ -373,7 +373,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "ad2f4f8f",
"id": "12",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -388,7 +388,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "3b1f7c70",
"id": "13",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -400,7 +400,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "b3dccb5e",
"id": "14",
"metadata": {},
"outputs": [
{
Expand Down
1 change: 1 addition & 0 deletions gradsflow/data/common.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Provide some common functionalities/utilities for Datasets"""

# Copyright (c) 2021 GradsFlow. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
1 change: 1 addition & 0 deletions gradsflow/data/image.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Data loader for image dataset"""

# Copyright (c) 2021 GradsFlow. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
9 changes: 3 additions & 6 deletions gradsflow/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,13 @@ def forward(self, x):
return self.learner(x)

# skipcp: PTC-W0049
def backward(self, loss):
...
def backward(self, loss): ...

# skipcp: PTC-W0049
def eval(self):
...
def eval(self): ...

# skipcp: PTC-W0049
def train(self):
...
def train(self): ...


class BaseModel(Base):
Expand Down

0 comments on commit 3377533

Please sign in to comment.