Skip to content

Commit 1c7a0e4

Browse files
authored
Aggressively deprecate Channels and AdHocProvider (#3569)
This is described in issue #3515. Issue #3515 has not received any comments arguing in favour of retaining channels and the AdHocprovider, and several in support of removing them, and so this PR takes a heavy handed approach that is well on the way to the end goal of #3515 of deleting channels and the AdHocProvider entirely: Channels except LocalChannel are renamed, so that any users of other channels will have to make a change to their code and actively observe the word "Deprecated" in the name. The AdHocProvider is renamed in the same way. Most documentation (but not docstrings) about channels and the ad-hoc provider is removed or replaced with a link to issue Tests which much be manually run, and so in effect are never run and shouldn't be expected to work now - parsl/tests/manual_tests and parsl/tests/integration/ - are deleted rather than fixed to follow the above naming change. The tests for SSH channels and the AdHocProvider that run in CI are modified to continue passing. Exposure of the deprecated components via top level parsl.providers and parsl.channels re-export is removed. To use this components, the deprecated modules must be imported directly.
1 parent 10a6a00 commit 1c7a0e4

File tree

25 files changed

+40
-480
lines changed

25 files changed

+40
-480
lines changed

docs/historical/changelog.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ New Functionality
334334
335335
* New launcher: `parsl.launchers.WrappedLauncher` for launching tasks inside containers.
336336

337-
* `parsl.channels.SSHChannel` now supports a ``key_filename`` kwarg `issue#1639 <https://github.com/Parsl/parsl/issues/1639>`_
337+
* ``parsl.channels.SSHChannel`` now supports a ``key_filename`` kwarg `issue#1639 <https://github.com/Parsl/parsl/issues/1639>`_
338338

339339
* Newly added Makefile wraps several frequent developer operations such as:
340340

@@ -442,7 +442,7 @@ New Functionality
442442
module, parsl.data_provider.globus
443443

444444
* `parsl.executors.WorkQueueExecutor`: a new executor that integrates functionality from `Work Queue <http://ccl.cse.nd.edu/software/workqueue/>`_ is now available.
445-
* New provider to support for Ad-Hoc clusters `parsl.providers.AdHocProvider`
445+
* New provider to support for Ad-Hoc clusters ``parsl.providers.AdHocProvider``
446446
* New provider added to support LSF on Summit `parsl.providers.LSFProvider`
447447
* Support for CPU and Memory resource hints to providers `(github) <https://github.com/Parsl/parsl/issues/942>`_.
448448
* The ``logging_level=logging.INFO`` in `parsl.monitoring.MonitoringHub` is replaced with ``monitoring_debug=False``:
@@ -468,7 +468,7 @@ New Functionality
468468
469469
* Several test-suite improvements that have dramatically reduced test duration.
470470
* Several improvements to the Monitoring interface.
471-
* Configurable port on `parsl.channels.SSHChannel`.
471+
* Configurable port on ``parsl.channels.SSHChannel``.
472472
* ``suppress_failure`` now defaults to True.
473473
* `parsl.executors.HighThroughputExecutor` is the recommended executor, and ``IPyParallelExecutor`` is deprecated.
474474
* `parsl.executors.HighThroughputExecutor` will expose worker information via environment variables: ``PARSL_WORKER_RANK`` and ``PARSL_WORKER_COUNT``
@@ -532,7 +532,7 @@ New Functionality
532532
533533
* Cleaner user app file log management.
534534
* Updated configurations using `parsl.executors.HighThroughputExecutor` in the configuration section of the userguide.
535-
* Support for OAuth based SSH with `parsl.channels.OAuthSSHChannel`.
535+
* Support for OAuth based SSH with ``parsl.channels.OAuthSSHChannel``.
536536

537537
Bug Fixes
538538
^^^^^^^^^

docs/reference.rst

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,9 @@ Configuration
3838
Channels
3939
========
4040

41-
.. autosummary::
42-
:toctree: stubs
43-
:nosignatures:
44-
45-
parsl.channels.base.Channel
46-
parsl.channels.LocalChannel
47-
parsl.channels.SSHChannel
48-
parsl.channels.OAuthSSHChannel
49-
parsl.channels.SSHInteractiveLoginChannel
41+
Channels are deprecated in Parsl. See
42+
`issue 3515 <https://github.com/Parsl/parsl/issues/3515>`_
43+
for further discussion.
5044

5145
Data management
5246
===============
@@ -109,7 +103,6 @@ Providers
109103
:toctree: stubs
110104
:nosignatures:
111105

112-
parsl.providers.AdHocProvider
113106
parsl.providers.AWSProvider
114107
parsl.providers.CobaltProvider
115108
parsl.providers.CondorProvider

docs/userguide/configuring.rst

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,14 @@ queues, durations, and data management options.
1515
The following example shows a basic configuration object (:class:`~parsl.config.Config`) for the Frontera
1616
supercomputer at TACC.
1717
This config uses the `parsl.executors.HighThroughputExecutor` to submit
18-
tasks from a login node (`parsl.channels.LocalChannel`). It requests an allocation of
18+
tasks from a login node. It requests an allocation of
1919
128 nodes, deploying 1 worker for each of the 56 cores per node, from the normal partition.
2020
To limit network connections to just the internal network the config specifies the address
2121
used by the infiniband interface with ``address_by_interface('ib0')``
2222

2323
.. code-block:: python
2424
2525
from parsl.config import Config
26-
from parsl.channels import LocalChannel
2726
from parsl.providers import SlurmProvider
2827
from parsl.executors import HighThroughputExecutor
2928
from parsl.launchers import SrunLauncher
@@ -36,7 +35,6 @@ used by the infiniband interface with ``address_by_interface('ib0')``
3635
address=address_by_interface('ib0'),
3736
max_workers_per_node=56,
3837
provider=SlurmProvider(
39-
channel=LocalChannel(),
4038
nodes_per_block=128,
4139
init_blocks=1,
4240
partition='normal',
@@ -197,22 +195,6 @@ Stepping through the following question should help formulate a suitable configu
197195
are on a **native Slurm** system like :ref:`configuring_nersc_cori`
198196

199197

200-
4) Where will the main Parsl program run and how will it communicate with the apps?
201-
202-
+------------------------+--------------------------+---------------------------------------------------+
203-
| Parsl program location | App execution target | Suitable channel |
204-
+========================+==========================+===================================================+
205-
| Laptop/Workstation | Laptop/Workstation | `parsl.channels.LocalChannel` |
206-
+------------------------+--------------------------+---------------------------------------------------+
207-
| Laptop/Workstation | Cloud Resources | No channel is needed |
208-
+------------------------+--------------------------+---------------------------------------------------+
209-
| Laptop/Workstation | Clusters with no 2FA | `parsl.channels.SSHChannel` |
210-
+------------------------+--------------------------+---------------------------------------------------+
211-
| Laptop/Workstation | Clusters with 2FA | `parsl.channels.SSHInteractiveLoginChannel` |
212-
+------------------------+--------------------------+---------------------------------------------------+
213-
| Login node | Cluster/Supercomputer | `parsl.channels.LocalChannel` |
214-
+------------------------+--------------------------+---------------------------------------------------+
215-
216198
Heterogeneous Resources
217199
-----------------------
218200

@@ -337,7 +319,6 @@ Provide either the number of executors (Parsl will assume they are named in inte
337319
worker_debug=True,
338320
available_accelerators=2,
339321
provider=LocalProvider(
340-
channel=LocalChannel(),
341322
init_blocks=1,
342323
max_blocks=1,
343324
),
@@ -372,7 +353,6 @@ Select the best blocking strategy for processor's cache hierarchy (choose ``alte
372353
worker_debug=True,
373354
cpu_affinity='alternating',
374355
provider=LocalProvider(
375-
channel=LocalChannel(),
376356
init_blocks=1,
377357
max_blocks=1,
378358
),
@@ -412,18 +392,12 @@ These include ``OMP_NUM_THREADS``, ``GOMP_COMP_AFFINITY``, and ``KMP_THREAD_AFFI
412392
Ad-Hoc Clusters
413393
---------------
414394

415-
Any collection of compute nodes without a scheduler can be considered an
416-
ad-hoc cluster. Often these machines have a shared file system such as NFS or Lustre.
417-
In order to use these resources with Parsl, they need to set-up for password-less SSH access.
418-
419-
To use these ssh-accessible collection of nodes as an ad-hoc cluster, we use
420-
the `parsl.providers.AdHocProvider` with an `parsl.channels.SSHChannel` to each node. An example
421-
configuration follows.
395+
Parsl's support of ad-hoc clusters of compute nodes without a scheduler
396+
is deprecated.
422397

423-
.. literalinclude:: ../../parsl/configs/ad_hoc.py
424-
425-
.. note::
426-
Multiple blocks should not be assigned to each node when using the `parsl.executors.HighThroughputExecutor`
398+
See
399+
`issue #3515 <https://github.com/Parsl/parsl/issues/3515>`_
400+
for further discussion.
427401

428402
Amazon Web Services
429403
-------------------

docs/userguide/examples/config.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from parsl.channels import LocalChannel
21
from parsl.config import Config
32
from parsl.executors import HighThroughputExecutor
43
from parsl.providers import LocalProvider
@@ -8,9 +7,7 @@
87
HighThroughputExecutor(
98
label="htex_local",
109
cores_per_worker=1,
11-
provider=LocalProvider(
12-
channel=LocalChannel(),
13-
),
10+
provider=LocalProvider(),
1411
)
1512
],
1613
)

