Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions src/adf_core_python/launcher.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import argparse
import resource
import sys

if sys.platform != "win32":
import resource

from adf_core_python.core.config.config import Config
from adf_core_python.core.launcher.agent_launcher import AgentLauncher
Expand All @@ -12,13 +15,14 @@ def __init__(
self,
launcher_config_file: str,
) -> None:
try:
resource.setrlimit(resource.RLIMIT_NOFILE, (8192, 1048576))
except Exception as e:
print(
f"Failed to set resource limit: {e}. "
"This may cause issues with the number of open files."
)
if sys.platform != "win32":
try:
resource.setrlimit(resource.RLIMIT_NOFILE, (8192, 1048576))
except Exception as e:
print(
f"Failed to set resource limit: {e}. "
"This may cause issues with the number of open files."
)

self.launcher_config = Config(launcher_config_file)

Expand Down
Loading