Hi all! I was wondering if there is a way to acces...
# questions
g
Hi all! I was wondering if there is a way to access the filepath of a dataset in a catalog within a node? I’m trying to integrate YOLOv8 from ultralytics and they require me to input as filepath. i.e., in this function. My attempts so far keeps treating the input_from_catalog as Dict and I am unable to interact with it directly as a dataset object.
Copy code
def sample(input_from_catalog):
input_filepath = input_from_catalog
return input_filepath
h
Someone will reply to you shortly. In the meantime, this might help:
y
Is this thing you’re trying to access within a node static, i.e., known before pipeline run? If so, then the fastest (but not cleanest indeed) solution can be to duplicate this path in
parameters.yml
, and ingest to the node as any other parameter?
n
Not directly. The separation of I/O deliberately avoid using dataset attributes within a node. What does the dataset return? Is it a model object? It may help if you can provide some snippets how are you doing this (without Kedro is fine).