King Chung Huang
07/24/2019, 9:04 PMhello_dag.py
example, how do I see the output from the solids? For example, I'm expecting solid_two
to output foo foo
. But, I don't see that in the output.
/project/src # dagster pipeline execute -f hello_dag.py -n hello_dag_pipeline
2019-07-24 21:01:09 - dagster - INFO -
orig_message = "Solid 'solid_one' emitted output 'result'"
log_message_id = "f2bb6fbc-8eb6-49bf-8893-7164481139b6"
log_timestamp = "2019-07-24T21:01:09.704841"
run_id = "b49ee030-d8ee-46eb-97b8-9c1aa176a41a"
pipeline = "hello_dag_pipeline"
execution_epoch_time = 1564002069.697249
step_key = "solid_one.compute"
solid = "solid_one"
solid_definition = "solid_one"
2019-07-24 21:01:09 - dagster - INFO -
orig_message = "Solid 'solid_two' emitted output 'result'"
log_message_id = "77559bfb-7390-4831-8ba0-ec152dfd7323"
log_timestamp = "2019-07-24T21:01:09.706621"
run_id = "b49ee030-d8ee-46eb-97b8-9c1aa176a41a"
pipeline = "hello_dag_pipeline"
execution_epoch_time = 1564002069.697249
step_key = "solid_two.compute"
solid = "solid_two"
solid_definition = "solid_two"
schrockn
07/24/2019, 9:07 PMrepr
to report values, but that actually was prohibitively slow for libraries such as Pandas. We’re also concerned about users leaking potentially sensitive information in logs. One can access the output values from the return value of execute_pipeline if you are using the python API.schrockn
07/24/2019, 9:08 PMKing Chung Huang
07/24/2019, 9:08 PMschrockn
07/24/2019, 9:08 PMKing Chung Huang
07/24/2019, 9:09 PMKing Chung Huang
07/24/2019, 9:10 PMschrockn
07/24/2019, 9:10 PMKing Chung Huang
07/24/2019, 9:11 PMschrockn
07/24/2019, 9:12 PMstorage:
filesystem:
schrockn
07/24/2019, 9:12 PMschrockn
07/24/2019, 9:12 PMschrockn
07/24/2019, 9:18 PMdagster/examples/dagster_examples/intro_tutorial
to load itschrockn
07/24/2019, 9:19 PMschrockn
07/24/2019, 9:19 PMKing Chung Huang
07/24/2019, 9:19 PMschrockn
07/24/2019, 9:20 PMschrockn
07/24/2019, 9:21 PMKing Chung Huang
07/24/2019, 9:21 PMKing Chung Huang
07/24/2019, 9:21 PMschrockn
07/24/2019, 9:22 PMKing Chung Huang
07/24/2019, 9:24 PMKing Chung Huang
07/25/2019, 3:02 PMtokens
right now. Can I log the tokens directly from the pipeline?
@solid
def print_tokens(context, tokens):
<http://context.log.info|context.log.info>(str(tokens))
return tokens
@pipeline
def test_tokenize():
tokens = tokenize()
print_tokens(tokens)
alex
07/25/2019, 3:06 PM@pipeline
decorated functions are only evaluated at init time and just used to determine the dependency graph of the pipeline.alex
07/25/2019, 3:08 PM@solid
/ @lambda_solid
functions are evaluated during execution, so if you want do do some logging it will have to happen therealex
07/25/2019, 3:08 PMKing Chung Huang
07/25/2019, 3:10 PMKing Chung Huang
07/25/2019, 7:58 PMcomposite_solid
that uses another solid and sets a config value in it. In this code snippet, the prefix_value
solid prefixes the input value with the prefix
from the config. Then, the prefix_id
composite solid uses prefix_value
but sets the prefix to _id_
.
@solid(
config={
'prefix': Field(str, default_value='_')
}
)
def prefix_value(context, v):
return f'{context.solid_config["prefix"]}{v}'
@composite_solid(
config_fn=lambda _, cfg: {
'prefix_value': {'config': {'prefix': '_id_'}},
},
config={},
)
def prefix_id(id):
return prefix_value(id)
I'm getting dagster.check.CheckError: Invariant failed. Description: Cannot specify empty config for ConfigMapping
. But, I'm not sure how to solve it. Is this a correct way for a solid to use another solid with a custom config?user
07/25/2019, 9:50 PMsashank
07/25/2019, 9:57 PM