Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Commit

Permalink
SUBMARINE-588. [SDK] Fix checkstyle error in core.py
Browse files Browse the repository at this point in the history
### What is this PR for?
Fix checkstyle error in submarine/ml/pytorch/model/ctr/
https://github.com/apache/submarine/runs/923503735
```bash
Run ./submarine-sdk/pysubmarine/github-actions/lint.sh
+++ dirname ./submarine-sdk/pysubmarine/github-actions/lint.sh
++ cd ./submarine-sdk/pysubmarine/github-actions
++ pwd
+ FWDIR=/home/runner/work/submarine/submarine/submarine-sdk/pysubmarine/github-actions
+ cd /home/runner/work/submarine/submarine/submarine-sdk/pysubmarine/github-actions
+ cd ..
+ pycodestyle --max-line-length=100 -- submarine tests
+ pylint --ignore experiment '--msg-template={path} ({line},{column}): [{msg_id} {symbol}] {msg}' --rcfile=pylintrc -- submarine tests
************* Module submarine.ml.pytorch.model.ctr.afm
submarine/ml/pytorch/model/ctr/afm.py (30,0): [W0223 abstract-method] Method '_forward_unimplemented' is abstract in class 'Module' but is not overridden
submarine/ml/pytorch/model/ctr/afm.py (57,0): [W0223 abstract-method] Method '_forward_unimplemented' is abstract in class 'Module' but is not overridden
submarine/ml/pytorch/model/ctr/afm.py (81,0): [W0223 abstract-method] Method '_forward_unimplemented' is abstract in class 'Module' but is not overridden
************* Module submarine.ml.pytorch.model.ctr.deepfm
submarine/ml/pytorch/model/ctr/deepfm.py (32,0): [W0223 abstract-method] Method '_forward_unimplemented' is abstract in class 'Module' but is not overridden
************* Module submarine.ml.pytorch.layers.core
submarine/ml/pytorch/layers/core.py (20,0): [W0223 abstract-method] Method '_forward_unimplemented' is abstract in class 'Module' but is not overridden
submarine/ml/pytorch/layers/core.py (42,0): [W0223 abstract-method] Method '_forward_unimplemented' is abstract in class 'Module' but is not overridden
submarine/ml/pytorch/layers/core.py (57,0): [W0223 abstract-method] Method '_forward_unimplemented' is abstract in class 'Module' but is not overridden
submarine/ml/pytorch/layers/core.py (72,0): [W0223 abstract-method] Method '_forward_unimplemented' is abstract in class 'Module' but is not overridden
```

### What type of PR is it?
[Hot Fix]

### Todos
* [ ] - Task

### What is the Jira issue?
https://issues.apache.org/jira/browse/SUBMARINE-588

### How should this be tested?
https://travis-ci.org/github/pingsutw/hadoop-submarine/builds/712952549

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Kevin Su <[email protected]>

Closes #365 from pingsutw/SUBMARINE-588 and squashes the following commits:

857bdfe [Kevin Su] Add apt update
5cb18cf [Kevin Su] Update torch version
4ff4458 [Kevin Su] Update pip
e3f4511 [Kevin Su] SUBMARINE-588. [SDK] Fix checkstyle error in core.py
  • Loading branch information
pingsutw authored and xunliu committed Jul 31, 2020
1 parent de55582 commit 8260a08
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
- uses: actions/checkout@v1
- name: Verify MySQL connection from host
run: |
sudo apt update
sudo apt-get install -y mysql-client
sudo service mysql restart
# default mysql account and password in github actions
Expand All @@ -34,6 +35,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip
pip install ./submarine-sdk/pysubmarine/.
pip install -q tensorflow==${{ matrix.tf-version }}
pip install -r ./submarine-sdk/pysubmarine/github-actions/test-requirements.txt
Expand Down
2 changes: 1 addition & 1 deletion submarine-sdk/pysubmarine/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
'certifi >= 14.05.14',
'python-dateutil >= 2.5.3',
'pyarrow==0.17.0',
'torch',
'torch>=1.4.0',
],
classifiers=[
'Intended Audience :: Developers',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from torch import nn


# pylint: disable=W0223
class FeatureLinear(nn.Module):

def __init__(self, num_features, out_features):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def model_fn(self, params):
return _AFM(**self.params['model']['kwargs'])


# pylint: disable=W0223
class _AFM(nn.Module):

def __init__(self, num_features: int, embedding_dim: int,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def model_fn(self, params):
return _DeepFM(**self.params['model']['kwargs'])


# pylint: disable=W0223
class _DeepFM(nn.Module):

def __init__(self, num_fields, num_features, embedding_dim, out_features,
Expand Down

0 comments on commit 8260a08

Please sign in to comment.