Skip to content

Commit

Permalink
fix commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lalala123123 committed Apr 12, 2024
1 parent c3aa77a commit d8220d0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

from promptflow._constants import FlowLanguage, FlowType
from promptflow._sdk._constants import REMOTE_URI_PREFIX, ContextAttributeKey, FlowRunProperties
from promptflow._sdk._utils import get_flow_name
from promptflow._sdk.entities._flows import Flow, Prompty
from promptflow._sdk.entities._run import Run
from promptflow._sdk.operations._local_storage_operations import LocalStorageOperations
Expand Down Expand Up @@ -91,7 +90,7 @@ def _run_bulk(self, run: Run, stream=False, **kwargs):
logger.debug("start trace for flow run...")
if is_collection_writeable():
logger.debug("trace collection is writeable, will use flow name as collection...")
collection_for_run = get_flow_name(run.flow)
collection_for_run = run._flow_name
logger.debug("collection for run: %s", collection_for_run)
# pass with internal parameter `_collection`
start_trace(attributes=attributes, run=run.name, _collection=collection_for_run)
Expand Down
5 changes: 4 additions & 1 deletion src/promptflow-devkit/promptflow/_sdk/entities/_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,10 @@ def __init__(
self._output_path = Path(
kwargs.get("output_path", self._generate_output_path(config=kwargs.get("config", None)))
)
self._flow_name = flow_dir.name
if is_prompty_flow(self.flow):
self._flow_name = Path(self.flow).stem
else:
self._flow_name = flow_dir.name
elif self._run_source == RunInfoSources.INDEX_SERVICE:
self._metrics = kwargs.get("metrics", {})
self._experiment_name = experiment_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,5 @@
'53f3e92d1fedad20dbdb333cbfecc9e05e88e482', (335360, 5192)
'b1939e95969d999dc1222987f873ffc71abc7ced', (346624, 5117)
'73a921e88b3a461b959e73609c3a842ec4ff28b8', (351744, 5240)
'1bf63409ed71dd20a27cbfc22daa40a520247e15', (357376, 2372)
'40930dde90321f7d2c74eb2507f82c74bc6112d9', (359936, 2377)
Binary file modified src/promptflow-recording/recordings/local/node_cache.shelve.dat
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,5 @@
'53f3e92d1fedad20dbdb333cbfecc9e05e88e482', (335360, 5192)
'b1939e95969d999dc1222987f873ffc71abc7ced', (346624, 5117)
'73a921e88b3a461b959e73609c3a842ec4ff28b8', (351744, 5240)
'1bf63409ed71dd20a27cbfc22daa40a520247e15', (357376, 2372)
'40930dde90321f7d2c74eb2507f82c74bc6112d9', (359936, 2377)

0 comments on commit d8220d0

Please sign in to comment.