-
Notifications
You must be signed in to change notification settings - Fork 627
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bugs when collecting results from
mp.spawn
- Loading branch information
1 parent
96eb311
commit d0ba4d4
Showing
5 changed files
with
136 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
from recbole.quick_start.quick_start import ( | ||
run, | ||
run_recbole, | ||
objective_function, | ||
load_data_and_model, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,9 +8,8 @@ | |
# @Email : [email protected], [email protected], [email protected] | ||
|
||
import argparse | ||
from ast import arg | ||
|
||
from recbole.quick_start import run_recbole, run_recboles | ||
from recbole.quick_start import run | ||
|
||
if __name__ == "__main__": | ||
parser = argparse.ArgumentParser() | ||
|
@@ -44,26 +43,13 @@ | |
args.config_files.strip().split(" ") if args.config_files else None | ||
) | ||
|
||
if args.nproc == 1 and args.world_size <= 0: | ||
run_recbole( | ||
model=args.model, dataset=args.dataset, config_file_list=config_file_list | ||
) | ||
else: | ||
if args.world_size == -1: | ||
args.world_size = args.nproc | ||
import torch.multiprocessing as mp | ||
|
||
mp.spawn( | ||
run_recboles, | ||
args=( | ||
args.model, | ||
args.dataset, | ||
config_file_list, | ||
args.ip, | ||
args.port, | ||
args.world_size, | ||
args.nproc, | ||
args.group_offset, | ||
), | ||
nprocs=args.nproc, | ||
) | ||
run( | ||
args.model, | ||
args.dataset, | ||
config_file_list=config_file_list, | ||
nproc=args.nproc, | ||
world_size=args.world_size, | ||
ip=args.ip, | ||
port=args.port, | ||
group_offset=args.group_offset, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters