This message was deleted.
# ask-anything
s
This message was deleted.
šŸ‘€ 2
i
This one? https://hydra.cc/docs/intro/. I wonder if other users has the same challenge.
e
I've heard about hydra but never used it. I think we need a bit more info here (hope other people can weigh in). Cause I'm unsure if there's potential for ploomber to improve env.yaml management or it's better to have an integration with Hydra
j
By unwieldy I mean when using complex configs I see I could either: • pass every parameter in
params
in pipeline.yaml • set config as dict and pass it in params, but this makes function signature not reflect what is actually needed
I mean maybe there is some simple middle way - one thing I imagine is to use decorators to validate that configs actually have required keys
I mean this is the "call" side, other side is "define" side, namely specifying stuff in env.yaml
@Ido (Ploomber) yeah that's it
šŸ‘ 1
e
this is great feedback. thanks! I agree with you, when you have tons of parameters passing them one by one is tedious. perhaps something that automatically grabs them would work? this reminds me of pytest fixtures, where you declare function arguments and then pytest passes the appropriate values. for example, if your env has:
Copy code
key: value
another: another-value
final: last-value
and your task:
Copy code
def some_task(key, final):
    passs
ploomber could inspect the function's signature and pass key and final (but not
another
). thoughts? the tradeoff is that the pipeline.yaml is not explicit anymore, since we'd have to dynamically pass the params. it'd look something like this:
Copy code
task:
   - source: functions.some_task
     params: auto # special value to have ploomber inspect the function signature
šŸ‘ 1
j
Hmm that might be useful, but I meant something else - the problem when we have tons of parameters env.yaml gets cluttered and it's harder to manage like hydra configs which can use single file for each config. I actually tried using configs from other files but this has the problem that ploomber does not see when a config gets updated.
Other than that, it might be useful to have something like automatic serialization - I've experimented with decorator that converts specified argument to a specified dataclass - but I ran into problems with using decorated functions with ploomber
e
I actually tried using configs from other files but this has the problem that ploomber does not see when a config gets updated.
you mean using configs for third party libraries? like you use hydra, and change the config but ploomber won't detect the changes?
Other than that, it might be useful to have something like automatic serialization
we have serialization of products. is this what you're looking for? https://docs.ploomber.io/en/latest/user-guide/serialization.html
if you have some ideas on how to unclutter env.yamls, I'm all ears šŸ™‚
j
Wow, that's not what I meant, but it's really great to know this šŸ˜„
šŸ‘ 1
By multiple configs I mean that let's say I have a MaskRCNN that has some config from other project with 20 fields. Currently the way to pass these parameters to ploomber is either • load config file in task, for example pass path to this config as parameter • pass parameters explicitly to env.yaml or pipeline.yaml
The problem with first approach is that someone can then change the config and pipeline doesn't recognize this happened.
The second one is obviously cumbersome
e
aaah. i got it now. are you passing configs from other projects because they're not written with ploomber? you can use
resources_
for this: you can pass a path to a file and ploomber will look for changes there to re-run a task. the path is also accessible to the task so you can use it for loading the config https://docs.ploomber.io/en/latest/api/spec.html#tasks-params-resources