From 2b7b7c9c6edeb89ca4e1f39883aaef61ac9c663f Mon Sep 17 00:00:00 2001 From: Vincent Jeanselme Date: Tue, 2 Feb 2021 16:17:42 +0000 Subject: [PATCH 1/3] Allow to choose other optimizer (#39) --- dsm/utilities.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dsm/utilities.py b/dsm/utilities.py index 4d82494..a5847b8 100644 --- a/dsm/utilities.py +++ b/dsm/utilities.py @@ -57,7 +57,7 @@ def pretrain_dsm(model, t_train, e_train, t_valid, e_valid, risks=model.risks) premodel.double() - optimizer = torch.optim.Adam(premodel.parameters(), lr=lr) + optimizer = get_optimizer(model, lr) oldcost = float('inf') patience = 0 @@ -137,7 +137,7 @@ def train_dsm(model, model.scale[str(r+1)].data.fill_(float(premodel.scale[str(r+1)])) model.double() - optimizer = torch.optim.Adam(model.parameters(), lr=lr) + optimizer = get_optimizer(model, lr) patience = 0 oldcost = float('inf') From 34769474089487d5a9a622026d356a986bceda6f Mon Sep 17 00:00:00 2001 From: shikhareddy <66842982+shikhareddy@users.noreply.github.com> Date: Wed, 3 Feb 2021 21:47:55 +0530 Subject: [PATCH 2/3] Adding code coverage to travis.yml (#38) --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 3638e13..0558bc9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,3 +15,7 @@ install: script: - python -m pytest tests/ - pylint --fail-under=8 dsm/ + +#command to track code coverage +after_success: + - bash <(curl -s https://codecov.io/bash) From 22b826a2705d2c607a53a6d3ccafaea8eb271aaa Mon Sep 17 00:00:00 2001 From: shikhareddy <66842982+shikhareddy@users.noreply.github.com> Date: Wed, 3 Feb 2021 21:52:09 +0530 Subject: [PATCH 3/3] Update __init__.py (#40) --- dsm/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dsm/__init__.py b/dsm/__init__.py index 87c27a1..fdb9f27 100644 --- a/dsm/__init__.py +++ b/dsm/__init__.py @@ -25,6 +25,8 @@ r""" [![Build Status](https://travis-ci.org/autonlab/DeepSurvivalMachines.svg?branch=master)](https://travis-ci.org/autonlab/DeepSurvivalMachines)     +[![codecov](https://codecov.io/gh/autonlab/DeepSurvivalMachines/branch/main/graph/badge.svg?token=FU1HB5O92D)](https://codecov.io/gh/autonlab/DeepSurvivalMachines) +    [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)     [![GitHub Repo stars](https://img.shields.io/github/stars/autonlab/DeepSurvivalMachines?style=social)](https://github.com/autonlab/DeepSurvivalMachines)