-
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.
support machine and context alias (#269)
- Loading branch information
Showing
8 changed files
with
73 additions
and
26 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
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
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 |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
from .context import LSF, Slurm, PBS, Shell | ||
from .context import Machine | ||
from .context import dargs | ||
from .context import DistributedShell, HDFSContext | ||
from .context import DistributedShell, HDFSContext, Lebesgue | ||
from .sample_class import SampleClass | ||
from dargs.dargs import ArgumentValueError | ||
|
||
|
@@ -195,6 +195,24 @@ def test_distributed_shell(self): | |
) | ||
self.assertIsInstance(machine, DistributedShell) | ||
|
||
def test_lebesgue(self): | ||
machine_dict = { | ||
'batch_type': 'Lebesgue', | ||
'context_type': 'LebesgueContext', | ||
'local_root':'./', | ||
'remote_root': './', | ||
'remote_profile': { | ||
'email': '[email protected]', | ||
'password': '114514', | ||
'program_id': 114514, | ||
'input_data': {}, | ||
} | ||
} | ||
machine = Machine.load_from_dict( | ||
machine_dict=machine_dict | ||
) | ||
self.assertIsInstance(machine, Lebesgue) | ||
|
||
class TestContextDispatch(unittest.TestCase): | ||
def setUp(self): | ||
self.maxDiff = None | ||
|