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

adding catalogs to README.md #3

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
restore lost file
  • Loading branch information
smellycloud committed Jan 3, 2025
commit 6875570552c7cc58222f5c0611738275184a049b
34 changes: 34 additions & 0 deletions models/plastic_beach/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import wandb
import warnings
from pathlib import Path
from views_pipeline_core.cli.utils import parse_args, validate_arguments
from views_pipeline_core.managers.log import LoggingManager
from views_pipeline_core.managers.model import ModelPathManager
from views_stepshifter.manager.stepshifter_manager import StepshifterManager

warnings.filterwarnings("ignore")

try:
model_path = ModelPathManager(Path(__file__))
logger = LoggingManager(model_path).get_logger()
except FileNotFoundError as fnf_error:
raise RuntimeError(
f"File not found: {fnf_error}. Check the file path and try again."
)
except PermissionError as perm_error:
raise RuntimeError(
f"Permission denied: {perm_error}. Check your permissions and try again."
)
except Exception as e:
raise RuntimeError(f"Unexpected error: {e}. Check the logs for details.")


if __name__ == "__main__":
wandb.login()
args = parse_args()
validate_arguments(args)

if args.sweep:
StepshifterManager(model_path=model_path).execute_sweep_run(args)
else:
StepshifterManager(model_path=model_path, wandb_notification=False).execute_single_run(args)