Title: Dynamically dispatch function but do not print result · Issue #231 · google/python-fire · GitHub
Open Graph Title: Dynamically dispatch function but do not print result · Issue #231 · google/python-fire
X Title: Dynamically dispatch function but do not print result · Issue #231 · google/python-fire
Description: Can Fire be used to dynamically dispatch a function as in the dict example but without printing the result? I would like to do something with the return value, for instance: if __name__ == "__main__": # inception and exception are functi...
Open Graph Description: Can Fire be used to dynamically dispatch a function as in the dict example but without printing the result? I would like to do something with the return value, for instance: if __name__ == "__main_...
X Description: Can Fire be used to dynamically dispatch a function as in the dict example but without printing the result? I would like to do something with the return value, for instance: if __name__ == "__...
Opengraph URL: https://github.com/google/python-fire/issues/231
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Dynamically dispatch function but do not print result","articleBody":"Can Fire be used to dynamically dispatch a function as in the dict example but without printing the result? I would like to do something with the return value, for instance:\r\n\r\n```\r\nif __name__ == \"__main__\":\r\n # inception and exception are functions that return keras models, \r\n # each having its own parameters \r\n ret = Fire.Fire({'inception': inception,\r\n 'xception': xception})\r\n\r\n # do something with ret\r\n```\r\n\r\nIf I try to run the previous code, for instance:\r\n \r\n python ./train.py inception 100 100 10\r\n\r\nI get the following error:\r\n\r\n```\r\nERROR: The function received no value for the required argument: inputs\r\n2020-03-03 16:30:13.774542: W tensorflow/python/util/util.cc:319] Sets are not currently considered sequences, but this may change in the future, so consider avoiding using them.\r\nUsage: train.py inception 100 100 10 - \u003cgroup|command|value> | --inputs=INPUTS \u003cflags> [ARGS]...\r\n available groups: inbound_nodes | input | input_names | input_shape |\r\n inputs | layers | losses | metrics | metrics_names |\r\n non_trainable_variables | non_trainable_weights |\r\n outbound_nodes | output | output_names |\r\n output_shape | outputs | state_updates | submodules |\r\n trainable_variables | trainable_weights | updates |\r\n variables | weights\r\n available commands: add_loss | add_metric | add_update | add_variable |\r\n add_weight | apply | build | call | compile |\r\n compute_mask | compute_output_shape |\r\n compute_output_signature | count_params | evaluate |\r\n evaluate_generator | fit | fit_generator |\r\n from_config | get_config | get_input_at |\r\n get_input_mask_at | get_input_shape_at | get_layer |\r\n get_losses_for | get_output_at | get_output_mask_at |\r\n get_output_shape_at | get_updates_for | get_weights |\r\n load_weights | name_scope | predict |\r\n predict_generator | predict_on_batch | reset_metrics |\r\n reset_states | save | save_weights | set_weights |\r\n summary | test_on_batch | to_json | to_yaml |\r\n train_on_batch | with_name_scope\r\n available values: activity_regularizer | built | dtype | dynamic |\r\n input_mask | input_spec | name | optimizer |\r\n output_mask | run_eagerly | stateful |\r\n supports_masking | trainable\r\n flags are accepted\r\n\r\nFor detailed information on this command, run:\r\n train.py inception 100 100 10 - -- --help`\r\n```","author":{"url":"https://github.com/albertotb","@type":"Person","name":"albertotb"},"datePublished":"2020-03-03T16:08:27Z","url":"https://github.com/google/python-fire/issues/231"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:af45051f-49ae-97a2-7153-cc7a0a74b853 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E510:30263F:15C141F:1D3A9BD:6AFFE3DD |
| html-safe-nonce | 702cba2e3f590947c5dab8aaf036684d07017b70d7f7bf05cd3d5f4a705e48b4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTEwOjMwMjYzRjoxNUMxNDFGOjFEM0E5QkQ6NkFGRkUzREQiLCJ2aXNpdG9yX2lkIjoiNjgzMDY1MjIwNDc5NDI0MjAxNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 271d9fcbf183c8ac1d34f795ee62159dc9b56b7b1192c052d78ea7e646e4aa99 |
| hovercard-subject-tag | issue:574775368 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/google/python-fire/231/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a8bf6efcb13227493161569b13a266e3eef019066ae5d537b542cd1d5cb95baf/google/python-fire/issues/231 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a8bf6efcb13227493161569b13a266e3eef019066ae5d537b542cd1d5cb95baf/google/python-fire/issues/231 |
| og:image:alt | Can Fire be used to dynamically dispatch a function as in the dict example but without printing the result? I would like to do something with the return value, for instance: if __name__ == "__main_... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | albertotb |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729 |
| turbo-cache-control | no-preview |
| go-import | github.com/google/python-fire git https://github.com/google/python-fire.git |
| octolytics-dimension-user_id | 1342004 |
| octolytics-dimension-user_login | |
| octolytics-dimension-repository_id | 82729529 |
| octolytics-dimension-repository_nwo | google/python-fire |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 82729529 |
| octolytics-dimension-repository_network_root_nwo | google/python-fire |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 16a11879678aaf97e2a42c33ee70830aa084fa37 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width