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

feat: make tegriddy happy #32

Merged
merged 3 commits into from
Nov 30, 2024
Merged

feat: make tegriddy happy #32

merged 3 commits into from
Nov 30, 2024

Conversation

distributedstatemachine
Copy link
Collaborator

Changes

Added --save-location Flag for Custom Slice Storage Path

  • Introduced --save-location Argument:

    • Added the --save-location flag to the argument parser in both miner.py and validator.py.
      • Allows users to specify a custom directory for saving and loading slice files.
      • If not provided, defaults to the system's temporary directory using tempfile.gettempdir().
  • Updated Neuron Initialization:

    • In the __init__ methods of the Miner and Validator classes:
      • Stored the save_location from the configuration.
      • Ensured the specified directory exists; created it if necessary with os.makedirs.

Benefits of Changes

  • Makes Tegriddy Happy:

Note:

  • Default behavior remains unchanged if --save-location is not specified.
  • Added error handling to manage invalid save_location paths appropriately.
  • Updated documentation to reflect the new --save-location flag.

@distributedstatemachine distributedstatemachine merged commit 5ce9b26 into main Nov 30, 2024
2 checks passed
@distributedstatemachine distributedstatemachine deleted the feat/tegriddy branch November 30, 2024 14:52
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.

1 participant