diff options
Diffstat (limited to '.venv/lib/python3.12/site-packages/azure/ai/ml/_schema/compute/setup_scripts.py')
-rw-r--r-- | .venv/lib/python3.12/site-packages/azure/ai/ml/_schema/compute/setup_scripts.py | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_schema/compute/setup_scripts.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_schema/compute/setup_scripts.py new file mode 100644 index 00000000..da3f3c14 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_schema/compute/setup_scripts.py @@ -0,0 +1,33 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +# pylint: disable=unused-argument +from marshmallow import fields +from marshmallow.decorators import post_load + +from azure.ai.ml._schema.core.fields import NestedField +from azure.ai.ml._schema.core.schema_meta import PatchedSchemaMeta + + +class ScriptReferenceSchema(metaclass=PatchedSchemaMeta): + path = fields.Str() + command = fields.Str() + timeout_minutes = fields.Int() + + @post_load + def make(self, data, **kwargs): + from azure.ai.ml.entities._compute._setup_scripts import ScriptReference + + return ScriptReference(**data) + + +class SetupScriptsSchema(metaclass=PatchedSchemaMeta): + creation_script = NestedField(ScriptReferenceSchema()) + startup_script = NestedField(ScriptReferenceSchema()) + + @post_load + def make(self, data, **kwargs): + from azure.ai.ml.entities._compute._setup_scripts import SetupScripts + + return SetupScripts(**data) |