docs/userguide/execution.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ Parsl currently supports the following providers:
4747
7. `parsl.providers.AWSProvider`: This provider allows you to provision and manage cloud nodes from Amazon Web Services.
4848
8. `parsl.providers.GoogleCloudProvider`: This provider allows you to provision and manage cloud nodes from Google Cloud.
4949
9. `parsl.providers.KubernetesProvider`: This provider allows you to provision and manage containers on a Kubernetes cluster.
50-
10. `parsl.providers.AdHocProvider`: This provider allows you manage execution over a collection of nodes to form an ad-hoc cluster.
51-
11. `parsl.providers.LSFProvider`: This provider allows you to schedule resources via IBM's LSF scheduler.
50+
10. `parsl.providers.LSFProvider`: This provider allows you to schedule resources via IBM's LSF scheduler.
5251

5352

5453

docs/userguide/plugins.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ executor to run code on the local submitting host, while another executor can
1616
run the same code on a large supercomputer.
1717

1818

19-
Providers, Launchers and Channels
20-
---------------------------------
19+
Providers and Launchers
20+
-----------------------
2121
Some executors are based on blocks of workers (for example the
2222
`parsl.executors.HighThroughputExecutor`: the submit side requires a
2323
batch system (eg slurm, kubernetes) to start worker processes, which then
@@ -34,10 +34,9 @@ add on any wrappers that are needed to launch the command (eg srun inside
3434
slurm). Providers and launchers are usually paired together for a particular
3535
system type.
3636

37-
A `Channel` allows the commands used to interact with an `ExecutionProvider` to be
38-
executed on a remote system. The default channel executes commands on the
39-
local system, but a few variants of an `parsl.channels.SSHChannel` are provided.
40-
37+
Parsl also has a deprecated ``Channel`` abstraction. See
38+
`issue 3515 <https://github.com/Parsl/parsl/issues/3515>`_
39+
for further discussion.
4140

4241
File staging
4342
------------

parsl/channels/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
from parsl.channels.base import Channel
22
from parsl.channels.local.local import LocalChannel
3-
from parsl.channels.oauth_ssh.oauth_ssh import OAuthSSHChannel
4-
from parsl.channels.ssh.ssh import SSHChannel
5-
from parsl.channels.ssh_il.ssh_il import SSHInteractiveLoginChannel
63

7-
__all__ = ['Channel', 'SSHChannel', 'LocalChannel', 'SSHInteractiveLoginChannel', 'OAuthSSHChannel']
4+
__all__ = ['Channel', 'LocalChannel']

parsl/channels/oauth_ssh/oauth_ssh.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import paramiko
55

6-
from parsl.channels.ssh.ssh import SSHChannel
6+
from parsl.channels.ssh.ssh import DeprecatedSSHChannel
77
from parsl.errors import OptionalModuleMissing
88

99
try:
@@ -17,7 +17,7 @@
1717
logger = logging.getLogger(__name__)
1818

1919

20-
class OAuthSSHChannel(SSHChannel):
20+
class DeprecatedOAuthSSHChannel(DeprecatedSSHChannel):
2121
"""SSH persistent channel. This enables remote execution on sites
2222
accessible via ssh. This channel uses Globus based OAuth tokens for authentication.
2323
"""

parsl/channels/ssh/ssh.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def _auth(self, username, *args):
2424
return
2525

2626

27-
class SSHChannel(Channel, RepresentationMixin):
27+
class DeprecatedSSHChannel(Channel, RepresentationMixin):
2828
''' SSH persistent channel. This enables remote execution on sites
2929
accessible via ssh. It is assumed that the user has setup host keys
3030
so as to ssh to the remote host. Which goes to say that the following

parsl/channels/ssh_il/ssh_il.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
import paramiko
55

6-
from parsl.channels.ssh.ssh import SSHChannel
6+
from parsl.channels.ssh.ssh import DeprecatedSSHChannel
77

88
logger = logging.getLogger(__name__)
99

1010

11-
class SSHInteractiveLoginChannel(SSHChannel):
11+
class DeprecatedSSHInteractiveLoginChannel(DeprecatedSSHChannel):
1212
"""SSH persistent channel. This enables remote execution on sites
1313
accessible via ssh. This channel supports interactive login and is appropriate when
1414
keys are not set up.

0 commit comments

Comments
 (0)