acoustic-carpenter-78188
04/23/2024, 11:27 PMfrom flytekit import CronSchedule, LaunchPlan # noqa: E402
from train_model_workflow import train
from flytekit.remote import FlyteRemote
from flytekit.configuration import Config
remote = FlyteRemote(
config=Config.auto(config_file="../config.yaml"),
default_project="flytesnacks",
default_domain="development",
)
cron_lp = LaunchPlan.get_or_create(
name="train-cron",
workflow=train,
schedule=CronSchedule(
schedule="*/5 * * * *",
),
)
remote.register_launch_plan(
cron_lp,
version="1707810374",
)
When I execute this, I get an error,
```
❯ python cron.py
╭────────────────── Traceback (most recent call last) ───────────────────╮
│ /Users/foo/work/pipelines/venv/lib/python3.11/site-pac │
│ kages/grpc/_interceptor.py:315 in continuation │
│ │
│ ❱ 315 │ │ │ │ response, call = self._thunk(new_method).with_ca │
│ │
│ /Users/foo/work/pipelines/venv/lib/python3.11/site-pac │
│ kages/grpc/_interceptor.py:343 in with_call │
│ │
│ ❱ 343 │ │ return self._with_call( │
│ │
│ /Users/foo/work/pipelines/venv/lib/python3.11/site-pac │
│ kages/grpc/_interceptor.py:332 in _with_call │
│ │
│ ❱ 332 │ │ return call.result(), call │
│ │
│ /Users/foo/work/pipelines/venv/lib/python3.11/site-pac │
│ kages/grpc/_channel.py:437 in result │
│ │
│ ❱ 437 │ │ raise self │
│ │
│ /Users/foo/work/pipelines/venv/lib/python3.11/site-pac │
│ kages/grpc/_interceptor.py:315 in continuation │
│ │
│ ❱ 315 │ │ │ │ response, call = self._thunk(new_method).with_ca │
│ │
│ /Users/foo/work/pipelines/venv/lib/python3.11/site-pac │
│ kages/grpc/_interceptor.py:343 in with_call │
│ │
│ ❱ 343 │ │ return self._with_call( │
│ │
│ /Users/foo/work/pipelines/venv/lib/python3.11/site-pac │
│ kages/grpc/_interceptor.py:332 in _with_call │
│ │
│ ❱ 332 │ │ return call.result(), call │
│ │
│ /Users/foo/work/pipelines/venv/lib/python3.11/site-pac │
│ kages/grpc/_channel.py:437 in result │
│ │
│ ❱ 437 │ │ raise self │
│ │
│ /Users/foo/work/pipelines/venv/lib/python3.11/site-pac │
│ kages/grpc/_interceptor.py:315 in continuation │
│ │
│ ❱ 315 │ │ │ │ response, call = self._thunk(new_method).with_ca │
│ │
│ /Users/foo/work/pipelines/venv/lib/python3.11/site-pac │
│ kages/grpc/_channel.py:1177 in with_call │
│ │
│ ❱ 1177 │ │ return _end_unary_response_blocking(state, call, True, │
│ │
│ /Users/foo/work/pipelines/venv/lib/python3.11/site-pac │
│ kages/grpc/_channel.py:1003 in _end_unary_response_blocking │
│ │
│ ❱ 1003 │ │ raise _InactiveRpcError(state) # pytype: disable=not-i │
╰────────────────────────────────────────────────────────────────────────╯
_InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.INVALID_ARGUMENT
details = "missing project"
debug_error_string = "UNKNOWN:Error received from peer
{created_time:"2024-02-13T165618.227687+05:30", grpc_status:3,
grpc_message:"missing project"}"
The above exception was the direct cause of the following exception:
╭────────────────── Traceback (most recent call last) ───────────────────╮
│ /Users/foo/work/pipelines/flyte/my_workflow/cron.py:21 │
│ in <module> │
│ │
│ ❱ 21 remote.register_launch_plan( │
│ │
│ /Users/foo/work/pipelines/venv/lib/python3.11/site-pac │
│ kages/flytekit/remote/remote.py:974 in register_launch_plan │
│ │
│ ❱ 974 │ │ │ self.client.create_launch_plan(ident, idl_lp.spec) │
│ │
│ /Users/foo/work/pipelines/venv/lib/python3.11/site-pac │
│ kages/flytekit/clients/friendly.py:333 in create_launch_plan │
│ │
│ ❱ 333 │ │ super(SynchronousFlyteClient, self).create_launch_plan( │
│ │
│ /Users/foo/work/pipelines/venv/lib/python3.11/site-pac │
│ kages/flytekit/clients/raw.py:274 in create_launch_plan │
│ │
│ ❱ 274 │ │ return self._stub.CreateLaunchPlan(launch_plan_create_re │
│ │
│ /Users/foo/work/pipelines/venv/lib/python3.11/site-pac │
│ kages/grpc/_interceptor.py:277 in call │
│ │
│ ❱ 277 │ │ response, ignored_call = self._with_call( │
│ │
│ /Users/foo/work/pipelines/venv/lib/python3.11/site-pac │
│ kages/grpc/_interceptor.py:329 in _with_call │
│ │
│ ❱ 329 │ │ call = self._interceptor.intercept_unary_unary( │
│ │
│ /Users/foo/work/pipelines/venv/lib/python3.11/site-pac │
│ kages/flytekit/clients/grpc_utils/wrap_exception_interceptor.py:44 in │
│ intercept_unary_unary │
│ │
│ ❱ 44 │ │ │ │ │ raise e │
│ │
│ /Users/foo/work/pipelines/venv/lib/python3.11/site-pac │
│ kages/flytekit/clients/grpc_utils/wrap_exception_interceptor.py:40 in │
│ intercept_unary_unary │
│ …
flyteorg/flyteacoustic-carpenter-78188
04/23/2024, 11:27 PM