Skip to content

Commit

Permalink
Remove channel classes and parameters (#3716)
Browse files Browse the repository at this point in the history
Before this PR, all channel functionality was removed and the channel
classes and config parameters remained as stubs waiting to be removed.
This PR removes them.

# Changed Behaviour

Any place that a user is specifying `channel=LocalChannel()` in their
configuration will now break. That option can be removed by the user
because that option should not have any effect in the codebase
immediately prior to this PR.

## Type of change

- Code maintenance/cleanup
  • Loading branch information
benclifford authored Dec 4, 2024
1 parent 63387f1 commit 113061d
Show file tree
Hide file tree
Showing 43 changed files with 4 additions and 119 deletions.
4 changes: 0 additions & 4 deletions parsl/channels/__init__.py

This file was deleted.

5 changes: 0 additions & 5 deletions parsl/channels/base.py

This file was deleted.

Empty file removed parsl/channels/local/__init__.py
Empty file.
10 changes: 0 additions & 10 deletions parsl/channels/local/local.py

This file was deleted.

2 changes: 0 additions & 2 deletions parsl/configs/cc_in2p3.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from parsl.channels import LocalChannel
from parsl.config import Config
from parsl.executors import HighThroughputExecutor
from parsl.providers import GridEngineProvider
Expand All @@ -10,7 +9,6 @@
label='cc_in2p3_htex',
max_workers_per_node=2,
provider=GridEngineProvider(
channel=LocalChannel(),
nodes_per_block=1,
init_blocks=2,
max_blocks=2,
Expand Down
2 changes: 0 additions & 2 deletions parsl/configs/frontera.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from parsl.channels import LocalChannel
from parsl.config import Config
from parsl.executors import HighThroughputExecutor
from parsl.launchers import SrunLauncher
Expand All @@ -15,7 +14,6 @@
max_workers_per_node=1, # Set number of workers per node
provider=SlurmProvider(
cmd_timeout=60, # Add extra time for slow scheduler responses
channel=LocalChannel(),
nodes_per_block=2,
init_blocks=1,
min_blocks=1,
Expand Down
2 changes: 0 additions & 2 deletions parsl/configs/htex_local.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from parsl.channels import LocalChannel
from parsl.config import Config
from parsl.executors import HighThroughputExecutor
from parsl.providers import LocalProvider
Expand All @@ -10,7 +9,6 @@
label="htex_local",
cores_per_worker=1,
provider=LocalProvider(
channel=LocalChannel(),
init_blocks=1,
max_blocks=1,
),
Expand Down
4 changes: 0 additions & 4 deletions parsl/providers/cluster_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ class ClusterProvider(ExecutionProvider):
----------
label : str
Label for this provider.
channel : Channel
Channel for accessing this provider.
walltime : str
Walltime requested per block in HH:MM:SS.
launcher : Launcher
Expand All @@ -45,7 +43,6 @@ class ClusterProvider(ExecutionProvider):

def __init__(self,
label,
channel,
nodes_per_block,
init_blocks,
min_blocks,
Expand All @@ -56,7 +53,6 @@ def __init__(self,
cmd_timeout=10):

self._label = label
self.channel = channel
self.nodes_per_block = nodes_per_block
self.init_blocks = init_blocks
self.min_blocks = min_blocks
Expand Down
7 changes: 0 additions & 7 deletions parsl/providers/condor/condor.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import typeguard

from parsl.channels import LocalChannel
from parsl.jobs.states import JobState, JobStatus
from parsl.launchers import SingleNodeLauncher
from parsl.launchers.base import Launcher
Expand All @@ -18,8 +17,6 @@

from typing import Dict, List, Optional

from parsl.channels.base import Channel

# See http://pages.cs.wisc.edu/~adesmet/status.html
translate_table = {
'1': JobState.PENDING,
Expand All @@ -36,8 +33,6 @@ class CondorProvider(RepresentationMixin, ClusterProvider):
Parameters
----------
channel : Channel
Channel for accessing this provider.
nodes_per_block : int
Nodes to provision per block.
cores_per_slot : int
Expand Down Expand Up @@ -79,7 +74,6 @@ class CondorProvider(RepresentationMixin, ClusterProvider):
"""
@typeguard.typechecked
def __init__(self,
channel: Channel = LocalChannel(),
nodes_per_block: int = 1,
cores_per_slot: Optional[int] = None,
mem_per_slot: Optional[float] = None,
Expand All @@ -100,7 +94,6 @@ def __init__(self,

label = 'condor'
super().__init__(label,
channel,
nodes_per_block,
init_blocks,
min_blocks,
Expand Down
5 changes: 0 additions & 5 deletions parsl/providers/grid_engine/grid_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os
import time

from parsl.channels import LocalChannel
from parsl.jobs.states import JobState, JobStatus
from parsl.launchers import SingleNodeLauncher
from parsl.providers.cluster_provider import ClusterProvider
Expand Down Expand Up @@ -36,8 +35,6 @@ class GridEngineProvider(ClusterProvider, RepresentationMixin):
Parameters
----------
channel : Channel
Channel for accessing this provider.
nodes_per_block : int
Nodes to provision per block.
min_blocks : int
Expand All @@ -62,7 +59,6 @@ class GridEngineProvider(ClusterProvider, RepresentationMixin):
"""

def __init__(self,
channel=LocalChannel(),
nodes_per_block=1,
init_blocks=1,
min_blocks=0,
Expand All @@ -76,7 +72,6 @@ def __init__(self,
queue=None):
label = 'grid_engine'
super().__init__(label,
channel,
nodes_per_block,
init_blocks,
min_blocks,
Expand Down
3 changes: 0 additions & 3 deletions parsl/providers/local/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os
import time

from parsl.channels import LocalChannel
from parsl.jobs.states import JobState, JobStatus
from parsl.launchers import SingleNodeLauncher
from parsl.providers.base import ExecutionProvider
Expand Down Expand Up @@ -37,7 +36,6 @@ class LocalProvider(ExecutionProvider, RepresentationMixin):
"""

def __init__(self,
channel=LocalChannel(),
nodes_per_block=1,
launcher=SingleNodeLauncher(),
init_blocks=1,
Expand All @@ -46,7 +44,6 @@ def __init__(self,
worker_init='',
cmd_timeout=30,
parallelism=1):
self.channel = channel
self._label = 'local'
self.nodes_per_block = nodes_per_block
self.launcher = launcher
Expand Down
5 changes: 0 additions & 5 deletions parsl/providers/lsf/lsf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import os
import time

from parsl.channels import LocalChannel
from parsl.jobs.states import JobState, JobStatus
from parsl.launchers import SingleNodeLauncher
from parsl.providers.cluster_provider import ClusterProvider
Expand Down Expand Up @@ -32,8 +31,6 @@ class LSFProvider(ClusterProvider, RepresentationMixin):
Parameters
----------
channel : Channel
Channel for accessing this provider.
nodes_per_block : int
Nodes to provision per block.
When request_by_nodes is False, it is computed by cores_per_block / cores_per_node.
Expand Down Expand Up @@ -77,7 +74,6 @@ class LSFProvider(ClusterProvider, RepresentationMixin):
"""

def __init__(self,
channel=LocalChannel(),
nodes_per_block=1,
cores_per_block=None,
cores_per_node=None,
Expand All @@ -96,7 +92,6 @@ def __init__(self,
launcher=SingleNodeLauncher()):
label = 'LSF'
super().__init__(label,
channel,
nodes_per_block,
init_blocks,
min_blocks,
Expand Down
7 changes: 1 addition & 6 deletions parsl/providers/pbspro/pbspro.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import os
import time

from parsl.channels import LocalChannel
from parsl.jobs.states import JobState, JobStatus
from parsl.launchers import SingleNodeLauncher
from parsl.providers.pbspro.template import template_string
Expand All @@ -17,8 +16,6 @@ class PBSProProvider(TorqueProvider):
Parameters
----------
channel : Channel
Channel for accessing this provider.
account : str
Account the job will be charged against.
queue : str
Expand Down Expand Up @@ -51,7 +48,6 @@ class PBSProProvider(TorqueProvider):
:class:`~parsl.launchers.SingleNodeLauncher`.
"""
def __init__(self,
channel=LocalChannel(),
account=None,
queue=None,
scheduler_options='',
Expand All @@ -66,8 +62,7 @@ def __init__(self,
launcher=SingleNodeLauncher(),
walltime="00:20:00",
cmd_timeout=120):
super().__init__(channel,
account,
super().__init__(account,
queue,
scheduler_options,
worker_init,
Expand Down
6 changes: 0 additions & 6 deletions parsl/providers/slurm/slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

import typeguard

from parsl.channels import LocalChannel
from parsl.channels.base import Channel
from parsl.jobs.states import JobState, JobStatus
from parsl.launchers import SingleNodeLauncher
from parsl.launchers.base import Launcher
Expand Down Expand Up @@ -73,8 +71,6 @@ class SlurmProvider(ClusterProvider, RepresentationMixin):
clusters : str
Slurm cluster name, or comma seperated cluster list, used to choose between different clusters in a federated Slurm instance.
If unspecified or ``None``, no slurm directive for clusters will be added.
channel : Channel
Channel for accessing this provider.
nodes_per_block : int
Nodes to provision per block.
cores_per_node : int
Expand Down Expand Up @@ -119,7 +115,6 @@ def __init__(self,
qos: Optional[str] = None,
constraint: Optional[str] = None,
clusters: Optional[str] = None,
channel: Channel = LocalChannel(),
nodes_per_block: int = 1,
cores_per_node: Optional[int] = None,
mem_per_node: Optional[int] = None,
Expand All @@ -136,7 +131,6 @@ def __init__(self,
launcher: Launcher = SingleNodeLauncher()):
label = 'slurm'
super().__init__(label,
channel,
nodes_per_block,
init_blocks,
min_blocks,
Expand Down
6 changes: 0 additions & 6 deletions parsl/providers/torque/torque.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os
import time

from parsl.channels import LocalChannel
from parsl.jobs.states import JobState, JobStatus
from parsl.launchers import AprunLauncher
from parsl.providers.cluster_provider import ClusterProvider
Expand Down Expand Up @@ -33,8 +32,6 @@ class TorqueProvider(ClusterProvider, RepresentationMixin):
Parameters
----------
channel : Channel
Channel for accessing this provider.
account : str
Account the job will be charged against.
queue : str
Expand Down Expand Up @@ -65,7 +62,6 @@ class TorqueProvider(ClusterProvider, RepresentationMixin):
"""
def __init__(self,
channel=LocalChannel(),
account=None,
queue=None,
scheduler_options='',
Expand All @@ -80,7 +76,6 @@ def __init__(self,
cmd_timeout=120):
label = 'torque'
super().__init__(label,
channel,
nodes_per_block,
init_blocks,
min_blocks,
Expand Down Expand Up @@ -170,7 +165,6 @@ def submit(self, command, tasks_per_node, job_name="parsl.torque"):
tasks_per_node)

job_config = {}
# TODO : script_path might need to change to accommodate script dir set via channels
job_config["submit_script_dir"] = self.script_dir
job_config["nodes"] = self.nodes_per_block
job_config["task_blocks"] = self.nodes_per_block * tasks_per_node
Expand Down
2 changes: 0 additions & 2 deletions parsl/tests/configs/cc_in2p3.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from parsl.channels import LocalChannel
from parsl.config import Config
from parsl.executors import HighThroughputExecutor
from parsl.providers import GridEngineProvider
Expand All @@ -14,7 +13,6 @@ def fresh_config():
max_workers_per_node=1,
encrypted=True,
provider=GridEngineProvider(
channel=LocalChannel(),
nodes_per_block=2,
init_blocks=2,
max_blocks=2,
Expand Down
2 changes: 0 additions & 2 deletions parsl/tests/configs/frontera.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from parsl.channels import LocalChannel
from parsl.config import Config
from parsl.executors import HighThroughputExecutor
from parsl.launchers import SrunLauncher
Expand All @@ -20,7 +19,6 @@ def fresh_config():
encrypted=True,
provider=SlurmProvider(
cmd_timeout=60, # Add extra time for slow scheduler responses
channel=LocalChannel(),
nodes_per_block=2,
init_blocks=1,
min_blocks=1,
Expand Down
2 changes: 0 additions & 2 deletions parsl/tests/configs/htex_local.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from parsl.channels import LocalChannel
from parsl.config import Config
from parsl.executors import HighThroughputExecutor
from parsl.launchers import SimpleLauncher
Expand All @@ -15,7 +14,6 @@ def fresh_config():
cores_per_worker=1,
encrypted=True,
provider=LocalProvider(
channel=LocalChannel(),
init_blocks=1,
max_blocks=1,
launcher=SimpleLauncher(),
Expand Down
2 changes: 0 additions & 2 deletions parsl/tests/configs/htex_local_alternate.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import os

from parsl.channels import LocalChannel
from parsl.config import Config
from parsl.data_provider.file_noop import NoOpFileStaging
from parsl.data_provider.ftp import FTPInTaskStaging
Expand Down Expand Up @@ -48,7 +47,6 @@ def fresh_config():
poll_period=100,
encrypted=True,
provider=LocalProvider(
channel=LocalChannel(),
init_blocks=0,
min_blocks=0,
max_blocks=5,
Expand Down
2 changes: 0 additions & 2 deletions parsl/tests/configs/htex_local_intask_staging.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from parsl.channels import LocalChannel
from parsl.config import Config
from parsl.data_provider.file_noop import NoOpFileStaging
from parsl.data_provider.ftp import FTPInTaskStaging
Expand All @@ -15,7 +14,6 @@
cores_per_worker=1,
encrypted=True,
provider=LocalProvider(
channel=LocalChannel(),
init_blocks=1,
max_blocks=1,
launcher=SimpleLauncher(),
Expand Down
Loading

0 comments on commit 113061d

Please sign in to comment.