Skip to content

trace_graph fundamentally broken #30

@RobertAgee

Description

@RobertAgee

Basically the title. Even trying to follow a simple example, trace_graph is broken. It calls the assert_valid_to method which doesn't exist in assertions (now replaced by various check_* methods it seems)

huge oversight

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
[/tmp/ipython-input-2-85428747.py](https://localhost:8080/#) in <cell line: 0>()
     17 
     18 ivy_inputs = {k:ivy.asarray(v.numpy()) for k, v in inputs.items()}
---> 19 ivy_bert.trace_graph(kwargs=ivy_inputs)
     20 import jax
     21 import jax.numpy as jnp

1 frames
[/usr/local/lib/python3.11/dist-packages/ivy/stateful/module.py](https://localhost:8080/#) in trace_graph(self, args, kwargs, **trace_kwargs)
    331         fn_to_trace = ivy.default(self._module_graph, self._call)
    332 
--> 333         self._module_graph = ivy.trace_graph(
    334             fn_to_trace, **trace_kwargs, args=args, kwargs=kwargs
    335         )

[/usr/local/lib/python3.11/dist-packages/ivy/tracer/tracer.py](https://localhost:8080/#) in trace_graph(stateful, arg_stateful_idxs, kwarg_stateful_idxs, to, include_generators, array_caching, with_numpy, modes_to_trace, backend_compile, static_argnums, static_argnames, compile_mode, graph_caching, args, kwargs, params_v, v, *objs)
    491     0.0001785755157470703
    492     """
--> 493     assertions.assert_valid_to(to, transpiling=False, is_lazy=args is None and kwargs is None)
    494     assert modes_to_trace in [
    495         "all",

AttributeError: module 'ivy.utils.assertions' has no attribute 'assert_valid_to'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions