bitter-house-36637
02/06/2023, 2:50 AMFile "/Library/Frameworks/Python.framework/Versions/3.11/bin/pyflyte", line 5, in <module>
from flytekit.clis.sdk_in_container.pyflyte import main
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/flytekit/__init__.py", line 165, in <module>
from flytekit.core.base_sql_task import SQLTask
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/flytekit/core/base_sql_task.py", line 4, in <module>
from flytekit.core.base_task import PythonTask, TaskMetadata
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/flytekit/core/base_task.py", line 26, in <module>
from flytekit.configuration import SerializationSettings
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/flytekit/configuration/__init__.py", line 473, in <module>
@dataclass(init=True, repr=True, eq=True, frozen=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/dataclasses.py", line 1210, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/dataclasses.py", line 958, in _process_class
cls_fields.append(_get_field(cls, name, type, kw_only))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/dataclasses.py", line 815, in _get_field
raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'flytekit.configuration.S3Config'> for field s3 is not allowed: use default_factory
tall-lock-23197
pip show flytekit
?bitter-house-36637
02/06/2023, 2:38 PMbroad-monitor-993
02/06/2023, 2:56 PMsetup.py
to reflect this (b) open up a PR to test changes necessary for 3.11 support. Last time I checked we’re blocked by some upstream dependencies.
@bitter-house-36637 would it be possible for you to use a venv with an earlier version of Python?average-finland-92144
02/06/2023, 8:32 PMaverage-finland-92144
02/06/2023, 9:11 PMbroad-monitor-993
02/06/2023, 9:54 PMhigh-accountant-32689
02/06/2023, 9:56 PMaverage-finland-92144
02/06/2023, 9:58 PMpyflyte run --remote example.py training_workflow \ 1 ✘ ╱ python
--hyperparameters '{"C": 0.1, "max_iter": 3000}'
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/bin/pyflyte", line 5, in <module>
from flytekit.clis.sdk_in_container.pyflyte import main
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/flytekit/_init_.py", line 165, in <module>
from flytekit.core.base_sql_task import SQLTask
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/flytekit/core/base_sql_task.py", line 4, in <module>
from flytekit.core.base_task import PythonTask, TaskMetadata
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/flytekit/core/base_task.py", line 26, in <module>
from flytekit.configuration import SerializationSettings
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/flytekit/configuration/_init_.py", line 473, in <module>
@dataclass(init=True, repr=True, eq=True, frozen=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/dataclasses.py", line 1210, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/dataclasses.py", line 958, in _process_class
cls_fields.append(_get_field(cls, name, type, kw_only))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/dataclasses.py", line 815, in _get_field
raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'flytekit.configuration.S3Config'> for field s3 is not allowed: use default_factory
average-finland-92144
02/06/2023, 9:59 PMpyflyte run
using the absolute path for the 3.10 package, I get a different error:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/bin/pyflyte", line 8, in <module>
sys.exit(main())
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1651, in invoke
cmd_name, cmd, args = self.resolve_command(ctx, args)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1698, in resolve_command
cmd = self.get_command(ctx, cmd_name)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/flytekit/clis/sdk_in_container/run.py", line 607, in get_command
entity = load_naive_entity(module, exe_entity, project_root)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/flytekit/clis/sdk_in_container/run.py", line 447, in load_naive_entity
importlib.import_module(module_name)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/davidespejo/code/python/example.py", line 2, in <module>
from sklearn.datasets import load_wine
ModuleNotFoundError: No module named 'sklearn'
Already verified that the package is installed and accesible from the venvbroad-monitor-993
02/06/2023, 10:14 PMscikit-learn
, this should be fixed by https://github.com/flyteorg/flytesnacks/pull/950average-finland-92144
02/06/2023, 10:16 PMRequirement already satisfied: scikit-learn in ./lib/python3.10/site-packages (1.2.1)
broad-monitor-993
02/06/2023, 10:18 PMhmm, doesn’t seem like this is a venv is it?Copy code/Library/Frameworks/Python.framework/Versions/3.11/bin/pyflyte
high-accountant-32689
02/10/2023, 6:44 PMaverage-finland-92144
02/10/2023, 10:12 PMWaiting for thread pool to idle before forking
and the workflow execution never startshigh-accountant-32689
02/10/2023, 11:27 PM