Comments (7)
Added a long-term tag for this. I have a proposal to introduce a code
field to flow's YAML. If user need to import outside of current working directory. They can set flow's code
to base folder.
For example, a project organized like this
src/
common/
flow1/
flow2/
The flow1
and flow2
can set code
in flow YAML like this
code: path/to/src
But, you'll need to use absolute import like this
from common import xxx
instead of relative import like this
from .. import xxx
since we used multi-processing to execute flow and relative import may fail to find it's parent package.
from promptflow.
Hi @pamelafox , in our concept, flow should be self-contained. Which makes it easier to build flow snapshot and share from local to cloud. When flow has relative external imports, we could not build snapshot for it. But we can improve the error message to make it more friendly to customer.
from promptflow.
Hi, we're sending this friendly reminder because we haven't heard back from you in 30 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 7 days of this comment, the issue will be automatically closed. Thank you!
from promptflow.
I think promptflow should be able to work with files that import other files, as most developers use modules in order to improve code reusability. If I can't bring in any other files, then I will have to needlessly repeat common code across parts of my codebase.
from promptflow.
blocked on the same issue.
from promptflow.
I'm blocked on this issue as well with 2 flows in the same project, both flows required shared code logic, and the VS Code extension were not able to import shared modules as Python nodes/tools.
Restructuring the project only works when just one flow at the root level.
from promptflow.
@MingStar , since it's currently prompt flow's by design behavior. A workaround would be put both of the flow files in root level like this. Let me know if it helps.
lib/
flow1/
flow2/
flow1.dag.yaml
flow2.dag.yaml
from promptflow.
Related Issues (20)
- [Contribution Request] Correcting some small English grammar mistakes HOT 1
- [Feature Request] Visualizing the evaluations should look different from the promptflow traces, should provide some kind of data visualization HOT 6
- [BUG] [VSCode Extension] Not able to import modules outside of the flow directory HOT 7
- [BUG] KeyError thrown due to environment variables not persisting when calling the promptflow endpoint
- Support remote tracing for CMK-enabled ML workspaces HOT 1
- [BUG]calling pf_client.run inside the callable target function for evaluate got "Error: (AssertionError) daemonic processes are not allowed to have children." HOT 2
- Lisence issue for the dependency on docutils(GPL 3.0) HOT 4
- [BUG] ValueError: Missing required inputs for target : ['question'] while using evalutor_config HOT 3
- [Performance] how to disable all dump, for ex. _node_run_postprocess in run_tracker.py HOT 1
- [BUG] Evaluator respond with Nan values as the first token is a text HOT 1
- [Feature Request] pass addition inputs to target function when using the evaluate method HOT 2
- [Feature Request] Have option to return trace as part of out put of a PromptFlow when deployed as endpoint HOT 12
- [BUG] Running evaluate from promptflow.evals.evaluate and setting trace.destination="none" or "local" causes evaluations to not be available HOT 1
- [BUG] prompt eval method does not take credential and creates PFClient without passing in credential HOT 1
- [BUG] Tracing Contextvar reset HOT 10
- Failed to load trace[BUG] HOT 3
- [BUG] Flow is not enabled HOT 1
- [BUG]evaluator keeps failing with promptflow-eval 0.3.1 but works with 0.3.0 HOT 3
- [BUG] Race condition with global state in process pool HOT 2
- [FeatureAsk] Instantiating a model config for Azure OAI using AAD instead of `api_key` HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from promptflow.