Hi folks. We’re preparing to upgrade from 0.15.5 t...
# ask-community
m
Hi folks. We’re preparing to upgrade from 0.15.5 to 1.0 (and beyond), and I’m wondering what the intended replacement for
execute_solid
is. Is it
materialize
? Thanks.
s
Hi @Mavi Toktamis-Paker if you have an op defined like
Copy code
@op
def my_op(my_input):
    return my_input + 1
you can just invoke it directly like a python function:
Copy code
my_op(5) == 7
m
Sure — however we were supplying ModeDefinitions inside of execute_solid. What is the 1.0 version of the ModeDefinitions pattern?
s
if you were doing
Copy code
ModeDefinitiom(resource_defs=my_resource_defs)
you can instead do
Copy code
my_op(context=build_op_context(resources=my_resource_defs))
🌈 1
m
I see. We’re also using run_configs; does that mean we have to use
materialize
or
execute_in_process
? Sorry to progressively reveal the portions of our issue, I know that’s annoying. In summary we have `execute_solid`s of the following form:
Copy code
execute_solid(
    my_op,
    input_values=my_dictionary_of_inputs,
    mode_def=my_mode,
    run_config=my_function_to_generate_a_run_config(),
)
s
Build_op_context also accepts config
👀 1
Look for the “testing” page in the docs