This message was deleted.
# ask-anything
s
This message was deleted.
e
I see two options here, one is to put
analyze_data.ipynb
twice in your `pipeline.yaml`(but with different names, example
name: analyze_data_a
and
name: analyze_data_b
) and put different parameters to each task. then, you can execute selectively with
ploomber build --partially analyze_data_a
the second option is to have a single instance of
analyze_data.ipynb
, you can use an
env.yaml
to parametrize the pipeline and then you can switch the parameters at runtime:
ploomber build --env-parameter some-value
. Ploomber automatically exposes all the values in the
env.yaml
in the CLI, you can see them if you do
ploomber build --help
Do any of these options solve the issue?
j
The first one is what I have working right now, but partial building helps some. I like writing code interactively (for better or for worse). Will the partial build leave the filled/injected parameters in place so that I can go through and run all the cells/inspect the results myself?
(i can also just run off and test that it does lol)
e
Will the partial build leave the filled/injected parameters in place so that I can go through and run all the cells/inspect the results myself?
are you referring to the execute notebook (the one that appears in the product section)? If so, yes. the output notebook will contain the injected parameters
j
What about the input/source notebook? I work mooostly with R/.rmds so it’d be nice if the injected parameters persist there
e
Ah, in that case. you can manually inject the parameters to the source with
ploomber nb --inject
, but you suggested that before. so maybe im not following (?)
j
right! heres a snippit of a pipeline I’m working on… so
compare-adultsVsChildren
and
compare-semcor
both use the same underlying R script
compare_models.R
(with a
name:
argument in the yaml). I’ve parameterized them so that they take in either
adultsVsChildren
or
semcor
and each target has different upstream tasks (for their different datasets). But right now, when I
ploomber nb --inject
I only see the parameters/upstream paths for
compare-semcor
. I’d like to be able to ask ploomber to inject the parameters for
compare-adultsVsChildren
instead if I want to interact with that dataset in R instead… any ideas?
these days I’ve been going in and commenting out the other targets that use that script so that it only injects the parameters for the target I want to interact with, but that feels pretty messy
e
ah. got it! so the problem is that
compare_models.R
appears once in the pipeline. so only the first parameter is injected. We don't have a way to easily achieve what you want, unfortunately, but I think we should. Let me open a PR to describe your problem and get your feedback. it won't be difficult to implement 🙂
j
Alright! Yeah, I’d love to be able to inject the parameters for a specific target I think that’d get to the root of it for me. Thanks!
e