Skip to content

Commit fa69b4c

Browse files
committed
Correct ferminet main program to have correct shebang
PiperOrigin-RevId: 765210239 Change-Id: Ifcbf27f0ef293ffc969308f49a9fc3a97e16c212
1 parent 82dbd7b commit fa69b4c

3 files changed

Lines changed: 20 additions & 3 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ calculation.
5656
ferminet --config ferminet/configs/atom.py --config.system.atom Li --config.batch_size 256 --config.pretrain.iterations 100
5757
```
5858

59+
or
60+
61+
```shell
62+
python3 ferminet/main.py --config ferminet/configs/atom.py --config.system.atom Li --config.batch_size 256 --config.pretrain.iterations 100
63+
```
64+
5965
will train FermiNet to find the ground-state wavefunction of the Li atom using a
6066
batch size of 1024 MCMC configurations ("walkers" in variational Monte Carlo
6167
language), and 100 iterations of pretraining (the default of 1000 is overkill

bin/ferminet renamed to ferminet/main.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,10 @@ def main(_):
3535
train.train(cfg)
3636

3737

38+
def main_wrapper():
39+
# For calling from setuptools' console_script entry-point.
40+
app.run(main)
41+
42+
3843
if __name__ == '__main__':
3944
app.run(main)

setup.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,19 @@ def ferminet_test_suite():
4949
setup(
5050
name='ferminet',
5151
version='0.2',
52-
description=('A library to train networks to represent ground '
53-
'state wavefunctions of fermionic systems'),
52+
description=(
53+
'A library to train networks to represent ground '
54+
'state wavefunctions of fermionic systems'
55+
),
5456
url='https://github.com/deepmind/ferminet',
5557
author='DeepMind',
5658
author_email='no-reply@google.com',
5759
# Contained modules and scripts.
58-
scripts=['bin/ferminet'],
60+
entry_points={
61+
'console_scripts': [
62+
'ferminet = ferminet.main:main_wrapper',
63+
],
64+
},
5965
packages=find_packages(),
6066
install_requires=REQUIRED_PACKAGES,
6167
extras_require={'testing': ['flake8', 'pylint', 'pytest', 'pytype']},

0 commit comments

Comments
 (0)