Skip to content

Commit

Permalink
Updated setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Hjorthmedh committed Oct 3, 2024
1 parent 1ca5052 commit b99ef41
Showing 1 changed file with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,19 @@

from ipyparallel import Client

ipython_profile = "default"
ipython_dir = os.getenv('IPYTHONDIR')
if not ipython_dir:
ipython_dir = os.path.join(os.path.abspath(os.getcwd()), ".ipython")

u_file = os.path.join(ipython_dir, f"profile_{ipython_profile}", "security", "ipcontroller-client.json")
print(f"Reading IPYPARALLEL connection info from {u_file}\n")
rc = Client(profile=ipython_profile, connection_info=u_file, timeout=120, debug=False)

try:
ipython_profile = "default"
ipython_dir = os.getenv('IPYTHONDIR')
if not ipython_dir:
ipython_dir = os.path.join(os.path.abspath(os.getcwd()), ".ipython")

u_file = os.path.join(ipython_dir, f"profile_{ipython_profile}", "security", "ipcontroller-client.json")
print(f"Reading IPYPARALLEL connection info from {u_file}\n")
rc = Client(profile=ipython_profile, connection_info=u_file, timeout=120, debug=False)
except:
print("\n!!! --> Failed to start ipyparallel\n")
rc = None

input_tuning = InputTuning(network_path, rc=rc, input_seed_list=seed_list)

print("Constructor done, calling setup_network.")
Expand All @@ -52,7 +56,6 @@
input_fraction=[0.5, 0.5],
num_input_min=10, num_input_max=1000,
input_frequency=[2, 2],
input_correlation=None,
input_duration=10)

print("All done with setup_input_tuning_background.py")
Expand Down

0 comments on commit b99ef41

Please sign in to comment.