Skip to content

Conversation

@k8culver
Copy link
Collaborator

  • Fixed command line runs
  • Renamed a bunch of stuff from job shop to flow shop
  • Made NL default for command line runs
  • Added print statements to command line runs to clarify solver use

@k8culver k8culver requested a review from thisac August 28, 2025 22:31
Comment on lines 9 to 10
sys.path.append("./src")
from model_data import JobShopData
from model_data import FlowShopData
Copy link
Contributor

@randomir randomir Aug 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps out of scope for this PR, but manual python path tweaks like this are extremely finicky and fragile. In the example above, src is added to the lookup path, but relative to cwd! So, the python interpreter will fail to find src when directory changes.

You can either anchor it relative to __file__, or better yet, convert src to a "package", since you're already treating it like that -- so, just add __init__.py to src and src/utils. The relative imports will also work:

from .model_data import FlowShopData

For max reliability you could also create a real package under e.g. src/flow_shop_utils, and then install it as part of requirements:

-e src/flow_shop_utils

That way it's available for import from anywhere.

Btw, I used the latter approach in https://github.com/dwave-examples/mvrp-demo/ (as it required cythonization and compilation).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Rad! In the other demos I've been using from src.file_name is this ok or would you prefer one of the solutions above?

@k8culver k8culver requested a review from randomir September 2, 2025 18:34
@k8culver k8culver requested a review from thisac October 23, 2025 23:37
Copy link
Contributor

@thisac thisac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @k8culver!

@k8culver k8culver merged commit b8c4844 into main Oct 28, 2025
@k8culver k8culver deleted the fix/command-line-runs branch October 28, 2025 22:08
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.

3 participants