Skip to content

Commit

Permalink
Merge branch 'fix-escort-sharrow' into preview
Browse files Browse the repository at this point in the history
# Conflicts:
#	activitysim/core/interaction_simulate.py
  • Loading branch information
jpn-- committed Apr 18, 2024
2 parents c88ff5b + 13f950b commit fbe6c83
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
1 change: 1 addition & 0 deletions activitysim/abm/models/transit_pass_subsidy.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def transit_pass_subsidy(
trace_label=trace_label,
trace_choice_name="transit_pass_subsidy",
estimator=estimator,
compute_settings=model_settings.compute_settings,
)

if estimator:
Expand Down
4 changes: 2 additions & 2 deletions activitysim/abm/models/trip_departure_choice.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from activitysim.core.configuration.base import (
ComputeSettings,
PreprocessorSettings,
PydanticSharrow,
PydanticCompute,
)
from activitysim.core.skim_dataset import SkimDataset
from activitysim.core.skim_dictionary import SkimDict
Expand Down Expand Up @@ -501,7 +501,7 @@ def apply_stage_two_model(
return trips["depart"].astype(int)


class TripDepartureChoiceSettings(PydanticSharrow, extra="forbid"):
class TripDepartureChoiceSettings(PydanticCompute, extra="forbid"):
"""
Settings for the `trip_departure_choice` component.
"""
Expand Down
2 changes: 1 addition & 1 deletion activitysim/core/configuration/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def subcomponent_settings(self, subcomponent: str) -> ComputeSettings:
)


class PydanticSharrow(PydanticReadable):
class PydanticCompute(PydanticReadable):
"""Base class for component settings that include optional sharrow controls."""

compute_settings: ComputeSettings = ComputeSettings()
Expand Down
4 changes: 2 additions & 2 deletions activitysim/core/configuration/logit.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from pydantic import BaseModel as PydanticBase
from pydantic import model_validator, validator

from activitysim.core.configuration.base import PreprocessorSettings, PydanticSharrow
from activitysim.core.configuration.base import PreprocessorSettings, PydanticCompute


class LogitNestSpec(PydanticBase):
Expand Down Expand Up @@ -45,7 +45,7 @@ def prefer_float_to_str(cls, coefficient_value):
return coefficient_value


class BaseLogitComponentSettings(PydanticSharrow):
class BaseLogitComponentSettings(PydanticCompute):
"""
Base configuration class for components that are logit models.
Expand Down
6 changes: 0 additions & 6 deletions activitysim/core/interaction_simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,6 @@ def eval_interaction_utilities(
if compute_settings.sharrow_skip:
sharrow_enabled = False

# if locals_d is not None and locals_d.get("_sharrow_skip", False):
# sharrow_enabled = False

# if trace_label.startswith("trip_destination"):
# sharrow_enabled = False

logger.info(f"{trace_label} sharrow_enabled is {sharrow_enabled}")

trace_eval_results = None
Expand Down

0 comments on commit fbe6c83

Please sign in to comment.