Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
Revert "Selectively install through pip (#139)" due to potential pip …
Browse files Browse the repository at this point in the history
…install issue (#142)

* Revert "Selectively install through pip (#139)"

This reverts commit 1d17483.

* Add exit code of subprocess for trial_keeper

* Update README, add link to PAImode doc
  • Loading branch information
yds05 authored Sep 29, 2018
1 parent ad8b0f0 commit 9d88f1b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 28 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ To learn more about how this example was constructed and how to analyze the expe
* [Tuners supported by NNI.](src/sdk/pynni/nni/README.md)
* [How to enable early stop (i.e. assessor) in an experiment?](docs/EnableAssessor.md)
* [How to run an experiment on multiple machines?](docs/RemoteMachineMode.md)
* [How to run an experiment on OpenPAI?](docs/PAIMode.md)
* [How to write a customized tuner?](docs/CustomizedTuner.md)
* [How to write a customized assessor?](examples/assessors/README.md)
* [How to resume an experiment?](docs/NNICTLDOC.md)
Expand Down
41 changes: 13 additions & 28 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,9 @@ def read(fname):

class CustomInstallCommand(install):
'''a customized install class in pip module'''
user_options = install.user_options + [
('sdk-only', None, '<add --sdk-only if you want to only install nni sdk')
]

def initialize_options(self):
install.initialize_options(self)
self.sdk_only = None

def install_requires(self):
self.install_requires_list = [
'astor',
'hyperopt',
'json_tricks',
'numpy',
'psutil',
'pyyaml',
'requests',
'scipy',
'schema',
'pyhdfs'
]
for pkg in self.install_requires_list:
subprocess.run(['python3', '-m', 'pip', 'install', pkg], check=True)

def run(self):
super().run()
if self.sdk_only is None:
subprocess.run(['make', 'pip-install'], check=True)
self.install_requires()
subprocess.run(['make', 'pip-install'], check=True)

setup(
name = 'NNI',
Expand All @@ -78,7 +52,18 @@ def run(self):
},
package_data = {'nni': ['**/requirements.txt']},
python_requires = '>=3.5',

install_requires = [
'astor',
'hyperopt',
'json_tricks',
'numpy',
'psutil',
'pyyaml',
'requests',
'scipy',
'schema',
'pyhdfs'
],

cmdclass={
'install': CustomInstallCommand
Expand Down
3 changes: 3 additions & 0 deletions tools/trial_tool/trial_keeper.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ def main_loop(args):
print('copy directory failed!')
except Exception as exception:
print(exception)

## Exit as the retCode of subprocess(trial)
exit(retCode)
break
else:
print('subprocess pid: {} is still alive'.format(process.pid))
Expand Down

0 comments on commit 9d88f1b

Please sign in to comment.