Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
thomwolf committed Oct 31, 2023
1 parent 5a55117 commit aa4f49e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/datatrove/executor/slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,16 @@ def launch_file(self):
def get_launch_file(self, sbatch_args: dict, run_script: str):
args = "\n".join([f"#SBATCH --{k}={v}" for k, v in sbatch_args.items()])

env_command = self.env_command if self.env_command else (
f"""conda init bash
env_command = (
self.env_command
if self.env_command
else (
f"""conda init bash
conda activate {self.condaenv}
source ~/.bashrc"""
if self.condaenv
else (f"source {self.venv_path}" if self.venv_path else "")
if self.condaenv
else (f"source {self.venv_path}" if self.venv_path else "")
)
)

return (
Expand Down

0 comments on commit aa4f49e

Please sign in to comment.