Comments (2)
Hi @bhanson-techempower , thanks for reaching us and the detail reproduce function. We just investigated this problem, I'll explain more about this.
Conclusion at first
- Move the 'load_flow' out of @tool function / 2. Use absolute path / 3. Set concurrency to 1, all of them can resolve the problem.
Root cause
- When running the flow, promptflow will change working directory to the flow directory to ensure flow can run successfully with correct imports.
- Nodes without dependencies are executed concurrently.
- In your flow, the 3 nodes didn't depends on each other so they got executed concurrently in one process, which caused the problem when executing to the
load_flow
line, as flow path got wrongly resolved due to cwd changed and effect each other.
Detail about the workaround
- Move the 'load_flow' out of @tool function -- the flow will be loaded when importing file, the cwd not changed at this time so flow can be loaded successfully.
- Use absolute path -- load flow can work well with abs path because cwd will not effect the path anymore.
- Set concurrency to 1 -- the cwd got changed and revert back correctly step by step when concurrency is 1, so load flow can work successfully with correct cwd.
To resolve this problem
To fully resolve this problem, we have to make each node run independently, for example in separate process, I'm afraid it will be a long-term work, I've add the 'long-term' tag and we'll keep this item open for anyone who meet the same problem, this item will be updated if we made changes to related part.
from promptflow.
Also not sure if I should open up another issue, but the example project also shows a bug with the trace viewer. When I open the link provided in the console only the errored cases show up. This is happening every time for me on that project, although I haven't noticed it in our actual applications.
There should be 10 rows here:
We have noticed other subtle bugs with the trace viewer. Sometimes the information displayed in the table format doesn't match the underlying case when you click on it. The same line run might be duplicated a few times and then we need to click into each row to find the actual case we're looking for.
My suspicion is both of these are related to other concurrency issues and not actually a problem with the trace viewer.
from promptflow.
Related Issues (20)
- 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 11
- [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 6
- 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
- [FeatureAsk] Instantiating a model config for Azure OAI using AAD instead of `api_key` HOT 11
- [Contribution Request] Integrate Unify into Promptflow HOT 14
- [Feature Request] HOT 1
- Deployed Endpoint App Insights Not Capturing Full Data [BUG] HOT 1
- Deployed Endpoint - Return Request Id as response so can easily find associated App Insights Data [Feature Request] HOT 1
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.