Skip to content

Commit

Permalink
Fixed error that caused replay to be run incorrectly.
Browse files Browse the repository at this point in the history
  • Loading branch information
GMvandeVen committed Nov 23, 2022
1 parent b273d97 commit cc51706
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 28 deletions.
1 change: 1 addition & 0 deletions compare_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ def collect_all(method_dict, seed_list, args, name=None):
AR1 = {}
AR1 = collect_all(AR1, seed_list, args, name="AR1")
args.cwr = False
args.cwr_plus = False
args.si = False
args.reg_only_hidden = False

Expand Down
13 changes: 0 additions & 13 deletions main_cl.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,19 +160,6 @@ def run(args, verbose=False):
test_datasets = new_test_datasets


#-------------------------------------------------------------------------------------------------#

#-----------------------#
#----- EXPERT GATE -----#
#-----------------------#

# Define the expert gate
if utils.checkattr(args, 'expert_gate'):
if verbose:
print("\nDefining the expert gate...")
#expert_gate = ...


#-------------------------------------------------------------------------------------------------#

#----------------------#
Expand Down
15 changes: 11 additions & 4 deletions options.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import argparse
from utils import checkattr

##-------------------------------------------------------------------------------------------------------------------##

# Where to store the data / results / models / plots
store = "./store"

##-------------------------------------------------------------------------------------------------------------------##

Expand All @@ -25,11 +29,14 @@ def add_general_options(parser, single_task=False, only_fc=True, **kwargs):
parser.add_argument('--get-stamp', action='store_true', help='print param-stamp & exit')
parser.add_argument('--seed', type=int, default=0, help='random seed (for each random-module used)')
parser.add_argument('--no-gpus', action='store_false', dest='cuda', help="don't use GPUs")
parser.add_argument('--data-dir', type=str, default='./store/datasets', dest='d_dir', help="default: %(default)s")
parser.add_argument('--model-dir', type=str, default='./store/models', dest='m_dir', help="default: %(default)s")
parser.add_argument('--data-dir', type=str, default='{}/datasets'.format(store), dest='d_dir',
help="default: %(default)s")
parser.add_argument('--model-dir', type=str, default='{}/models'.format(store), dest='m_dir',
help="default: %(default)s")
if not single_task:
parser.add_argument('--plot-dir', type=str, default='./store/plots', dest='p_dir', help="default: %(default)s")
parser.add_argument('--results-dir', type=str, default='./store/results', dest='r_dir',
parser.add_argument('--plot-dir', type=str, default='{}/plots'.format(store), dest='p_dir',
help="default: %(default)s")
parser.add_argument('--results-dir', type=str, default='{}/results'.format(store), dest='r_dir',
help="default: %(default)s")
return parser

Expand Down
4 changes: 4 additions & 0 deletions options_gen_classifier.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import argparse
from utils import checkattr

##-------------------------------------------------------------------------------------------------------------------##

# Where to store the data / results / models / plots
store = "./store"

##-------------------------------------------------------------------------------------------------------------------##

Expand Down
11 changes: 9 additions & 2 deletions preprocess_core50.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@

## NOTE: The loading of the COR50e-dataset is based on: https://github.com/Continvvm/continuum (retrieved 18 Dec 2020)

##-------------------------------------------------------------------------------------------------------------------##

# Where to store the data / results / models / plots
store = "./store"

##-------------------------------------------------------------------------------------------------------------------##

####################################################################################################################

Expand Down Expand Up @@ -118,14 +124,15 @@ def handle_inputs():
filename = 'preprocess_core50.py'
description = 'Download and preprocess (with ResNet18 pretrained on ImageNet) the CORe50 dataset.'
parser = argparse.ArgumentParser('./{}.py'.format(filename), description=description)
parser.add_argument('--data-dir', type=str, default='./store/datasets', dest='d_dir', help="default: %(default)s")
parser.add_argument('--data-dir', type=str, default='{}/datasets'.format(store),
dest='d_dir', help="default: %(default)s")
parser.add_argument('--batch', type=int, default=512, help="batch-size for pre-processing")
args = parser.parse_args()
return args


## Function for downloading and pre-processing the CORe50 dataset
def download_and_preprocess(data_dir='./store/datasets', batch_size=512):
def download_and_preprocess(data_dir='{}/datasets'.format(store), batch_size=512):

# Create folders, if necessary
if not os.path.isdir(data_dir):
Expand Down
18 changes: 9 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
numpy==1.19.5
scipy==1.5.4
pandas==1.1.5
torch==1.7.1
torchvision==0.8.2
tqdm==4.58.0
scikit-learn==0.24.1
matplotlib==3.3.4
visdom==0.1.8.9
numpy
scipy
pandas
torch
torchvision
tqdm
scikit-learn
matplotlib
visdom

0 comments on commit cc51706

Please sign in to comment.