Skip to content

Commit

Permalink
Fix parse issues in certain distributions
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertDominguez committed Jun 7, 2022
1 parent 8f6c847 commit 171b5d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions neural_admixture/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
log = logging.getLogger(__name__)

def main():
assert len(sys.argv) > 2, 'Please provide either the argument "train" or "infer" to choose running mode.'
arg_list = tuple(sys.argv)
assert len(arg_list) > 1, 'Please provide either the argument "train" or "infer" to choose running mode.'
if sys.argv[1] == 'train':
from src import train
sys.exit(train.main(sys.argv[2:]))
sys.exit(train.main(arg_list[2:]))
if sys.argv[1] == 'infer':
from src import inference
sys.exit(inference.main(sys.argv[2:]))
log.error(f'Invalid argument {sys.argv[1]}. Please run either "neural-admixture train" or "neural-admixture infer"')
sys.exit(inference.main(arg_list[2:]))
log.error(f'Invalid argument {arg_list[1]}. Please run either "neural-admixture train" or "neural-admixture infer"')
sys.exit(1)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

setup(
name='neural-admixture',
version='1.1.4',
version='1.1.5',
long_description=(Path(__file__).parent / 'README.md').read_text(),
long_description_content_type='text/markdown',
description='Population clustering with autoencoders',
Expand Down

0 comments on commit 171b5d8

Please sign in to comment.