Skip to content

Commit

Permalink
[PromptFlow] Move import to the head of the file to avoid package ref…
Browse files Browse the repository at this point in the history
…erences. (#349)

# Description

Move import to the head of the file to avoid package references.

# All Promptflow Contribution checklist:
- [x] **The pull request does not introduce [breaking changes]**
- [ ] **CHANGELOG is updated for new features, bug fixes or other
significant changes.**
- [ ] **I have read the [contribution guidelines](../CONTRIBUTING.md).**

## General Guidelines and Best Practices
- [ ] Title of the pull request is clear and informative.
- [ ] There are a small number of commits, each of which have an
informative message. This means that previously merged commits do not
appear in the history of the PR. For more information on cleaning up the
commits in your PR, [see this
page](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md).

### Testing Guidelines
- [ ] Pull request includes test coverage for the included changes.
  • Loading branch information
Hhhilulu authored Sep 8, 2023
1 parent b02229a commit cd2291e
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import contextvars
import multiprocessing
import queue
import math
import os
import psutil
from datetime import datetime
from functools import partial
from logging import INFO
Expand Down Expand Up @@ -363,11 +366,6 @@ def create_executor_legacy(*, flow, connections, loaded_tools, cache_manager, st


def get_available_max_worker_count():
import math
import os

import psutil

pid = os.getpid()
mem_info = psutil.virtual_memory()
total_memory = mem_info.total / (1024 * 1024) # in MB
Expand Down

0 comments on commit cd2291e

Please sign in to comment.