prehistoric-hydrogen-4945
09/18/2024, 8:43 AMunion register clf --project default --domain development
union run --remote --copy-all script_pyflyte.py imperative_wf
However, when I try to run the workflow by connecting from the code with remote it fails with this error. -> [1/1] currentAttempt done. Last Error: USER::admission webhook "<http://image-builder-webhook.union.ai|image-builder-webhook.union.ai>" denied the request: access to classifiers_spec:Oh6eZo6iI15tuUomnYPN7w is not authorized
remote = UnionRemote(
config=Config.for_endpoint(endpoint=endpoint),
default_project=project,
default_domain=domain,
)
image_config = ImageConfig.auto_default_image()
registered_workflow = remote.register_script(
outputs,
copy_all=True,
default_launch_plan=False,
image_config=image_config,
project=project,
domain=domain,
source_path=Path(__file__).parent.parent.parent.resolve(),
version=version,
)
execution = remote.execute_remote_wf(
registered_workflow, inputs={}, project=project, domain=domain
)
I have tried with various image configurations and also using a built and publicly accessible image but still I get the same error. What can I do to fix this error? I appreciate any help šfreezing-airport-6809
acceptable-policeman-57188
acceptable-policeman-57188
acceptable-policeman-57188
prehistoric-hydrogen-4945
09/19/2024, 6:25 AMimage = ImageSpec(
name="classifiers",
packages=[
"accelerate>=0.20.1",
"adlfs>=2023.4.0",
"ai2-tango>=1.3.0",
"azure-storage-blob>=12.17.0",
"datasets>=2.14.6",
"docker==6.1.3",
"einops>=0.6.1",
"mlflow>=2.12.1",
"nlpaug",
"onnx==1.15.0",
"onnxruntime==1.16.2",
"onnxruntime-gpu==1.16.2",
"plotnine",
"scikit-learn",
"sentence-transformers>=2.2.2",
"tabulate",
"torch>=2.0.1",
"einops>=0.6.1",
"accelerate",
"bitsandbytes",
"tritonclient[http]==2.39.0",
],
)
@task(
container_image=image, cache=True, cache_version="6",
)
def load_data_from_disk(dataset_path: str, ...):
...
I register my tasks using union register
, then a build_image execution is launched, building my container image. But now when I try to run remote.register_script I get same error -> [1/1] currentAttempt done. Last Error: USER::admission webhook "<http://image-builder-webhook.union.ai|image-builder-webhook.union.ai>" denied the request: access to classifiers:4V7kczm3iHLfhnAN69NKAA is not authorized.
freezing-airport-6809
acceptable-policeman-57188
classifiers:4V7kczm3iHLfhnAN69NKAA
during registration in that case?
cc @flaky-parrot-42438astonishing-eve-54331
09/19/2024, 3:27 PMrequirements
parameter of `ImageSpec`:
import flytekit
image = flytekit.ImageSpec(requirements="requirements.txt")
Where you may define requirements.txt
with a command like this:
uv pip compile pyproject.toml > requirements.txt --python-platform linux
This will freeze all of your local dependencies. This works really well in handling complex version dependencies issues.prehistoric-hydrogen-4945
09/20/2024, 7:30 AMunion register clf --project default --domain development
When I launch the imperative workflow it automatically takes the image and label that I had generated when registering the tasks. I have also tried running the union run
command directly without registering the tasks and it also launches the process to build the image directly. The problem is that if I launch it with union command line it works.
union run --remote --copy-all run_imperative_wf.py outputs
But if I do it using UnionRemote as I showed you in the code I get the USER::admission
error.flaky-parrot-42438
09/20/2024, 5:45 PMflaky-parrot-42438
09/22/2024, 7:23 PMregistry
or set it to the default value?
image = ImageSpec(
name="classifiers", ...
registry=None.
)
On serverless, we'll update the image builder to raise an earlier error when registry is not None
.prehistoric-hydrogen-4945
09/23/2024, 12:28 PM/home/aromo/aromo-union/lib/python3.10/site-packages/flytekit/image_spec/image_spec.py:136 in ā
ā exist ā
ā ā
ā 133 ā ā except Exception as e: ā
ā 134 ā ā ā tag = calculate_hash_from_image_spec(self) ā
ā 135 ā ā ā # if docker engine is not running locally, use requests to check if the imag ā
ā ā± 136 ā ā ā if "localhost:" in self.registry: ā
ā 137 ā ā ā ā container_registry = self.registry ā
ā 138 ā ā ā elif self.registry and "/" in self.registry: ā
ā 139 ā ā ā ā container_registry = self.registry.split("/")[0] ā
ā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā locals āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā® ā
ā ā APIError = <class 'docker.errors.APIError'> ā ā
ā ā docker = <module 'docker' from ā ā
ā ā '/home/aromo/aromo-union/lib/python3.10/site-packages/docker/__init__.py'> ā ā
ā ā ImageNotFound = <class 'docker.errors.ImageNotFound'> ā ā
ā ā self = ImageSpec( ā ā
ā ā ā name='classifiers_v2', ā ā
ā ā ā python_version=None, ā ā
ā ā ā builder=None, ā ā
ā ā ā source_root=None, ā ā
ā ā ā env=None, ā ā
ā ā ā registry=None, ā ā
ā ā ā packages=None, ā ā
ā ā ā conda_packages=None, ā ā
ā ā ā conda_channels=None, ā ā
ā ā ā requirements='requirements_union.txt', ā ā
ā ā ā apt_packages=None, ā ā
ā ā ā cuda=None, ā ā
ā ā ā cudnn=None, ā ā
ā ā ā base_image=None, ā ā
ā ā ā platform='linux/amd64', ā ā
ā ā ā pip_index=None, ā ā
ā ā ā pip_extra_index_url=None, ā ā
ā ā ā registry_config=None, ā ā
ā ā ā entrypoint=None, ā ā
ā ā ā commands=None, ā ā
ā ā ā tag_format=None ā ā
ā ā ) ā ā
ā ā tag = '3lqAJSS3fFLROiVbqpa1_Q' ā ā
ā ā°āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā⯠ā
ā°āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāÆ
TypeError: argument of type 'NoneType' is not iterable
flaky-parrot-42438
09/23/2024, 3:13 PMregistry=None
. I think It should have went to: https://github.com/thomasjpfan/flytekit/blob/eb204594a5f8cd4a662d4bd44ab7e8d7dea22a98/flytekit/image_spec/image_spec.py#L115-L116
CC @glamorous-carpet-83516prehistoric-hydrogen-4945
10/02/2024, 10:00 AMflaky-parrot-42438
10/04/2024, 12:02 AM