diff --git a/genc/__init__.py b/genc/__init__.py index 36a1e0f..73269d1 100644 --- a/genc/__init__.py +++ b/genc/__init__.py @@ -20,4 +20,4 @@ from genc.python import runtime # pylint: enable=g-importing-member -del python # pylint: disable=undefined-variable +del python # pylint: disable=undefined-variable # pyrefly: ignore[unbound-name] diff --git a/genc/python/authoring/tracing_decorator.py b/genc/python/authoring/tracing_decorator.py index 40df538..ffe0a63 100644 --- a/genc/python/authoring/tracing_decorator.py +++ b/genc/python/authoring/tracing_decorator.py @@ -61,7 +61,7 @@ def traced_computation(fn): local=[ pb.Block.Local(name=k, value=v) for k, v in my_locals.items() ], - result=result, + result=result, # pyrefly: ignore[bad-argument-type] ) ) portable_ir = constructor_bindings.create_lambda('arg', result) diff --git a/genc/python/examples/confidential_computing/client.py b/genc/python/examples/confidential_computing/client.py index 9d0d38e..595690f 100644 --- a/genc/python/examples/confidential_computing/client.py +++ b/genc/python/examples/confidential_computing/client.py @@ -36,8 +36,8 @@ def main(argv: Sequence[str]) -> None: # Computation to be executed in a secure enclave on Confidential Computing. @genc.authoring.traced_computation def foo(x): - prompt_template = genc.authoring.prompt_template["Tell me about {topic}"] - model_inference = genc.authoring.model_inference_with_config[{ + prompt_template = genc.authoring.prompt_template["Tell me about {topic}"] # pyrefly: ignore[missing-attribute] + model_inference = genc.authoring.model_inference_with_config[{ # pyrefly: ignore[missing-attribute] "model_uri": "/device/gemma", "model_config": {"model_path": "/gemma-2b-it-q4_k_m.gguf"}}] return model_inference(prompt_template(x)) @@ -46,7 +46,7 @@ def foo(x): @genc.authoring.traced_computation def bar(x): backend = {"server_address": ADDRESS.value, "image_digest": DIGEST.value} - return genc.authoring.confidential_computation[foo, backend](x) + return genc.authoring.confidential_computation[foo, backend](x) # pyrefly: ignore[missing-attribute] result = bar("scuba diving") print(result) diff --git a/genc/python/examples/openai_demo.py b/genc/python/examples/openai_demo.py index 83c1790..5e2a13f 100644 --- a/genc/python/examples/openai_demo.py +++ b/genc/python/examples/openai_demo.py @@ -47,6 +47,7 @@ def main(argv: Sequence[str]) -> None: request = pb.Value() request.str = ( + # pyrefly: ignore[bad-assignment] b'{"model": "gpt-3.5-turbo", "messages": [{"role": "user", "content":' b' "Can you help me know things to do in San Fransisco"}]}' ) diff --git a/genc/python/interop/langchain/custom_agent.py b/genc/python/interop/langchain/custom_agent.py index eb7a9c1..1ad1378 100644 --- a/genc/python/interop/langchain/custom_agent.py +++ b/genc/python/interop/langchain/custom_agent.py @@ -35,7 +35,7 @@ class CustomAgent(langchain.agents.agent.Agent): """The output parser to use in the agent.""" # Part of Langchain's Agent API. - allowed_tools: List[str] = None + allowed_tools: List[str] = None # pyrefly: ignore[bad-assignment] """The names of the tools that are allowed to be used.""" # List of tools to use with this Agent. @@ -85,7 +85,7 @@ def _validate_tools(cls, tools: Sequence[Any]) -> None: """Validate that appropriate tools are passed in.""" pass - @pydantic_v1.root_validator() - def validate_prompt(cls, values: Dict[Any, Any]) -> Dict[Any, Any]: # pylint: disable=no-self-argument + @pydantic_v1.root_validator() # pyrefly: ignore[no-matching-overload] + def validate_prompt(cls, values: Dict[Any, Any]) -> Dict[Any, Any]: # pylint: disable=no-self-argument # pyrefly: ignore[bad-override] """Validate that prompt matches format.""" return values