Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix relative path issue for possion. #234

Merged
merged 2 commits into from
Feb 14, 2025

Conversation

letonghan
Copy link
Contributor

Description

The poisson_load_shape.py file was located using relative path, refined to absolute path now so that outer files can call this function correctly.

Issues

Found this issue in PR: opea-project/GenAIExamples#1531

Type of change

List the type of change like below. Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Dependencies

None

Tests

Local tested

The poisson_load_shape.py file was located using relative path, refined
to absolute path now so that outer files can call this function
correctly.

Found this issue in PR: opea-project/GenAIExamples#1531

Signed-off-by: letonghan <[email protected]>
@chensuyue chensuyue changed the title Fix relative path issue for poisson. Fix relative path issue for possion. Feb 14, 2025
@chensuyue chensuyue merged commit 3b9981a into opea-project:main Feb 14, 2025
7 checks passed
@mkbhanda
Copy link

@letonghan it looks like you have an extra os.path.dirname, though it is not harmful
f_custom_load_shape = os.path.join(
os.path.dirname(os.path.abspath(file)), f"locust/{load_shape}_load_shape.py"
)

and we are not coding for windows, but if we where that f"locust/" would give us trouble! Would need to use os.path.join to concatenate it correctly.

@letonghan
Copy link
Contributor Author

@letonghan it looks like you have an extra os.path.dirname, though it is not harmful f_custom_load_shape = os.path.join( os.path.dirname(os.path.abspath(file)), f"locust/{load_shape}_load_shape.py" )

and we are not coding for windows, but if we where that f"locust/" would give us trouble! Would need to use os.path.join to concatenate it correctly.

Hi, here need exactly two os.path.dirname to locate the folder stresscli.
The path join part is a good point, will update it later!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants