2021-03-05 23:39:14 -08:00
|
|
|
from azureml.core import Workspace, Experiment, ScriptRunConfig
|
2022-01-02 20:12:34 -05:00
|
|
|
|
2021-03-05 23:39:14 -08:00
|
|
|
ws = Workspace.from_config()
|
|
|
|
|
2022-01-02 20:12:34 -05:00
|
|
|
compute_target = ws.compute_targets["V100-4"]
|
2021-03-05 23:39:14 -08:00
|
|
|
# compute_target = ws.compute_targets['K80']
|
|
|
|
command = [
|
2021-03-28 17:54:25 -07:00
|
|
|
"pip install torch transformers datasets flaml[blendsearch,ray] && ",
|
2022-01-02 20:12:34 -05:00
|
|
|
"python test_electra.py",
|
|
|
|
]
|
2021-03-05 23:39:14 -08:00
|
|
|
|
|
|
|
config = ScriptRunConfig(
|
2022-01-02 20:12:34 -05:00
|
|
|
source_directory="hf/",
|
2021-03-05 23:39:14 -08:00
|
|
|
command=command,
|
|
|
|
compute_target=compute_target,
|
|
|
|
)
|
|
|
|
|
2022-01-02 20:12:34 -05:00
|
|
|
exp = Experiment(ws, "test-electra")
|
2021-03-05 23:39:14 -08:00
|
|
|
run = exp.submit(config)
|
2021-04-08 09:29:55 -07:00
|
|
|
print(run.get_portal_url()) # link to ml.azure.com
|
|
|
|
run.wait_for_completion(show_output=True)
|