-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from felix5572/master
update docs with dargs
- Loading branch information
Showing
10 changed files
with
307 additions
and
36 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 |
---|---|---|
@@ -0,0 +1,78 @@ | ||
machine: | ||
| type: ``dict`` | ||
| argument path: ``machine`` | ||
batch_type: | ||
| type: ``str`` | ||
| argument path: ``machine/batch_type`` | ||
The batch job system type. Option: Slurm, PBS, LSF, Shell, DpCloudServer | ||
|
||
context_type: | ||
| type: ``str`` | ||
| argument path: ``machine/context_type`` | ||
The connection used to remote machine. Option: LocalContext, LazyLocalContext, SSHContext, DpCloudServerContext | ||
|
||
local_root: | ||
| type: ``str`` | ||
| argument path: ``machine/local_root`` | ||
The dir where the tasks and relating files locate. Typically the project dir. | ||
|
||
remote_root: | ||
| type: ``str``, optional | ||
| argument path: ``machine/remote_root`` | ||
The dir where the tasks are executed on the remote machine. | ||
|
||
remote_profile: | ||
| type: ``dict``, optional | ||
| argument path: ``machine/remote_profile`` | ||
The information used to maintain the connection with remote machine. see subclass introduction | ||
SSHContext.remote_profile: | ||
| type: ``dict`` | ||
| argument path: ``SSHContext.remote_profile`` | ||
hostname: | ||
| type: ``str`` | ||
| argument path: ``SSHContext.remote_profile/hostname`` | ||
hostname or ip of ssh connection. | ||
|
||
username: | ||
| type: ``str`` | ||
| argument path: ``SSHContext.remote_profile/username`` | ||
username of target linux system | ||
|
||
password: | ||
| type: ``str``, optional | ||
| argument path: ``SSHContext.remote_profile/password`` | ||
password of linux system | ||
|
||
port: | ||
| type: ``int``, optional, default: ``22`` | ||
| argument path: ``SSHContext.remote_profile/port`` | ||
ssh connection port. | ||
|
||
key_filename: | ||
| type: ``NoneType`` | ``str``, optional, default: ``None`` | ||
| argument path: ``SSHContext.remote_profile/key_filename`` | ||
key_filename used by ssh connection | ||
|
||
passphrase: | ||
| type: ``NoneType`` | ``str``, optional, default: ``None`` | ||
| argument path: ``SSHContext.remote_profile/passphrase`` | ||
passphrase used by ssh connection | ||
|
||
timeout: | ||
| type: ``int``, optional, default: ``10`` | ||
| argument path: ``SSHContext.remote_profile/timeout`` | ||
timeout of ssh connection |
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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
resources_dict: | ||
| type: ``dict`` | ||
| argument path: ``resources_dict`` | ||
number_node: | ||
| type: ``int`` | ||
| argument path: ``resources_dict/number_node`` | ||
The number of node need for each `job` | ||
|
||
cpu_per_node: | ||
| type: ``int`` | ||
| argument path: ``resources_dict/cpu_per_node`` | ||
cpu numbers of each node. | ||
|
||
gpu_per_node: | ||
| type: ``int`` | ||
| argument path: ``resources_dict/gpu_per_node`` | ||
gpu numbers of each node. | ||
|
||
queue_name: | ||
| type: ``str`` | ||
| argument path: ``resources_dict/queue_name`` | ||
The queue name of batch job scheduler system. | ||
|
||
group_size: | ||
| type: ``int`` | ||
| argument path: ``resources_dict/group_size`` | ||
The number of `tasks` in a `job`. | ||
|
||
custom_flags: | ||
| type: ``str``, optional | ||
| argument path: ``resources_dict/custom_flags`` | ||
The extra lines pass to job submitting script header | ||
|
||
strategy: | ||
| type: ``dict``, optional | ||
| argument path: ``resources_dict/strategy`` | ||
strategies we use to generation job submitting scripts. | ||
|
||
para_deg: | ||
| type: ``int``, optional | ||
| argument path: ``resources_dict/para_deg`` | ||
Decide how many tasks will be run in parallel. | ||
|
||
source_list: | ||
| type: ``list``, optional | ||
| argument path: ``resources_dict/source_list`` | ||
The env file to be sourced before the command execution. | ||
|
||
kwargs: | ||
| type: ``dict``, optional | ||
| argument path: ``resources_dict/kwargs`` | ||
extra key-value pair |
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
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
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
#%% | ||
# import sys, os | ||
# sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..' ))) | ||
# import dpdispatcher | ||
from dpdispatcher.submission import Resources | ||
from dpdispatcher.machine import Machine | ||
|
||
|
||
# %% | ||
resources_dargs_doc = Resources.dargs_gen_doc() | ||
with open('../doc/resources-auto.rst', 'w') as f: | ||
# print(resources_dargs_doc) | ||
f.write(resources_dargs_doc) | ||
|
||
machine_dargs_doc = Machine.dargs_gen_doc() | ||
with open('../doc/machine-auto.rst', 'w') as f: | ||
f.write(machine_dargs_doc) | ||
# %% |
Oops, something went wrong.