Skip to content

Commit

Permalink
Convergence plots and other fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
atharva-2001 committed Jan 1, 2025
1 parent 82bd57a commit d2f3bdd
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tardis/visualization/tools/convergence_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
# Added the below as a (temporary) workaround to the latex
# labels on the convergence plots not rendering correctly.
import plotly
from IPython.display import display, HTML
# from IPython.display import display, HTML

plotly.offline.init_notebook_mode()
display(HTML(
'<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_SVG"></script>'
))
# plotly.offline.init_notebook_mode()
# display(HTML(
# '<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_SVG"></script>'
# ))


def transition_colors(length, name="jet"):
Expand Down
35 changes: 35 additions & 0 deletions tardis/workflows/standard_workflow_runnner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import os
# import sys
# print(f"Working Directory: {os.getcwd()}")
# print(f"PYTHONPATH: {sys.path}")
# print(f"Environment: {dict(os.environ)}")
import time
# time.sleep(10)

from tardis.io.configuration.config_reader import Configuration
from tardis.workflows.standard_tardis_workflow import StandardTARDISWorkflow


yaml_file_path = '/Users/atharva/workspace/code/tardis-main/tardis/docs/tardis_example.yml'
print(f"Current working directory: {os.getcwd()}")
print(f"About to load YAML config from: {yaml_file_path}") # If yaml_file_path exists


# Create configuration from YAML file
config = Configuration.from_yaml(
yaml_file_path
)

# Set debug configuration
config.debug = {}
config.debug.log_level = "WARNING"
config.debug.specific_log_level = "WARNING"

# Initialize and run workflow
workflow = StandardTARDISWorkflow(
config,
show_convergence_plots=False,
show_progress_bars=False,
convergence_plots_kwargs={"export_convergence_plots": True}
)
workflow.run()

0 comments on commit d2f3bdd

Please sign in to comment.