I am new to Azure and am trying to run a hyperparameter search on my neural network. I can run my code fine when I'm submitting a single job to examine a parameter, but when I run a hyperparameter search with the same configurations I get the following error:
"ComputeTargetNotFound: Compute Target with name local not found in provided workspace"
Any help would be appreciated!
from azureml.core import Workspace
from azureml.core import Experiment
from azureml.core import Environment
from azureml.core import ScriptRunConfig
from azureml.core.environment import CondaDependencies
from azureml.train.hyperdrive import HyperDriveConfig
from azureml.train.hyperdrive import choice
from azureml.train.hyperdrive import RandomParameterSampling, BanditPolicy, uniform, PrimaryMetricGoal
from azureml.core.compute import ComputeTarget
ws = Workspace.from_config()
env = Environment.get(workspace=ws, name="AzureML-tensorflow-2.5-ubuntu20.04-py38-cuda11-gpu")
curated_clone1 = env.clone("customize_curated")
conda_dep = CondaDependencies().add_conda_package("scikit-learn")
curated_clone1.python.conda_dependencies=conda_dep
curated_clone1.register(ws)
param_sampling = RandomParameterSampling( {
'learning_rate': choice(0.001, 0.0001, 0.00001),
}
)
early_termination_policy = BanditPolicy(slack_factor=0.15, evaluation_interval=1, delay_evaluation=10)
src = ScriptRunConfig(source_directory='./', script='loadv1.py', environment=curated_clone1)
hd_config = HyperDriveConfig(run_config=src,
hyperparameter_sampling=param_sampling,
policy=early_termination_policy,
primary_metric_name="loss",
primary_metric_goal=PrimaryMetricGoal.MINIMIZE,
max_total_runs=100,
max_concurrent_runs=4)
experiment = Experiment(workspace=ws, name='day3-experiment-data')
#run = experiment.submit(src)
hyperdrive_run = experiment.submit(hd_config)